Module: Cadenya::Types

Defined in:
lib/cadenya/types.rb

Defined Under Namespace

Classes: AIProviderConfig_Openai, AIProviderConfig_OpenaiCompatible, AIProviderConfig_Openrouter, AIProviderCredential_ApiKey, AIProviderCredential_Headers, AIProviderKey, AIProviderKeyInfo, AIProviderKeySpec, APIKey, APIKeyInfo, APIKeySpec, Account, AccountInfo, AccountResourceMetadata, AccountSpec, AddAgentVariationAssignmentRequest_SubAgentId, AddAgentVariationAssignmentRequest_ToolId, AddAgentVariationAssignmentRequest_ToolSetId, AddAgentVariationMemoryLayerRequest, AddWorkspaceMemberRequest, Agent, AgentInfo, AgentSchedule, AgentScheduleInfo, AgentScheduleSpec, AgentScheduleSpec_Schedule, AgentSpec, AgentVariation, AgentVariationInfo, AgentVariationSpec, AgentVariationSpec_CompactionConfig, AgentVariationSpec_Constraints, AgentVariationSpec_ModelConfig, AgentVariationSpec_ProgressiveDiscovery, ApproveToolCallRequest, ArchiveAgentRequest, ArchiveAgentScheduleRequest, ArchiveToolSetRequest, ArchiveWidgetRequest, AssistantMessage, AssistantToolCall, BareMetadata, CallableTool_Agent, CallableTool_CadenyaProvidedTool, CallableTool_Tool, CancelObjectiveRequest, Capability_Caching, Capability_MaxOutputTokens, Capability_Reasoning, Capability_StopSequences, Capability_Temperature, Capability_TopK, Capability_TopP, CompactObjectiveRequest, CompactObjectiveResponse, CompactionConfig_SummarizationStrategy, CompactionConfig_ToolResultClearingStrategy, Config_Bare, Config_HTTP, Config_MCP, Config_OpenAPI, ContextLengths, ContextWindowCompacted, ContinueObjectiveRequest, CreateAIProviderKeyRequest, CreateAPIKeyRequest, CreateAccountResourceMetadata, CreateAgentRequest, CreateAgentScheduleRequest, CreateAgentVariationRequest, CreateMemoryEntryRequest, CreateMemoryLayerRequest, CreateObjectiveFeedbackRequest, CreateObjectiveRequest, CreateObjectiveRequest_Secret, CreateOperationMetadata, CreateResourceMetadata, CreateToolRequest, CreateToolSetRequest, CreateToolSetSecretRequest, CreateUploadRequest, CreateWidgetRequest, CreateWidgetSessionRequest, CreateWidgetSessionRequest_Secret, CreateWorkspaceRequest, CreateWorkspaceSecretRequest, CredentialAPIKey, CredentialHeaders, DeleteTenantWidgetSessionsResponse, DenyToolCallRequest, DisableAPIKeyRequest, DisableModelRequest, EnableAPIKeyRequest, EnableModelRequest, GetObjectiveDiagnosticsResponse, GetToolSetOpenAPISpecResponse, GoogleProtobufAny, ListAIProviderKeysResponse, ListAPIKeysResponse, ListAccountWorkspacesResponse, ListAgentFeedbackResponse, ListAgentSchedulesResponse, ListAgentVariationsResponse, ListAgentWebhookDeliveriesResponse, ListAgentsResponse, ListMemoryEntriesResponse, ListMemoryLayersResponse, ListModelsResponse, ListObjectiveContextWindowsResponse, ListObjectiveEventsResponse, ListObjectiveFeedbackResponse, ListObjectiveTasksResponse, ListObjectiveToolCallsResponse, ListObjectiveToolsResponse, ListObjectivesResponse, ListProfilesResponse, ListTenantSubjectsResponse, ListTenantsResponse, ListToolSetEventsResponse, ListToolSetSecretsResponse, ListToolSetUsageResponse, ListToolSetsResponse, ListToolsResponse, ListWidgetSessionsResponse, ListWidgetsResponse, ListWorkspaceMembersResponse, ListWorkspaceSecretsResponse, ListWorkspacesResponse, MCP_Annotations, MemoryEntry, MemoryEntryCreateSpec_Content, MemoryEntryCreateSpec_UploadId, MemoryEntryDetail, MemoryEntryInfo, MemoryEntrySpec, MemoryEntryUpdateSpec, MemoryLayer, MemoryLayerInfo, MemoryLayerSpec, MemoryRead, MemoryReference, Model, ModelInfo, ModelSpec, ModelSpec_Capability_Caching, ModelSpec_Capability_MaxOutputTokens, ModelSpec_Capability_Reasoning, ModelSpec_Capability_StopSequences, ModelSpec_Capability_Temperature, ModelSpec_Capability_TopK, ModelSpec_Capability_TopP, Notice, Objective, ObjectiveCancelled, ObjectiveConfigSnapshot, ObjectiveContextWindow, ObjectiveContextWindowData, ObjectiveContextWindowInfo, ObjectiveDiagnostics, ObjectiveEpisodicConfig, ObjectiveError, ObjectiveEvent, ObjectiveEventData_AssistantMessage, ObjectiveEventData_Cancelled, ObjectiveEventData_ContextWindowCompacted, ObjectiveEventData_Error, ObjectiveEventData_Finalized, ObjectiveEventData_MemoryRead, ObjectiveEventData_Notice, ObjectiveEventData_Reasoning, ObjectiveEventData_SubAgentSpawned, ObjectiveEventData_SubAgentUpdated, ObjectiveEventData_TimedOut, ObjectiveEventData_ToolApprovalRequested, ObjectiveEventData_ToolApproved, ObjectiveEventData_ToolCalled, ObjectiveEventData_ToolDenied, ObjectiveEventData_ToolError, ObjectiveEventData_ToolResult, ObjectiveEventData_UserMessage, ObjectiveEventInfo, ObjectiveEventWebhookData, ObjectiveEventWebhookDataData, ObjectiveFeedback, ObjectiveFeedbackData, ObjectiveFeedbackInfo, ObjectiveFinalized, ObjectiveInfo, ObjectiveTask, ObjectiveTaskData, ObjectiveTimedOut, ObjectiveTool, ObjectiveToolCall, ObjectiveToolCallData, ObjectiveToolCallInfo, ObjectiveToolCallResult, ObjectiveToolCallResult_AudioBlock, ObjectiveToolCallResult_ContentBlock_Audio, ObjectiveToolCallResult_ContentBlock_Image, ObjectiveToolCallResult_ContentBlock_Text, ObjectiveToolCallResult_ImageBlock, ObjectiveToolCallResult_TextBlock, ObjectiveToolCallWithResult, Objective_Secret, OmitToolRequest, OpenAICompatibleConfig, OpenAIConfig, OpenRouterConfig, OperationMetadata, Page, ParameterAction_Pin, ParameterAction_Remove, ParameterAction_Set, PauseAgentScheduleRequest, Profile, ProfileSpec, PublishAgentRequest, Reasoning, ResolvedSecret, ResourceMetadata, RestoreToolRequest, ResultAction_Transform, ResumeAgentScheduleRequest, RevokeWidgetSessionRequest, RotateAPIKeyRequest, RotateChallengeTokenResponse, RotateWebhookEventsHmacSecretResponse, Schedule_Calendar, Schedule_Interval, Schedule_Range, SearchToolsOrToolSetsResponse, Selector_Condition_Attribute, Selector_Condition_HasParameter, Selector_Condition_Tools, Selector_ToolNames, SetToolCallContentRequest, SetToolCallContentRequest_AudioBlock, SetToolCallContentRequest_ContentBlock_Audio, SetToolCallContentRequest_ContentBlock_Image, SetToolCallContentRequest_ContentBlock_Text, SetToolCallContentRequest_ImageBlock, SetToolCallContentRequest_TextBlock, Status, SubAgentSpawned, SubAgentUpdated, Subject, SubjectAssertion, SubjectInfo, SubjectReference, SwapModelOnVariationsRequest, SwapModelOnVariationsRequest_ModelSwap, SwapModelOnVariationsResponse, SyncCompleted, SyncFailed, SyncStarted, Tenant, TenantAssertion, TenantInfo, TenantReference, Tool, ToolApprovalRequested, ToolApproved, ToolCalled, ToolDenied, ToolError, ToolInfo, ToolOverlay, ToolOverlay_ParameterAction_Pin, ToolOverlay_ParameterAction_Remove, ToolOverlay_ParameterAction_Set, ToolOverlay_ParameterPath, ToolOverlay_ResultAction_Transform, ToolOverlay_Selector, ToolOverlay_WidgetArgumentExposure, ToolResult, ToolSet, ToolSetAdapter_ApprovalRequirementFilter_Always, ToolSetAdapter_ApprovalRequirementFilter_Only, ToolSetAdapter_AttributeFilter, ToolSetAdapter_Bare, ToolSetAdapter_BareVariant, ToolSetAdapter_HTTP, ToolSetAdapter_HttpVariant, ToolSetAdapter_JustInTime, ToolSetAdapter_MCP, ToolSetAdapter_McpVariant, ToolSetAdapter_OpenAPI_UploadId, ToolSetAdapter_OpenAPI_Url, ToolSetAdapter_OpenapiVariant, ToolSetAdapter_StringMatcher_Contains, ToolSetAdapter_StringMatcher_EndsWith, ToolSetAdapter_StringMatcher_Exact, ToolSetAdapter_StringMatcher_Regex, ToolSetAdapter_StringMatcher_StartsWith, ToolSetAdapter_ToolFilter, ToolSetEvent, ToolSetEventData_SyncCompleted, ToolSetEventData_SyncFailed, ToolSetEventData_SyncStarted, ToolSetEventInfo, ToolSetInfo, ToolSetSecret, ToolSetSecretInfo, ToolSetSecretSpec, ToolSetSpec, ToolSetUsage, ToolSpec, ToolSpec_Config_Bare, ToolSpec_Config_Http, ToolSpec_Config_Mcp, ToolSpec_Config_Openapi, UnarchiveAgentRequest, UnarchiveToolSetRequest, UnarchiveWidgetRequest, UnpublishAgentRequest, UpdateAIProviderKeyRequest, UpdateAPIKeyRequest, UpdateAccountResourceMetadata, UpdateAgentRequest, UpdateAgentScheduleRequest, UpdateAgentVariationMemoryLayerRequest, UpdateAgentVariationRequest, UpdateMemoryEntryRequest, UpdateMemoryLayerRequest, UpdateResourceMetadata, UpdateToolRequest, UpdateToolSetRequest, UpdateToolSetSecretRequest, UpdateWidgetRequest, UpdateWorkspaceRequest, UpdateWorkspaceSecretRequest, Upload, UploadInfo, UploadSpec, UserMessage, VariationAssignment_Agent, VariationAssignment_Tool, VariationAssignment_ToolSet, VariationMemoryLayerAssignment, WebhookDelivery, WebhookDeliveryData, Widget, WidgetInfo, WidgetSession, WidgetSessionInfo, WidgetSessionSpec, WidgetSession_Secret, WidgetSpec, Workspace, WorkspaceInfo, WorkspaceMember, WorkspaceSecret, WorkspaceSecretInfo, WorkspaceSecretSpec, WorkspaceSpec

Constant Summary collapse

AiProviderKeySpecProvider =
["AI_PROVIDER_UNSPECIFIED", "AI_PROVIDER_OPENROUTER", "AI_PROVIDER_OPENAI", "AI_PROVIDER_ANTHROPIC", "AI_PROVIDER_GEMINI", "AI_PROVIDER_OPENAI_COMPATIBLE"].freeze
ApiKeyState =
["STATE_UNSPECIFIED", "STATE_ENABLED", "STATE_DISABLED"].freeze
AgentState =
["STATE_UNSPECIFIED", "STATE_DRAFT", "STATE_PUBLISHED", "STATE_ARCHIVED"].freeze
AgentScheduleState =
["STATE_UNSPECIFIED", "STATE_ACTIVE", "STATE_PAUSED", "STATE_ARCHIVED"].freeze
AgentScheduleSpecOverlapPolicy =
["OVERLAP_POLICY_UNSPECIFIED", "OVERLAP_POLICY_ALLOW", "OVERLAP_POLICY_SKIP"].freeze
AgentSpecVariationSelectionMode =
["VARIATION_SELECTION_MODE_UNSPECIFIED", "VARIATION_SELECTION_MODE_RANDOM", "VARIATION_SELECTION_MODE_WEIGHTED"].freeze
AgentVariationSpecModelConfigReasoningEffort =
["REASONING_EFFORT_UNSPECIFIED", "REASONING_EFFORT_NONE", "REASONING_EFFORT_LOW", "REASONING_EFFORT_MEDIUM", "REASONING_EFFORT_HIGH"].freeze
CapabilityReasoningMode =
["MODE_UNSPECIFIED", "MODE_ADAPTIVE", "MODE_BUDGET"].freeze
ConfigHttpRequestMethod =
["HTTP_METHOD_UNSPECIFIED", "GET", "POST", "PUT", "PATCH", "DELETE"].freeze
MemoryLayerSpecType =
["MEMORY_LAYER_TYPE_UNSPECIFIED", "MEMORY_LAYER_TYPE_EPISODIC", "MEMORY_LAYER_TYPE_SKILLS"].freeze
ModelState =
["STATE_UNSPECIFIED", "STATE_ENABLED", "STATE_DISABLED"].freeze
NoticeLevel =
["LEVEL_UNSPECIFIED", "LEVEL_INFO", "LEVEL_WARN"].freeze
ObjectiveState =
["STATE_UNSPECIFIED", "STATE_PENDING", "STATE_RUNNING", "STATE_WAITING", "STATE_FAILED", "STATE_CANCELLED", "STATE_FINALIZED", "STATE_TIMED_OUT"].freeze
ObjectiveToolCallStatus =
["TOOL_CALL_STATUS_UNSPECIFIED", "TOOL_CALL_STATUS_AUTO_APPROVED", "TOOL_CALL_STATUS_WAITING_FOR_APPROVAL", "TOOL_CALL_STATUS_APPROVED", "TOOL_CALL_STATUS_DENIED"].freeze
ObjectiveToolCallExecutionStatus =
["TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED", "TOOL_CALL_EXECUTION_STATUS_PENDING", "TOOL_CALL_EXECUTION_STATUS_RUNNING", "TOOL_CALL_EXECUTION_STATUS_COMPLETED", "TOOL_CALL_EXECUTION_STATUS_ERRORED", "TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT"].freeze
ObjectiveToolCallWithResultStatus =
["TOOL_CALL_STATUS_UNSPECIFIED", "TOOL_CALL_STATUS_AUTO_APPROVED", "TOOL_CALL_STATUS_WAITING_FOR_APPROVAL", "TOOL_CALL_STATUS_APPROVED", "TOOL_CALL_STATUS_DENIED"].freeze
ObjectiveToolCallWithResultExecutionStatus =
["TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED", "TOOL_CALL_EXECUTION_STATUS_PENDING", "TOOL_CALL_EXECUTION_STATUS_RUNNING", "TOOL_CALL_EXECUTION_STATUS_COMPLETED", "TOOL_CALL_EXECUTION_STATUS_ERRORED", "TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT"].freeze
ParameterActionPinOnMissing =
["ON_MISSING_UNSPECIFIED", "ON_MISSING_FAIL", "ON_MISSING_SKIP"].freeze
ProfileSpecType =
["PROFILE_TYPE_UNSPECIFIED", "PROFILE_TYPE_USER", "PROFILE_TYPE_API_KEY", "PROFILE_TYPE_SYSTEM"].freeze
ResolvedSecretSource =
["RESOLVED_SECRET_SOURCE_UNSPECIFIED", "RESOLVED_SECRET_SOURCE_WORKSPACE", "RESOLVED_SECRET_SOURCE_TOOLSET", "RESOLVED_SECRET_SOURCE_OBJECTIVE"].freeze
ResultActionTransformOnError =
["ON_ERROR_UNSPECIFIED", "ON_ERROR_RAW_CONTENT", "ON_ERROR_FAIL"].freeze
SubAgentUpdatedStatus =
["STATUS_UNSPECIFIED", "STATUS_PENDING", "STATUS_RUNNING", "STATUS_COMPLETED", "STATUS_FAILED", "STATUS_CANCELLED"].freeze
TenantState =
["STATE_UNSPECIFIED", "STATE_ACTIVE", "STATE_ERASING"].freeze
ToolState =
["STATE_UNSPECIFIED", "STATE_AVAILABLE", "STATE_OMITTED", "STATE_ARCHIVED"].freeze
ToolOverlaySelectorOperator =
["OPERATOR_UNSPECIFIED", "OPERATOR_AND", "OPERATOR_OR"].freeze
ToolSetState =
["STATE_UNSPECIFIED", "STATE_ACTIVE", "STATE_ARCHIVED"].freeze
ToolSetAdapterAttributeFilterAttribute =
["ATTRIBUTE_UNSPECIFIED", "ATTRIBUTE_NAME", "ATTRIBUTE_TITLE", "ATTRIBUTE_DESCRIPTION", "ATTRIBUTE_LLM_TOOL_NAME"].freeze
ToolSetAdapterToolFilterOperator =
["OPERATOR_UNSPECIFIED", "OPERATOR_AND", "OPERATOR_OR"].freeze
UploadInfoStatus =
["UPLOAD_STATUS_UNSPECIFIED", "UPLOAD_STATUS_PENDING", "UPLOAD_STATUS_COMPLETE", "UPLOAD_STATUS_CONSUMED", "UPLOAD_STATUS_EXPIRED"].freeze
WebhookDeliveryDataStatus =
["WEBHOOK_DELIVERY_STATUS_UNSPECIFIED", "WEBHOOK_DELIVERY_STATUS_PENDING", "WEBHOOK_DELIVERY_STATUS_COMPLETED", "WEBHOOK_DELIVERY_STATUS_FAILED", "WEBHOOK_DELIVERY_STATUS_DISABLED"].freeze
WebhookDeliveryDataEventType =
["OBJECTIVE_EVENT_TYPE_UNSPECIFIED", "OBJECTIVE_EVENT_TYPE_USER_MESSAGE", "OBJECTIVE_EVENT_TYPE_TOOL_APPROVAL_REQUESTED", "OBJECTIVE_EVENT_TYPE_TOOL_APPROVED", "OBJECTIVE_EVENT_TYPE_TOOL_DENIED", "OBJECTIVE_EVENT_TYPE_TOOL_CALLED", "OBJECTIVE_EVENT_TYPE_ERROR", "OBJECTIVE_EVENT_TYPE_ASSISTANT_MESSAGE", "OBJECTIVE_EVENT_TYPE_TOOL_RESULT", "OBJECTIVE_EVENT_TYPE_TOOL_ERROR", "OBJECTIVE_EVENT_TYPE_CONTEXT_WINDOW_COMPACTED", "OBJECTIVE_EVENT_TYPE_MEMORY_READ", "OBJECTIVE_EVENT_TYPE_CANCELLED", "OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED", "OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED", "OBJECTIVE_EVENT_TYPE_FINALIZED", "OBJECTIVE_EVENT_TYPE_NOTICE", "OBJECTIVE_EVENT_TYPE_TIMED_OUT", "OBJECTIVE_EVENT_TYPE_REASONING"].freeze
WidgetState =
["STATE_UNSPECIFIED", "STATE_ACTIVE", "STATE_ARCHIVED"].freeze
WidgetSessionState =
["STATE_UNSPECIFIED", "STATE_ACTIVE", "STATE_EXPIRED", "STATE_REVOKED", "STATE_EXHAUSTED"].freeze
WorkspaceStatus =
["STATUS_ENABLED", "STATUS_DISABLED", "STATUS_ARCHIVED"].freeze
AgentServiceListAgentsState =
["STATE_UNSPECIFIED", "STATE_DRAFT", "STATE_PUBLISHED", "STATE_ARCHIVED"].freeze
AgentServiceListAgentsVariationSelectionMode =
["VARIATION_SELECTION_MODE_UNSPECIFIED", "VARIATION_SELECTION_MODE_RANDOM", "VARIATION_SELECTION_MODE_WEIGHTED"].freeze
AgentServiceListAgentFeedbackSentiment =
["FEEDBACK_SENTIMENT_UNSPECIFIED", "FEEDBACK_SENTIMENT_POSITIVE", "FEEDBACK_SENTIMENT_NEGATIVE"].freeze
AgentServiceListAgentWebhookDeliveriesEventType =
["OBJECTIVE_EVENT_TYPE_UNSPECIFIED", "OBJECTIVE_EVENT_TYPE_USER_MESSAGE", "OBJECTIVE_EVENT_TYPE_TOOL_APPROVAL_REQUESTED", "OBJECTIVE_EVENT_TYPE_TOOL_APPROVED", "OBJECTIVE_EVENT_TYPE_TOOL_DENIED", "OBJECTIVE_EVENT_TYPE_TOOL_CALLED", "OBJECTIVE_EVENT_TYPE_ERROR", "OBJECTIVE_EVENT_TYPE_ASSISTANT_MESSAGE", "OBJECTIVE_EVENT_TYPE_TOOL_RESULT", "OBJECTIVE_EVENT_TYPE_TOOL_ERROR", "OBJECTIVE_EVENT_TYPE_CONTEXT_WINDOW_COMPACTED", "OBJECTIVE_EVENT_TYPE_MEMORY_READ", "OBJECTIVE_EVENT_TYPE_CANCELLED", "OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED", "OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED", "OBJECTIVE_EVENT_TYPE_FINALIZED", "OBJECTIVE_EVENT_TYPE_NOTICE", "OBJECTIVE_EVENT_TYPE_TIMED_OUT", "OBJECTIVE_EVENT_TYPE_REASONING"].freeze
MemoryServiceListMemoryLayersType =
["MEMORY_LAYER_TYPE_UNSPECIFIED", "MEMORY_LAYER_TYPE_EPISODIC", "MEMORY_LAYER_TYPE_SKILLS"].freeze
ModelServiceListModelsState =
["STATE_UNSPECIFIED", "STATE_ENABLED", "STATE_DISABLED"].freeze
ObjectiveServiceListObjectivesState =
["STATE_UNSPECIFIED", "STATE_PENDING", "STATE_RUNNING", "STATE_WAITING", "STATE_FAILED", "STATE_CANCELLED", "STATE_FINALIZED", "STATE_TIMED_OUT"].freeze
ObjectiveServiceListObjectiveToolCallsStatus =
["TOOL_CALL_STATUS_UNSPECIFIED", "TOOL_CALL_STATUS_AUTO_APPROVED", "TOOL_CALL_STATUS_WAITING_FOR_APPROVAL", "TOOL_CALL_STATUS_APPROVED", "TOOL_CALL_STATUS_DENIED"].freeze
ObjectiveServiceListObjectiveToolCallsExecutionStatus =
["TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED", "TOOL_CALL_EXECUTION_STATUS_PENDING", "TOOL_CALL_EXECUTION_STATUS_RUNNING", "TOOL_CALL_EXECUTION_STATUS_COMPLETED", "TOOL_CALL_EXECUTION_STATUS_ERRORED", "TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT"].freeze
ToolServiceListToolSetsState =
["STATE_UNSPECIFIED", "STATE_ACTIVE", "STATE_ARCHIVED"].freeze
ToolServiceListToolsStates =
["STATE_UNSPECIFIED", "STATE_AVAILABLE", "STATE_OMITTED", "STATE_ARCHIVED"].freeze
WidgetSessionServiceListWidgetSessionsState =
["STATE_UNSPECIFIED", "STATE_ACTIVE", "STATE_EXPIRED", "STATE_REVOKED", "STATE_EXHAUSTED"].freeze
ENCODE_AI_PROVIDER_KEY_SPEC =
{
  "provider" => ["provider", nil],
  "credentials" => ["credentials", ->(_v) { encode_AIProviderCredential(_v) }],
  "config" => ["config", ->(_v) { encode_AIProviderConfig(_v) }],
}.freeze
ENCODE_API_KEY_SPEC =
{
  "description" => ["description", nil],
  "permissions" => ["permissions", nil],
}.freeze
DROP_API_KEY_SPEC =
["system", "token"].freeze
ENCODE_AGENT_SCHEDULE_SPEC =
{
  "schedule" => ["schedule", ->(_v) { encode_AgentScheduleSpec_Schedule(_v) }],
  "overlap_policy" => ["overlapPolicy", nil],
  "overlapPolicy" => ["overlapPolicy", nil],
  "first_user_message" => ["firstUserMessage", nil],
  "firstUserMessage" => ["firstUserMessage", nil],
  "variation_id" => ["variationId", nil],
  "variationId" => ["variationId", nil],
  "system_prompt_data" => ["systemPromptData", nil],
  "systemPromptData" => ["systemPromptData", nil],
  "first_user_message_data" => ["firstUserMessageData", nil],
  "firstUserMessageData" => ["firstUserMessageData", nil],
}.freeze
ENCODE_AGENT_SCHEDULE_SPEC_SCHEDULE =
{
  "calendars" => ["calendars", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_Schedule_Calendar(_v) }).call(_i) } : _v }],
  "intervals" => ["intervals", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_Schedule_Interval(_v) }).call(_i) } : _v }],
  "timezone" => ["timezone", nil],
}.freeze
ENCODE_AGENT_SPEC =
{
  "description" => ["description", nil],
  "webhook_events_url" => ["webhookEventsUrl", nil],
  "webhookEventsUrl" => ["webhookEventsUrl", nil],
  "variation_selection_mode" => ["variationSelectionMode", nil],
  "variationSelectionMode" => ["variationSelectionMode", nil],
  "system_prompt_data_schema" => ["systemPromptDataSchema", nil],
  "systemPromptDataSchema" => ["systemPromptDataSchema", nil],
  "output_definition" => ["outputDefinition", nil],
  "outputDefinition" => ["outputDefinition", nil],
  "enable_episodic_memory" => ["enableEpisodicMemory", nil],
  "enableEpisodicMemory" => ["enableEpisodicMemory", nil],
  "episodic_memory_ttl" => ["episodicMemoryTtl", nil],
  "episodicMemoryTtl" => ["episodicMemoryTtl", nil],
}.freeze
ENCODE_AGENT_VARIATION_SPEC =
{
  "system_prompt_template" => ["systemPromptTemplate", nil],
  "systemPromptTemplate" => ["systemPromptTemplate", nil],
  "progressive_discovery" => ["progressiveDiscovery", ->(_v) { encode_AgentVariationSpec_ProgressiveDiscovery(_v) }],
  "progressiveDiscovery" => ["progressiveDiscovery", ->(_v) { encode_AgentVariationSpec_ProgressiveDiscovery(_v) }],
  "constraints" => ["constraints", ->(_v) { encode_AgentVariationSpec_Constraints(_v) }],
  "description" => ["description", nil],
  "model_config" => ["modelConfig", ->(_v) { encode_AgentVariationSpec_ModelConfig(_v) }],
  "modelConfig" => ["modelConfig", ->(_v) { encode_AgentVariationSpec_ModelConfig(_v) }],
  "compaction_config" => ["compactionConfig", ->(_v) { encode_AgentVariationSpec_CompactionConfig(_v) }],
  "compactionConfig" => ["compactionConfig", ->(_v) { encode_AgentVariationSpec_CompactionConfig(_v) }],
  "first_user_message_template" => ["firstUserMessageTemplate", nil],
  "firstUserMessageTemplate" => ["firstUserMessageTemplate", nil],
}.freeze
ENCODE_AGENT_VARIATION_SPEC_COMPACTION_CONFIG =
{
  "trigger_threshold" => ["triggerThreshold", nil],
  "triggerThreshold" => ["triggerThreshold", nil],
  "summarization" => ["summarization", ->(_v) { encode_CompactionConfig_SummarizationStrategy(_v) }],
  "tool_result_clearing" => ["toolResultClearing", ->(_v) { encode_CompactionConfig_ToolResultClearingStrategy(_v) }],
  "toolResultClearing" => ["toolResultClearing", ->(_v) { encode_CompactionConfig_ToolResultClearingStrategy(_v) }],
}.freeze
ENCODE_AGENT_VARIATION_SPEC_CONSTRAINTS =
{
  "max_tool_calls" => ["maxToolCalls", nil],
  "maxToolCalls" => ["maxToolCalls", nil],
  "max_sub_objectives" => ["maxSubObjectives", nil],
  "maxSubObjectives" => ["maxSubObjectives", nil],
  "inactivity_timeout" => ["inactivityTimeout", nil],
  "inactivityTimeout" => ["inactivityTimeout", nil],
}.freeze
ENCODE_AGENT_VARIATION_SPEC_MODEL_CONFIG =
{
  "model_id" => ["modelId", nil],
  "modelId" => ["modelId", nil],
  "temperature" => ["temperature", nil],
  "top_p" => ["topP", nil],
  "topP" => ["topP", nil],
  "top_k" => ["topK", nil],
  "topK" => ["topK", nil],
  "stop_sequences" => ["stopSequences", nil],
  "stopSequences" => ["stopSequences", nil],
  "max_output_tokens" => ["maxOutputTokens", nil],
  "maxOutputTokens" => ["maxOutputTokens", nil],
  "reasoning_effort" => ["reasoningEffort", nil],
  "reasoningEffort" => ["reasoningEffort", nil],
  "caching_enabled" => ["cachingEnabled", nil],
  "cachingEnabled" => ["cachingEnabled", nil],
}.freeze
ENCODE_AGENT_VARIATION_SPEC_PROGRESSIVE_DISCOVERY =
{
  "max_tools" => ["maxTools", nil],
  "maxTools" => ["maxTools", nil],
  "hints" => ["hints", nil],
}.freeze
ENCODE_COMPACTION_CONFIG_SUMMARIZATION_STRATEGY =
{
  "instructions" => ["instructions", nil],
}.freeze
ENCODE_COMPACTION_CONFIG_TOOL_RESULT_CLEARING_STRATEGY =
{
  "preserve_recent_results" => ["preserveRecentResults", nil],
  "preserveRecentResults" => ["preserveRecentResults", nil],
}.freeze
ENCODE_CONFIG_BARE =
{
  "always_set_result" => ["alwaysSetResult", nil],
  "alwaysSetResult" => ["alwaysSetResult", nil],
}.freeze
ENCODE_CONFIG_HTTP =
{
  "request_method" => ["requestMethod", nil],
  "requestMethod" => ["requestMethod", nil],
  "path" => ["path", nil],
  "query" => ["query", nil],
  "headers" => ["headers", nil],
  "request_body_template" => ["requestBodyTemplate", nil],
  "requestBodyTemplate" => ["requestBodyTemplate", nil],
  "request_body_content_type" => ["requestBodyContentType", nil],
  "requestBodyContentType" => ["requestBodyContentType", nil],
}.freeze
ENCODE_CONFIG_MCP =
{
  "annotations" => ["annotations", ->(_v) { encode_MCP_Annotations(_v) }],
}.freeze
ENCODE_CONFIG_OPEN_API =
{
  "path" => ["path", nil],
  "method" => ["method", nil],
}.freeze
ENCODE_CREATE_ACCOUNT_RESOURCE_METADATA =
{
  "name" => ["name", nil],
  "external_id" => ["externalId", nil],
  "externalId" => ["externalId", nil],
  "labels" => ["labels", nil],
}.freeze
ENCODE_CREATE_AGENT_VARIATION_REQUEST =
{
  "metadata" => ["metadata", ->(_v) { (_v) }],
  "spec" => ["spec", ->(_v) { encode_AgentVariationSpec(_v) }],
}.freeze
DROP_CREATE_AGENT_VARIATION_REQUEST =
["agentId", "agent_id", "workspaceId", "workspace_id"].freeze
ENCODE_CREATE_OBJECTIVE_REQUEST_SECRET =
{
  "name" => ["name", nil],
  "value" => ["value", nil],
}.freeze
ENCODE_CREATE_OPERATION_METADATA =
{
  "labels" => ["labels", nil],
  "external_id" => ["externalId", nil],
  "externalId" => ["externalId", nil],
}.freeze
ENCODE_CREATE_RESOURCE_METADATA =
{
  "name" => ["name", nil],
  "external_id" => ["externalId", nil],
  "externalId" => ["externalId", nil],
  "labels" => ["labels", nil],
}.freeze
ENCODE_CREATE_WIDGET_SESSION_REQUEST_SECRET =
{
  "name" => ["name", nil],
  "value" => ["value", nil],
}.freeze
ENCODE_CREDENTIAL_API_KEY =
{
  "api_key" => ["apiKey", nil],
  "apiKey" => ["apiKey", nil],
}.freeze
ENCODE_CREDENTIAL_HEADERS =
{
  "headers" => ["headers", nil],
}.freeze
ENCODE_MCP_ANNOTATIONS =
{
  "title" => ["title", nil],
  "read_only_hint" => ["readOnlyHint", nil],
  "readOnlyHint" => ["readOnlyHint", nil],
  "destructive_hint" => ["destructiveHint", nil],
  "destructiveHint" => ["destructiveHint", nil],
  "idempotent_hint" => ["idempotentHint", nil],
  "idempotentHint" => ["idempotentHint", nil],
  "open_world_hint" => ["openWorldHint", nil],
  "openWorldHint" => ["openWorldHint", nil],
}.freeze
ENCODE_MEMORY_ENTRY_UPDATE_SPEC =
{
  "key" => ["key", nil],
  "description" => ["description", nil],
  "content" => ["content", nil],
  "upload_id" => ["uploadId", nil],
  "uploadId" => ["uploadId", nil],
}.freeze
ENCODE_MEMORY_LAYER_SPEC =
{
  "type" => ["type", nil],
  "description" => ["description", nil],
}.freeze
DROP_MEMORY_LAYER_SPEC =
["agentId", "agent_id", "episodicKey", "episodic_key", "expiresAt", "expires_at", "systemManaged", "system_managed"].freeze
ENCODE_MEMORY_REFERENCE =
{
  "memory_layer_id" => ["memoryLayerId", nil],
  "memoryLayerId" => ["memoryLayerId", nil],
  "memory_entry_id" => ["memoryEntryId", nil],
  "memoryEntryId" => ["memoryEntryId", nil],
}.freeze
ENCODE_OBJECTIVE_EPISODIC_CONFIG =
{
  "key" => ["key", nil],
}.freeze
DROP_OBJECTIVE_EPISODIC_CONFIG =
["memoryLayerId", "memory_layer_id"].freeze
ENCODE_OBJECTIVE_FEEDBACK_DATA =
{
  "score" => ["score", nil],
  "comment" => ["comment", nil],
}.freeze
ENCODE_OPEN_AI_COMPATIBLE_CONFIG =
{
  "base_url" => ["baseUrl", nil],
  "baseUrl" => ["baseUrl", nil],
}.freeze
ENCODE_OPEN_AI_CONFIG =
{
  "organization_id" => ["organizationId", nil],
  "organizationId" => ["organizationId", nil],
  "project_id" => ["projectId", nil],
  "projectId" => ["projectId", nil],
}.freeze
ENCODE_OPEN_ROUTER_CONFIG =
{
  "region" => ["region", nil],
}.freeze
ENCODE_PARAMETER_ACTION_PIN =
{
  "path" => ["path", nil],
  "pinned_parameter" => ["pinnedParameter", nil],
  "pinnedParameter" => ["pinnedParameter", nil],
  "on_missing" => ["onMissing", nil],
  "onMissing" => ["onMissing", nil],
}.freeze
ENCODE_PARAMETER_ACTION_REMOVE =
{
  "path" => ["path", nil],
}.freeze
ENCODE_PARAMETER_ACTION_SET =
{
  "path" => ["path", nil],
  "value_template" => ["valueTemplate", nil],
  "valueTemplate" => ["valueTemplate", nil],
}.freeze
ENCODE_RESULT_ACTION_TRANSFORM =
{
  "content_template" => ["contentTemplate", nil],
  "contentTemplate" => ["contentTemplate", nil],
  "on_error" => ["onError", nil],
  "onError" => ["onError", nil],
  "expect_json" => ["expectJson", nil],
  "expectJson" => ["expectJson", nil],
}.freeze
ENCODE_SCHEDULE_CALENDAR =
{
  "second" => ["second", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_Schedule_Range(_v) }).call(_i) } : _v }],
  "minute" => ["minute", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_Schedule_Range(_v) }).call(_i) } : _v }],
  "hour" => ["hour", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_Schedule_Range(_v) }).call(_i) } : _v }],
  "day_of_month" => ["dayOfMonth", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_Schedule_Range(_v) }).call(_i) } : _v }],
  "dayOfMonth" => ["dayOfMonth", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_Schedule_Range(_v) }).call(_i) } : _v }],
  "month" => ["month", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_Schedule_Range(_v) }).call(_i) } : _v }],
  "day_of_week" => ["dayOfWeek", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_Schedule_Range(_v) }).call(_i) } : _v }],
  "dayOfWeek" => ["dayOfWeek", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_Schedule_Range(_v) }).call(_i) } : _v }],
  "comment" => ["comment", nil],
}.freeze
ENCODE_SCHEDULE_INTERVAL =
{
  "every" => ["every", nil],
  "offset" => ["offset", nil],
}.freeze
ENCODE_SCHEDULE_RANGE =
{
  "start" => ["start", nil],
  "end_" => ["end", nil],
  "end" => ["end", nil],
  "step" => ["step", nil],
}.freeze
ENCODE_SELECTOR_TOOL_NAMES =
{
  "names" => ["names", nil],
}.freeze
ENCODE_SET_TOOL_CALL_CONTENT_REQUEST_AUDIO_BLOCK =
{
  "data" => ["data", nil],
  "mime_type" => ["mimeType", nil],
  "mimeType" => ["mimeType", nil],
}.freeze
ENCODE_SET_TOOL_CALL_CONTENT_REQUEST_IMAGE_BLOCK =
{
  "data" => ["data", nil],
  "mime_type" => ["mimeType", nil],
  "mimeType" => ["mimeType", nil],
}.freeze
ENCODE_SET_TOOL_CALL_CONTENT_REQUEST_TEXT_BLOCK =
{
  "text" => ["text", nil],
}.freeze
ENCODE_SUBJECT_ASSERTION =
{
  "id" => ["id", nil],
  "name" => ["name", nil],
}.freeze
ENCODE_SWAP_MODEL_ON_VARIATIONS_REQUEST_MODEL_SWAP =
{
  "current_model_id" => ["currentModelId", nil],
  "currentModelId" => ["currentModelId", nil],
  "next_model_id" => ["nextModelId", nil],
  "nextModelId" => ["nextModelId", nil],
  "disable_current_after_swap" => ["disableCurrentAfterSwap", nil],
  "disableCurrentAfterSwap" => ["disableCurrentAfterSwap", nil],
}.freeze
ENCODE_TENANT_ASSERTION =
{
  "id" => ["id", nil],
  "name" => ["name", nil],
}.freeze
ENCODE_TOOL_OVERLAY =
{
  "key" => ["key", nil],
  "selector" => ["selector", ->(_v) { encode_ToolOverlay_Selector(_v) }],
  "parameter_actions" => ["parameterActions", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_ToolOverlay_ParameterAction(_v) }).call(_i) } : _v }],
  "parameterActions" => ["parameterActions", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_ToolOverlay_ParameterAction(_v) }).call(_i) } : _v }],
  "result_actions" => ["resultActions", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_ToolOverlay_ResultAction(_v) }).call(_i) } : _v }],
  "resultActions" => ["resultActions", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_ToolOverlay_ResultAction(_v) }).call(_i) } : _v }],
  "disabled" => ["disabled", nil],
  "widget_argument_exposure" => ["widgetArgumentExposure", ->(_v) { encode_ToolOverlay_WidgetArgumentExposure(_v) }],
  "widgetArgumentExposure" => ["widgetArgumentExposure", ->(_v) { encode_ToolOverlay_WidgetArgumentExposure(_v) }],
}.freeze
ENCODE_TOOL_OVERLAY_PARAMETER_PATH =
{
  "path" => ["path", nil],
}.freeze
ENCODE_TOOL_OVERLAY_SELECTOR =
{
  "conditions" => ["conditions", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_Selector_Condition(_v) }).call(_i) } : _v }],
  "operator" => ["operator", nil],
}.freeze
ENCODE_TOOL_OVERLAY_WIDGET_ARGUMENT_EXPOSURE =
{
  "enabled" => ["enabled", nil],
}.freeze
ENCODE_TOOL_SET_ADAPTER_ATTRIBUTE_FILTER =
{
  "attribute" => ["attribute", nil],
  "matcher" => ["matcher", ->(_v) { encode_ToolSetAdapter_StringMatcher(_v) }],
}.freeze
ENCODE_TOOL_SET_ADAPTER_BARE =
{
  "content_timeout" => ["contentTimeout", nil],
  "contentTimeout" => ["contentTimeout", nil],
}.freeze
ENCODE_TOOL_SET_ADAPTER_HTTP =
{
  "base_url" => ["baseUrl", nil],
  "baseUrl" => ["baseUrl", nil],
  "headers" => ["headers", nil],
}.freeze
ENCODE_TOOL_SET_ADAPTER_JUST_IN_TIME =
{
  "enabled" => ["enabled", nil],
  "fail_objective_on_tool_list_error" => ["failObjectiveOnToolListError", nil],
  "failObjectiveOnToolListError" => ["failObjectiveOnToolListError", nil],
}.freeze
ENCODE_TOOL_SET_ADAPTER_MCP =
{
  "url" => ["url", nil],
  "headers" => ["headers", nil],
  "include_tools" => ["includeTools", ->(_v) { encode_ToolSetAdapter_ToolFilter(_v) }],
  "includeTools" => ["includeTools", ->(_v) { encode_ToolSetAdapter_ToolFilter(_v) }],
  "exclude_tools" => ["excludeTools", ->(_v) { encode_ToolSetAdapter_ToolFilter(_v) }],
  "excludeTools" => ["excludeTools", ->(_v) { encode_ToolSetAdapter_ToolFilter(_v) }],
  "tool_approvals" => ["toolApprovals", ->(_v) { encode_ToolSetAdapter_ApprovalRequirementFilter(_v) }],
  "toolApprovals" => ["toolApprovals", ->(_v) { encode_ToolSetAdapter_ApprovalRequirementFilter(_v) }],
  "just_in_time" => ["justInTime", ->(_v) { encode_ToolSetAdapter_JustInTime(_v) }],
  "justInTime" => ["justInTime", ->(_v) { encode_ToolSetAdapter_JustInTime(_v) }],
}.freeze
ENCODE_TOOL_SET_ADAPTER_TOOL_FILTER =
{
  "filters" => ["filters", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_ToolSetAdapter_AttributeFilter(_v) }).call(_i) } : _v }],
  "operator" => ["operator", nil],
}.freeze
ENCODE_TOOL_SET_SECRET_SPEC =
{
  "value" => ["value", nil],
}.freeze
ENCODE_TOOL_SET_SPEC =
{
  "description" => ["description", nil],
  "adapter" => ["adapter", ->(_v) { encode_ToolSetAdapter(_v) }],
  "overlays" => ["overlays", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_ToolOverlay(_v) }).call(_i) } : _v }],
}.freeze
ENCODE_TOOL_SPEC =
{
  "description" => ["description", nil],
  "requires_approval" => ["requiresApproval", nil],
  "requiresApproval" => ["requiresApproval", nil],
  "parameters" => ["parameters", nil],
  "config" => ["config", ->(_v) { encode_ToolSpec_Config(_v) }],
  "llm_tool_name" => ["llmToolName", nil],
  "llmToolName" => ["llmToolName", nil],
}.freeze
ENCODE_UPDATE_ACCOUNT_RESOURCE_METADATA =
{
  "name" => ["name", nil],
  "external_id" => ["externalId", nil],
  "externalId" => ["externalId", nil],
  "labels" => ["labels", nil],
}.freeze
ENCODE_UPDATE_RESOURCE_METADATA =
{
  "name" => ["name", nil],
  "external_id" => ["externalId", nil],
  "externalId" => ["externalId", nil],
  "labels" => ["labels", nil],
}.freeze
ENCODE_UPLOAD_SPEC =
{
  "filename" => ["filename", nil],
  "content_type" => ["contentType", nil],
  "contentType" => ["contentType", nil],
  "size_bytes" => ["sizeBytes", nil],
  "sizeBytes" => ["sizeBytes", nil],
}.freeze
ENCODE_WIDGET_SESSION_SPEC =
{
  "widget_id" => ["widgetId", nil],
  "widgetId" => ["widgetId", nil],
  "tenant" => ["tenant", ->(_v) { encode_TenantAssertion(_v) }],
  "subject" => ["subject", ->(_v) { encode_SubjectAssertion(_v) }],
  "expires_at" => ["expiresAt", nil],
  "expiresAt" => ["expiresAt", nil],
  "pinned_parameters" => ["pinnedParameters", nil],
  "pinnedParameters" => ["pinnedParameters", nil],
}.freeze
DROP_WIDGET_SESSION_SPEC =
["token", "tokenExpiresAt", "token_expires_at"].freeze
ENCODE_WIDGET_SPEC =
{
  "agent_id" => ["agentId", nil],
  "agentId" => ["agentId", nil],
  "variation_id" => ["variationId", nil],
  "variationId" => ["variationId", nil],
  "origin_allowlist" => ["originAllowlist", nil],
  "originAllowlist" => ["originAllowlist", nil],
}.freeze
ENCODE_WORKSPACE_SECRET_SPEC =
{
  "value" => ["value", nil],
}.freeze
ENCODE_WORKSPACE_SPEC =
{
  "description" => ["description", nil],
}.freeze
ENCODE_TOOL_SET_ADAPTER_MCP_VARIANT =
{
  "type" => ["type", nil],
  "mcp" => ["mcp", ->(_v) { encode_ToolSetAdapter_MCP(_v) }],
}.freeze
ENCODE_TOOL_SET_ADAPTER_HTTP_VARIANT =
{
  "type" => ["type", nil],
  "http" => ["http", ->(_v) { encode_ToolSetAdapter_HTTP(_v) }],
}.freeze
ENCODE_TOOL_SET_ADAPTER_OPENAPI_VARIANT =
{
  "type" => ["type", nil],
  "openapi" => ["openapi", ->(_v) { encode_ToolSetAdapter_OpenAPI(_v) }],
}.freeze
ENCODE_TOOL_SET_ADAPTER_BARE_VARIANT =
{
  "type" => ["type", nil],
  "bare" => ["bare", ->(_v) { encode_ToolSetAdapter_Bare(_v) }],
}.freeze
ENCODE_TOOL_SET_ADAPTER_STRING_MATCHER_EXACT =
{
  "type" => ["type", nil],
  "exact" => ["exact", nil],
  "case_sensitive" => ["caseSensitive", nil],
  "caseSensitive" => ["caseSensitive", nil],
}.freeze
ENCODE_TOOL_SET_ADAPTER_STRING_MATCHER_STARTS_WITH =
{
  "type" => ["type", nil],
  "starts_with" => ["startsWith", nil],
  "startsWith" => ["startsWith", nil],
  "case_sensitive" => ["caseSensitive", nil],
  "caseSensitive" => ["caseSensitive", nil],
}.freeze
ENCODE_TOOL_SET_ADAPTER_STRING_MATCHER_ENDS_WITH =
{
  "type" => ["type", nil],
  "ends_with" => ["endsWith", nil],
  "endsWith" => ["endsWith", nil],
  "case_sensitive" => ["caseSensitive", nil],
  "caseSensitive" => ["caseSensitive", nil],
}.freeze
ENCODE_TOOL_SET_ADAPTER_STRING_MATCHER_CONTAINS =
{
  "type" => ["type", nil],
  "contains" => ["contains", nil],
  "case_sensitive" => ["caseSensitive", nil],
  "caseSensitive" => ["caseSensitive", nil],
}.freeze
ENCODE_TOOL_SET_ADAPTER_STRING_MATCHER_REGEX =
{
  "type" => ["type", nil],
  "regex" => ["regex", nil],
  "case_sensitive" => ["caseSensitive", nil],
  "caseSensitive" => ["caseSensitive", nil],
}.freeze
ENCODE_TOOL_SET_ADAPTER_APPROVAL_REQUIREMENT_FILTER_ALWAYS =
{
  "type" => ["type", nil],
  "always" => ["always", nil],
}.freeze
ENCODE_TOOL_SET_ADAPTER_APPROVAL_REQUIREMENT_FILTER_ONLY =
{
  "type" => ["type", nil],
  "only" => ["only", ->(_v) { encode_ToolSetAdapter_ToolFilter(_v) }],
}.freeze
ENCODE_TOOL_SET_ADAPTER_OPEN_API_URL =
{
  "type" => ["type", nil],
  "url" => ["url", nil],
  "headers" => ["headers", nil],
  "include_tools" => ["includeTools", ->(_v) { encode_ToolSetAdapter_ToolFilter(_v) }],
  "includeTools" => ["includeTools", ->(_v) { encode_ToolSetAdapter_ToolFilter(_v) }],
  "exclude_tools" => ["excludeTools", ->(_v) { encode_ToolSetAdapter_ToolFilter(_v) }],
  "excludeTools" => ["excludeTools", ->(_v) { encode_ToolSetAdapter_ToolFilter(_v) }],
  "tool_approvals" => ["toolApprovals", ->(_v) { encode_ToolSetAdapter_ApprovalRequirementFilter(_v) }],
  "toolApprovals" => ["toolApprovals", ->(_v) { encode_ToolSetAdapter_ApprovalRequirementFilter(_v) }],
  "base_url" => ["baseUrl", nil],
  "baseUrl" => ["baseUrl", nil],
  "server_name" => ["serverName", nil],
  "serverName" => ["serverName", nil],
}.freeze
ENCODE_TOOL_SET_ADAPTER_OPEN_API_UPLOAD_ID =
{
  "type" => ["type", nil],
  "upload_id" => ["uploadId", nil],
  "uploadId" => ["uploadId", nil],
  "headers" => ["headers", nil],
  "include_tools" => ["includeTools", ->(_v) { encode_ToolSetAdapter_ToolFilter(_v) }],
  "includeTools" => ["includeTools", ->(_v) { encode_ToolSetAdapter_ToolFilter(_v) }],
  "exclude_tools" => ["excludeTools", ->(_v) { encode_ToolSetAdapter_ToolFilter(_v) }],
  "excludeTools" => ["excludeTools", ->(_v) { encode_ToolSetAdapter_ToolFilter(_v) }],
  "tool_approvals" => ["toolApprovals", ->(_v) { encode_ToolSetAdapter_ApprovalRequirementFilter(_v) }],
  "toolApprovals" => ["toolApprovals", ->(_v) { encode_ToolSetAdapter_ApprovalRequirementFilter(_v) }],
  "base_url" => ["baseUrl", nil],
  "baseUrl" => ["baseUrl", nil],
  "server_name" => ["serverName", nil],
  "serverName" => ["serverName", nil],
}.freeze
ENCODE_SELECTOR_CONDITION_ATTRIBUTE =
{
  "type" => ["type", nil],
  "attribute" => ["attribute", ->(_v) { encode_ToolSetAdapter_AttributeFilter(_v) }],
}.freeze
ENCODE_SELECTOR_CONDITION_HAS_PARAMETER =
{
  "type" => ["type", nil],
  "has_parameter" => ["hasParameter", ->(_v) { encode_ToolOverlay_ParameterPath(_v) }],
  "hasParameter" => ["hasParameter", ->(_v) { encode_ToolOverlay_ParameterPath(_v) }],
}.freeze
ENCODE_SELECTOR_CONDITION_TOOLS =
{
  "type" => ["type", nil],
  "tools" => ["tools", ->(_v) { encode_Selector_ToolNames(_v) }],
}.freeze
ENCODE_TOOL_OVERLAY_PARAMETER_ACTION_REMOVE =
{
  "type" => ["type", nil],
  "remove" => ["remove", ->(_v) { encode_ParameterAction_Remove(_v) }],
}.freeze
ENCODE_TOOL_OVERLAY_PARAMETER_ACTION_SET =
{
  "type" => ["type", nil],
  "set" => ["set", ->(_v) { encode_ParameterAction_Set(_v) }],
}.freeze
ENCODE_TOOL_OVERLAY_PARAMETER_ACTION_PIN =
{
  "type" => ["type", nil],
  "pin" => ["pin", ->(_v) { encode_ParameterAction_Pin(_v) }],
}.freeze
ENCODE_TOOL_OVERLAY_RESULT_ACTION_TRANSFORM =
{
  "type" => ["type", nil],
  "transform" => ["transform", ->(_v) { encode_ResultAction_Transform(_v) }],
}.freeze
ENCODE_TOOL_SPEC_CONFIG_HTTP =
{
  "type" => ["type", nil],
  "http" => ["http", ->(_v) { encode_Config_HTTP(_v) }],
}.freeze
ENCODE_TOOL_SPEC_CONFIG_MCP =
{
  "type" => ["type", nil],
  "mcp" => ["mcp", ->(_v) { encode_Config_MCP(_v) }],
}.freeze
ENCODE_TOOL_SPEC_CONFIG_OPENAPI =
{
  "type" => ["type", nil],
  "openapi" => ["openapi", ->(_v) { encode_Config_OpenAPI(_v) }],
}.freeze
ENCODE_TOOL_SPEC_CONFIG_BARE =
{
  "type" => ["type", nil],
  "bare" => ["bare", ->(_v) { encode_Config_Bare(_v) }],
}.freeze
ENCODE_MEMORY_ENTRY_CREATE_SPEC_CONTENT =
{
  "type" => ["type", nil],
  "content" => ["content", nil],
  "key" => ["key", nil],
  "description" => ["description", nil],
}.freeze
ENCODE_MEMORY_ENTRY_CREATE_SPEC_UPLOAD_ID =
{
  "type" => ["type", nil],
  "upload_id" => ["uploadId", nil],
  "uploadId" => ["uploadId", nil],
  "key" => ["key", nil],
  "description" => ["description", nil],
}.freeze
ENCODE_SET_TOOL_CALL_CONTENT_REQUEST_CONTENT_BLOCK_TEXT =
{
  "type" => ["type", nil],
  "text" => ["text", ->(_v) { encode_SetToolCallContentRequest_TextBlock(_v) }],
}.freeze
ENCODE_SET_TOOL_CALL_CONTENT_REQUEST_CONTENT_BLOCK_IMAGE =
{
  "type" => ["type", nil],
  "image" => ["image", ->(_v) { encode_SetToolCallContentRequest_ImageBlock(_v) }],
}.freeze
ENCODE_SET_TOOL_CALL_CONTENT_REQUEST_CONTENT_BLOCK_AUDIO =
{
  "type" => ["type", nil],
  "audio" => ["audio", ->(_v) { encode_SetToolCallContentRequest_AudioBlock(_v) }],
}.freeze
ENCODE_ADD_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_ID =
{
  "type" => ["type", nil],
  "tool_id" => ["toolId", nil],
  "toolId" => ["toolId", nil],
}.freeze
DROP_ADD_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_ID =
["agentId", "agent_id", "variationId", "variation_id", "workspaceId", "workspace_id"].freeze
ENCODE_ADD_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_SET_ID =
{
  "type" => ["type", nil],
  "tool_set_id" => ["toolSetId", nil],
  "toolSetId" => ["toolSetId", nil],
}.freeze
DROP_ADD_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_SET_ID =
["agentId", "agent_id", "variationId", "variation_id", "workspaceId", "workspace_id"].freeze
ENCODE_ADD_AGENT_VARIATION_ASSIGNMENT_REQUEST_SUB_AGENT_ID =
{
  "type" => ["type", nil],
  "sub_agent_id" => ["subAgentId", nil],
  "subAgentId" => ["subAgentId", nil],
}.freeze
DROP_ADD_AGENT_VARIATION_ASSIGNMENT_REQUEST_SUB_AGENT_ID =
["agentId", "agent_id", "variationId", "variation_id", "workspaceId", "workspace_id"].freeze
ENCODE_AI_PROVIDER_CREDENTIAL_API_KEY =
{
  "type" => ["type", nil],
  "api_key" => ["apiKey", ->(_v) { encode_CredentialAPIKey(_v) }],
  "apiKey" => ["apiKey", ->(_v) { encode_CredentialAPIKey(_v) }],
}.freeze
ENCODE_AI_PROVIDER_CREDENTIAL_HEADERS =
{
  "type" => ["type", nil],
  "headers" => ["headers", ->(_v) { encode_CredentialHeaders(_v) }],
}.freeze
ENCODE_AI_PROVIDER_CONFIG_OPENROUTER =
{
  "type" => ["type", nil],
  "openrouter" => ["openrouter", ->(_v) { encode_OpenRouterConfig(_v) }],
}.freeze
ENCODE_AI_PROVIDER_CONFIG_OPENAI =
{
  "type" => ["type", nil],
  "openai" => ["openai", ->(_v) { encode_OpenAIConfig(_v) }],
}.freeze
ENCODE_AI_PROVIDER_CONFIG_OPENAI_COMPATIBLE =
{
  "type" => ["type", nil],
  "openai_compatible" => ["openaiCompatible", ->(_v) { encode_OpenAICompatibleConfig(_v) }],
  "openaiCompatible" => ["openaiCompatible", ->(_v) { encode_OpenAICompatibleConfig(_v) }],
}.freeze

Class Method Summary collapse

Class Method Details

.decode_AddAgentVariationAssignmentRequest(data) ⇒ Object



311
312
313
314
315
316
317
318
319
320
321
322
323
# File 'lib/cadenya/types.rb', line 311

def self.decode_AddAgentVariationAssignmentRequest(data)
  return nil if data.nil? || data["type"].to_s.empty?
  case data["type"]
  when "toolId"
    Types::AddAgentVariationAssignmentRequest_ToolId.from_json(data)
  when "toolSetId"
    Types::AddAgentVariationAssignmentRequest_ToolSetId.from_json(data)
  when "subAgentId"
    Types::AddAgentVariationAssignmentRequest_SubAgentId.from_json(data)
  else
    raise ArgumentError, "AddAgentVariationAssignmentRequest: unknown type #{data["type"].inspect}"
  end
end

.decode_AIProviderConfig(data) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/cadenya/types.rb', line 9

def self.decode_AIProviderConfig(data)
  return nil if data.nil? || data["type"].to_s.empty?
  case data["type"]
  when "openrouter"
    Types::AIProviderConfig_Openrouter.from_json(data)
  when "openai"
    Types::AIProviderConfig_Openai.from_json(data)
  when "openaiCompatible"
    Types::AIProviderConfig_OpenaiCompatible.from_json(data)
  else
    raise ArgumentError, "AIProviderConfig: unknown type #{data["type"].inspect}"
  end
end

.decode_AIProviderCredential(data) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/cadenya/types.rb', line 23

def self.decode_AIProviderCredential(data)
  return nil if data.nil? || data["type"].to_s.empty?
  case data["type"]
  when "apiKey"
    Types::AIProviderCredential_ApiKey.from_json(data)
  when "headers"
    Types::AIProviderCredential_Headers.from_json(data)
  else
    raise ArgumentError, "AIProviderCredential: unknown type #{data["type"].inspect}"
  end
end

.decode_CallableTool(data) ⇒ Object



1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
# File 'lib/cadenya/types.rb', line 1031

def self.decode_CallableTool(data)
  return nil if data.nil? || data["type"].to_s.empty?
  case data["type"]
  when "tool"
    Types::CallableTool_Tool.from_json(data)
  when "agent"
    Types::CallableTool_Agent.from_json(data)
  when "cadenyaProvidedTool"
    Types::CallableTool_CadenyaProvidedTool.from_json(data)
  else
    raise ArgumentError, "CallableTool: unknown type #{data["type"].inspect}"
  end
end

.decode_MemoryEntryCreateSpec(data) ⇒ Object



3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
# File 'lib/cadenya/types.rb', line 3077

def self.decode_MemoryEntryCreateSpec(data)
  return nil if data.nil? || data["type"].to_s.empty?
  case data["type"]
  when "content"
    Types::MemoryEntryCreateSpec_Content.from_json(data)
  when "uploadId"
    Types::MemoryEntryCreateSpec_UploadId.from_json(data)
  else
    raise ArgumentError, "MemoryEntryCreateSpec: unknown type #{data["type"].inspect}"
  end
end

.decode_ModelSpec_Capability(data) ⇒ Object



3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
# File 'lib/cadenya/types.rb', line 3429

def self.decode_ModelSpec_Capability(data)
  return nil if data.nil? || data["type"].to_s.empty?
  case data["type"]
  when "temperature"
    Types::ModelSpec_Capability_Temperature.from_json(data)
  when "topP"
    Types::ModelSpec_Capability_TopP.from_json(data)
  when "topK"
    Types::ModelSpec_Capability_TopK.from_json(data)
  when "stopSequences"
    Types::ModelSpec_Capability_StopSequences.from_json(data)
  when "maxOutputTokens"
    Types::ModelSpec_Capability_MaxOutputTokens.from_json(data)
  when "reasoning"
    Types::ModelSpec_Capability_Reasoning.from_json(data)
  when "caching"
    Types::ModelSpec_Capability_Caching.from_json(data)
  else
    raise ArgumentError, "ModelSpec_Capability: unknown type #{data["type"].inspect}"
  end
end

.decode_ObjectiveEventData(data) ⇒ Object



3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
# File 'lib/cadenya/types.rb', line 3777

def self.decode_ObjectiveEventData(data)
  return nil if data.nil? || data["type"].to_s.empty?
  case data["type"]
  when "userMessage"
    Types::ObjectiveEventData_UserMessage.from_json(data)
  when "toolApprovalRequested"
    Types::ObjectiveEventData_ToolApprovalRequested.from_json(data)
  when "toolApproved"
    Types::ObjectiveEventData_ToolApproved.from_json(data)
  when "toolDenied"
    Types::ObjectiveEventData_ToolDenied.from_json(data)
  when "toolCalled"
    Types::ObjectiveEventData_ToolCalled.from_json(data)
  when "error"
    Types::ObjectiveEventData_Error.from_json(data)
  when "assistantMessage"
    Types::ObjectiveEventData_AssistantMessage.from_json(data)
  when "toolResult"
    Types::ObjectiveEventData_ToolResult.from_json(data)
  when "toolError"
    Types::ObjectiveEventData_ToolError.from_json(data)
  when "contextWindowCompacted"
    Types::ObjectiveEventData_ContextWindowCompacted.from_json(data)
  when "memoryRead"
    Types::ObjectiveEventData_MemoryRead.from_json(data)
  when "cancelled"
    Types::ObjectiveEventData_Cancelled.from_json(data)
  when "subAgentSpawned"
    Types::ObjectiveEventData_SubAgentSpawned.from_json(data)
  when "subAgentUpdated"
    Types::ObjectiveEventData_SubAgentUpdated.from_json(data)
  when "finalized"
    Types::ObjectiveEventData_Finalized.from_json(data)
  when "notice"
    Types::ObjectiveEventData_Notice.from_json(data)
  when "timedOut"
    Types::ObjectiveEventData_TimedOut.from_json(data)
  when "reasoning"
    Types::ObjectiveEventData_Reasoning.from_json(data)
  else
    raise ArgumentError, "ObjectiveEventData: unknown type #{data["type"].inspect}"
  end
end

.decode_ObjectiveToolCallResult_ContentBlock(data) ⇒ Object



4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
# File 'lib/cadenya/types.rb', line 4239

def self.decode_ObjectiveToolCallResult_ContentBlock(data)
  return nil if data.nil? || data["type"].to_s.empty?
  case data["type"]
  when "text"
    Types::ObjectiveToolCallResult_ContentBlock_Text.from_json(data)
  when "image"
    Types::ObjectiveToolCallResult_ContentBlock_Image.from_json(data)
  when "audio"
    Types::ObjectiveToolCallResult_ContentBlock_Audio.from_json(data)
  else
    raise ArgumentError, "ObjectiveToolCallResult_ContentBlock: unknown type #{data["type"].inspect}"
  end
end

.decode_Selector_Condition(data) ⇒ Object



5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
# File 'lib/cadenya/types.rb', line 5050

def self.decode_Selector_Condition(data)
  return nil if data.nil? || data["type"].to_s.empty?
  case data["type"]
  when "attribute"
    Types::Selector_Condition_Attribute.from_json(data)
  when "hasParameter"
    Types::Selector_Condition_HasParameter.from_json(data)
  when "tools"
    Types::Selector_Condition_Tools.from_json(data)
  else
    raise ArgumentError, "Selector_Condition: unknown type #{data["type"].inspect}"
  end
end

.decode_SetToolCallContentRequest_ContentBlock(data) ⇒ Object



5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
# File 'lib/cadenya/types.rb', line 5136

def self.decode_SetToolCallContentRequest_ContentBlock(data)
  return nil if data.nil? || data["type"].to_s.empty?
  case data["type"]
  when "text"
    Types::SetToolCallContentRequest_ContentBlock_Text.from_json(data)
  when "image"
    Types::SetToolCallContentRequest_ContentBlock_Image.from_json(data)
  when "audio"
    Types::SetToolCallContentRequest_ContentBlock_Audio.from_json(data)
  else
    raise ArgumentError, "SetToolCallContentRequest_ContentBlock: unknown type #{data["type"].inspect}"
  end
end

.decode_ToolOverlay_ParameterAction(data) ⇒ Object



5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
# File 'lib/cadenya/types.rb', line 5818

def self.decode_ToolOverlay_ParameterAction(data)
  return nil if data.nil? || data["type"].to_s.empty?
  case data["type"]
  when "remove"
    Types::ToolOverlay_ParameterAction_Remove.from_json(data)
  when "set"
    Types::ToolOverlay_ParameterAction_Set.from_json(data)
  when "pin"
    Types::ToolOverlay_ParameterAction_Pin.from_json(data)
  else
    raise ArgumentError, "ToolOverlay_ParameterAction: unknown type #{data["type"].inspect}"
  end
end

.decode_ToolOverlay_ResultAction(data) ⇒ Object



5852
5853
5854
5855
5856
5857
5858
5859
5860
# File 'lib/cadenya/types.rb', line 5852

def self.decode_ToolOverlay_ResultAction(data)
  return nil if data.nil? || data["type"].to_s.empty?
  case data["type"]
  when "transform"
    Types::ToolOverlay_ResultAction_Transform.from_json(data)
  else
    raise ArgumentError, "ToolOverlay_ResultAction: unknown type #{data["type"].inspect}"
  end
end

.decode_ToolSetAdapter(data) ⇒ Object



5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
# File 'lib/cadenya/types.rb', line 5961

def self.decode_ToolSetAdapter(data)
  return nil if data.nil? || data["type"].to_s.empty?
  case data["type"]
  when "mcp"
    Types::ToolSetAdapter_McpVariant.from_json(data)
  when "http"
    Types::ToolSetAdapter_HttpVariant.from_json(data)
  when "openapi"
    Types::ToolSetAdapter_OpenapiVariant.from_json(data)
  when "bare"
    Types::ToolSetAdapter_BareVariant.from_json(data)
  else
    raise ArgumentError, "ToolSetAdapter: unknown type #{data["type"].inspect}"
  end
end

.decode_ToolSetAdapter_ApprovalRequirementFilter(data) ⇒ Object



5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
# File 'lib/cadenya/types.rb', line 5977

def self.decode_ToolSetAdapter_ApprovalRequirementFilter(data)
  return nil if data.nil? || data["type"].to_s.empty?
  case data["type"]
  when "always"
    Types::ToolSetAdapter_ApprovalRequirementFilter_Always.from_json(data)
  when "only"
    Types::ToolSetAdapter_ApprovalRequirementFilter_Only.from_json(data)
  else
    raise ArgumentError, "ToolSetAdapter_ApprovalRequirementFilter: unknown type #{data["type"].inspect}"
  end
end

.decode_ToolSetAdapter_OpenAPI(data) ⇒ Object



6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
# File 'lib/cadenya/types.rb', line 6115

def self.decode_ToolSetAdapter_OpenAPI(data)
  return nil if data.nil? || data["type"].to_s.empty?
  case data["type"]
  when "url"
    Types::ToolSetAdapter_OpenAPI_Url.from_json(data)
  when "uploadId"
    Types::ToolSetAdapter_OpenAPI_UploadId.from_json(data)
  else
    raise ArgumentError, "ToolSetAdapter_OpenAPI: unknown type #{data["type"].inspect}"
  end
end

.decode_ToolSetAdapter_StringMatcher(data) ⇒ Object



6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
# File 'lib/cadenya/types.rb', line 6127

def self.decode_ToolSetAdapter_StringMatcher(data)
  return nil if data.nil? || data["type"].to_s.empty?
  case data["type"]
  when "exact"
    Types::ToolSetAdapter_StringMatcher_Exact.from_json(data)
  when "startsWith"
    Types::ToolSetAdapter_StringMatcher_StartsWith.from_json(data)
  when "endsWith"
    Types::ToolSetAdapter_StringMatcher_EndsWith.from_json(data)
  when "contains"
    Types::ToolSetAdapter_StringMatcher_Contains.from_json(data)
  when "regex"
    Types::ToolSetAdapter_StringMatcher_Regex.from_json(data)
  else
    raise ArgumentError, "ToolSetAdapter_StringMatcher: unknown type #{data["type"].inspect}"
  end
end

.decode_ToolSetEventData(data) ⇒ Object



6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
# File 'lib/cadenya/types.rb', line 6199

def self.decode_ToolSetEventData(data)
  return nil if data.nil? || data["type"].to_s.empty?
  case data["type"]
  when "syncStarted"
    Types::ToolSetEventData_SyncStarted.from_json(data)
  when "syncCompleted"
    Types::ToolSetEventData_SyncCompleted.from_json(data)
  when "syncFailed"
    Types::ToolSetEventData_SyncFailed.from_json(data)
  else
    raise ArgumentError, "ToolSetEventData: unknown type #{data["type"].inspect}"
  end
end

.decode_ToolSpec_Config(data) ⇒ Object



6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
# File 'lib/cadenya/types.rb', line 6427

def self.decode_ToolSpec_Config(data)
  return nil if data.nil? || data["type"].to_s.empty?
  case data["type"]
  when "http"
    Types::ToolSpec_Config_Http.from_json(data)
  when "mcp"
    Types::ToolSpec_Config_Mcp.from_json(data)
  when "openapi"
    Types::ToolSpec_Config_Openapi.from_json(data)
  when "bare"
    Types::ToolSpec_Config_Bare.from_json(data)
  else
    raise ArgumentError, "ToolSpec_Config: unknown type #{data["type"].inspect}"
  end
end

.decode_VariationAssignment(data) ⇒ Object



7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
# File 'lib/cadenya/types.rb', line 7150

def self.decode_VariationAssignment(data)
  return nil if data.nil? || data["type"].to_s.empty?
  case data["type"]
  when "tool"
    Types::VariationAssignment_Tool.from_json(data)
  when "toolSet"
    Types::VariationAssignment_ToolSet.from_json(data)
  when "agent"
    Types::VariationAssignment_Agent.from_json(data)
  else
    raise ArgumentError, "VariationAssignment: unknown type #{data["type"].inspect}"
  end
end

.encode_AddAgentVariationAssignmentRequest(data) ⇒ Object



9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
# File 'lib/cadenya/types.rb', line 9645

def self.encode_AddAgentVariationAssignmentRequest(data)
  data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
  unless data.is_a?(Hash)
    raise TypeError, "expected a Hash (or a decoded Types value object), got #{data.class}"
  end

  case data["type"] || data[:type]
  when "toolId"
    (->(_v) { encode_AddAgentVariationAssignmentRequest_ToolId(_v) }).call(data)
  when "toolSetId"
    (->(_v) { encode_AddAgentVariationAssignmentRequest_ToolSetId(_v) }).call(data)
  when "subAgentId"
    (->(_v) { encode_AddAgentVariationAssignmentRequest_SubAgentId(_v) }).call(data)
  else
    data
  end
end

.encode_AddAgentVariationAssignmentRequest_SubAgentId(data) ⇒ Object



10896
10897
10898
# File 'lib/cadenya/types.rb', line 10896

def self.encode_AddAgentVariationAssignmentRequest_SubAgentId(data)
  encode_fields(ENCODE_ADD_AGENT_VARIATION_ASSIGNMENT_REQUEST_SUB_AGENT_ID, data, drop: DROP_ADD_AGENT_VARIATION_ASSIGNMENT_REQUEST_SUB_AGENT_ID)
end

.encode_AddAgentVariationAssignmentRequest_ToolId(data) ⇒ Object



10872
10873
10874
# File 'lib/cadenya/types.rb', line 10872

def self.encode_AddAgentVariationAssignmentRequest_ToolId(data)
  encode_fields(ENCODE_ADD_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_ID, data, drop: DROP_ADD_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_ID)
end

.encode_AddAgentVariationAssignmentRequest_ToolSetId(data) ⇒ Object



10884
10885
10886
# File 'lib/cadenya/types.rb', line 10884

def self.encode_AddAgentVariationAssignmentRequest_ToolSetId(data)
  encode_fields(ENCODE_ADD_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_SET_ID, data, drop: DROP_ADD_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_SET_ID)
end

.encode_AgentScheduleSpec(data) ⇒ Object



9677
9678
9679
# File 'lib/cadenya/types.rb', line 9677

def self.encode_AgentScheduleSpec(data)
  encode_fields(ENCODE_AGENT_SCHEDULE_SPEC, data)
end

.encode_AgentScheduleSpec_Schedule(data) ⇒ Object



9687
9688
9689
# File 'lib/cadenya/types.rb', line 9687

def self.encode_AgentScheduleSpec_Schedule(data)
  encode_fields(ENCODE_AGENT_SCHEDULE_SPEC_SCHEDULE, data)
end

.encode_AgentSpec(data) ⇒ Object



9707
9708
9709
# File 'lib/cadenya/types.rb', line 9707

def self.encode_AgentSpec(data)
  encode_fields(ENCODE_AGENT_SPEC, data)
end

.encode_AgentVariationSpec(data) ⇒ Object



9726
9727
9728
# File 'lib/cadenya/types.rb', line 9726

def self.encode_AgentVariationSpec(data)
  encode_fields(ENCODE_AGENT_VARIATION_SPEC, data)
end

.encode_AgentVariationSpec_CompactionConfig(data) ⇒ Object



9738
9739
9740
# File 'lib/cadenya/types.rb', line 9738

def self.encode_AgentVariationSpec_CompactionConfig(data)
  encode_fields(ENCODE_AGENT_VARIATION_SPEC_COMPACTION_CONFIG, data)
end

.encode_AgentVariationSpec_Constraints(data) ⇒ Object



9751
9752
9753
# File 'lib/cadenya/types.rb', line 9751

def self.encode_AgentVariationSpec_Constraints(data)
  encode_fields(ENCODE_AGENT_VARIATION_SPEC_CONSTRAINTS, data)
end

.encode_AgentVariationSpec_ModelConfig(data) ⇒ Object



9773
9774
9775
# File 'lib/cadenya/types.rb', line 9773

def self.encode_AgentVariationSpec_ModelConfig(data)
  encode_fields(ENCODE_AGENT_VARIATION_SPEC_MODEL_CONFIG, data)
end

.encode_AgentVariationSpec_ProgressiveDiscovery(data) ⇒ Object



9783
9784
9785
# File 'lib/cadenya/types.rb', line 9783

def self.encode_AgentVariationSpec_ProgressiveDiscovery(data)
  encode_fields(ENCODE_AGENT_VARIATION_SPEC_PROGRESSIVE_DISCOVERY, data)
end

.encode_AIProviderConfig(data) ⇒ Object



9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
# File 'lib/cadenya/types.rb', line 9590

def self.encode_AIProviderConfig(data)
  data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
  unless data.is_a?(Hash)
    raise TypeError, "expected a Hash (or a decoded Types value object), got #{data.class}"
  end

  case data["type"] || data[:type]
  when "openrouter"
    (->(_v) { encode_AIProviderConfig_Openrouter(_v) }).call(data)
  when "openai"
    (->(_v) { encode_AIProviderConfig_Openai(_v) }).call(data)
  when "openaiCompatible"
    (->(_v) { encode_AIProviderConfig_OpenaiCompatible(_v) }).call(data)
  else
    data
  end
end

.encode_AIProviderConfig_Openai(data) ⇒ Object



10933
10934
10935
# File 'lib/cadenya/types.rb', line 10933

def self.encode_AIProviderConfig_Openai(data)
  encode_fields(ENCODE_AI_PROVIDER_CONFIG_OPENAI, data)
end

.encode_AIProviderConfig_OpenaiCompatible(data) ⇒ Object



10943
10944
10945
# File 'lib/cadenya/types.rb', line 10943

def self.encode_AIProviderConfig_OpenaiCompatible(data)
  encode_fields(ENCODE_AI_PROVIDER_CONFIG_OPENAI_COMPATIBLE, data)
end

.encode_AIProviderConfig_Openrouter(data) ⇒ Object



10924
10925
10926
# File 'lib/cadenya/types.rb', line 10924

def self.encode_AIProviderConfig_Openrouter(data)
  encode_fields(ENCODE_AI_PROVIDER_CONFIG_OPENROUTER, data)
end

.encode_AIProviderCredential(data) ⇒ Object



9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
# File 'lib/cadenya/types.rb', line 9608

def self.encode_AIProviderCredential(data)
  data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
  unless data.is_a?(Hash)
    raise TypeError, "expected a Hash (or a decoded Types value object), got #{data.class}"
  end

  case data["type"] || data[:type]
  when "apiKey"
    (->(_v) { encode_AIProviderCredential_ApiKey(_v) }).call(data)
  when "headers"
    (->(_v) { encode_AIProviderCredential_Headers(_v) }).call(data)
  else
    data
  end
end

.encode_AIProviderCredential_ApiKey(data) ⇒ Object



10906
10907
10908
# File 'lib/cadenya/types.rb', line 10906

def self.encode_AIProviderCredential_ApiKey(data)
  encode_fields(ENCODE_AI_PROVIDER_CREDENTIAL_API_KEY, data)
end

.encode_AIProviderCredential_Headers(data) ⇒ Object



10915
10916
10917
# File 'lib/cadenya/types.rb', line 10915

def self.encode_AIProviderCredential_Headers(data)
  encode_fields(ENCODE_AI_PROVIDER_CREDENTIAL_HEADERS, data)
end

.encode_AIProviderKeySpec(data) ⇒ Object



9630
9631
9632
# File 'lib/cadenya/types.rb', line 9630

def self.encode_AIProviderKeySpec(data)
  encode_fields(ENCODE_AI_PROVIDER_KEY_SPEC, data)
end

.encode_APIKeySpec(data) ⇒ Object



9641
9642
9643
# File 'lib/cadenya/types.rb', line 9641

def self.encode_APIKeySpec(data)
  encode_fields(ENCODE_API_KEY_SPEC, data, drop: DROP_API_KEY_SPEC)
end

.encode_CompactionConfig_SummarizationStrategy(data) ⇒ Object



9791
9792
9793
# File 'lib/cadenya/types.rb', line 9791

def self.encode_CompactionConfig_SummarizationStrategy(data)
  encode_fields(ENCODE_COMPACTION_CONFIG_SUMMARIZATION_STRATEGY, data)
end

.encode_CompactionConfig_ToolResultClearingStrategy(data) ⇒ Object



9800
9801
9802
# File 'lib/cadenya/types.rb', line 9800

def self.encode_CompactionConfig_ToolResultClearingStrategy(data)
  encode_fields(ENCODE_COMPACTION_CONFIG_TOOL_RESULT_CLEARING_STRATEGY, data)
end

.encode_Config_Bare(data) ⇒ Object



9809
9810
9811
# File 'lib/cadenya/types.rb', line 9809

def self.encode_Config_Bare(data)
  encode_fields(ENCODE_CONFIG_BARE, data)
end

.encode_Config_HTTP(data) ⇒ Object



9825
9826
9827
# File 'lib/cadenya/types.rb', line 9825

def self.encode_Config_HTTP(data)
  encode_fields(ENCODE_CONFIG_HTTP, data)
end

.encode_Config_MCP(data) ⇒ Object



9833
9834
9835
# File 'lib/cadenya/types.rb', line 9833

def self.encode_Config_MCP(data)
  encode_fields(ENCODE_CONFIG_MCP, data)
end

.encode_Config_OpenAPI(data) ⇒ Object



9842
9843
9844
# File 'lib/cadenya/types.rb', line 9842

def self.encode_Config_OpenAPI(data)
  encode_fields(ENCODE_CONFIG_OPEN_API, data)
end

.encode_CreateAccountResourceMetadata(data) ⇒ Object



9853
9854
9855
# File 'lib/cadenya/types.rb', line 9853

def self.(data)
  encode_fields(ENCODE_CREATE_ACCOUNT_RESOURCE_METADATA, data)
end

.encode_CreateAgentVariationRequest(data) ⇒ Object



9864
9865
9866
# File 'lib/cadenya/types.rb', line 9864

def self.encode_CreateAgentVariationRequest(data)
  encode_fields(ENCODE_CREATE_AGENT_VARIATION_REQUEST, data, drop: DROP_CREATE_AGENT_VARIATION_REQUEST)
end

.encode_CreateObjectiveRequest_Secret(data) ⇒ Object



9873
9874
9875
# File 'lib/cadenya/types.rb', line 9873

def self.encode_CreateObjectiveRequest_Secret(data)
  encode_fields(ENCODE_CREATE_OBJECTIVE_REQUEST_SECRET, data)
end

.encode_CreateOperationMetadata(data) ⇒ Object



9883
9884
9885
# File 'lib/cadenya/types.rb', line 9883

def self.(data)
  encode_fields(ENCODE_CREATE_OPERATION_METADATA, data)
end

.encode_CreateResourceMetadata(data) ⇒ Object



9894
9895
9896
# File 'lib/cadenya/types.rb', line 9894

def self.(data)
  encode_fields(ENCODE_CREATE_RESOURCE_METADATA, data)
end

.encode_CreateWidgetSessionRequest_Secret(data) ⇒ Object



9903
9904
9905
# File 'lib/cadenya/types.rb', line 9903

def self.encode_CreateWidgetSessionRequest_Secret(data)
  encode_fields(ENCODE_CREATE_WIDGET_SESSION_REQUEST_SECRET, data)
end

.encode_CredentialAPIKey(data) ⇒ Object



9912
9913
9914
# File 'lib/cadenya/types.rb', line 9912

def self.encode_CredentialAPIKey(data)
  encode_fields(ENCODE_CREDENTIAL_API_KEY, data)
end

.encode_CredentialHeaders(data) ⇒ Object



9920
9921
9922
# File 'lib/cadenya/types.rb', line 9920

def self.encode_CredentialHeaders(data)
  encode_fields(ENCODE_CREDENTIAL_HEADERS, data)
end

.encode_fields(fields, data, drop: nil) ⇒ Object

Translate known snake_case keys (symbols or strings) to wire names, encoding nested typed values. Wire-format and unknown keys pass through untouched, so raw payloads and forward-compatible fields keep working. Decoded Types::* value objects unwrap via to_h (round-trip); anything else non-Hash is a caller bug surfaced BEFORE network I/O — silently JSON-ing an arbitrary object would send its inspection string.



9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
# File 'lib/cadenya/types.rb', line 9562

def self.encode_fields(fields, data, drop: nil)
  data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
  unless data.is_a?(Hash)
    raise TypeError, "expected a Hash (or a decoded Types value object), got #{data.class}"
  end

  out = {}
  claimed = {}
  data.each do |key, value|
    # Server-owned (readOnly) keys are silently REMOVED, so a fetched
    # resource can be modified and resubmitted without echoing state.
    next if drop&.include?(key.to_s)

    entry = fields[key.to_s]
    wire, encode = entry.nil? ? [key.to_s, nil] : entry
    # Two DISTINCT input keys normalizing to one wire key are a caller
    # bug surfaced pre-transport -- hash order must never pick a winner.
    if claimed.key?(wire) && claimed[wire] != key.to_s
      raise ArgumentError,
            "conflicting request keys #{claimed[wire].inspect} and #{key.to_s.inspect} " \
            "both map to the wire field #{wire.inspect}; supply exactly one spelling"
    end
    claimed[wire] = key.to_s
    out[entry.nil? ? key : wire] = encode && !value.nil? ? encode.call(value) : value
  end
  out
end

.encode_MCP_Annotations(data) ⇒ Object



9936
9937
9938
# File 'lib/cadenya/types.rb', line 9936

def self.encode_MCP_Annotations(data)
  encode_fields(ENCODE_MCP_ANNOTATIONS, data)
end

.encode_MemoryEntryCreateSpec(data) ⇒ Object



9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
# File 'lib/cadenya/types.rb', line 9940

def self.encode_MemoryEntryCreateSpec(data)
  data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
  unless data.is_a?(Hash)
    raise TypeError, "expected a Hash (or a decoded Types value object), got #{data.class}"
  end

  case data["type"] || data[:type]
  when "content"
    (->(_v) { encode_MemoryEntryCreateSpec_Content(_v) }).call(data)
  when "uploadId"
    (->(_v) { encode_MemoryEntryCreateSpec_UploadId(_v) }).call(data)
  else
    data
  end
end

.encode_MemoryEntryCreateSpec_Content(data) ⇒ Object



10821
10822
10823
# File 'lib/cadenya/types.rb', line 10821

def self.encode_MemoryEntryCreateSpec_Content(data)
  encode_fields(ENCODE_MEMORY_ENTRY_CREATE_SPEC_CONTENT, data)
end

.encode_MemoryEntryCreateSpec_UploadId(data) ⇒ Object



10833
10834
10835
# File 'lib/cadenya/types.rb', line 10833

def self.encode_MemoryEntryCreateSpec_UploadId(data)
  encode_fields(ENCODE_MEMORY_ENTRY_CREATE_SPEC_UPLOAD_ID, data)
end

.encode_MemoryEntryUpdateSpec(data) ⇒ Object



9964
9965
9966
# File 'lib/cadenya/types.rb', line 9964

def self.encode_MemoryEntryUpdateSpec(data)
  encode_fields(ENCODE_MEMORY_ENTRY_UPDATE_SPEC, data)
end

.encode_MemoryLayerSpec(data) ⇒ Object



9975
9976
9977
# File 'lib/cadenya/types.rb', line 9975

def self.encode_MemoryLayerSpec(data)
  encode_fields(ENCODE_MEMORY_LAYER_SPEC, data, drop: DROP_MEMORY_LAYER_SPEC)
end

.encode_MemoryReference(data) ⇒ Object



9986
9987
9988
# File 'lib/cadenya/types.rb', line 9986

def self.encode_MemoryReference(data)
  encode_fields(ENCODE_MEMORY_REFERENCE, data)
end

.encode_ObjectiveEpisodicConfig(data) ⇒ Object



9996
9997
9998
# File 'lib/cadenya/types.rb', line 9996

def self.encode_ObjectiveEpisodicConfig(data)
  encode_fields(ENCODE_OBJECTIVE_EPISODIC_CONFIG, data, drop: DROP_OBJECTIVE_EPISODIC_CONFIG)
end

.encode_ObjectiveFeedbackData(data) ⇒ Object



10005
10006
10007
# File 'lib/cadenya/types.rb', line 10005

def self.encode_ObjectiveFeedbackData(data)
  encode_fields(ENCODE_OBJECTIVE_FEEDBACK_DATA, data)
end

.encode_OpenAICompatibleConfig(data) ⇒ Object



10014
10015
10016
# File 'lib/cadenya/types.rb', line 10014

def self.encode_OpenAICompatibleConfig(data)
  encode_fields(ENCODE_OPEN_AI_COMPATIBLE_CONFIG, data)
end

.encode_OpenAIConfig(data) ⇒ Object



10025
10026
10027
# File 'lib/cadenya/types.rb', line 10025

def self.encode_OpenAIConfig(data)
  encode_fields(ENCODE_OPEN_AI_CONFIG, data)
end

.encode_OpenRouterConfig(data) ⇒ Object



10033
10034
10035
# File 'lib/cadenya/types.rb', line 10033

def self.encode_OpenRouterConfig(data)
  encode_fields(ENCODE_OPEN_ROUTER_CONFIG, data)
end

.encode_ParameterAction_Pin(data) ⇒ Object



10045
10046
10047
# File 'lib/cadenya/types.rb', line 10045

def self.encode_ParameterAction_Pin(data)
  encode_fields(ENCODE_PARAMETER_ACTION_PIN, data)
end

.encode_ParameterAction_Remove(data) ⇒ Object



10053
10054
10055
# File 'lib/cadenya/types.rb', line 10053

def self.encode_ParameterAction_Remove(data)
  encode_fields(ENCODE_PARAMETER_ACTION_REMOVE, data)
end

.encode_ParameterAction_Set(data) ⇒ Object



10063
10064
10065
# File 'lib/cadenya/types.rb', line 10063

def self.encode_ParameterAction_Set(data)
  encode_fields(ENCODE_PARAMETER_ACTION_SET, data)
end

.encode_ResultAction_Transform(data) ⇒ Object



10076
10077
10078
# File 'lib/cadenya/types.rb', line 10076

def self.encode_ResultAction_Transform(data)
  encode_fields(ENCODE_RESULT_ACTION_TRANSFORM, data)
end

.encode_Schedule_Calendar(data) ⇒ Object



10092
10093
10094
# File 'lib/cadenya/types.rb', line 10092

def self.encode_Schedule_Calendar(data)
  encode_fields(ENCODE_SCHEDULE_CALENDAR, data)
end

.encode_Schedule_Interval(data) ⇒ Object



10101
10102
10103
# File 'lib/cadenya/types.rb', line 10101

def self.encode_Schedule_Interval(data)
  encode_fields(ENCODE_SCHEDULE_INTERVAL, data)
end

.encode_Schedule_Range(data) ⇒ Object



10112
10113
10114
# File 'lib/cadenya/types.rb', line 10112

def self.encode_Schedule_Range(data)
  encode_fields(ENCODE_SCHEDULE_RANGE, data)
end

.encode_Selector_Condition(data) ⇒ Object



10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
# File 'lib/cadenya/types.rb', line 10116

def self.encode_Selector_Condition(data)
  data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
  unless data.is_a?(Hash)
    raise TypeError, "expected a Hash (or a decoded Types value object), got #{data.class}"
  end

  case data["type"] || data[:type]
  when "attribute"
    (->(_v) { encode_Selector_Condition_Attribute(_v) }).call(data)
  when "hasParameter"
    (->(_v) { encode_Selector_Condition_HasParameter(_v) }).call(data)
  when "tools"
    (->(_v) { encode_Selector_Condition_Tools(_v) }).call(data)
  else
    data
  end
end

.encode_Selector_Condition_Attribute(data) ⇒ Object



10719
10720
10721
# File 'lib/cadenya/types.rb', line 10719

def self.encode_Selector_Condition_Attribute(data)
  encode_fields(ENCODE_SELECTOR_CONDITION_ATTRIBUTE, data)
end

.encode_Selector_Condition_HasParameter(data) ⇒ Object



10729
10730
10731
# File 'lib/cadenya/types.rb', line 10729

def self.encode_Selector_Condition_HasParameter(data)
  encode_fields(ENCODE_SELECTOR_CONDITION_HAS_PARAMETER, data)
end

.encode_Selector_Condition_Tools(data) ⇒ Object



10738
10739
10740
# File 'lib/cadenya/types.rb', line 10738

def self.encode_Selector_Condition_Tools(data)
  encode_fields(ENCODE_SELECTOR_CONDITION_TOOLS, data)
end

.encode_Selector_ToolNames(data) ⇒ Object



10138
10139
10140
# File 'lib/cadenya/types.rb', line 10138

def self.encode_Selector_ToolNames(data)
  encode_fields(ENCODE_SELECTOR_TOOL_NAMES, data)
end

.encode_SetToolCallContentRequest_AudioBlock(data) ⇒ Object



10148
10149
10150
# File 'lib/cadenya/types.rb', line 10148

def self.encode_SetToolCallContentRequest_AudioBlock(data)
  encode_fields(ENCODE_SET_TOOL_CALL_CONTENT_REQUEST_AUDIO_BLOCK, data)
end

.encode_SetToolCallContentRequest_ContentBlock(data) ⇒ Object



10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
# File 'lib/cadenya/types.rb', line 10152

def self.encode_SetToolCallContentRequest_ContentBlock(data)
  data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
  unless data.is_a?(Hash)
    raise TypeError, "expected a Hash (or a decoded Types value object), got #{data.class}"
  end

  case data["type"] || data[:type]
  when "text"
    (->(_v) { encode_SetToolCallContentRequest_ContentBlock_Text(_v) }).call(data)
  when "image"
    (->(_v) { encode_SetToolCallContentRequest_ContentBlock_Image(_v) }).call(data)
  when "audio"
    (->(_v) { encode_SetToolCallContentRequest_ContentBlock_Audio(_v) }).call(data)
  else
    data
  end
end

.encode_SetToolCallContentRequest_ContentBlock_Audio(data) ⇒ Object



10860
10861
10862
# File 'lib/cadenya/types.rb', line 10860

def self.encode_SetToolCallContentRequest_ContentBlock_Audio(data)
  encode_fields(ENCODE_SET_TOOL_CALL_CONTENT_REQUEST_CONTENT_BLOCK_AUDIO, data)
end

.encode_SetToolCallContentRequest_ContentBlock_Image(data) ⇒ Object



10851
10852
10853
# File 'lib/cadenya/types.rb', line 10851

def self.encode_SetToolCallContentRequest_ContentBlock_Image(data)
  encode_fields(ENCODE_SET_TOOL_CALL_CONTENT_REQUEST_CONTENT_BLOCK_IMAGE, data)
end

.encode_SetToolCallContentRequest_ContentBlock_Text(data) ⇒ Object



10842
10843
10844
# File 'lib/cadenya/types.rb', line 10842

def self.encode_SetToolCallContentRequest_ContentBlock_Text(data)
  encode_fields(ENCODE_SET_TOOL_CALL_CONTENT_REQUEST_CONTENT_BLOCK_TEXT, data)
end

.encode_SetToolCallContentRequest_ImageBlock(data) ⇒ Object



10176
10177
10178
# File 'lib/cadenya/types.rb', line 10176

def self.encode_SetToolCallContentRequest_ImageBlock(data)
  encode_fields(ENCODE_SET_TOOL_CALL_CONTENT_REQUEST_IMAGE_BLOCK, data)
end

.encode_SetToolCallContentRequest_TextBlock(data) ⇒ Object



10184
10185
10186
# File 'lib/cadenya/types.rb', line 10184

def self.encode_SetToolCallContentRequest_TextBlock(data)
  encode_fields(ENCODE_SET_TOOL_CALL_CONTENT_REQUEST_TEXT_BLOCK, data)
end

.encode_SubjectAssertion(data) ⇒ Object



10193
10194
10195
# File 'lib/cadenya/types.rb', line 10193

def self.encode_SubjectAssertion(data)
  encode_fields(ENCODE_SUBJECT_ASSERTION, data)
end

.encode_SwapModelOnVariationsRequest_ModelSwap(data) ⇒ Object



10206
10207
10208
# File 'lib/cadenya/types.rb', line 10206

def self.encode_SwapModelOnVariationsRequest_ModelSwap(data)
  encode_fields(ENCODE_SWAP_MODEL_ON_VARIATIONS_REQUEST_MODEL_SWAP, data)
end

.encode_TenantAssertion(data) ⇒ Object



10215
10216
10217
# File 'lib/cadenya/types.rb', line 10215

def self.encode_TenantAssertion(data)
  encode_fields(ENCODE_TENANT_ASSERTION, data)
end

.encode_ToolOverlay(data) ⇒ Object



10231
10232
10233
# File 'lib/cadenya/types.rb', line 10231

def self.encode_ToolOverlay(data)
  encode_fields(ENCODE_TOOL_OVERLAY, data)
end

.encode_ToolOverlay_ParameterAction(data) ⇒ Object



10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
# File 'lib/cadenya/types.rb', line 10235

def self.encode_ToolOverlay_ParameterAction(data)
  data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
  unless data.is_a?(Hash)
    raise TypeError, "expected a Hash (or a decoded Types value object), got #{data.class}"
  end

  case data["type"] || data[:type]
  when "remove"
    (->(_v) { encode_ToolOverlay_ParameterAction_Remove(_v) }).call(data)
  when "set"
    (->(_v) { encode_ToolOverlay_ParameterAction_Set(_v) }).call(data)
  when "pin"
    (->(_v) { encode_ToolOverlay_ParameterAction_Pin(_v) }).call(data)
  else
    data
  end
end

.encode_ToolOverlay_ParameterAction_Pin(data) ⇒ Object



10765
10766
10767
# File 'lib/cadenya/types.rb', line 10765

def self.encode_ToolOverlay_ParameterAction_Pin(data)
  encode_fields(ENCODE_TOOL_OVERLAY_PARAMETER_ACTION_PIN, data)
end

.encode_ToolOverlay_ParameterAction_Remove(data) ⇒ Object



10747
10748
10749
# File 'lib/cadenya/types.rb', line 10747

def self.encode_ToolOverlay_ParameterAction_Remove(data)
  encode_fields(ENCODE_TOOL_OVERLAY_PARAMETER_ACTION_REMOVE, data)
end

.encode_ToolOverlay_ParameterAction_Set(data) ⇒ Object



10756
10757
10758
# File 'lib/cadenya/types.rb', line 10756

def self.encode_ToolOverlay_ParameterAction_Set(data)
  encode_fields(ENCODE_TOOL_OVERLAY_PARAMETER_ACTION_SET, data)
end

.encode_ToolOverlay_ParameterPath(data) ⇒ Object



10257
10258
10259
# File 'lib/cadenya/types.rb', line 10257

def self.encode_ToolOverlay_ParameterPath(data)
  encode_fields(ENCODE_TOOL_OVERLAY_PARAMETER_PATH, data)
end

.encode_ToolOverlay_ResultAction(data) ⇒ Object



10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
# File 'lib/cadenya/types.rb', line 10261

def self.encode_ToolOverlay_ResultAction(data)
  data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
  unless data.is_a?(Hash)
    raise TypeError, "expected a Hash (or a decoded Types value object), got #{data.class}"
  end

  case data["type"] || data[:type]
  when "transform"
    (->(_v) { encode_ToolOverlay_ResultAction_Transform(_v) }).call(data)
  else
    data
  end
end

.encode_ToolOverlay_ResultAction_Transform(data) ⇒ Object



10774
10775
10776
# File 'lib/cadenya/types.rb', line 10774

def self.encode_ToolOverlay_ResultAction_Transform(data)
  encode_fields(ENCODE_TOOL_OVERLAY_RESULT_ACTION_TRANSFORM, data)
end

.encode_ToolOverlay_Selector(data) ⇒ Object



10280
10281
10282
# File 'lib/cadenya/types.rb', line 10280

def self.encode_ToolOverlay_Selector(data)
  encode_fields(ENCODE_TOOL_OVERLAY_SELECTOR, data)
end

.encode_ToolOverlay_WidgetArgumentExposure(data) ⇒ Object



10288
10289
10290
# File 'lib/cadenya/types.rb', line 10288

def self.encode_ToolOverlay_WidgetArgumentExposure(data)
  encode_fields(ENCODE_TOOL_OVERLAY_WIDGET_ARGUMENT_EXPOSURE, data)
end

.encode_ToolSetAdapter(data) ⇒ Object



10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
# File 'lib/cadenya/types.rb', line 10292

def self.encode_ToolSetAdapter(data)
  data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
  unless data.is_a?(Hash)
    raise TypeError, "expected a Hash (or a decoded Types value object), got #{data.class}"
  end

  case data["type"] || data[:type]
  when "mcp"
    (->(_v) { encode_ToolSetAdapter_McpVariant(_v) }).call(data)
  when "http"
    (->(_v) { encode_ToolSetAdapter_HttpVariant(_v) }).call(data)
  when "openapi"
    (->(_v) { encode_ToolSetAdapter_OpenapiVariant(_v) }).call(data)
  when "bare"
    (->(_v) { encode_ToolSetAdapter_BareVariant(_v) }).call(data)
  else
    data
  end
end

.encode_ToolSetAdapter_ApprovalRequirementFilter(data) ⇒ Object



10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
# File 'lib/cadenya/types.rb', line 10312

def self.encode_ToolSetAdapter_ApprovalRequirementFilter(data)
  data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
  unless data.is_a?(Hash)
    raise TypeError, "expected a Hash (or a decoded Types value object), got #{data.class}"
  end

  case data["type"] || data[:type]
  when "always"
    (->(_v) { encode_ToolSetAdapter_ApprovalRequirementFilter_Always(_v) }).call(data)
  when "only"
    (->(_v) { encode_ToolSetAdapter_ApprovalRequirementFilter_Only(_v) }).call(data)
  else
    data
  end
end

.encode_ToolSetAdapter_ApprovalRequirementFilter_Always(data) ⇒ Object



10660
10661
10662
# File 'lib/cadenya/types.rb', line 10660

def self.encode_ToolSetAdapter_ApprovalRequirementFilter_Always(data)
  encode_fields(ENCODE_TOOL_SET_ADAPTER_APPROVAL_REQUIREMENT_FILTER_ALWAYS, data)
end

.encode_ToolSetAdapter_ApprovalRequirementFilter_Only(data) ⇒ Object



10669
10670
10671
# File 'lib/cadenya/types.rb', line 10669

def self.encode_ToolSetAdapter_ApprovalRequirementFilter_Only(data)
  encode_fields(ENCODE_TOOL_SET_ADAPTER_APPROVAL_REQUIREMENT_FILTER_ONLY, data)
end

.encode_ToolSetAdapter_AttributeFilter(data) ⇒ Object



10333
10334
10335
# File 'lib/cadenya/types.rb', line 10333

def self.encode_ToolSetAdapter_AttributeFilter(data)
  encode_fields(ENCODE_TOOL_SET_ADAPTER_ATTRIBUTE_FILTER, data)
end

.encode_ToolSetAdapter_Bare(data) ⇒ Object



10342
10343
10344
# File 'lib/cadenya/types.rb', line 10342

def self.encode_ToolSetAdapter_Bare(data)
  encode_fields(ENCODE_TOOL_SET_ADAPTER_BARE, data)
end

.encode_ToolSetAdapter_BareVariant(data) ⇒ Object



10594
10595
10596
# File 'lib/cadenya/types.rb', line 10594

def self.encode_ToolSetAdapter_BareVariant(data)
  encode_fields(ENCODE_TOOL_SET_ADAPTER_BARE_VARIANT, data)
end

.encode_ToolSetAdapter_HTTP(data) ⇒ Object



10352
10353
10354
# File 'lib/cadenya/types.rb', line 10352

def self.encode_ToolSetAdapter_HTTP(data)
  encode_fields(ENCODE_TOOL_SET_ADAPTER_HTTP, data)
end

.encode_ToolSetAdapter_HttpVariant(data) ⇒ Object



10576
10577
10578
# File 'lib/cadenya/types.rb', line 10576

def self.encode_ToolSetAdapter_HttpVariant(data)
  encode_fields(ENCODE_TOOL_SET_ADAPTER_HTTP_VARIANT, data)
end

.encode_ToolSetAdapter_JustInTime(data) ⇒ Object



10362
10363
10364
# File 'lib/cadenya/types.rb', line 10362

def self.encode_ToolSetAdapter_JustInTime(data)
  encode_fields(ENCODE_TOOL_SET_ADAPTER_JUST_IN_TIME, data)
end

.encode_ToolSetAdapter_MCP(data) ⇒ Object



10379
10380
10381
# File 'lib/cadenya/types.rb', line 10379

def self.encode_ToolSetAdapter_MCP(data)
  encode_fields(ENCODE_TOOL_SET_ADAPTER_MCP, data)
end

.encode_ToolSetAdapter_McpVariant(data) ⇒ Object



10567
10568
10569
# File 'lib/cadenya/types.rb', line 10567

def self.encode_ToolSetAdapter_McpVariant(data)
  encode_fields(ENCODE_TOOL_SET_ADAPTER_MCP_VARIANT, data)
end

.encode_ToolSetAdapter_OpenAPI(data) ⇒ Object



10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
# File 'lib/cadenya/types.rb', line 10383

def self.encode_ToolSetAdapter_OpenAPI(data)
  data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
  unless data.is_a?(Hash)
    raise TypeError, "expected a Hash (or a decoded Types value object), got #{data.class}"
  end

  case data["type"] || data[:type]
  when "url"
    (->(_v) { encode_ToolSetAdapter_OpenAPI_Url(_v) }).call(data)
  when "uploadId"
    (->(_v) { encode_ToolSetAdapter_OpenAPI_UploadId(_v) }).call(data)
  else
    data
  end
end

.encode_ToolSetAdapter_OpenAPI_UploadId(data) ⇒ Object



10710
10711
10712
# File 'lib/cadenya/types.rb', line 10710

def self.encode_ToolSetAdapter_OpenAPI_UploadId(data)
  encode_fields(ENCODE_TOOL_SET_ADAPTER_OPEN_API_UPLOAD_ID, data)
end

.encode_ToolSetAdapter_OpenAPI_Url(data) ⇒ Object



10689
10690
10691
# File 'lib/cadenya/types.rb', line 10689

def self.encode_ToolSetAdapter_OpenAPI_Url(data)
  encode_fields(ENCODE_TOOL_SET_ADAPTER_OPEN_API_URL, data)
end

.encode_ToolSetAdapter_OpenapiVariant(data) ⇒ Object



10585
10586
10587
# File 'lib/cadenya/types.rb', line 10585

def self.encode_ToolSetAdapter_OpenapiVariant(data)
  encode_fields(ENCODE_TOOL_SET_ADAPTER_OPENAPI_VARIANT, data)
end

.encode_ToolSetAdapter_StringMatcher(data) ⇒ Object



10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
# File 'lib/cadenya/types.rb', line 10399

def self.encode_ToolSetAdapter_StringMatcher(data)
  data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
  unless data.is_a?(Hash)
    raise TypeError, "expected a Hash (or a decoded Types value object), got #{data.class}"
  end

  case data["type"] || data[:type]
  when "exact"
    (->(_v) { encode_ToolSetAdapter_StringMatcher_Exact(_v) }).call(data)
  when "startsWith"
    (->(_v) { encode_ToolSetAdapter_StringMatcher_StartsWith(_v) }).call(data)
  when "endsWith"
    (->(_v) { encode_ToolSetAdapter_StringMatcher_EndsWith(_v) }).call(data)
  when "contains"
    (->(_v) { encode_ToolSetAdapter_StringMatcher_Contains(_v) }).call(data)
  when "regex"
    (->(_v) { encode_ToolSetAdapter_StringMatcher_Regex(_v) }).call(data)
  else
    data
  end
end

.encode_ToolSetAdapter_StringMatcher_Contains(data) ⇒ Object



10640
10641
10642
# File 'lib/cadenya/types.rb', line 10640

def self.encode_ToolSetAdapter_StringMatcher_Contains(data)
  encode_fields(ENCODE_TOOL_SET_ADAPTER_STRING_MATCHER_CONTAINS, data)
end

.encode_ToolSetAdapter_StringMatcher_EndsWith(data) ⇒ Object



10629
10630
10631
# File 'lib/cadenya/types.rb', line 10629

def self.encode_ToolSetAdapter_StringMatcher_EndsWith(data)
  encode_fields(ENCODE_TOOL_SET_ADAPTER_STRING_MATCHER_ENDS_WITH, data)
end

.encode_ToolSetAdapter_StringMatcher_Exact(data) ⇒ Object



10605
10606
10607
# File 'lib/cadenya/types.rb', line 10605

def self.encode_ToolSetAdapter_StringMatcher_Exact(data)
  encode_fields(ENCODE_TOOL_SET_ADAPTER_STRING_MATCHER_EXACT, data)
end

.encode_ToolSetAdapter_StringMatcher_Regex(data) ⇒ Object



10651
10652
10653
# File 'lib/cadenya/types.rb', line 10651

def self.encode_ToolSetAdapter_StringMatcher_Regex(data)
  encode_fields(ENCODE_TOOL_SET_ADAPTER_STRING_MATCHER_REGEX, data)
end

.encode_ToolSetAdapter_StringMatcher_StartsWith(data) ⇒ Object



10617
10618
10619
# File 'lib/cadenya/types.rb', line 10617

def self.encode_ToolSetAdapter_StringMatcher_StartsWith(data)
  encode_fields(ENCODE_TOOL_SET_ADAPTER_STRING_MATCHER_STARTS_WITH, data)
end

.encode_ToolSetAdapter_ToolFilter(data) ⇒ Object



10426
10427
10428
# File 'lib/cadenya/types.rb', line 10426

def self.encode_ToolSetAdapter_ToolFilter(data)
  encode_fields(ENCODE_TOOL_SET_ADAPTER_TOOL_FILTER, data)
end

.encode_ToolSetSecretSpec(data) ⇒ Object



10434
10435
10436
# File 'lib/cadenya/types.rb', line 10434

def self.encode_ToolSetSecretSpec(data)
  encode_fields(ENCODE_TOOL_SET_SECRET_SPEC, data)
end

.encode_ToolSetSpec(data) ⇒ Object



10444
10445
10446
# File 'lib/cadenya/types.rb', line 10444

def self.encode_ToolSetSpec(data)
  encode_fields(ENCODE_TOOL_SET_SPEC, data)
end

.encode_ToolSpec(data) ⇒ Object



10458
10459
10460
# File 'lib/cadenya/types.rb', line 10458

def self.encode_ToolSpec(data)
  encode_fields(ENCODE_TOOL_SPEC, data)
end

.encode_ToolSpec_Config(data) ⇒ Object



10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
# File 'lib/cadenya/types.rb', line 10462

def self.encode_ToolSpec_Config(data)
  data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
  unless data.is_a?(Hash)
    raise TypeError, "expected a Hash (or a decoded Types value object), got #{data.class}"
  end

  case data["type"] || data[:type]
  when "http"
    (->(_v) { encode_ToolSpec_Config_Http(_v) }).call(data)
  when "mcp"
    (->(_v) { encode_ToolSpec_Config_Mcp(_v) }).call(data)
  when "openapi"
    (->(_v) { encode_ToolSpec_Config_Openapi(_v) }).call(data)
  when "bare"
    (->(_v) { encode_ToolSpec_Config_Bare(_v) }).call(data)
  else
    data
  end
end

.encode_ToolSpec_Config_Bare(data) ⇒ Object



10810
10811
10812
# File 'lib/cadenya/types.rb', line 10810

def self.encode_ToolSpec_Config_Bare(data)
  encode_fields(ENCODE_TOOL_SPEC_CONFIG_BARE, data)
end

.encode_ToolSpec_Config_Http(data) ⇒ Object



10783
10784
10785
# File 'lib/cadenya/types.rb', line 10783

def self.encode_ToolSpec_Config_Http(data)
  encode_fields(ENCODE_TOOL_SPEC_CONFIG_HTTP, data)
end

.encode_ToolSpec_Config_Mcp(data) ⇒ Object



10792
10793
10794
# File 'lib/cadenya/types.rb', line 10792

def self.encode_ToolSpec_Config_Mcp(data)
  encode_fields(ENCODE_TOOL_SPEC_CONFIG_MCP, data)
end

.encode_ToolSpec_Config_Openapi(data) ⇒ Object



10801
10802
10803
# File 'lib/cadenya/types.rb', line 10801

def self.encode_ToolSpec_Config_Openapi(data)
  encode_fields(ENCODE_TOOL_SPEC_CONFIG_OPENAPI, data)
end

.encode_UpdateAccountResourceMetadata(data) ⇒ Object



10489
10490
10491
# File 'lib/cadenya/types.rb', line 10489

def self.(data)
  encode_fields(ENCODE_UPDATE_ACCOUNT_RESOURCE_METADATA, data)
end

.encode_UpdateResourceMetadata(data) ⇒ Object



10500
10501
10502
# File 'lib/cadenya/types.rb', line 10500

def self.(data)
  encode_fields(ENCODE_UPDATE_RESOURCE_METADATA, data)
end

.encode_UploadSpec(data) ⇒ Object



10512
10513
10514
# File 'lib/cadenya/types.rb', line 10512

def self.encode_UploadSpec(data)
  encode_fields(ENCODE_UPLOAD_SPEC, data)
end

.encode_WidgetSessionSpec(data) ⇒ Object



10529
10530
10531
# File 'lib/cadenya/types.rb', line 10529

def self.encode_WidgetSessionSpec(data)
  encode_fields(ENCODE_WIDGET_SESSION_SPEC, data, drop: DROP_WIDGET_SESSION_SPEC)
end

.encode_WidgetSpec(data) ⇒ Object



10542
10543
10544
# File 'lib/cadenya/types.rb', line 10542

def self.encode_WidgetSpec(data)
  encode_fields(ENCODE_WIDGET_SPEC, data)
end

.encode_WorkspaceSecretSpec(data) ⇒ Object



10550
10551
10552
# File 'lib/cadenya/types.rb', line 10550

def self.encode_WorkspaceSecretSpec(data)
  encode_fields(ENCODE_WORKSPACE_SECRET_SPEC, data)
end

.encode_WorkspaceSpec(data) ⇒ Object



10558
10559
10560
# File 'lib/cadenya/types.rb', line 10558

def self.encode_WorkspaceSpec(data)
  encode_fields(ENCODE_WORKSPACE_SPEC, data)
end