diff --git a/eslint.config.js b/eslint.config.js index 22e2d2daac..4b30570af6 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -17,4 +17,15 @@ export default tseslint.config( }, }, tseslint.configs.recommended, + { + rules: { + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + }, + ], + }, + }, ); \ No newline at end of file diff --git a/examples/multi-service-client.ts b/examples/multi-service-client.ts new file mode 100644 index 0000000000..7f34483d9a --- /dev/null +++ b/examples/multi-service-client.ts @@ -0,0 +1,201 @@ +import { + ServiceManager, + createServiceManager, + createDigitalOceanClient, + createServerlessInferenceClient, + createAgentInferenceClient, +} from "../src/dots/services/index.js"; + +/** + * Example 1: Using individual service clients + */ +async function exampleIndividualServices() { + console.log("=== Example 1: Individual Service Clients ===\n"); + + // DigitalOcean API v2 + const doClient = createDigitalOceanClient(process.env.DO_API_KEY!); + console.log("DigitalOcean Client:"); + console.log(` Base URL: ${doClient.baseUrl}`); + console.log(` Service Type: ${doClient.config.type}\n`); + + // Serverless Inference + const serverlessClient = createServerlessInferenceClient( + process.env.INFERENCE_TOKEN!, + "https://inference.do-ai.run" // custom base URL (optional) + ); + console.log("Serverless Inference Client:"); + console.log(` Base URL: ${serverlessClient.baseUrl}`); + console.log(` Service Type: ${serverlessClient.config.type}\n`); + + // Agent Inference + const agentClient = createAgentInferenceClient( + "my-agent.example.com", // Agent URL + process.env.AGENT_TOKEN, // Optional auth token + { "X-Custom-Header": "value" } // Optional custom headers + ); + console.log("Agent Inference Client:"); + console.log(` Base URL: ${agentClient.baseUrl}`); + console.log(` Service Type: ${agentClient.config.type}\n`); +} + +/** + * Example 2: Using ServiceManager with pre-configured services + */ +async function exampleServiceManager() { + console.log("=== Example 2: Service Manager ===\n"); + + const manager = createServiceManager({ + digitalOcean: process.env.DO_API_KEY, + serverlessInference: { + token: process.env.INFERENCE_TOKEN!, + baseUrl: "https://inference.do-ai.run", + }, + agentInference: { + url: "my-agent.example.com", + token: process.env.AGENT_TOKEN, + headers: { "X-Custom-Header": "value" }, + }, + }); + + console.log("Registered services:"); + manager.listServices().forEach((name) => { + const service = manager.getService(name); + if (service) { + console.log(` - ${name}: ${service.config.type} (${service.baseUrl})`); + } + }); + console.log(); + + // Get a specific service + const doService = manager.getService("digitalocean"); + if (doService) { + console.log(`Retrieved service: ${doService.config.type}`); + console.log(` Adapter: ${doService.adapter.constructor.name}`); + console.log(` Base URL: ${doService.baseUrl}\n`); + } +} + +/** + * Example 3: Dynamic service registration + */ +async function exampleDynamicRegistration() { + console.log("=== Example 3: Dynamic Service Registration ===\n"); + + const manager = new ServiceManager(); + + // Register services dynamically + manager.registerService( + "do-prod", + createDigitalOceanClient(process.env.DO_API_KEY!) + ); + + manager.registerService( + "inference-prod", + createServerlessInferenceClient(process.env.INFERENCE_TOKEN!) + ); + + manager.registerService( + "agent-dev", + createAgentInferenceClient("dev-agent.internal.com") + ); + + manager.registerService( + "agent-prod", + createAgentInferenceClient( + "prod-agent.internal.com", + process.env.AGENT_TOKEN + ) + ); + + console.log("Dynamically registered services:"); + manager.listServices().forEach((name) => { + const service = manager.getService(name); + if (service) { + console.log(` ${name}:`); + console.log(` Type: ${service.config.type}`); + console.log(` URL: ${service.baseUrl}`); + console.log(` Has Auth Token: ${!!service.config.authToken}`); + } + }); + console.log(); + + // Remove a service + manager.removeService("agent-dev"); + console.log("After removing 'agent-dev':"); + console.log(` Services: ${manager.listServices().join(", ")}\n`); +} + +/** + * Example 4: Using different service URLs for environment-specific configuration + */ +async function exampleEnvironmentSpecific() { + console.log("=== Example 4: Environment-Specific Configuration ===\n"); + + const environment = process.env.NODE_ENV || "development"; + + const config = + environment === "production" + ? { + digitalOcean: process.env.DO_API_KEY_PROD, + serverlessInference: { + token: process.env.INFERENCE_TOKEN_PROD!, + baseUrl: "https://inference.prod.do-ai.run", + }, + agentInference: { + url: "prod-agent.company.com", + token: process.env.AGENT_TOKEN_PROD, + }, + } + : { + digitalOcean: process.env.DO_API_KEY_DEV, + serverlessInference: { + token: process.env.INFERENCE_TOKEN_DEV!, + baseUrl: "https://inference.dev.do-ai.run", + }, + agentInference: { + url: "dev-agent.company.com", + token: process.env.AGENT_TOKEN_DEV, + }, + }; + + const manager = createServiceManager(config); + + console.log(`Environment: ${environment}`); + console.log(`Services configured for ${environment}:`); + manager.listServices().forEach((name) => { + const service = manager.getService(name); + if (service) { + // Mask sensitive URLs + const displayUrl = service.baseUrl.includes("local") + ? service.baseUrl + : new URL(service.baseUrl).hostname; + console.log(` - ${name}: ${displayUrl}`); + } + }); + console.log(); +} + +/** + * Main runner + */ +async function main() { + try { + // Check required environment variables + if (!process.env.DO_API_KEY) { + console.warn("Warning: DO_API_KEY not set\n"); + } + + // Run examples + await exampleIndividualServices(); + await exampleServiceManager(); + await exampleDynamicRegistration(); + await exampleEnvironmentSpecific(); + + console.log("✅ All examples completed successfully!"); + } catch (error) { + console.error("Error:", error); + process.exit(1); + } +} + +main(); diff --git a/examples/streaming_endpoints.ts b/examples/streaming_endpoints.ts new file mode 100644 index 0000000000..4b5680fb3a --- /dev/null +++ b/examples/streaming_endpoints.ts @@ -0,0 +1,188 @@ +import dotenv from "dotenv"; +import type { RequestInformation } from "@microsoft/kiota-abstractions"; +import { + createDigitalOceanClient, + createServerlessInferenceClient, + createStreamingAdapter, + StreamingResponseType, + type Chat_completion_request, + type Create_image_request, + type Create_response_request, +} from "../index.js"; + +dotenv.config(); + +const token = process.env.DO_INFERENCE_TOKEN || process.env.INFERENCE_TOKEN; +if (!token) { + throw new Error("Set DO_INFERENCE_TOKEN (or INFERENCE_TOKEN)"); +} +const authToken: string = token; + +const baseUrl = process.env.DO_INFERENCE_BASE_URL || "https://inference.do-ai.run"; +const endpoint = (process.env.DO_STREAM_ENDPOINT || "chat").toLowerCase(); +const model = process.env.DO_MODEL || "llama3.3-70b-instruct"; +const prompt = process.env.DO_PROMPT || "Write two short lines about DigitalOcean."; +const streamEnabled = (process.env.DO_STREAM ?? "true").toLowerCase() !== "false"; + +function isObjectRecord(value: unknown): value is Record { + return typeof value === "object" && value !== null; +} + +function printStreamChunk(chunk: unknown): void { + if (typeof chunk === "string") { + if (chunk !== "[DONE]") { + process.stdout.write(chunk); + } + return; + } + if (!isObjectRecord(chunk)) { + return; + } + const choices = chunk.choices; + if (Array.isArray(choices) && choices.length > 0) { + const first = choices[0]; + if (isObjectRecord(first) && isObjectRecord(first.delta)) { + const content = first.delta.content; + if (typeof content === "string") { + process.stdout.write(content); + return; + } + } + } + if (chunk.type === "response.output_text.delta" && typeof chunk.delta === "string") { + process.stdout.write(chunk.delta); + } +} + +async function runNonStreaming(client: ReturnType) { + if (endpoint === "chat") { + const body = { + model, + stream: false, + messages: [{ role: "user", content: prompt }], + } as unknown as Chat_completion_request; + const response = await client.v1.chat.completions.post(body); + console.log(JSON.stringify(response, null, 2)); + return; + } + + if (endpoint === "agent-chat") { + const body = { + model, + stream: false, + messages: [{ role: "user", content: prompt }], + } as unknown as Chat_completion_request; + const response = await client.api.v1.chat.completions.post(body, { + queryParameters: { agent: true }, + }); + console.log(JSON.stringify(response, null, 2)); + return; + } + + if (endpoint === "responses") { + const body = { + model, + input: prompt, + stream: false, + } as unknown as Create_response_request; + const response = await client.v1.responses.post(body); + console.log(JSON.stringify(response, null, 2)); + return; + } + + if (endpoint === "images") { + const body = { + model: process.env.DO_IMAGE_MODEL || "gpt-image-1", + prompt, + stream: false, + } as unknown as Create_image_request; + const response = await client.v1.images.generations.post(body); + console.log(JSON.stringify(response, null, 2)); + return; + } + + throw new Error("Unsupported DO_STREAM_ENDPOINT. Use chat, agent-chat, responses, images"); +} + +async function runStreaming( + client: ReturnType, + streamingAdapter: ReturnType +) { + let requestInfo: RequestInformation; + let url = ""; + + if (endpoint === "chat") { + const body = { + model, + stream: true, + messages: [{ role: "user", content: prompt }], + } as unknown as Chat_completion_request; + requestInfo = client.v1.chat.completions.toPostRequestInformation(body); + url = `${baseUrl}/v1/chat/completions`; + } else if (endpoint === "agent-chat") { + const body = { + model, + stream: true, + messages: [{ role: "user", content: prompt }], + } as unknown as Chat_completion_request; + requestInfo = client.api.v1.chat.completions.toPostRequestInformation(body, { + queryParameters: { agent: true }, + }); + url = `${baseUrl}/api/v1/chat/completions?agent=true`; + } else if (endpoint === "responses") { + const body = { + model, + input: prompt, + stream: true, + } as unknown as Create_response_request; + requestInfo = client.v1.responses.toPostRequestInformation(body); + url = `${baseUrl}/v1/responses`; + } else if (endpoint === "images") { + const body = { + model: process.env.DO_IMAGE_MODEL || "gpt-image-1", + prompt, + stream: true, + partialImages: 1, + } as unknown as Create_image_request; + requestInfo = client.v1.images.generations.toPostRequestInformation(body); + url = `${baseUrl}/v1/images/generations`; + } else { + throw new Error("Unsupported DO_STREAM_ENDPOINT. Use chat, agent-chat, responses, images"); + } + + console.log(`Streaming from ${url}`); + await streamingAdapter.stream( + requestInfo, + { + onData: printStreamChunk, + onError: (error) => console.error("stream error:", error.message), + onComplete: () => { + process.stdout.write("\n"); + console.log("stream complete"); + }, + }, + { + streamType: StreamingResponseType.TEXT_EVENT_STREAM, + parseJsonLines: true, + } + ); +} + +async function main(): Promise { + const service = createServerlessInferenceClient(authToken, baseUrl); + service.adapter.baseUrl = service.baseUrl; + const client = createDigitalOceanClient(service.adapter); + const streamingAdapter = createStreamingAdapter(service.adapter, service.authProvider); + + if (!streamEnabled) { + await runNonStreaming(client); + return; + } + + await runStreaming(client, streamingAdapter); +} + +main().catch((error) => { + console.error(error); + process.exit(1); +}); \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 0000000000..7802c5c673 --- /dev/null +++ b/index.js @@ -0,0 +1,5 @@ +export { createDigitalOceanClient } from "./src/dots/digitalOceanClient.js"; +export { DigitalOceanApiKeyAuthenticationProvider } from "./src/dots/DigitalOceanApiKeyAuthenticationProvider.js"; +export * from "./src/dots/models/index.js"; +export * from "./src/dots/streaming/index.js"; +export * from "./src/dots/services/index.js"; diff --git a/index.ts b/index.ts index 590da98319..7802c5c673 100644 --- a/index.ts +++ b/index.ts @@ -1,4 +1,5 @@ export { createDigitalOceanClient } from "./src/dots/digitalOceanClient.js"; export { DigitalOceanApiKeyAuthenticationProvider } from "./src/dots/DigitalOceanApiKeyAuthenticationProvider.js"; -export { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary"; export * from "./src/dots/models/index.js"; +export * from "./src/dots/streaming/index.js"; +export * from "./src/dots/services/index.js"; diff --git a/src/dots/DigitalOceanApiKeyAuthenticationProvider.js b/src/dots/DigitalOceanApiKeyAuthenticationProvider.js index d880dc7215..3b06773453 100644 --- a/src/dots/DigitalOceanApiKeyAuthenticationProvider.js +++ b/src/dots/DigitalOceanApiKeyAuthenticationProvider.js @@ -1,3 +1,5 @@ +// @ts-expect-error: Importing JSON for dynamic version in User-Agent header +import pkg from '../../package.json' assert { type: "json" }; /** Authenticate a request by using an API Key */ export class DigitalOceanApiKeyAuthenticationProvider { /** @@ -14,6 +16,7 @@ export class DigitalOceanApiKeyAuthenticationProvider { // eslint-disable-next-line @typescript-eslint/no-unused-vars additionalAuthenticationContext) { request.headers.add("Authorization", `Bearer ${this.apiKey}`); + request.headers.add("User-Agent", `DigitalOcean-Dots/${pkg.version}`); return Promise.resolve(); } } diff --git a/src/dots/digitalOceanClient.js b/src/dots/digitalOceanClient.js new file mode 100644 index 0000000000..90adefa73d --- /dev/null +++ b/src/dots/digitalOceanClient.js @@ -0,0 +1,60 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { V2RequestBuilderNavigationMetadata } from './v2/index.js'; +// @ts-ignore +import { apiClientProxifier } from '@microsoft/kiota-abstractions'; +// @ts-ignore +import { FormParseNodeFactory, FormSerializationWriterFactory } from '@microsoft/kiota-serialization-form'; +// @ts-ignore +import { JsonParseNodeFactory, JsonSerializationWriterFactory } from '@microsoft/kiota-serialization-json'; +// @ts-ignore +import { MultipartSerializationWriterFactory } from '@microsoft/kiota-serialization-multipart'; +// @ts-ignore +import { TextParseNodeFactory, TextSerializationWriterFactory } from '@microsoft/kiota-serialization-text'; +/** + * Instantiates a new {@link DigitalOceanClient} and sets the default values. + * @param requestAdapter The request adapter to use to execute the requests. + */ +// @ts-ignore +export function createDigitalOceanClient(requestAdapter) { + if (requestAdapter === undefined) { + throw new Error("requestAdapter cannot be undefined"); + } + const serializationWriterFactory = requestAdapter.getSerializationWriterFactory(); + const parseNodeFactoryRegistry = requestAdapter.getParseNodeFactory(); + const backingStoreFactory = requestAdapter.getBackingStoreFactory(); + if (parseNodeFactoryRegistry.registerDefaultDeserializer) { + parseNodeFactoryRegistry.registerDefaultDeserializer(JsonParseNodeFactory, backingStoreFactory); + parseNodeFactoryRegistry.registerDefaultDeserializer(TextParseNodeFactory, backingStoreFactory); + parseNodeFactoryRegistry.registerDefaultDeserializer(FormParseNodeFactory, backingStoreFactory); + } + if (serializationWriterFactory.registerDefaultSerializer) { + serializationWriterFactory.registerDefaultSerializer(JsonSerializationWriterFactory); + serializationWriterFactory.registerDefaultSerializer(TextSerializationWriterFactory); + serializationWriterFactory.registerDefaultSerializer(FormSerializationWriterFactory); + serializationWriterFactory.registerDefaultSerializer(MultipartSerializationWriterFactory); + } + if (requestAdapter.baseUrl === undefined || requestAdapter.baseUrl === null || requestAdapter.baseUrl === "") { + requestAdapter.baseUrl = "https://api.digitalocean.com"; + } + const pathParameters = { + "baseurl": requestAdapter.baseUrl, + }; + return apiClientProxifier(requestAdapter, pathParameters, DigitalOceanClientNavigationMetadata, undefined); +} +/** + * Uri template for the request builder. + */ +export const DigitalOceanClientUriTemplate = "{+baseurl}"; +/** + * Metadata for all the navigation properties in the request builder. + */ +export const DigitalOceanClientNavigationMetadata = { + v2: { + navigationMetadata: V2RequestBuilderNavigationMetadata, + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/src/dots/models/index.js b/src/dots/models/index.js new file mode 100644 index 0000000000..8ee2aa380f --- /dev/null +++ b/src/dots/models/index.js @@ -0,0 +1,29588 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { createUntypedNodeFromDiscriminatorValue } from '@microsoft/kiota-abstractions'; +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Account_team} + */ +// @ts-ignore +export function createAccount_teamFromDiscriminatorValue(parseNode) { + return deserializeIntoAccount_team; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Account} + */ +// @ts-ignore +export function createAccountFromDiscriminatorValue(parseNode) { + return deserializeIntoAccount; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Action_link} + */ +// @ts-ignore +export function createAction_linkFromDiscriminatorValue(parseNode) { + return deserializeIntoAction_link; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Action} + */ +// @ts-ignore +export function createActionFromDiscriminatorValue(parseNode) { + return deserializeIntoAction; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Addons_app_info} + */ +// @ts-ignore +export function createAddons_app_infoFromDiscriminatorValue(parseNode) { + return deserializeIntoAddons_app_info; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Addons_app_metadata} + */ +// @ts-ignore +export function createAddons_app_metadataFromDiscriminatorValue(parseNode) { + return deserializeIntoAddons_app_metadata; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Addons_dimension_volume_with_price} + */ +// @ts-ignore +export function createAddons_dimension_volume_with_priceFromDiscriminatorValue(parseNode) { + return deserializeIntoAddons_dimension_volume_with_price; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Addons_dimension_with_price} + */ +// @ts-ignore +export function createAddons_dimension_with_priceFromDiscriminatorValue(parseNode) { + return deserializeIntoAddons_dimension_with_price; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {boolean | string} + */ +// @ts-ignore +export function createAddons_feature_valueFromDiscriminatorValue(parseNode) { + return parseNode?.getBooleanValue() ?? parseNode?.getStringValue(); +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Addons_feature} + */ +// @ts-ignore +export function createAddons_featureFromDiscriminatorValue(parseNode) { + return deserializeIntoAddons_feature; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Addons_plan} + */ +// @ts-ignore +export function createAddons_planFromDiscriminatorValue(parseNode) { + return deserializeIntoAddons_plan; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {boolean | string} + */ +// @ts-ignore +export function createAddons_resource_metadata_valueFromDiscriminatorValue(parseNode) { + return parseNode?.getBooleanValue() ?? parseNode?.getStringValue(); +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Addons_resource_metadata} + */ +// @ts-ignore +export function createAddons_resource_metadataFromDiscriminatorValue(parseNode) { + return deserializeIntoAddons_resource_metadata; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Addons_resource_new} + */ +// @ts-ignore +export function createAddons_resource_newFromDiscriminatorValue(parseNode) { + return deserializeIntoAddons_resource_new; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Addons_resource} + */ +// @ts-ignore +export function createAddons_resourceFromDiscriminatorValue(parseNode) { + return deserializeIntoAddons_resource; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Alert_policy_request} + */ +// @ts-ignore +export function createAlert_policy_requestFromDiscriminatorValue(parseNode) { + return deserializeIntoAlert_policy_request; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Alert_policy} + */ +// @ts-ignore +export function createAlert_policyFromDiscriminatorValue(parseNode) { + return deserializeIntoAlert_policy; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Alert_updatable} + */ +// @ts-ignore +export function createAlert_updatableFromDiscriminatorValue(parseNode) { + return deserializeIntoAlert_updatable; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Alert} + */ +// @ts-ignore +export function createAlertFromDiscriminatorValue(parseNode) { + return deserializeIntoAlert; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Alerts} + */ +// @ts-ignore +export function createAlertsFromDiscriminatorValue(parseNode) { + return deserializeIntoAlerts; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Amd_gpu_device_metrics_exporter_plugin} + */ +// @ts-ignore +export function createAmd_gpu_device_metrics_exporter_pluginFromDiscriminatorValue(parseNode) { + return deserializeIntoAmd_gpu_device_metrics_exporter_plugin; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Amd_gpu_device_plugin} + */ +// @ts-ignore +export function createAmd_gpu_device_pluginFromDiscriminatorValue(parseNode) { + return deserializeIntoAmd_gpu_device_plugin; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAgentAPIKey} + */ +// @ts-ignore +export function createApiAgentAPIKeyFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAgentAPIKey; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAgentAPIKeyInfo} + */ +// @ts-ignore +export function createApiAgentAPIKeyInfoFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAgentAPIKeyInfo; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAgentChatbotIdentifier} + */ +// @ts-ignore +export function createApiAgentChatbotIdentifierFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAgentChatbotIdentifier; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAgentChildRelationshipVerion} + */ +// @ts-ignore +export function createApiAgentChildRelationshipVerionFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAgentChildRelationshipVerion; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAgent} + */ +// @ts-ignore +export function createApiAgentFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAgent; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAgentFunction_input_schema} + */ +// @ts-ignore +export function createApiAgentFunction_input_schemaFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAgentFunction_input_schema; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAgentFunction_output_schema} + */ +// @ts-ignore +export function createApiAgentFunction_output_schemaFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAgentFunction_output_schema; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAgentFunction} + */ +// @ts-ignore +export function createApiAgentFunctionFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAgentFunction; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAgentFunctionVersion} + */ +// @ts-ignore +export function createApiAgentFunctionVersionFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAgentFunctionVersion; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAgentGuardrail_metadata} + */ +// @ts-ignore +export function createApiAgentGuardrail_metadataFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAgentGuardrail_metadata; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAgentGuardrail} + */ +// @ts-ignore +export function createApiAgentGuardrailFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAgentGuardrail; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAgentGuardrailInput} + */ +// @ts-ignore +export function createApiAgentGuardrailInputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAgentGuardrailInput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAgentGuardrailVersion} + */ +// @ts-ignore +export function createApiAgentGuardrailVersionFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAgentGuardrailVersion; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAgentKnowledgeBaseVersion} + */ +// @ts-ignore +export function createApiAgentKnowledgeBaseVersionFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAgentKnowledgeBaseVersion; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAgentLoggingConfig} + */ +// @ts-ignore +export function createApiAgentLoggingConfigFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAgentLoggingConfig; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAgentPublic} + */ +// @ts-ignore +export function createApiAgentPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAgentPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAgentTemplate} + */ +// @ts-ignore +export function createApiAgentTemplateFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAgentTemplate; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAgentTemplateGuardrail} + */ +// @ts-ignore +export function createApiAgentTemplateGuardrailFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAgentTemplateGuardrail; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAgentVersion} + */ +// @ts-ignore +export function createApiAgentVersionFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAgentVersion; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAgreement} + */ +// @ts-ignore +export function createApiAgreementFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAgreement; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAnthropicAPIKeyInfo} + */ +// @ts-ignore +export function createApiAnthropicAPIKeyInfoFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAnthropicAPIKeyInfo; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAuditHeader} + */ +// @ts-ignore +export function createApiAuditHeaderFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAuditHeader; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAWSDataSourceDisplay} + */ +// @ts-ignore +export function createApiAWSDataSourceDisplayFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAWSDataSourceDisplay; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiAWSDataSource} + */ +// @ts-ignore +export function createApiAWSDataSourceFromDiscriminatorValue(parseNode) { + return deserializeIntoApiAWSDataSource; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCancelKnowledgeBaseIndexingJobInputPublic} + */ +// @ts-ignore +export function createApiCancelKnowledgeBaseIndexingJobInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCancelKnowledgeBaseIndexingJobInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCancelKnowledgeBaseIndexingJobOutput} + */ +// @ts-ignore +export function createApiCancelKnowledgeBaseIndexingJobOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCancelKnowledgeBaseIndexingJobOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiChatbot} + */ +// @ts-ignore +export function createApiChatbotFromDiscriminatorValue(parseNode) { + return deserializeIntoApiChatbot; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiChunkingOptions} + */ +// @ts-ignore +export function createApiChunkingOptionsFromDiscriminatorValue(parseNode) { + return deserializeIntoApiChunkingOptions; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateAgentAPIKeyInputPublic} + */ +// @ts-ignore +export function createApiCreateAgentAPIKeyInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateAgentAPIKeyInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateAgentAPIKeyOutput} + */ +// @ts-ignore +export function createApiCreateAgentAPIKeyOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateAgentAPIKeyOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateAgentInputPublic} + */ +// @ts-ignore +export function createApiCreateAgentInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateAgentInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateAgentOutput} + */ +// @ts-ignore +export function createApiCreateAgentOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateAgentOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateAnthropicAPIKeyInputPublic} + */ +// @ts-ignore +export function createApiCreateAnthropicAPIKeyInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateAnthropicAPIKeyInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateAnthropicAPIKeyOutput} + */ +// @ts-ignore +export function createApiCreateAnthropicAPIKeyOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateAnthropicAPIKeyOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateDataSourceFileUploadPresignedUrlsInputPublic} + */ +// @ts-ignore +export function createApiCreateDataSourceFileUploadPresignedUrlsInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateDataSourceFileUploadPresignedUrlsInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateDataSourceFileUploadPresignedUrlsOutput} + */ +// @ts-ignore +export function createApiCreateDataSourceFileUploadPresignedUrlsOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateDataSourceFileUploadPresignedUrlsOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateEvaluationDatasetInputPublic} + */ +// @ts-ignore +export function createApiCreateEvaluationDatasetInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateEvaluationDatasetInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateEvaluationDatasetOutput} + */ +// @ts-ignore +export function createApiCreateEvaluationDatasetOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateEvaluationDatasetOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateEvaluationTestCaseInputPublic} + */ +// @ts-ignore +export function createApiCreateEvaluationTestCaseInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateEvaluationTestCaseInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateEvaluationTestCaseOutput} + */ +// @ts-ignore +export function createApiCreateEvaluationTestCaseOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateEvaluationTestCaseOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateKnowledgeBaseDataSourceInputPublic} + */ +// @ts-ignore +export function createApiCreateKnowledgeBaseDataSourceInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateKnowledgeBaseDataSourceInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateKnowledgeBaseDataSourceOutput} + */ +// @ts-ignore +export function createApiCreateKnowledgeBaseDataSourceOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateKnowledgeBaseDataSourceOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateKnowledgeBaseInputPublic} + */ +// @ts-ignore +export function createApiCreateKnowledgeBaseInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateKnowledgeBaseInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateKnowledgeBaseOutput} + */ +// @ts-ignore +export function createApiCreateKnowledgeBaseOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateKnowledgeBaseOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateModelAPIKeyInputPublic} + */ +// @ts-ignore +export function createApiCreateModelAPIKeyInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateModelAPIKeyInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateModelAPIKeyOutput} + */ +// @ts-ignore +export function createApiCreateModelAPIKeyOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateModelAPIKeyOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateOpenAIAPIKeyInputPublic} + */ +// @ts-ignore +export function createApiCreateOpenAIAPIKeyInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateOpenAIAPIKeyInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateOpenAIAPIKeyOutput} + */ +// @ts-ignore +export function createApiCreateOpenAIAPIKeyOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateOpenAIAPIKeyOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateScheduledIndexingInputPublic} + */ +// @ts-ignore +export function createApiCreateScheduledIndexingInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateScheduledIndexingInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateScheduledIndexingOutput} + */ +// @ts-ignore +export function createApiCreateScheduledIndexingOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateScheduledIndexingOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateWorkspaceInputPublic} + */ +// @ts-ignore +export function createApiCreateWorkspaceInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateWorkspaceInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiCreateWorkspaceOutput} + */ +// @ts-ignore +export function createApiCreateWorkspaceOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiCreateWorkspaceOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiDeleteAgentAPIKeyOutput} + */ +// @ts-ignore +export function createApiDeleteAgentAPIKeyOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiDeleteAgentAPIKeyOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiDeleteAgentOutput} + */ +// @ts-ignore +export function createApiDeleteAgentOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiDeleteAgentOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiDeleteAnthropicAPIKeyOutput} + */ +// @ts-ignore +export function createApiDeleteAnthropicAPIKeyOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiDeleteAnthropicAPIKeyOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiDeleteKnowledgeBaseDataSourceOutput} + */ +// @ts-ignore +export function createApiDeleteKnowledgeBaseDataSourceOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiDeleteKnowledgeBaseDataSourceOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiDeleteKnowledgeBaseOutput} + */ +// @ts-ignore +export function createApiDeleteKnowledgeBaseOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiDeleteKnowledgeBaseOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiDeleteModelAPIKeyOutput} + */ +// @ts-ignore +export function createApiDeleteModelAPIKeyOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiDeleteModelAPIKeyOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiDeleteOpenAIAPIKeyOutput} + */ +// @ts-ignore +export function createApiDeleteOpenAIAPIKeyOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiDeleteOpenAIAPIKeyOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiDeleteScheduledIndexingOutput} + */ +// @ts-ignore +export function createApiDeleteScheduledIndexingOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiDeleteScheduledIndexingOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiDeleteWorkspaceOutput} + */ +// @ts-ignore +export function createApiDeleteWorkspaceOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiDeleteWorkspaceOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiDeployment} + */ +// @ts-ignore +export function createApiDeploymentFromDiscriminatorValue(parseNode) { + return deserializeIntoApiDeployment; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiDropboxDataSourceDisplay} + */ +// @ts-ignore +export function createApiDropboxDataSourceDisplayFromDiscriminatorValue(parseNode) { + return deserializeIntoApiDropboxDataSourceDisplay; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiDropboxDataSource} + */ +// @ts-ignore +export function createApiDropboxDataSourceFromDiscriminatorValue(parseNode) { + return deserializeIntoApiDropboxDataSource; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiDropboxOauth2GetTokensInput} + */ +// @ts-ignore +export function createApiDropboxOauth2GetTokensInputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiDropboxOauth2GetTokensInput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiDropboxOauth2GetTokensOutput} + */ +// @ts-ignore +export function createApiDropboxOauth2GetTokensOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiDropboxOauth2GetTokensOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiEvaluationDataset} + */ +// @ts-ignore +export function createApiEvaluationDatasetFromDiscriminatorValue(parseNode) { + return deserializeIntoApiEvaluationDataset; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiEvaluationMetric} + */ +// @ts-ignore +export function createApiEvaluationMetricFromDiscriminatorValue(parseNode) { + return deserializeIntoApiEvaluationMetric; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiEvaluationMetricResult} + */ +// @ts-ignore +export function createApiEvaluationMetricResultFromDiscriminatorValue(parseNode) { + return deserializeIntoApiEvaluationMetricResult; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiEvaluationRun} + */ +// @ts-ignore +export function createApiEvaluationRunFromDiscriminatorValue(parseNode) { + return deserializeIntoApiEvaluationRun; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiEvaluationTestCase} + */ +// @ts-ignore +export function createApiEvaluationTestCaseFromDiscriminatorValue(parseNode) { + return deserializeIntoApiEvaluationTestCase; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiEvaluationTestCaseMetricList} + */ +// @ts-ignore +export function createApiEvaluationTestCaseMetricListFromDiscriminatorValue(parseNode) { + return deserializeIntoApiEvaluationTestCaseMetricList; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiEvaluationTraceSpan_input} + */ +// @ts-ignore +export function createApiEvaluationTraceSpan_inputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiEvaluationTraceSpan_input; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiEvaluationTraceSpan_output} + */ +// @ts-ignore +export function createApiEvaluationTraceSpan_outputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiEvaluationTraceSpan_output; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiEvaluationTraceSpan} + */ +// @ts-ignore +export function createApiEvaluationTraceSpanFromDiscriminatorValue(parseNode) { + return deserializeIntoApiEvaluationTraceSpan; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiFilePresignedUrlResponse} + */ +// @ts-ignore +export function createApiFilePresignedUrlResponseFromDiscriminatorValue(parseNode) { + return deserializeIntoApiFilePresignedUrlResponse; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiFileUploadDataSource} + */ +// @ts-ignore +export function createApiFileUploadDataSourceFromDiscriminatorValue(parseNode) { + return deserializeIntoApiFileUploadDataSource; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiGenerateOauth2URLOutput} + */ +// @ts-ignore +export function createApiGenerateOauth2URLOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiGenerateOauth2URLOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiGetAgentOutput} + */ +// @ts-ignore +export function createApiGetAgentOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiGetAgentOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiGetAgentUsageOutput} + */ +// @ts-ignore +export function createApiGetAgentUsageOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiGetAgentUsageOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiGetAnthropicAPIKeyOutput} + */ +// @ts-ignore +export function createApiGetAnthropicAPIKeyOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiGetAnthropicAPIKeyOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiGetChildrenOutput} + */ +// @ts-ignore +export function createApiGetChildrenOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiGetChildrenOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiGetEvaluationRunOutput} + */ +// @ts-ignore +export function createApiGetEvaluationRunOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiGetEvaluationRunOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiGetEvaluationRunPromptResultsOutput} + */ +// @ts-ignore +export function createApiGetEvaluationRunPromptResultsOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiGetEvaluationRunPromptResultsOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiGetEvaluationRunResultsOutput} + */ +// @ts-ignore +export function createApiGetEvaluationRunResultsOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiGetEvaluationRunResultsOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiGetEvaluationTestCaseOutput} + */ +// @ts-ignore +export function createApiGetEvaluationTestCaseOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiGetEvaluationTestCaseOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiGetIndexingJobDetailsSignedURLOutput} + */ +// @ts-ignore +export function createApiGetIndexingJobDetailsSignedURLOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiGetIndexingJobDetailsSignedURLOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiGetKnowledgeBaseIndexingJobOutput} + */ +// @ts-ignore +export function createApiGetKnowledgeBaseIndexingJobOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiGetKnowledgeBaseIndexingJobOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiGetKnowledgeBaseOutput} + */ +// @ts-ignore +export function createApiGetKnowledgeBaseOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiGetKnowledgeBaseOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiGetOpenAIAPIKeyOutput} + */ +// @ts-ignore +export function createApiGetOpenAIAPIKeyOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiGetOpenAIAPIKeyOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiGetScheduledIndexingOutput} + */ +// @ts-ignore +export function createApiGetScheduledIndexingOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiGetScheduledIndexingOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiGetWorkspaceOutput} + */ +// @ts-ignore +export function createApiGetWorkspaceOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiGetWorkspaceOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiGoogleDriveDataSourceDisplay} + */ +// @ts-ignore +export function createApiGoogleDriveDataSourceDisplayFromDiscriminatorValue(parseNode) { + return deserializeIntoApiGoogleDriveDataSourceDisplay; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiGoogleDriveDataSource} + */ +// @ts-ignore +export function createApiGoogleDriveDataSourceFromDiscriminatorValue(parseNode) { + return deserializeIntoApiGoogleDriveDataSource; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiIndexedDataSource} + */ +// @ts-ignore +export function createApiIndexedDataSourceFromDiscriminatorValue(parseNode) { + return deserializeIntoApiIndexedDataSource; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiIndexingJob} + */ +// @ts-ignore +export function createApiIndexingJobFromDiscriminatorValue(parseNode) { + return deserializeIntoApiIndexingJob; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiKBDataSource} + */ +// @ts-ignore +export function createApiKBDataSourceFromDiscriminatorValue(parseNode) { + return deserializeIntoApiKBDataSource; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiKnowledgeBaseDataSource} + */ +// @ts-ignore +export function createApiKnowledgeBaseDataSourceFromDiscriminatorValue(parseNode) { + return deserializeIntoApiKnowledgeBaseDataSource; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiKnowledgeBase} + */ +// @ts-ignore +export function createApiKnowledgeBaseFromDiscriminatorValue(parseNode) { + return deserializeIntoApiKnowledgeBase; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiLinkAgentFunctionInputPublic_input_schema} + */ +// @ts-ignore +export function createApiLinkAgentFunctionInputPublic_input_schemaFromDiscriminatorValue(parseNode) { + return deserializeIntoApiLinkAgentFunctionInputPublic_input_schema; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiLinkAgentFunctionInputPublic_output_schema} + */ +// @ts-ignore +export function createApiLinkAgentFunctionInputPublic_output_schemaFromDiscriminatorValue(parseNode) { + return deserializeIntoApiLinkAgentFunctionInputPublic_output_schema; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiLinkAgentFunctionInputPublic} + */ +// @ts-ignore +export function createApiLinkAgentFunctionInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiLinkAgentFunctionInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiLinkAgentFunctionOutput} + */ +// @ts-ignore +export function createApiLinkAgentFunctionOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiLinkAgentFunctionOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiLinkAgentGuardrailOutput} + */ +// @ts-ignore +export function createApiLinkAgentGuardrailOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiLinkAgentGuardrailOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiLinkAgentGuardrailsInputPublic} + */ +// @ts-ignore +export function createApiLinkAgentGuardrailsInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiLinkAgentGuardrailsInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiLinkAgentInputPublic} + */ +// @ts-ignore +export function createApiLinkAgentInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiLinkAgentInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiLinkAgentOutput} + */ +// @ts-ignore +export function createApiLinkAgentOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiLinkAgentOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiLinkKnowledgeBaseOutput} + */ +// @ts-ignore +export function createApiLinkKnowledgeBaseOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiLinkKnowledgeBaseOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiLinks} + */ +// @ts-ignore +export function createApiLinksFromDiscriminatorValue(parseNode) { + return deserializeIntoApiLinks; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiListAgentAPIKeysOutput} + */ +// @ts-ignore +export function createApiListAgentAPIKeysOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiListAgentAPIKeysOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiListAgentsByAnthropicKeyOutput} + */ +// @ts-ignore +export function createApiListAgentsByAnthropicKeyOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiListAgentsByAnthropicKeyOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiListAgentsByOpenAIKeyOutput} + */ +// @ts-ignore +export function createApiListAgentsByOpenAIKeyOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiListAgentsByOpenAIKeyOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiListAgentsByWorkspaceOutput} + */ +// @ts-ignore +export function createApiListAgentsByWorkspaceOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiListAgentsByWorkspaceOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiListAgentsOutputPublic} + */ +// @ts-ignore +export function createApiListAgentsOutputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiListAgentsOutputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiListAgentVersionsOutput} + */ +// @ts-ignore +export function createApiListAgentVersionsOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiListAgentVersionsOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiListAnthropicAPIKeysOutput} + */ +// @ts-ignore +export function createApiListAnthropicAPIKeysOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiListAnthropicAPIKeysOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiListEvaluationMetricsOutput} + */ +// @ts-ignore +export function createApiListEvaluationMetricsOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiListEvaluationMetricsOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiListEvaluationRunsByTestCaseOutput} + */ +// @ts-ignore +export function createApiListEvaluationRunsByTestCaseOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiListEvaluationRunsByTestCaseOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiListEvaluationTestCasesByWorkspaceOutput} + */ +// @ts-ignore +export function createApiListEvaluationTestCasesByWorkspaceOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiListEvaluationTestCasesByWorkspaceOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiListEvaluationTestCasesOutput} + */ +// @ts-ignore +export function createApiListEvaluationTestCasesOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiListEvaluationTestCasesOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiListIndexingJobDataSourcesOutput} + */ +// @ts-ignore +export function createApiListIndexingJobDataSourcesOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiListIndexingJobDataSourcesOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiListKnowledgeBaseDataSourcesOutput} + */ +// @ts-ignore +export function createApiListKnowledgeBaseDataSourcesOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiListKnowledgeBaseDataSourcesOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiListKnowledgeBaseIndexingJobsOutput} + */ +// @ts-ignore +export function createApiListKnowledgeBaseIndexingJobsOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiListKnowledgeBaseIndexingJobsOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiListKnowledgeBasesOutput} + */ +// @ts-ignore +export function createApiListKnowledgeBasesOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiListKnowledgeBasesOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiListModelAPIKeysOutput} + */ +// @ts-ignore +export function createApiListModelAPIKeysOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiListModelAPIKeysOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiListModelsOutputPublic} + */ +// @ts-ignore +export function createApiListModelsOutputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiListModelsOutputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiListOpenAIAPIKeysOutput} + */ +// @ts-ignore +export function createApiListOpenAIAPIKeysOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiListOpenAIAPIKeysOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiListRegionsOutput} + */ +// @ts-ignore +export function createApiListRegionsOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiListRegionsOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiListWorkspacesOutput} + */ +// @ts-ignore +export function createApiListWorkspacesOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiListWorkspacesOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiMeta} + */ +// @ts-ignore +export function createApiMetaFromDiscriminatorValue(parseNode) { + return deserializeIntoApiMeta; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiModel_metadata} + */ +// @ts-ignore +export function createApiModel_metadataFromDiscriminatorValue(parseNode) { + return deserializeIntoApiModel_metadata; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiModelAPIKeyInfo} + */ +// @ts-ignore +export function createApiModelAPIKeyInfoFromDiscriminatorValue(parseNode) { + return deserializeIntoApiModelAPIKeyInfo; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiModel} + */ +// @ts-ignore +export function createApiModelFromDiscriminatorValue(parseNode) { + return deserializeIntoApiModel; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiModelProviderKeyInfo} + */ +// @ts-ignore +export function createApiModelProviderKeyInfoFromDiscriminatorValue(parseNode) { + return deserializeIntoApiModelProviderKeyInfo; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiModelPublic} + */ +// @ts-ignore +export function createApiModelPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiModelPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiModelVersion} + */ +// @ts-ignore +export function createApiModelVersionFromDiscriminatorValue(parseNode) { + return deserializeIntoApiModelVersion; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiMoveAgentsToWorkspaceInputPublic} + */ +// @ts-ignore +export function createApiMoveAgentsToWorkspaceInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiMoveAgentsToWorkspaceInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiMoveAgentsToWorkspaceOutput} + */ +// @ts-ignore +export function createApiMoveAgentsToWorkspaceOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiMoveAgentsToWorkspaceOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiOpenAIAPIKeyInfo} + */ +// @ts-ignore +export function createApiOpenAIAPIKeyInfoFromDiscriminatorValue(parseNode) { + return deserializeIntoApiOpenAIAPIKeyInfo; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiPages} + */ +// @ts-ignore +export function createApiPagesFromDiscriminatorValue(parseNode) { + return deserializeIntoApiPages; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiPresignedUrlFile} + */ +// @ts-ignore +export function createApiPresignedUrlFileFromDiscriminatorValue(parseNode) { + return deserializeIntoApiPresignedUrlFile; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiPromptChunk} + */ +// @ts-ignore +export function createApiPromptChunkFromDiscriminatorValue(parseNode) { + return deserializeIntoApiPromptChunk; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiPrompt} + */ +// @ts-ignore +export function createApiPromptFromDiscriminatorValue(parseNode) { + return deserializeIntoApiPrompt; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiRegenerateAgentAPIKeyOutput} + */ +// @ts-ignore +export function createApiRegenerateAgentAPIKeyOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiRegenerateAgentAPIKeyOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiRegenerateModelAPIKeyOutput} + */ +// @ts-ignore +export function createApiRegenerateModelAPIKeyOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiRegenerateModelAPIKeyOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiResourceUsage} + */ +// @ts-ignore +export function createApiResourceUsageFromDiscriminatorValue(parseNode) { + return deserializeIntoApiResourceUsage; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiRollbackToAgentVersionInputPublic} + */ +// @ts-ignore +export function createApiRollbackToAgentVersionInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiRollbackToAgentVersionInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiRollbackToAgentVersionOutput} + */ +// @ts-ignore +export function createApiRollbackToAgentVersionOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiRollbackToAgentVersionOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiRunEvaluationTestCaseInputPublic} + */ +// @ts-ignore +export function createApiRunEvaluationTestCaseInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiRunEvaluationTestCaseInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiRunEvaluationTestCaseOutput} + */ +// @ts-ignore +export function createApiRunEvaluationTestCaseOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiRunEvaluationTestCaseOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiScheduledIndexingInfo} + */ +// @ts-ignore +export function createApiScheduledIndexingInfoFromDiscriminatorValue(parseNode) { + return deserializeIntoApiScheduledIndexingInfo; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiSpacesDataSource} + */ +// @ts-ignore +export function createApiSpacesDataSourceFromDiscriminatorValue(parseNode) { + return deserializeIntoApiSpacesDataSource; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiStarMetric} + */ +// @ts-ignore +export function createApiStarMetricFromDiscriminatorValue(parseNode) { + return deserializeIntoApiStarMetric; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiStartKnowledgeBaseIndexingJobInputPublic} + */ +// @ts-ignore +export function createApiStartKnowledgeBaseIndexingJobInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiStartKnowledgeBaseIndexingJobInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiStartKnowledgeBaseIndexingJobOutput} + */ +// @ts-ignore +export function createApiStartKnowledgeBaseIndexingJobOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiStartKnowledgeBaseIndexingJobOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUnlinkAgentFunctionOutput} + */ +// @ts-ignore +export function createApiUnlinkAgentFunctionOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUnlinkAgentFunctionOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUnlinkAgentGuardrailOutput} + */ +// @ts-ignore +export function createApiUnlinkAgentGuardrailOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUnlinkAgentGuardrailOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUnlinkAgentOutput} + */ +// @ts-ignore +export function createApiUnlinkAgentOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUnlinkAgentOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUnlinkKnowledgeBaseOutput} + */ +// @ts-ignore +export function createApiUnlinkKnowledgeBaseOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUnlinkKnowledgeBaseOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateAgentAPIKeyInputPublic} + */ +// @ts-ignore +export function createApiUpdateAgentAPIKeyInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateAgentAPIKeyInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateAgentAPIKeyOutput} + */ +// @ts-ignore +export function createApiUpdateAgentAPIKeyOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateAgentAPIKeyOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateAgentDeploymentVisbilityOutput} + */ +// @ts-ignore +export function createApiUpdateAgentDeploymentVisbilityOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateAgentDeploymentVisbilityOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateAgentDeploymentVisibilityInputPublic} + */ +// @ts-ignore +export function createApiUpdateAgentDeploymentVisibilityInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateAgentDeploymentVisibilityInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateAgentFunctionInputPublic_input_schema} + */ +// @ts-ignore +export function createApiUpdateAgentFunctionInputPublic_input_schemaFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateAgentFunctionInputPublic_input_schema; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateAgentFunctionInputPublic_output_schema} + */ +// @ts-ignore +export function createApiUpdateAgentFunctionInputPublic_output_schemaFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateAgentFunctionInputPublic_output_schema; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateAgentFunctionInputPublic} + */ +// @ts-ignore +export function createApiUpdateAgentFunctionInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateAgentFunctionInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateAgentFunctionOutput} + */ +// @ts-ignore +export function createApiUpdateAgentFunctionOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateAgentFunctionOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateAgentInputPublic} + */ +// @ts-ignore +export function createApiUpdateAgentInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateAgentInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateAgentOutput} + */ +// @ts-ignore +export function createApiUpdateAgentOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateAgentOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateAnthropicAPIKeyInputPublic} + */ +// @ts-ignore +export function createApiUpdateAnthropicAPIKeyInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateAnthropicAPIKeyInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateAnthropicAPIKeyOutput} + */ +// @ts-ignore +export function createApiUpdateAnthropicAPIKeyOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateAnthropicAPIKeyOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateEvaluationTestCaseInputPublic} + */ +// @ts-ignore +export function createApiUpdateEvaluationTestCaseInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateEvaluationTestCaseInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateEvaluationTestCaseOutput} + */ +// @ts-ignore +export function createApiUpdateEvaluationTestCaseOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateEvaluationTestCaseOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateKnowledgeBaseDataSourceInputPublic} + */ +// @ts-ignore +export function createApiUpdateKnowledgeBaseDataSourceInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateKnowledgeBaseDataSourceInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateKnowledgeBaseDataSourceOutput} + */ +// @ts-ignore +export function createApiUpdateKnowledgeBaseDataSourceOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateKnowledgeBaseDataSourceOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateKnowledgeBaseInputPublic} + */ +// @ts-ignore +export function createApiUpdateKnowledgeBaseInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateKnowledgeBaseInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateKnowledgeBaseOutput} + */ +// @ts-ignore +export function createApiUpdateKnowledgeBaseOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateKnowledgeBaseOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateLinkedAgentInputPublic} + */ +// @ts-ignore +export function createApiUpdateLinkedAgentInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateLinkedAgentInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateLinkedAgentOutput} + */ +// @ts-ignore +export function createApiUpdateLinkedAgentOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateLinkedAgentOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateModelAPIKeyInputPublic} + */ +// @ts-ignore +export function createApiUpdateModelAPIKeyInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateModelAPIKeyInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateModelAPIKeyOutput} + */ +// @ts-ignore +export function createApiUpdateModelAPIKeyOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateModelAPIKeyOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateOpenAIAPIKeyInputPublic} + */ +// @ts-ignore +export function createApiUpdateOpenAIAPIKeyInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateOpenAIAPIKeyInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateOpenAIAPIKeyOutput} + */ +// @ts-ignore +export function createApiUpdateOpenAIAPIKeyOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateOpenAIAPIKeyOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateWorkspaceInputPublic} + */ +// @ts-ignore +export function createApiUpdateWorkspaceInputPublicFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateWorkspaceInputPublic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUpdateWorkspaceOutput} + */ +// @ts-ignore +export function createApiUpdateWorkspaceOutputFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUpdateWorkspaceOutput; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiUsageMeasurement} + */ +// @ts-ignore +export function createApiUsageMeasurementFromDiscriminatorValue(parseNode) { + return deserializeIntoApiUsageMeasurement; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiWebCrawlerDataSource} + */ +// @ts-ignore +export function createApiWebCrawlerDataSourceFromDiscriminatorValue(parseNode) { + return deserializeIntoApiWebCrawlerDataSource; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ApiWorkspace} + */ +// @ts-ignore +export function createApiWorkspaceFromDiscriminatorValue(parseNode) { + return deserializeIntoApiWorkspace; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_alert_progress_step_reason} + */ +// @ts-ignore +export function createApp_alert_progress_step_reasonFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_alert_progress_step_reason; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_alert_progress_step} + */ +// @ts-ignore +export function createApp_alert_progress_stepFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_alert_progress_step; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_alert_progress} + */ +// @ts-ignore +export function createApp_alert_progressFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_alert_progress; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_alert_slack_webhook} + */ +// @ts-ignore +export function createApp_alert_slack_webhookFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_alert_slack_webhook; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_alert_spec} + */ +// @ts-ignore +export function createApp_alert_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_alert_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_alert} + */ +// @ts-ignore +export function createApp_alertFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_alert; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_component_base} + */ +// @ts-ignore +export function createApp_component_baseFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_component_base; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_component_health} + */ +// @ts-ignore +export function createApp_component_healthFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_component_health; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_database_spec} + */ +// @ts-ignore +export function createApp_database_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_database_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_domain_spec} + */ +// @ts-ignore +export function createApp_domain_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_domain_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_domain_validation} + */ +// @ts-ignore +export function createApp_domain_validationFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_domain_validation; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_egress_spec} + */ +// @ts-ignore +export function createApp_egress_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_egress_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_functions_component_health_functions_component_health_metrics} + */ +// @ts-ignore +export function createApp_functions_component_health_functions_component_health_metricsFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_functions_component_health_functions_component_health_metrics; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_functions_component_health} + */ +// @ts-ignore +export function createApp_functions_component_healthFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_functions_component_health; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_functions_spec} + */ +// @ts-ignore +export function createApp_functions_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_functions_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_health_check_spec} + */ +// @ts-ignore +export function createApp_health_check_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_health_check_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_health_response} + */ +// @ts-ignore +export function createApp_health_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_health_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_health} + */ +// @ts-ignore +export function createApp_healthFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_health; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_ingress_spec_rule_match} + */ +// @ts-ignore +export function createApp_ingress_spec_rule_matchFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_ingress_spec_rule_match; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_ingress_spec_rule_routing_component} + */ +// @ts-ignore +export function createApp_ingress_spec_rule_routing_componentFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_ingress_spec_rule_routing_component; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_ingress_spec_rule_routing_redirect} + */ +// @ts-ignore +export function createApp_ingress_spec_rule_routing_redirectFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_ingress_spec_rule_routing_redirect; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_ingress_spec_rule_string_match_exact} + */ +// @ts-ignore +export function createApp_ingress_spec_rule_string_match_exactFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_ingress_spec_rule_string_match_exact; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_ingress_spec_rule_string_match_prefix} + */ +// @ts-ignore +export function createApp_ingress_spec_rule_string_match_prefixFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_ingress_spec_rule_string_match_prefix; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_ingress_spec_rule} + */ +// @ts-ignore +export function createApp_ingress_spec_ruleFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_ingress_spec_rule; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_ingress_spec} + */ +// @ts-ignore +export function createApp_ingress_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_ingress_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_instance} + */ +// @ts-ignore +export function createApp_instanceFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_instance; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_instances} + */ +// @ts-ignore +export function createApp_instancesFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_instances; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_job_invocation_trigger_manual_user} + */ +// @ts-ignore +export function createApp_job_invocation_trigger_manual_userFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_job_invocation_trigger_manual_user; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_job_invocation_trigger_manual} + */ +// @ts-ignore +export function createApp_job_invocation_trigger_manualFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_job_invocation_trigger_manual; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_job_invocation_trigger_scheduled_schedule} + */ +// @ts-ignore +export function createApp_job_invocation_trigger_scheduled_scheduleFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_job_invocation_trigger_scheduled_schedule; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_job_invocation_trigger_scheduled} + */ +// @ts-ignore +export function createApp_job_invocation_trigger_scheduledFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_job_invocation_trigger_scheduled; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_job_invocation_trigger} + */ +// @ts-ignore +export function createApp_job_invocation_triggerFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_job_invocation_trigger; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_job_invocation} + */ +// @ts-ignore +export function createApp_job_invocationFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_job_invocation; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_job_invocations} + */ +// @ts-ignore +export function createApp_job_invocationsFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_job_invocations; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_job_spec_autoscaling_metrics_cpu} + */ +// @ts-ignore +export function createApp_job_spec_autoscaling_metrics_cpuFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_job_spec_autoscaling_metrics_cpu; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_job_spec_autoscaling_metrics} + */ +// @ts-ignore +export function createApp_job_spec_autoscaling_metricsFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_job_spec_autoscaling_metrics; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_job_spec_autoscaling} + */ +// @ts-ignore +export function createApp_job_spec_autoscalingFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_job_spec_autoscaling; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {string} + */ +// @ts-ignore +export function createApp_job_spec_instance_size_slugFromDiscriminatorValue(parseNode) { + return parseNode?.getStringValue(); +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_job_spec_termination} + */ +// @ts-ignore +export function createApp_job_spec_terminationFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_job_spec_termination; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_job_spec} + */ +// @ts-ignore +export function createApp_job_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_job_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_log_destination_datadog_spec} + */ +// @ts-ignore +export function createApp_log_destination_datadog_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_log_destination_datadog_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_log_destination_definition} + */ +// @ts-ignore +export function createApp_log_destination_definitionFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_log_destination_definition; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_log_destination_logtail_spec} + */ +// @ts-ignore +export function createApp_log_destination_logtail_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_log_destination_logtail_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_log_destination_open_search_spec_basic_auth} + */ +// @ts-ignore +export function createApp_log_destination_open_search_spec_basic_authFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_log_destination_open_search_spec_basic_auth; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_log_destination_open_search_spec} + */ +// @ts-ignore +export function createApp_log_destination_open_search_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_log_destination_open_search_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_log_destination_papertrail_spec} + */ +// @ts-ignore +export function createApp_log_destination_papertrail_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_log_destination_papertrail_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_maintenance_spec} + */ +// @ts-ignore +export function createApp_maintenance_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_maintenance_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_metrics_bandwidth_usage_details} + */ +// @ts-ignore +export function createApp_metrics_bandwidth_usage_detailsFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_metrics_bandwidth_usage_details; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_metrics_bandwidth_usage_request} + */ +// @ts-ignore +export function createApp_metrics_bandwidth_usage_requestFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_metrics_bandwidth_usage_request; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_metrics_bandwidth_usage} + */ +// @ts-ignore +export function createApp_metrics_bandwidth_usageFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_metrics_bandwidth_usage; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_propose_response} + */ +// @ts-ignore +export function createApp_propose_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_propose_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_propose} + */ +// @ts-ignore +export function createApp_proposeFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_propose; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_response} + */ +// @ts-ignore +export function createApp_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_rollback_validation_condition} + */ +// @ts-ignore +export function createApp_rollback_validation_conditionFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_rollback_validation_condition; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_route_spec} + */ +// @ts-ignore +export function createApp_route_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_route_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_service_spec_autoscaling_metrics_cpu} + */ +// @ts-ignore +export function createApp_service_spec_autoscaling_metrics_cpuFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_service_spec_autoscaling_metrics_cpu; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_service_spec_autoscaling_metrics} + */ +// @ts-ignore +export function createApp_service_spec_autoscaling_metricsFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_service_spec_autoscaling_metrics; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_service_spec_autoscaling} + */ +// @ts-ignore +export function createApp_service_spec_autoscalingFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_service_spec_autoscaling; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_service_spec_health_check} + */ +// @ts-ignore +export function createApp_service_spec_health_checkFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_service_spec_health_check; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {string} + */ +// @ts-ignore +export function createApp_service_spec_instance_size_slugFromDiscriminatorValue(parseNode) { + return parseNode?.getStringValue(); +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_service_spec_termination} + */ +// @ts-ignore +export function createApp_service_spec_terminationFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_service_spec_termination; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_service_spec} + */ +// @ts-ignore +export function createApp_service_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_service_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_spec} + */ +// @ts-ignore +export function createApp_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_static_site_spec} + */ +// @ts-ignore +export function createApp_static_site_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_static_site_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_variable_definition} + */ +// @ts-ignore +export function createApp_variable_definitionFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_variable_definition; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_worker_spec_autoscaling_metrics_cpu} + */ +// @ts-ignore +export function createApp_worker_spec_autoscaling_metrics_cpuFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_worker_spec_autoscaling_metrics_cpu; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_worker_spec_autoscaling_metrics} + */ +// @ts-ignore +export function createApp_worker_spec_autoscaling_metricsFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_worker_spec_autoscaling_metrics; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_worker_spec_autoscaling} + */ +// @ts-ignore +export function createApp_worker_spec_autoscalingFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_worker_spec_autoscaling; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {string} + */ +// @ts-ignore +export function createApp_worker_spec_instance_size_slugFromDiscriminatorValue(parseNode) { + return parseNode?.getStringValue(); +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_worker_spec_termination} + */ +// @ts-ignore +export function createApp_worker_spec_terminationFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_worker_spec_termination; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App_worker_spec} + */ +// @ts-ignore +export function createApp_worker_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApp_worker_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {App} + */ +// @ts-ignore +export function createAppFromDiscriminatorValue(parseNode) { + return deserializeIntoApp; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_alert_response} + */ +// @ts-ignore +export function createApps_alert_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_alert_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_assign_app_alert_destinations_request} + */ +// @ts-ignore +export function createApps_assign_app_alert_destinations_requestFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_assign_app_alert_destinations_request; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_bitbucket_source_spec} + */ +// @ts-ignore +export function createApps_bitbucket_source_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_bitbucket_source_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_cors_policy} + */ +// @ts-ignore +export function createApps_cors_policyFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_cors_policy; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_create_app_request} + */ +// @ts-ignore +export function createApps_create_app_requestFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_create_app_request; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_create_deployment_request} + */ +// @ts-ignore +export function createApps_create_deployment_requestFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_create_deployment_request; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_dedicated_egress_ip} + */ +// @ts-ignore +export function createApps_dedicated_egress_ipFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_dedicated_egress_ip; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_delete_app_response} + */ +// @ts-ignore +export function createApps_delete_app_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_delete_app_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_deployment_functions} + */ +// @ts-ignore +export function createApps_deployment_functionsFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_deployment_functions; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_deployment_job} + */ +// @ts-ignore +export function createApps_deployment_jobFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_deployment_job; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_deployment_progress_step_reason} + */ +// @ts-ignore +export function createApps_deployment_progress_step_reasonFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_deployment_progress_step_reason; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_deployment_progress_step_steps} + */ +// @ts-ignore +export function createApps_deployment_progress_step_stepsFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_deployment_progress_step_steps; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_deployment_progress_step} + */ +// @ts-ignore +export function createApps_deployment_progress_stepFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_deployment_progress_step; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_deployment_progress} + */ +// @ts-ignore +export function createApps_deployment_progressFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_deployment_progress; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_deployment_response} + */ +// @ts-ignore +export function createApps_deployment_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_deployment_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_deployment_service} + */ +// @ts-ignore +export function createApps_deployment_serviceFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_deployment_service; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_deployment_static_site} + */ +// @ts-ignore +export function createApps_deployment_static_siteFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_deployment_static_site; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_deployment_worker} + */ +// @ts-ignore +export function createApps_deployment_workerFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_deployment_worker; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_deployment} + */ +// @ts-ignore +export function createApps_deploymentFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_deployment; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_deployments_response} + */ +// @ts-ignore +export function createApps_deployments_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_deployments_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_domain_progress_steps} + */ +// @ts-ignore +export function createApps_domain_progress_stepsFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_domain_progress_steps; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_domain_progress} + */ +// @ts-ignore +export function createApps_domain_progressFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_domain_progress; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_domain} + */ +// @ts-ignore +export function createApps_domainFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_domain; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_get_exec_response} + */ +// @ts-ignore +export function createApps_get_exec_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_get_exec_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_get_instance_size_response} + */ +// @ts-ignore +export function createApps_get_instance_size_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_get_instance_size_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_get_logs_response} + */ +// @ts-ignore +export function createApps_get_logs_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_get_logs_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_git_source_spec} + */ +// @ts-ignore +export function createApps_git_source_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_git_source_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_github_source_spec} + */ +// @ts-ignore +export function createApps_github_source_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_github_source_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_gitlab_source_spec} + */ +// @ts-ignore +export function createApps_gitlab_source_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_gitlab_source_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_image_source_spec_deploy_on_push} + */ +// @ts-ignore +export function createApps_image_source_spec_deploy_on_pushFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_image_source_spec_deploy_on_push; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_image_source_spec} + */ +// @ts-ignore +export function createApps_image_source_specFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_image_source_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_instance_size} + */ +// @ts-ignore +export function createApps_instance_sizeFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_instance_size; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_list_alerts_response} + */ +// @ts-ignore +export function createApps_list_alerts_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_list_alerts_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_list_instance_sizes_response} + */ +// @ts-ignore +export function createApps_list_instance_sizes_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_list_instance_sizes_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_list_regions_response} + */ +// @ts-ignore +export function createApps_list_regions_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_list_regions_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_region} + */ +// @ts-ignore +export function createApps_regionFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_region; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_response} + */ +// @ts-ignore +export function createApps_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_restart_request} + */ +// @ts-ignore +export function createApps_restart_requestFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_restart_request; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_rollback_app_request} + */ +// @ts-ignore +export function createApps_rollback_app_requestFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_rollback_app_request; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_string_match} + */ +// @ts-ignore +export function createApps_string_matchFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_string_match; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_update_app_request} + */ +// @ts-ignore +export function createApps_update_app_requestFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_update_app_request; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_vpc_egress_ip} + */ +// @ts-ignore +export function createApps_vpc_egress_ipFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_vpc_egress_ip; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Apps_vpc} + */ +// @ts-ignore +export function createApps_vpcFromDiscriminatorValue(parseNode) { + return deserializeIntoApps_vpc; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Associated_kubernetes_resource} + */ +// @ts-ignore +export function createAssociated_kubernetes_resourceFromDiscriminatorValue(parseNode) { + return deserializeIntoAssociated_kubernetes_resource; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Associated_kubernetes_resources} + */ +// @ts-ignore +export function createAssociated_kubernetes_resourcesFromDiscriminatorValue(parseNode) { + return deserializeIntoAssociated_kubernetes_resources; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Associated_resource_status_resources} + */ +// @ts-ignore +export function createAssociated_resource_status_resourcesFromDiscriminatorValue(parseNode) { + return deserializeIntoAssociated_resource_status_resources; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Associated_resource_status} + */ +// @ts-ignore +export function createAssociated_resource_statusFromDiscriminatorValue(parseNode) { + return deserializeIntoAssociated_resource_status; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Associated_resource} + */ +// @ts-ignore +export function createAssociated_resourceFromDiscriminatorValue(parseNode) { + return deserializeIntoAssociated_resource; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Autoscale_pool_dynamic_config | Autoscale_pool_static_config} + */ +// @ts-ignore +export function createAutoscale_pool_configFromDiscriminatorValue(parseNode) { + return deserializeIntoAutoscale_pool_config; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Autoscale_pool_dynamic_config | Autoscale_pool_static_config} + */ +// @ts-ignore +export function createAutoscale_pool_create_configFromDiscriminatorValue(parseNode) { + return deserializeIntoAutoscale_pool_create_config; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Autoscale_pool_create} + */ +// @ts-ignore +export function createAutoscale_pool_createFromDiscriminatorValue(parseNode) { + return deserializeIntoAutoscale_pool_create; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Autoscale_pool_droplet_template} + */ +// @ts-ignore +export function createAutoscale_pool_droplet_templateFromDiscriminatorValue(parseNode) { + return deserializeIntoAutoscale_pool_droplet_template; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Autoscale_pool_dynamic_config} + */ +// @ts-ignore +export function createAutoscale_pool_dynamic_configFromDiscriminatorValue(parseNode) { + return deserializeIntoAutoscale_pool_dynamic_config; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Autoscale_pool_static_config} + */ +// @ts-ignore +export function createAutoscale_pool_static_configFromDiscriminatorValue(parseNode) { + return deserializeIntoAutoscale_pool_static_config; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Autoscale_pool} + */ +// @ts-ignore +export function createAutoscale_poolFromDiscriminatorValue(parseNode) { + return deserializeIntoAutoscale_pool; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Backup} + */ +// @ts-ignore +export function createBackupFromDiscriminatorValue(parseNode) { + return deserializeIntoBackup; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Backward_links} + */ +// @ts-ignore +export function createBackward_linksFromDiscriminatorValue(parseNode) { + return deserializeIntoBackward_links; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Balance} + */ +// @ts-ignore +export function createBalanceFromDiscriminatorValue(parseNode) { + return deserializeIntoBalance; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Billing_address} + */ +// @ts-ignore +export function createBilling_addressFromDiscriminatorValue(parseNode) { + return deserializeIntoBilling_address; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Billing_data_point} + */ +// @ts-ignore +export function createBilling_data_pointFromDiscriminatorValue(parseNode) { + return deserializeIntoBilling_data_point; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Billing_history} + */ +// @ts-ignore +export function createBilling_historyFromDiscriminatorValue(parseNode) { + return deserializeIntoBilling_history; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Byoip_prefix_create} + */ +// @ts-ignore +export function createByoip_prefix_createFromDiscriminatorValue(parseNode) { + return deserializeIntoByoip_prefix_create; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Byoip_prefix_resource} + */ +// @ts-ignore +export function createByoip_prefix_resourceFromDiscriminatorValue(parseNode) { + return deserializeIntoByoip_prefix_resource; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Byoip_prefix_update} + */ +// @ts-ignore +export function createByoip_prefix_updateFromDiscriminatorValue(parseNode) { + return deserializeIntoByoip_prefix_update; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Byoip_prefix_validations} + */ +// @ts-ignore +export function createByoip_prefix_validationsFromDiscriminatorValue(parseNode) { + return deserializeIntoByoip_prefix_validations; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Byoip_prefix} + */ +// @ts-ignore +export function createByoip_prefixFromDiscriminatorValue(parseNode) { + return deserializeIntoByoip_prefix; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Ca} + */ +// @ts-ignore +export function createCaFromDiscriminatorValue(parseNode) { + return deserializeIntoCa; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Cdn_endpoint} + */ +// @ts-ignore +export function createCdn_endpointFromDiscriminatorValue(parseNode) { + return deserializeIntoCdn_endpoint; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Certificate_create_base} + */ +// @ts-ignore +export function createCertificate_create_baseFromDiscriminatorValue(parseNode) { + return deserializeIntoCertificate_create_base; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Certificate_request_custom} + */ +// @ts-ignore +export function createCertificate_request_customFromDiscriminatorValue(parseNode) { + return deserializeIntoCertificate_request_custom; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Certificate_request_lets_encrypt} + */ +// @ts-ignore +export function createCertificate_request_lets_encryptFromDiscriminatorValue(parseNode) { + return deserializeIntoCertificate_request_lets_encrypt; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Certificate} + */ +// @ts-ignore +export function createCertificateFromDiscriminatorValue(parseNode) { + return deserializeIntoCertificate; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Check_updatable} + */ +// @ts-ignore +export function createCheck_updatableFromDiscriminatorValue(parseNode) { + return deserializeIntoCheck_updatable; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Check} + */ +// @ts-ignore +export function createCheckFromDiscriminatorValue(parseNode) { + return deserializeIntoCheck; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Cluster_autoscaler_configuration} + */ +// @ts-ignore +export function createCluster_autoscaler_configurationFromDiscriminatorValue(parseNode) { + return deserializeIntoCluster_autoscaler_configuration; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Cluster_read_status} + */ +// @ts-ignore +export function createCluster_read_statusFromDiscriminatorValue(parseNode) { + return deserializeIntoCluster_read_status; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Cluster_read} + */ +// @ts-ignore +export function createCluster_readFromDiscriminatorValue(parseNode) { + return deserializeIntoCluster_read; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Cluster_registries} + */ +// @ts-ignore +export function createCluster_registriesFromDiscriminatorValue(parseNode) { + return deserializeIntoCluster_registries; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Cluster_registry} + */ +// @ts-ignore +export function createCluster_registryFromDiscriminatorValue(parseNode) { + return deserializeIntoCluster_registry; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Cluster_status} + */ +// @ts-ignore +export function createCluster_statusFromDiscriminatorValue(parseNode) { + return deserializeIntoCluster_status; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Cluster_update} + */ +// @ts-ignore +export function createCluster_updateFromDiscriminatorValue(parseNode) { + return deserializeIntoCluster_update; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Cluster} + */ +// @ts-ignore +export function createClusterFromDiscriminatorValue(parseNode) { + return deserializeIntoCluster; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Clusterlint_request} + */ +// @ts-ignore +export function createClusterlint_requestFromDiscriminatorValue(parseNode) { + return deserializeIntoClusterlint_request; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Clusterlint_results_diagnostics_object} + */ +// @ts-ignore +export function createClusterlint_results_diagnostics_objectFromDiscriminatorValue(parseNode) { + return deserializeIntoClusterlint_results_diagnostics_object; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Clusterlint_results_diagnostics} + */ +// @ts-ignore +export function createClusterlint_results_diagnosticsFromDiscriminatorValue(parseNode) { + return deserializeIntoClusterlint_results_diagnostics; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Clusterlint_results} + */ +// @ts-ignore +export function createClusterlint_resultsFromDiscriminatorValue(parseNode) { + return deserializeIntoClusterlint_results; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Connection_pool_update} + */ +// @ts-ignore +export function createConnection_pool_updateFromDiscriminatorValue(parseNode) { + return deserializeIntoConnection_pool_update; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Connection_pool} + */ +// @ts-ignore +export function createConnection_poolFromDiscriminatorValue(parseNode) { + return deserializeIntoConnection_pool; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Connection_pools} + */ +// @ts-ignore +export function createConnection_poolsFromDiscriminatorValue(parseNode) { + return deserializeIntoConnection_pools; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Control_plane_firewall} + */ +// @ts-ignore +export function createControl_plane_firewallFromDiscriminatorValue(parseNode) { + return deserializeIntoControl_plane_firewall; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Create_namespace} + */ +// @ts-ignore +export function createCreate_namespaceFromDiscriminatorValue(parseNode) { + return deserializeIntoCreate_namespace; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Create_trigger} + */ +// @ts-ignore +export function createCreate_triggerFromDiscriminatorValue(parseNode) { + return deserializeIntoCreate_trigger; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Credentials} + */ +// @ts-ignore +export function createCredentialsFromDiscriminatorValue(parseNode) { + return deserializeIntoCredentials; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Current_utilization} + */ +// @ts-ignore +export function createCurrent_utilizationFromDiscriminatorValue(parseNode) { + return deserializeIntoCurrent_utilization; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Database_autoscale_params} + */ +// @ts-ignore +export function createDatabase_autoscale_paramsFromDiscriminatorValue(parseNode) { + return deserializeIntoDatabase_autoscale_params; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Database_backup} + */ +// @ts-ignore +export function createDatabase_backupFromDiscriminatorValue(parseNode) { + return deserializeIntoDatabase_backup; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Database_cluster_read} + */ +// @ts-ignore +export function createDatabase_cluster_readFromDiscriminatorValue(parseNode) { + return deserializeIntoDatabase_cluster_read; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Database_cluster_resize} + */ +// @ts-ignore +export function createDatabase_cluster_resizeFromDiscriminatorValue(parseNode) { + return deserializeIntoDatabase_cluster_resize; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Database_cluster} + */ +// @ts-ignore +export function createDatabase_clusterFromDiscriminatorValue(parseNode) { + return deserializeIntoDatabase_cluster; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kafka_advanced_config | Mongo_advanced_config | Mysql_advanced_config | Opensearch_advanced_config | Postgres_advanced_config | Redis_advanced_config | Valkey_advanced_config} + */ +// @ts-ignore +export function createDatabase_config_configFromDiscriminatorValue(parseNode) { + return deserializeIntoDatabase_config_config; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Database_config} + */ +// @ts-ignore +export function createDatabase_configFromDiscriminatorValue(parseNode) { + return deserializeIntoDatabase_config; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Database_connection} + */ +// @ts-ignore +export function createDatabase_connectionFromDiscriminatorValue(parseNode) { + return deserializeIntoDatabase_connection; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Database_kafka_schema_create} + */ +// @ts-ignore +export function createDatabase_kafka_schema_createFromDiscriminatorValue(parseNode) { + return deserializeIntoDatabase_kafka_schema_create; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Database_layout_option} + */ +// @ts-ignore +export function createDatabase_layout_optionFromDiscriminatorValue(parseNode) { + return deserializeIntoDatabase_layout_option; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Database_maintenance_window} + */ +// @ts-ignore +export function createDatabase_maintenance_windowFromDiscriminatorValue(parseNode) { + return deserializeIntoDatabase_maintenance_window; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Database_metrics_credentials} + */ +// @ts-ignore +export function createDatabase_metrics_credentialsFromDiscriminatorValue(parseNode) { + return deserializeIntoDatabase_metrics_credentials; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Database_replica_read} + */ +// @ts-ignore +export function createDatabase_replica_readFromDiscriminatorValue(parseNode) { + return deserializeIntoDatabase_replica_read; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Database_replica} + */ +// @ts-ignore +export function createDatabase_replicaFromDiscriminatorValue(parseNode) { + return deserializeIntoDatabase_replica; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Database_service_endpoint} + */ +// @ts-ignore +export function createDatabase_service_endpointFromDiscriminatorValue(parseNode) { + return deserializeIntoDatabase_service_endpoint; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Database_storage_autoscale_params} + */ +// @ts-ignore +export function createDatabase_storage_autoscale_paramsFromDiscriminatorValue(parseNode) { + return deserializeIntoDatabase_storage_autoscale_params; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Database_user} + */ +// @ts-ignore +export function createDatabase_userFromDiscriminatorValue(parseNode) { + return deserializeIntoDatabase_user; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Database_version_availability} + */ +// @ts-ignore +export function createDatabase_version_availabilityFromDiscriminatorValue(parseNode) { + return deserializeIntoDatabase_version_availability; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Database} + */ +// @ts-ignore +export function createDatabaseFromDiscriminatorValue(parseNode) { + return deserializeIntoDatabase; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Databases_basic_auth_credentials} + */ +// @ts-ignore +export function createDatabases_basic_auth_credentialsFromDiscriminatorValue(parseNode) { + return deserializeIntoDatabases_basic_auth_credentials; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Datadog_logsink} + */ +// @ts-ignore +export function createDatadog_logsinkFromDiscriminatorValue(parseNode) { + return deserializeIntoDatadog_logsink; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Destination_omit_credentials} + */ +// @ts-ignore +export function createDestination_omit_credentialsFromDiscriminatorValue(parseNode) { + return deserializeIntoDestination_omit_credentials; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Destination_request} + */ +// @ts-ignore +export function createDestination_requestFromDiscriminatorValue(parseNode) { + return deserializeIntoDestination_request; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Destination} + */ +// @ts-ignore +export function createDestinationFromDiscriminatorValue(parseNode) { + return deserializeIntoDestination; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Destroy_associated_kubernetes_resources} + */ +// @ts-ignore +export function createDestroy_associated_kubernetes_resourcesFromDiscriminatorValue(parseNode) { + return deserializeIntoDestroy_associated_kubernetes_resources; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Destroyed_associated_resource} + */ +// @ts-ignore +export function createDestroyed_associated_resourceFromDiscriminatorValue(parseNode) { + return deserializeIntoDestroyed_associated_resource; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Disk_info_size} + */ +// @ts-ignore +export function createDisk_info_sizeFromDiscriminatorValue(parseNode) { + return deserializeIntoDisk_info_size; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Disk_info} + */ +// @ts-ignore +export function createDisk_infoFromDiscriminatorValue(parseNode) { + return deserializeIntoDisk_info; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Do_settings} + */ +// @ts-ignore +export function createDo_settingsFromDiscriminatorValue(parseNode) { + return deserializeIntoDo_settings; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Docker_credentials_auths_registryDigitaloceanCom} + */ +// @ts-ignore +export function createDocker_credentials_auths_registryDigitaloceanComFromDiscriminatorValue(parseNode) { + return deserializeIntoDocker_credentials_auths_registryDigitaloceanCom; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Docker_credentials_auths} + */ +// @ts-ignore +export function createDocker_credentials_authsFromDiscriminatorValue(parseNode) { + return deserializeIntoDocker_credentials_auths; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Docker_credentials} + */ +// @ts-ignore +export function createDocker_credentialsFromDiscriminatorValue(parseNode) { + return deserializeIntoDocker_credentials; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Domain_record_aaaa} + */ +// @ts-ignore +export function createDomain_record_aaaaFromDiscriminatorValue(parseNode) { + return deserializeIntoDomain_record_aaaa; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Domain_record_a} + */ +// @ts-ignore +export function createDomain_record_aFromDiscriminatorValue(parseNode) { + return deserializeIntoDomain_record_a; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Domain_record_caa} + */ +// @ts-ignore +export function createDomain_record_caaFromDiscriminatorValue(parseNode) { + return deserializeIntoDomain_record_caa; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Domain_record_cname} + */ +// @ts-ignore +export function createDomain_record_cnameFromDiscriminatorValue(parseNode) { + return deserializeIntoDomain_record_cname; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Domain_record_mx} + */ +// @ts-ignore +export function createDomain_record_mxFromDiscriminatorValue(parseNode) { + return deserializeIntoDomain_record_mx; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Domain_record_ns} + */ +// @ts-ignore +export function createDomain_record_nsFromDiscriminatorValue(parseNode) { + return deserializeIntoDomain_record_ns; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Domain_record_soa} + */ +// @ts-ignore +export function createDomain_record_soaFromDiscriminatorValue(parseNode) { + return deserializeIntoDomain_record_soa; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Domain_record_srv} + */ +// @ts-ignore +export function createDomain_record_srvFromDiscriminatorValue(parseNode) { + return deserializeIntoDomain_record_srv; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Domain_record_txt} + */ +// @ts-ignore +export function createDomain_record_txtFromDiscriminatorValue(parseNode) { + return deserializeIntoDomain_record_txt; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Domain_record} + */ +// @ts-ignore +export function createDomain_recordFromDiscriminatorValue(parseNode) { + return deserializeIntoDomain_record; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Domain} + */ +// @ts-ignore +export function createDomainFromDiscriminatorValue(parseNode) { + return deserializeIntoDomain; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Domains} + */ +// @ts-ignore +export function createDomainsFromDiscriminatorValue(parseNode) { + return deserializeIntoDomains; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Droplet_action_change_backup_policy} + */ +// @ts-ignore +export function createDroplet_action_change_backup_policyFromDiscriminatorValue(parseNode) { + return deserializeIntoDroplet_action_change_backup_policy; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Droplet_action_change_kernel} + */ +// @ts-ignore +export function createDroplet_action_change_kernelFromDiscriminatorValue(parseNode) { + return deserializeIntoDroplet_action_change_kernel; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Droplet_action_enable_backups} + */ +// @ts-ignore +export function createDroplet_action_enable_backupsFromDiscriminatorValue(parseNode) { + return deserializeIntoDroplet_action_enable_backups; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {number | string} + */ +// @ts-ignore +export function createDroplet_action_rebuild_imageFromDiscriminatorValue(parseNode) { + return parseNode?.getNumberValue() ?? parseNode?.getStringValue(); +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Droplet_action_rebuild} + */ +// @ts-ignore +export function createDroplet_action_rebuildFromDiscriminatorValue(parseNode) { + return deserializeIntoDroplet_action_rebuild; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Droplet_action_rename} + */ +// @ts-ignore +export function createDroplet_action_renameFromDiscriminatorValue(parseNode) { + return deserializeIntoDroplet_action_rename; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Droplet_action_resize} + */ +// @ts-ignore +export function createDroplet_action_resizeFromDiscriminatorValue(parseNode) { + return deserializeIntoDroplet_action_resize; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Droplet_action_restore} + */ +// @ts-ignore +export function createDroplet_action_restoreFromDiscriminatorValue(parseNode) { + return deserializeIntoDroplet_action_restore; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Droplet_action_snapshot} + */ +// @ts-ignore +export function createDroplet_action_snapshotFromDiscriminatorValue(parseNode) { + return deserializeIntoDroplet_action_snapshot; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Droplet_action} + */ +// @ts-ignore +export function createDroplet_actionFromDiscriminatorValue(parseNode) { + return deserializeIntoDroplet_action; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Droplet_backup_policy_record} + */ +// @ts-ignore +export function createDroplet_backup_policy_recordFromDiscriminatorValue(parseNode) { + return deserializeIntoDroplet_backup_policy_record; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Droplet_backup_policy} + */ +// @ts-ignore +export function createDroplet_backup_policyFromDiscriminatorValue(parseNode) { + return deserializeIntoDroplet_backup_policy; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {number | string} + */ +// @ts-ignore +export function createDroplet_create_imageFromDiscriminatorValue(parseNode) { + return parseNode?.getNumberValue() ?? parseNode?.getStringValue(); +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Droplet_create} + */ +// @ts-ignore +export function createDroplet_createFromDiscriminatorValue(parseNode) { + return deserializeIntoDroplet_create; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Droplet_multi_create} + */ +// @ts-ignore +export function createDroplet_multi_createFromDiscriminatorValue(parseNode) { + return deserializeIntoDroplet_multi_create; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Droplet_networks} + */ +// @ts-ignore +export function createDroplet_networksFromDiscriminatorValue(parseNode) { + return deserializeIntoDroplet_networks; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Droplet_next_backup_window} + */ +// @ts-ignore +export function createDroplet_next_backup_windowFromDiscriminatorValue(parseNode) { + return deserializeIntoDroplet_next_backup_window; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Droplet_single_create} + */ +// @ts-ignore +export function createDroplet_single_createFromDiscriminatorValue(parseNode) { + return deserializeIntoDroplet_single_create; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Droplet_snapshot} + */ +// @ts-ignore +export function createDroplet_snapshotFromDiscriminatorValue(parseNode) { + return deserializeIntoDroplet_snapshot; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Droplet} + */ +// @ts-ignore +export function createDropletFromDiscriminatorValue(parseNode) { + return deserializeIntoDroplet; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Elasticsearch_logsink} + */ +// @ts-ignore +export function createElasticsearch_logsinkFromDiscriminatorValue(parseNode) { + return deserializeIntoElasticsearch_logsink; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Error_with_root_causes} + */ +// @ts-ignore +export function createError_with_root_causesFromDiscriminatorValue(parseNode) { + return deserializeIntoError_with_root_causes; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {ErrorEscaped} + */ +// @ts-ignore +export function createErrorEscapedFromDiscriminatorValue(parseNode) { + return deserializeIntoErrorEscaped; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Events_logs} + */ +// @ts-ignore +export function createEvents_logsFromDiscriminatorValue(parseNode) { + return deserializeIntoEvents_logs; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Firewall_pending_changes} + */ +// @ts-ignore +export function createFirewall_pending_changesFromDiscriminatorValue(parseNode) { + return deserializeIntoFirewall_pending_changes; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Firewall_rule_base} + */ +// @ts-ignore +export function createFirewall_rule_baseFromDiscriminatorValue(parseNode) { + return deserializeIntoFirewall_rule_base; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Firewall_rule_target} + */ +// @ts-ignore +export function createFirewall_rule_targetFromDiscriminatorValue(parseNode) { + return deserializeIntoFirewall_rule_target; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Firewall_rule} + */ +// @ts-ignore +export function createFirewall_ruleFromDiscriminatorValue(parseNode) { + return deserializeIntoFirewall_rule; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Firewall_rules_inbound_rules} + */ +// @ts-ignore +export function createFirewall_rules_inbound_rulesFromDiscriminatorValue(parseNode) { + return deserializeIntoFirewall_rules_inbound_rules; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Firewall_rules_outbound_rules} + */ +// @ts-ignore +export function createFirewall_rules_outbound_rulesFromDiscriminatorValue(parseNode) { + return deserializeIntoFirewall_rules_outbound_rules; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Firewall_rules} + */ +// @ts-ignore +export function createFirewall_rulesFromDiscriminatorValue(parseNode) { + return deserializeIntoFirewall_rules; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Firewall} + */ +// @ts-ignore +export function createFirewallFromDiscriminatorValue(parseNode) { + return deserializeIntoFirewall; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Floating_ip_action_assign} + */ +// @ts-ignore +export function createFloating_ip_action_assignFromDiscriminatorValue(parseNode) { + return deserializeIntoFloating_ip_action_assign; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Floating_ip_action_unassign} + */ +// @ts-ignore +export function createFloating_ip_action_unassignFromDiscriminatorValue(parseNode) { + return deserializeIntoFloating_ip_action_unassign; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Floating_ip_createMember1} + */ +// @ts-ignore +export function createFloating_ip_createMember1FromDiscriminatorValue(parseNode) { + return deserializeIntoFloating_ip_createMember1; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Floating_ip_createMember2} + */ +// @ts-ignore +export function createFloating_ip_createMember2FromDiscriminatorValue(parseNode) { + return deserializeIntoFloating_ip_createMember2; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Floating_ip} + */ +// @ts-ignore +export function createFloating_ipFromDiscriminatorValue(parseNode) { + return deserializeIntoFloating_ip; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {FloatingIPsAction} + */ +// @ts-ignore +export function createFloatingIPsActionFromDiscriminatorValue(parseNode) { + if (!parseNode) + throw new Error("parseNode cannot be undefined"); + const mappingValueNode = parseNode?.getChildNode("type"); + if (mappingValueNode) { + const mappingValue = mappingValueNode.getStringValue(); + if (mappingValue) { + switch (mappingValue) { + case "assign": + return deserializeIntoFloating_ip_action_assign; + case "unassign": + return deserializeIntoFloating_ip_action_unassign; + } + } + } + return deserializeIntoFloatingIPsAction; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Forward_links} + */ +// @ts-ignore +export function createForward_linksFromDiscriminatorValue(parseNode) { + return deserializeIntoForward_links; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Forwarding_rule} + */ +// @ts-ignore +export function createForwarding_ruleFromDiscriminatorValue(parseNode) { + return deserializeIntoForwarding_rule; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Garbage_collection} + */ +// @ts-ignore +export function createGarbage_collectionFromDiscriminatorValue(parseNode) { + return deserializeIntoGarbage_collection; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {GenaiapiRegion} + */ +// @ts-ignore +export function createGenaiapiRegionFromDiscriminatorValue(parseNode) { + return deserializeIntoGenaiapiRegion; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Glb_settings_cdn} + */ +// @ts-ignore +export function createGlb_settings_cdnFromDiscriminatorValue(parseNode) { + return deserializeIntoGlb_settings_cdn; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Glb_settings_region_priorities} + */ +// @ts-ignore +export function createGlb_settings_region_prioritiesFromDiscriminatorValue(parseNode) { + return deserializeIntoGlb_settings_region_priorities; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Glb_settings} + */ +// @ts-ignore +export function createGlb_settingsFromDiscriminatorValue(parseNode) { + return deserializeIntoGlb_settings; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Gpu_info_vram} + */ +// @ts-ignore +export function createGpu_info_vramFromDiscriminatorValue(parseNode) { + return deserializeIntoGpu_info_vram; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Gpu_info} + */ +// @ts-ignore +export function createGpu_infoFromDiscriminatorValue(parseNode) { + return deserializeIntoGpu_info; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Grant} + */ +// @ts-ignore +export function createGrantFromDiscriminatorValue(parseNode) { + return deserializeIntoGrant; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Health_check} + */ +// @ts-ignore +export function createHealth_checkFromDiscriminatorValue(parseNode) { + return deserializeIntoHealth_check; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {History} + */ +// @ts-ignore +export function createHistoryFromDiscriminatorValue(parseNode) { + return deserializeIntoHistory; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Image_action_base} + */ +// @ts-ignore +export function createImage_action_baseFromDiscriminatorValue(parseNode) { + return deserializeIntoImage_action_base; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Image_action_transfer} + */ +// @ts-ignore +export function createImage_action_transferFromDiscriminatorValue(parseNode) { + return deserializeIntoImage_action_transfer; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Image_new_custom} + */ +// @ts-ignore +export function createImage_new_customFromDiscriminatorValue(parseNode) { + return deserializeIntoImage_new_custom; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Image_update} + */ +// @ts-ignore +export function createImage_updateFromDiscriminatorValue(parseNode) { + return deserializeIntoImage_update; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Image} + */ +// @ts-ignore +export function createImageFromDiscriminatorValue(parseNode) { + return deserializeIntoImage; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Invoice_item} + */ +// @ts-ignore +export function createInvoice_itemFromDiscriminatorValue(parseNode) { + return deserializeIntoInvoice_item; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Invoice_preview} + */ +// @ts-ignore +export function createInvoice_previewFromDiscriminatorValue(parseNode) { + return deserializeIntoInvoice_preview; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Invoice_summary} + */ +// @ts-ignore +export function createInvoice_summaryFromDiscriminatorValue(parseNode) { + return deserializeIntoInvoice_summary; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kafka_advanced_config} + */ +// @ts-ignore +export function createKafka_advanced_configFromDiscriminatorValue(parseNode) { + return deserializeIntoKafka_advanced_config; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kafka_schema_verbose} + */ +// @ts-ignore +export function createKafka_schema_verboseFromDiscriminatorValue(parseNode) { + return deserializeIntoKafka_schema_verbose; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kafka_schema_version_verbose} + */ +// @ts-ignore +export function createKafka_schema_version_verboseFromDiscriminatorValue(parseNode) { + return deserializeIntoKafka_schema_version_verbose; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kafka_topic_base} + */ +// @ts-ignore +export function createKafka_topic_baseFromDiscriminatorValue(parseNode) { + return deserializeIntoKafka_topic_base; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kafka_topic_config} + */ +// @ts-ignore +export function createKafka_topic_configFromDiscriminatorValue(parseNode) { + return deserializeIntoKafka_topic_config; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kafka_topic_create} + */ +// @ts-ignore +export function createKafka_topic_createFromDiscriminatorValue(parseNode) { + return deserializeIntoKafka_topic_create; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kafka_topic_partition_consumer_groups} + */ +// @ts-ignore +export function createKafka_topic_partition_consumer_groupsFromDiscriminatorValue(parseNode) { + return deserializeIntoKafka_topic_partition_consumer_groups; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kafka_topic_partition} + */ +// @ts-ignore +export function createKafka_topic_partitionFromDiscriminatorValue(parseNode) { + return deserializeIntoKafka_topic_partition; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kafka_topic_update} + */ +// @ts-ignore +export function createKafka_topic_updateFromDiscriminatorValue(parseNode) { + return deserializeIntoKafka_topic_update; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kafka_topic_verbose} + */ +// @ts-ignore +export function createKafka_topic_verboseFromDiscriminatorValue(parseNode) { + return deserializeIntoKafka_topic_verbose; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kafka_topic} + */ +// @ts-ignore +export function createKafka_topicFromDiscriminatorValue(parseNode) { + return deserializeIntoKafka_topic; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kernel} + */ +// @ts-ignore +export function createKernelFromDiscriminatorValue(parseNode) { + return deserializeIntoKernel; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Key_create_response} + */ +// @ts-ignore +export function createKey_create_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoKey_create_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Key} + */ +// @ts-ignore +export function createKeyFromDiscriminatorValue(parseNode) { + return deserializeIntoKey; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kubernetes_node_pool_labels} + */ +// @ts-ignore +export function createKubernetes_node_pool_labelsFromDiscriminatorValue(parseNode) { + return deserializeIntoKubernetes_node_pool_labels; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kubernetes_node_pool_taint} + */ +// @ts-ignore +export function createKubernetes_node_pool_taintFromDiscriminatorValue(parseNode) { + return deserializeIntoKubernetes_node_pool_taint; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kubernetes_node_pool_update_labels} + */ +// @ts-ignore +export function createKubernetes_node_pool_update_labelsFromDiscriminatorValue(parseNode) { + return deserializeIntoKubernetes_node_pool_update_labels; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kubernetes_node_pool_update} + */ +// @ts-ignore +export function createKubernetes_node_pool_updateFromDiscriminatorValue(parseNode) { + return deserializeIntoKubernetes_node_pool_update; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kubernetes_node_pool} + */ +// @ts-ignore +export function createKubernetes_node_poolFromDiscriminatorValue(parseNode) { + return deserializeIntoKubernetes_node_pool; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kubernetes_options_options} + */ +// @ts-ignore +export function createKubernetes_options_optionsFromDiscriminatorValue(parseNode) { + return deserializeIntoKubernetes_options_options; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kubernetes_options} + */ +// @ts-ignore +export function createKubernetes_optionsFromDiscriminatorValue(parseNode) { + return deserializeIntoKubernetes_options; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kubernetes_region} + */ +// @ts-ignore +export function createKubernetes_regionFromDiscriminatorValue(parseNode) { + return deserializeIntoKubernetes_region; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kubernetes_size} + */ +// @ts-ignore +export function createKubernetes_sizeFromDiscriminatorValue(parseNode) { + return deserializeIntoKubernetes_size; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Kubernetes_version} + */ +// @ts-ignore +export function createKubernetes_versionFromDiscriminatorValue(parseNode) { + return deserializeIntoKubernetes_version; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Lb_firewall} + */ +// @ts-ignore +export function createLb_firewallFromDiscriminatorValue(parseNode) { + return deserializeIntoLb_firewall; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Load_balancer_base} + */ +// @ts-ignore +export function createLoad_balancer_baseFromDiscriminatorValue(parseNode) { + return deserializeIntoLoad_balancer_base; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Load_balancer_region} + */ +// @ts-ignore +export function createLoad_balancer_regionFromDiscriminatorValue(parseNode) { + return deserializeIntoLoad_balancer_region; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Load_balancer} + */ +// @ts-ignore +export function createLoad_balancerFromDiscriminatorValue(parseNode) { + return deserializeIntoLoad_balancer; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Logsink_base_verbose} + */ +// @ts-ignore +export function createLogsink_base_verboseFromDiscriminatorValue(parseNode) { + return deserializeIntoLogsink_base_verbose; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Logsink_base} + */ +// @ts-ignore +export function createLogsink_baseFromDiscriminatorValue(parseNode) { + return deserializeIntoLogsink_base; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Datadog_logsink | Elasticsearch_logsink | Opensearch_logsink | Rsyslog_logsink} + */ +// @ts-ignore +export function createLogsink_create_configFromDiscriminatorValue(parseNode) { + return deserializeIntoLogsink_create_config; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Logsink_create} + */ +// @ts-ignore +export function createLogsink_createFromDiscriminatorValue(parseNode) { + return deserializeIntoLogsink_create; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Logsink_schema} + */ +// @ts-ignore +export function createLogsink_schemaFromDiscriminatorValue(parseNode) { + return deserializeIntoLogsink_schema; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Datadog_logsink | Elasticsearch_logsink | Opensearch_logsink | Rsyslog_logsink} + */ +// @ts-ignore +export function createLogsink_update_configFromDiscriminatorValue(parseNode) { + return deserializeIntoLogsink_update_config; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Logsink_update} + */ +// @ts-ignore +export function createLogsink_updateFromDiscriminatorValue(parseNode) { + return deserializeIntoLogsink_update; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Datadog_logsink | Elasticsearch_logsink | Opensearch_logsink | Rsyslog_logsink} + */ +// @ts-ignore +export function createLogsink_verbose_configFromDiscriminatorValue(parseNode) { + return deserializeIntoLogsink_verbose_config; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Logsink_verbose} + */ +// @ts-ignore +export function createLogsink_verboseFromDiscriminatorValue(parseNode) { + return deserializeIntoLogsink_verbose; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Maintenance_policy} + */ +// @ts-ignore +export function createMaintenance_policyFromDiscriminatorValue(parseNode) { + return deserializeIntoMaintenance_policy; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Member_current_utilization} + */ +// @ts-ignore +export function createMember_current_utilizationFromDiscriminatorValue(parseNode) { + return deserializeIntoMember_current_utilization; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Member} + */ +// @ts-ignore +export function createMemberFromDiscriminatorValue(parseNode) { + return deserializeIntoMember; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Meta_properties} + */ +// @ts-ignore +export function createMeta_propertiesFromDiscriminatorValue(parseNode) { + return deserializeIntoMeta_properties; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Metrics_data} + */ +// @ts-ignore +export function createMetrics_dataFromDiscriminatorValue(parseNode) { + return deserializeIntoMetrics_data; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Metrics_result_metric} + */ +// @ts-ignore +export function createMetrics_result_metricFromDiscriminatorValue(parseNode) { + return deserializeIntoMetrics_result_metric; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Metrics_result} + */ +// @ts-ignore +export function createMetrics_resultFromDiscriminatorValue(parseNode) { + return deserializeIntoMetrics_result; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Metrics} + */ +// @ts-ignore +export function createMetricsFromDiscriminatorValue(parseNode) { + return deserializeIntoMetrics; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Mongo_advanced_config} + */ +// @ts-ignore +export function createMongo_advanced_configFromDiscriminatorValue(parseNode) { + return deserializeIntoMongo_advanced_config; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Multiregistry_create} + */ +// @ts-ignore +export function createMultiregistry_createFromDiscriminatorValue(parseNode) { + return deserializeIntoMultiregistry_create; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Multiregistry} + */ +// @ts-ignore +export function createMultiregistryFromDiscriminatorValue(parseNode) { + return deserializeIntoMultiregistry; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Mysql_advanced_config} + */ +// @ts-ignore +export function createMysql_advanced_configFromDiscriminatorValue(parseNode) { + return deserializeIntoMysql_advanced_config; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Mysql_incremental_backup} + */ +// @ts-ignore +export function createMysql_incremental_backupFromDiscriminatorValue(parseNode) { + return deserializeIntoMysql_incremental_backup; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Mysql_settings} + */ +// @ts-ignore +export function createMysql_settingsFromDiscriminatorValue(parseNode) { + return deserializeIntoMysql_settings; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Namespace_info} + */ +// @ts-ignore +export function createNamespace_infoFromDiscriminatorValue(parseNode) { + return deserializeIntoNamespace_info; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Neighbor_ids} + */ +// @ts-ignore +export function createNeighbor_idsFromDiscriminatorValue(parseNode) { + return deserializeIntoNeighbor_ids; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Network_v4} + */ +// @ts-ignore +export function createNetwork_v4FromDiscriminatorValue(parseNode) { + return deserializeIntoNetwork_v4; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Network_v6} + */ +// @ts-ignore +export function createNetwork_v6FromDiscriminatorValue(parseNode) { + return deserializeIntoNetwork_v6; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Nfs_action_attach_params} + */ +// @ts-ignore +export function createNfs_action_attach_paramsFromDiscriminatorValue(parseNode) { + return deserializeIntoNfs_action_attach_params; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Nfs_action_attach} + */ +// @ts-ignore +export function createNfs_action_attachFromDiscriminatorValue(parseNode) { + return deserializeIntoNfs_action_attach; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Nfs_action_detach_params} + */ +// @ts-ignore +export function createNfs_action_detach_paramsFromDiscriminatorValue(parseNode) { + return deserializeIntoNfs_action_detach_params; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Nfs_action_detach} + */ +// @ts-ignore +export function createNfs_action_detachFromDiscriminatorValue(parseNode) { + return deserializeIntoNfs_action_detach; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Nfs_action_resize_params} + */ +// @ts-ignore +export function createNfs_action_resize_paramsFromDiscriminatorValue(parseNode) { + return deserializeIntoNfs_action_resize_params; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Nfs_action_resize} + */ +// @ts-ignore +export function createNfs_action_resizeFromDiscriminatorValue(parseNode) { + return deserializeIntoNfs_action_resize; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Nfs_action_snapshot_params} + */ +// @ts-ignore +export function createNfs_action_snapshot_paramsFromDiscriminatorValue(parseNode) { + return deserializeIntoNfs_action_snapshot_params; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Nfs_action_snapshot} + */ +// @ts-ignore +export function createNfs_action_snapshotFromDiscriminatorValue(parseNode) { + return deserializeIntoNfs_action_snapshot; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Nfs_action_switch_performance_tier_params} + */ +// @ts-ignore +export function createNfs_action_switch_performance_tier_paramsFromDiscriminatorValue(parseNode) { + return deserializeIntoNfs_action_switch_performance_tier_params; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Nfs_action_switch_performance_tier} + */ +// @ts-ignore +export function createNfs_action_switch_performance_tierFromDiscriminatorValue(parseNode) { + return deserializeIntoNfs_action_switch_performance_tier; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Nfs_action} + */ +// @ts-ignore +export function createNfs_actionFromDiscriminatorValue(parseNode) { + return deserializeIntoNfs_action; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Nfs_actions_response_action} + */ +// @ts-ignore +export function createNfs_actions_response_actionFromDiscriminatorValue(parseNode) { + return deserializeIntoNfs_actions_response_action; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Nfs_actions_response} + */ +// @ts-ignore +export function createNfs_actions_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoNfs_actions_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Nfs_create_response} + */ +// @ts-ignore +export function createNfs_create_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoNfs_create_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Nfs_get_response} + */ +// @ts-ignore +export function createNfs_get_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoNfs_get_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Nfs_list_response} + */ +// @ts-ignore +export function createNfs_list_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoNfs_list_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Nfs_request} + */ +// @ts-ignore +export function createNfs_requestFromDiscriminatorValue(parseNode) { + return deserializeIntoNfs_request; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Nfs_response} + */ +// @ts-ignore +export function createNfs_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoNfs_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Nfs_snapshot_get_response} + */ +// @ts-ignore +export function createNfs_snapshot_get_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoNfs_snapshot_get_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Nfs_snapshot_list_response} + */ +// @ts-ignore +export function createNfs_snapshot_list_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoNfs_snapshot_list_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Nfs_snapshot_response} + */ +// @ts-ignore +export function createNfs_snapshot_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoNfs_snapshot_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Node_status} + */ +// @ts-ignore +export function createNode_statusFromDiscriminatorValue(parseNode) { + return deserializeIntoNode_status; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Node} + */ +// @ts-ignore +export function createNodeFromDiscriminatorValue(parseNode) { + return deserializeIntoNode; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Notification_slack} + */ +// @ts-ignore +export function createNotification_slackFromDiscriminatorValue(parseNode) { + return deserializeIntoNotification_slack; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Notification} + */ +// @ts-ignore +export function createNotificationFromDiscriminatorValue(parseNode) { + return deserializeIntoNotification; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Nvidia_gpu_device_plugin} + */ +// @ts-ignore +export function createNvidia_gpu_device_pluginFromDiscriminatorValue(parseNode) { + return deserializeIntoNvidia_gpu_device_plugin; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {OneClicks_create} + */ +// @ts-ignore +export function createOneClicks_createFromDiscriminatorValue(parseNode) { + return deserializeIntoOneClicks_create; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {OneClicks} + */ +// @ts-ignore +export function createOneClicksFromDiscriminatorValue(parseNode) { + return deserializeIntoOneClicks; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Online_migration} + */ +// @ts-ignore +export function createOnline_migrationFromDiscriminatorValue(parseNode) { + return deserializeIntoOnline_migration; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Opensearch_advanced_config} + */ +// @ts-ignore +export function createOpensearch_advanced_configFromDiscriminatorValue(parseNode) { + return deserializeIntoOpensearch_advanced_config; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Opensearch_config_credentials} + */ +// @ts-ignore +export function createOpensearch_config_credentialsFromDiscriminatorValue(parseNode) { + return deserializeIntoOpensearch_config_credentials; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Opensearch_config_omit_credentials} + */ +// @ts-ignore +export function createOpensearch_config_omit_credentialsFromDiscriminatorValue(parseNode) { + return deserializeIntoOpensearch_config_omit_credentials; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Opensearch_config_request_credentials} + */ +// @ts-ignore +export function createOpensearch_config_request_credentialsFromDiscriminatorValue(parseNode) { + return deserializeIntoOpensearch_config_request_credentials; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Opensearch_config_request} + */ +// @ts-ignore +export function createOpensearch_config_requestFromDiscriminatorValue(parseNode) { + return deserializeIntoOpensearch_config_request; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Opensearch_config} + */ +// @ts-ignore +export function createOpensearch_configFromDiscriminatorValue(parseNode) { + return deserializeIntoOpensearch_config; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Opensearch_connection} + */ +// @ts-ignore +export function createOpensearch_connectionFromDiscriminatorValue(parseNode) { + return deserializeIntoOpensearch_connection; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Opensearch_index_base} + */ +// @ts-ignore +export function createOpensearch_index_baseFromDiscriminatorValue(parseNode) { + return deserializeIntoOpensearch_index_base; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Opensearch_index} + */ +// @ts-ignore +export function createOpensearch_indexFromDiscriminatorValue(parseNode) { + return deserializeIntoOpensearch_index; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Opensearch_logsink} + */ +// @ts-ignore +export function createOpensearch_logsinkFromDiscriminatorValue(parseNode) { + return deserializeIntoOpensearch_logsink; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Options_options_kafka} + */ +// @ts-ignore +export function createOptions_options_kafkaFromDiscriminatorValue(parseNode) { + return deserializeIntoOptions_options_kafka; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Options_options_mongodb} + */ +// @ts-ignore +export function createOptions_options_mongodbFromDiscriminatorValue(parseNode) { + return deserializeIntoOptions_options_mongodb; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Options_options_mysql} + */ +// @ts-ignore +export function createOptions_options_mysqlFromDiscriminatorValue(parseNode) { + return deserializeIntoOptions_options_mysql; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Options_options_opensearch} + */ +// @ts-ignore +export function createOptions_options_opensearchFromDiscriminatorValue(parseNode) { + return deserializeIntoOptions_options_opensearch; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Options_options_pg} + */ +// @ts-ignore +export function createOptions_options_pgFromDiscriminatorValue(parseNode) { + return deserializeIntoOptions_options_pg; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Options_options_redis} + */ +// @ts-ignore +export function createOptions_options_redisFromDiscriminatorValue(parseNode) { + return deserializeIntoOptions_options_redis; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Options_options_valkey} + */ +// @ts-ignore +export function createOptions_options_valkeyFromDiscriminatorValue(parseNode) { + return deserializeIntoOptions_options_valkey; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Options_options} + */ +// @ts-ignore +export function createOptions_optionsFromDiscriminatorValue(parseNode) { + return deserializeIntoOptions_options; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Options_version_availability} + */ +// @ts-ignore +export function createOptions_version_availabilityFromDiscriminatorValue(parseNode) { + return deserializeIntoOptions_version_availability; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Options} + */ +// @ts-ignore +export function createOptionsFromDiscriminatorValue(parseNode) { + return deserializeIntoOptions; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Backward_links | Forward_links | Page_links_pagesMember1} + */ +// @ts-ignore +export function createPage_links_pagesFromDiscriminatorValue(parseNode) { + return deserializeIntoPage_links_pages; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Page_links_pagesMember1} + */ +// @ts-ignore +export function createPage_links_pagesMember1FromDiscriminatorValue(parseNode) { + return deserializeIntoPage_links_pagesMember1; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Page_links} + */ +// @ts-ignore +export function createPage_linksFromDiscriminatorValue(parseNode) { + return deserializeIntoPage_links; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Pagination} + */ +// @ts-ignore +export function createPaginationFromDiscriminatorValue(parseNode) { + return deserializeIntoPagination; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Partner_attachment_bgp} + */ +// @ts-ignore +export function createPartner_attachment_bgpFromDiscriminatorValue(parseNode) { + return deserializeIntoPartner_attachment_bgp; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Partner_attachment_remote_route} + */ +// @ts-ignore +export function createPartner_attachment_remote_routeFromDiscriminatorValue(parseNode) { + return deserializeIntoPartner_attachment_remote_route; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Partner_attachment_updatableMember1} + */ +// @ts-ignore +export function createPartner_attachment_updatableMember1FromDiscriminatorValue(parseNode) { + return deserializeIntoPartner_attachment_updatableMember1; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Partner_attachment_updatableMember2} + */ +// @ts-ignore +export function createPartner_attachment_updatableMember2FromDiscriminatorValue(parseNode) { + return deserializeIntoPartner_attachment_updatableMember2; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Partner_attachment_updatableMember3_bgp} + */ +// @ts-ignore +export function createPartner_attachment_updatableMember3_bgpFromDiscriminatorValue(parseNode) { + return deserializeIntoPartner_attachment_updatableMember3_bgp; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Partner_attachment_updatableMember3} + */ +// @ts-ignore +export function createPartner_attachment_updatableMember3FromDiscriminatorValue(parseNode) { + return deserializeIntoPartner_attachment_updatableMember3; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Partner_attachment_writable_bgp} + */ +// @ts-ignore +export function createPartner_attachment_writable_bgpFromDiscriminatorValue(parseNode) { + return deserializeIntoPartner_attachment_writable_bgp; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Partner_attachment_writable} + */ +// @ts-ignore +export function createPartner_attachment_writableFromDiscriminatorValue(parseNode) { + return deserializeIntoPartner_attachment_writable; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Partner_attachment} + */ +// @ts-ignore +export function createPartner_attachmentFromDiscriminatorValue(parseNode) { + return deserializeIntoPartner_attachment; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Pgbouncer_advanced_config} + */ +// @ts-ignore +export function createPgbouncer_advanced_configFromDiscriminatorValue(parseNode) { + return deserializeIntoPgbouncer_advanced_config; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Postgres_advanced_config} + */ +// @ts-ignore +export function createPostgres_advanced_configFromDiscriminatorValue(parseNode) { + return deserializeIntoPostgres_advanced_config; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Previous_outage} + */ +// @ts-ignore +export function createPrevious_outageFromDiscriminatorValue(parseNode) { + return deserializeIntoPrevious_outage; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Product_charge_item} + */ +// @ts-ignore +export function createProduct_charge_itemFromDiscriminatorValue(parseNode) { + return deserializeIntoProduct_charge_item; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Product_usage_charges} + */ +// @ts-ignore +export function createProduct_usage_chargesFromDiscriminatorValue(parseNode) { + return deserializeIntoProduct_usage_charges; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Project_assignment} + */ +// @ts-ignore +export function createProject_assignmentFromDiscriminatorValue(parseNode) { + return deserializeIntoProject_assignment; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Project_base} + */ +// @ts-ignore +export function createProject_baseFromDiscriminatorValue(parseNode) { + return deserializeIntoProject_base; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Project} + */ +// @ts-ignore +export function createProjectFromDiscriminatorValue(parseNode) { + return deserializeIntoProject; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Purge_cache} + */ +// @ts-ignore +export function createPurge_cacheFromDiscriminatorValue(parseNode) { + return deserializeIntoPurge_cache; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Rdma_shared_dev_plugin} + */ +// @ts-ignore +export function createRdma_shared_dev_pluginFromDiscriminatorValue(parseNode) { + return deserializeIntoRdma_shared_dev_plugin; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Redis_advanced_config} + */ +// @ts-ignore +export function createRedis_advanced_configFromDiscriminatorValue(parseNode) { + return deserializeIntoRedis_advanced_config; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Region_state} + */ +// @ts-ignore +export function createRegion_stateFromDiscriminatorValue(parseNode) { + return deserializeIntoRegion_state; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Regional_state} + */ +// @ts-ignore +export function createRegional_stateFromDiscriminatorValue(parseNode) { + return deserializeIntoRegional_state; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Region} + */ +// @ts-ignore +export function createRegionFromDiscriminatorValue(parseNode) { + return deserializeIntoRegion; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Registry_base} + */ +// @ts-ignore +export function createRegistry_baseFromDiscriminatorValue(parseNode) { + return deserializeIntoRegistry_base; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Registry_create} + */ +// @ts-ignore +export function createRegistry_createFromDiscriminatorValue(parseNode) { + return deserializeIntoRegistry_create; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Registry_run_gc} + */ +// @ts-ignore +export function createRegistry_run_gcFromDiscriminatorValue(parseNode) { + return deserializeIntoRegistry_run_gc; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Registry} + */ +// @ts-ignore +export function createRegistryFromDiscriminatorValue(parseNode) { + return deserializeIntoRegistry; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Repository_blob} + */ +// @ts-ignore +export function createRepository_blobFromDiscriminatorValue(parseNode) { + return deserializeIntoRepository_blob; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Repository_manifest} + */ +// @ts-ignore +export function createRepository_manifestFromDiscriminatorValue(parseNode) { + return deserializeIntoRepository_manifest; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Repository_tag} + */ +// @ts-ignore +export function createRepository_tagFromDiscriminatorValue(parseNode) { + return deserializeIntoRepository_tag; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Repository_v2} + */ +// @ts-ignore +export function createRepository_v2FromDiscriminatorValue(parseNode) { + return deserializeIntoRepository_v2; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Repository} + */ +// @ts-ignore +export function createRepositoryFromDiscriminatorValue(parseNode) { + return deserializeIntoRepository; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Reserved_ip_action_assign} + */ +// @ts-ignore +export function createReserved_ip_action_assignFromDiscriminatorValue(parseNode) { + return deserializeIntoReserved_ip_action_assign; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Reserved_ip_action_type} + */ +// @ts-ignore +export function createReserved_ip_action_typeFromDiscriminatorValue(parseNode) { + if (!parseNode) + throw new Error("parseNode cannot be undefined"); + const mappingValueNode = parseNode?.getChildNode("type"); + if (mappingValueNode) { + const mappingValue = mappingValueNode.getStringValue(); + if (mappingValue) { + switch (mappingValue) { + case "assign": + return deserializeIntoReserved_ip_action_assign; + case "unassign": + return deserializeIntoReserved_ip_action_unassign; + } + } + } + return deserializeIntoReserved_ip_action_type; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Reserved_ip_action_unassign} + */ +// @ts-ignore +export function createReserved_ip_action_unassignFromDiscriminatorValue(parseNode) { + return deserializeIntoReserved_ip_action_unassign; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Reserved_ip_createMember1} + */ +// @ts-ignore +export function createReserved_ip_createMember1FromDiscriminatorValue(parseNode) { + return deserializeIntoReserved_ip_createMember1; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Reserved_ip_createMember2} + */ +// @ts-ignore +export function createReserved_ip_createMember2FromDiscriminatorValue(parseNode) { + return deserializeIntoReserved_ip_createMember2; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Reserved_ip} + */ +// @ts-ignore +export function createReserved_ipFromDiscriminatorValue(parseNode) { + return deserializeIntoReserved_ip; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Reserved_ipv6_action_assign} + */ +// @ts-ignore +export function createReserved_ipv6_action_assignFromDiscriminatorValue(parseNode) { + return deserializeIntoReserved_ipv6_action_assign; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Reserved_ipv6_action_type} + */ +// @ts-ignore +export function createReserved_ipv6_action_typeFromDiscriminatorValue(parseNode) { + if (!parseNode) + throw new Error("parseNode cannot be undefined"); + const mappingValueNode = parseNode?.getChildNode("type"); + if (mappingValueNode) { + const mappingValue = mappingValueNode.getStringValue(); + if (mappingValue) { + switch (mappingValue) { + case "assign": + return deserializeIntoReserved_ipv6_action_assign; + case "unassign": + return deserializeIntoReserved_ipv6_action_unassign; + } + } + } + return deserializeIntoReserved_ipv6_action_type; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Reserved_ipv6_action_unassign} + */ +// @ts-ignore +export function createReserved_ipv6_action_unassignFromDiscriminatorValue(parseNode) { + return deserializeIntoReserved_ipv6_action_unassign; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Reserved_ipv6_create} + */ +// @ts-ignore +export function createReserved_ipv6_createFromDiscriminatorValue(parseNode) { + return deserializeIntoReserved_ipv6_create; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Reserved_ipv6} + */ +// @ts-ignore +export function createReserved_ipv6FromDiscriminatorValue(parseNode) { + return deserializeIntoReserved_ipv6; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Resource_links} + */ +// @ts-ignore +export function createResource_linksFromDiscriminatorValue(parseNode) { + return deserializeIntoResource_links; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Resource} + */ +// @ts-ignore +export function createResourceFromDiscriminatorValue(parseNode) { + return deserializeIntoResource; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Routing_agent} + */ +// @ts-ignore +export function createRouting_agentFromDiscriminatorValue(parseNode) { + return deserializeIntoRouting_agent; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Rsyslog_logsink} + */ +// @ts-ignore +export function createRsyslog_logsinkFromDiscriminatorValue(parseNode) { + return deserializeIntoRsyslog_logsink; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Scheduled_details_body} + */ +// @ts-ignore +export function createScheduled_details_bodyFromDiscriminatorValue(parseNode) { + return deserializeIntoScheduled_details_body; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Scheduled_details} + */ +// @ts-ignore +export function createScheduled_detailsFromDiscriminatorValue(parseNode) { + return deserializeIntoScheduled_details; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Schema_registry_connection} + */ +// @ts-ignore +export function createSchema_registry_connectionFromDiscriminatorValue(parseNode) { + return deserializeIntoSchema_registry_connection; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Selective_destroy_associated_resource} + */ +// @ts-ignore +export function createSelective_destroy_associated_resourceFromDiscriminatorValue(parseNode) { + return deserializeIntoSelective_destroy_associated_resource; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Simple_charge} + */ +// @ts-ignore +export function createSimple_chargeFromDiscriminatorValue(parseNode) { + return deserializeIntoSimple_charge; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Sink_resource} + */ +// @ts-ignore +export function createSink_resourceFromDiscriminatorValue(parseNode) { + return deserializeIntoSink_resource; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Sinks_response} + */ +// @ts-ignore +export function createSinks_responseFromDiscriminatorValue(parseNode) { + return deserializeIntoSinks_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Size} + */ +// @ts-ignore +export function createSizeFromDiscriminatorValue(parseNode) { + return deserializeIntoSize; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Slack_details} + */ +// @ts-ignore +export function createSlack_detailsFromDiscriminatorValue(parseNode) { + return deserializeIntoSlack_details; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Snapshots_base} + */ +// @ts-ignore +export function createSnapshots_baseFromDiscriminatorValue(parseNode) { + return deserializeIntoSnapshots_base; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Snapshots} + */ +// @ts-ignore +export function createSnapshotsFromDiscriminatorValue(parseNode) { + return deserializeIntoSnapshots; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Source_database_source} + */ +// @ts-ignore +export function createSource_database_sourceFromDiscriminatorValue(parseNode) { + return deserializeIntoSource_database_source; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Source_database} + */ +// @ts-ignore +export function createSource_databaseFromDiscriminatorValue(parseNode) { + return deserializeIntoSource_database; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Sql_mode} + */ +// @ts-ignore +export function createSql_modeFromDiscriminatorValue(parseNode) { + return deserializeIntoSql_mode; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {SshKeys} + */ +// @ts-ignore +export function createSshKeysFromDiscriminatorValue(parseNode) { + return deserializeIntoSshKeys; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {State} + */ +// @ts-ignore +export function createStateFromDiscriminatorValue(parseNode) { + return deserializeIntoState; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Status_messages} + */ +// @ts-ignore +export function createStatus_messagesFromDiscriminatorValue(parseNode) { + return deserializeIntoStatus_messages; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Sticky_sessions} + */ +// @ts-ignore +export function createSticky_sessionsFromDiscriminatorValue(parseNode) { + return deserializeIntoSticky_sessions; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Subscription_tier_base} + */ +// @ts-ignore +export function createSubscription_tier_baseFromDiscriminatorValue(parseNode) { + return deserializeIntoSubscription_tier_base; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Subscription} + */ +// @ts-ignore +export function createSubscriptionFromDiscriminatorValue(parseNode) { + return deserializeIntoSubscription; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Supported_droplet_backup_policy} + */ +// @ts-ignore +export function createSupported_droplet_backup_policyFromDiscriminatorValue(parseNode) { + return deserializeIntoSupported_droplet_backup_policy; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Tags_metadata} + */ +// @ts-ignore +export function createTags_metadataFromDiscriminatorValue(parseNode) { + return deserializeIntoTags_metadata; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Tags_resource_resources} + */ +// @ts-ignore +export function createTags_resource_resourcesFromDiscriminatorValue(parseNode) { + return deserializeIntoTags_resource_resources; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Tags_resource} + */ +// @ts-ignore +export function createTags_resourceFromDiscriminatorValue(parseNode) { + return deserializeIntoTags_resource; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Tags_resources} + */ +// @ts-ignore +export function createTags_resourcesFromDiscriminatorValue(parseNode) { + return deserializeIntoTags_resources; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Tags} + */ +// @ts-ignore +export function createTagsFromDiscriminatorValue(parseNode) { + return deserializeIntoTags; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Timescaledb_advanced_config} + */ +// @ts-ignore +export function createTimescaledb_advanced_configFromDiscriminatorValue(parseNode) { + return deserializeIntoTimescaledb_advanced_config; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Trigger_info_scheduled_runs} + */ +// @ts-ignore +export function createTrigger_info_scheduled_runsFromDiscriminatorValue(parseNode) { + return deserializeIntoTrigger_info_scheduled_runs; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Trigger_info} + */ +// @ts-ignore +export function createTrigger_infoFromDiscriminatorValue(parseNode) { + return deserializeIntoTrigger_info; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Update_endpoint} + */ +// @ts-ignore +export function createUpdate_endpointFromDiscriminatorValue(parseNode) { + return deserializeIntoUpdate_endpoint; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Update_registry} + */ +// @ts-ignore +export function createUpdate_registryFromDiscriminatorValue(parseNode) { + return deserializeIntoUpdate_registry; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Update_trigger} + */ +// @ts-ignore +export function createUpdate_triggerFromDiscriminatorValue(parseNode) { + return deserializeIntoUpdate_trigger; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {User_kubernetes_cluster_user} + */ +// @ts-ignore +export function createUser_kubernetes_cluster_userFromDiscriminatorValue(parseNode) { + return deserializeIntoUser_kubernetes_cluster_user; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {User_settings_acl} + */ +// @ts-ignore +export function createUser_settings_aclFromDiscriminatorValue(parseNode) { + return deserializeIntoUser_settings_acl; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {User_settings_mongo_user_settings} + */ +// @ts-ignore +export function createUser_settings_mongo_user_settingsFromDiscriminatorValue(parseNode) { + return deserializeIntoUser_settings_mongo_user_settings; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {User_settings_opensearch_acl} + */ +// @ts-ignore +export function createUser_settings_opensearch_aclFromDiscriminatorValue(parseNode) { + return deserializeIntoUser_settings_opensearch_acl; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {User_settings} + */ +// @ts-ignore +export function createUser_settingsFromDiscriminatorValue(parseNode) { + return deserializeIntoUser_settings; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {User} + */ +// @ts-ignore +export function createUserFromDiscriminatorValue(parseNode) { + return deserializeIntoUser; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Validate_registry} + */ +// @ts-ignore +export function createValidate_registryFromDiscriminatorValue(parseNode) { + return deserializeIntoValidate_registry; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Valkey_advanced_config} + */ +// @ts-ignore +export function createValkey_advanced_configFromDiscriminatorValue(parseNode) { + return deserializeIntoValkey_advanced_config; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Version2} + */ +// @ts-ignore +export function createVersion2FromDiscriminatorValue(parseNode) { + return deserializeIntoVersion2; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Volume_action_post_attach} + */ +// @ts-ignore +export function createVolume_action_post_attachFromDiscriminatorValue(parseNode) { + return deserializeIntoVolume_action_post_attach; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Volume_action_post_base} + */ +// @ts-ignore +export function createVolume_action_post_baseFromDiscriminatorValue(parseNode) { + return deserializeIntoVolume_action_post_base; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Volume_action_post_detach} + */ +// @ts-ignore +export function createVolume_action_post_detachFromDiscriminatorValue(parseNode) { + return deserializeIntoVolume_action_post_detach; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Volume_action_post_resize} + */ +// @ts-ignore +export function createVolume_action_post_resizeFromDiscriminatorValue(parseNode) { + return deserializeIntoVolume_action_post_resize; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Volume_base_read} + */ +// @ts-ignore +export function createVolume_base_readFromDiscriminatorValue(parseNode) { + return deserializeIntoVolume_base_read; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Volume_full} + */ +// @ts-ignore +export function createVolume_fullFromDiscriminatorValue(parseNode) { + return deserializeIntoVolume_full; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {VolumeAction} + */ +// @ts-ignore +export function createVolumeActionFromDiscriminatorValue(parseNode) { + return deserializeIntoVolumeAction; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Volumes_ext4} + */ +// @ts-ignore +export function createVolumes_ext4FromDiscriminatorValue(parseNode) { + return deserializeIntoVolumes_ext4; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Volumes_xfs} + */ +// @ts-ignore +export function createVolumes_xfsFromDiscriminatorValue(parseNode) { + return deserializeIntoVolumes_xfs; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Vpc_member} + */ +// @ts-ignore +export function createVpc_memberFromDiscriminatorValue(parseNode) { + return deserializeIntoVpc_member; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Vpc_nat_gateway_create_vpcs} + */ +// @ts-ignore +export function createVpc_nat_gateway_create_vpcsFromDiscriminatorValue(parseNode) { + return deserializeIntoVpc_nat_gateway_create_vpcs; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Vpc_nat_gateway_create} + */ +// @ts-ignore +export function createVpc_nat_gateway_createFromDiscriminatorValue(parseNode) { + return deserializeIntoVpc_nat_gateway_create; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Vpc_nat_gateway_get_egresses_public_gateways} + */ +// @ts-ignore +export function createVpc_nat_gateway_get_egresses_public_gatewaysFromDiscriminatorValue(parseNode) { + return deserializeIntoVpc_nat_gateway_get_egresses_public_gateways; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Vpc_nat_gateway_get_egresses} + */ +// @ts-ignore +export function createVpc_nat_gateway_get_egressesFromDiscriminatorValue(parseNode) { + return deserializeIntoVpc_nat_gateway_get_egresses; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Vpc_nat_gateway_get_vpcs} + */ +// @ts-ignore +export function createVpc_nat_gateway_get_vpcsFromDiscriminatorValue(parseNode) { + return deserializeIntoVpc_nat_gateway_get_vpcs; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Vpc_nat_gateway_get} + */ +// @ts-ignore +export function createVpc_nat_gateway_getFromDiscriminatorValue(parseNode) { + return deserializeIntoVpc_nat_gateway_get; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Vpc_nat_gateway_update_vpcs} + */ +// @ts-ignore +export function createVpc_nat_gateway_update_vpcsFromDiscriminatorValue(parseNode) { + return deserializeIntoVpc_nat_gateway_update_vpcs; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Vpc_nat_gateway_update} + */ +// @ts-ignore +export function createVpc_nat_gateway_updateFromDiscriminatorValue(parseNode) { + return deserializeIntoVpc_nat_gateway_update; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Vpc_peering_updatable} + */ +// @ts-ignore +export function createVpc_peering_updatableFromDiscriminatorValue(parseNode) { + return deserializeIntoVpc_peering_updatable; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Vpc_peering} + */ +// @ts-ignore +export function createVpc_peeringFromDiscriminatorValue(parseNode) { + return deserializeIntoVpc_peering; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Vpc} + */ +// @ts-ignore +export function createVpcFromDiscriminatorValue(parseNode) { + return deserializeIntoVpc; +} +/** + * The deserialization information for the current model + * @param Account The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAccount(account = {}) { + return { + "droplet_limit": n => { account.dropletLimit = n.getNumberValue(); }, + "email": n => { account.email = n.getStringValue(); }, + "email_verified": n => { account.emailVerified = n.getBooleanValue(); }, + "floating_ip_limit": n => { account.floatingIpLimit = n.getNumberValue(); }, + "name": n => { account.name = n.getStringValue(); }, + "status": n => { account.status = n.getEnumValue(Account_statusObject) ?? Account_statusObject.Active; }, + "status_message": n => { account.statusMessage = n.getStringValue(); }, + "team": n => { account.team = n.getObjectValue(createAccount_teamFromDiscriminatorValue); }, + "uuid": n => { account.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Account_team The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAccount_team(account_team = {}) { + return { + "name": n => { account_team.name = n.getStringValue(); }, + "uuid": n => { account_team.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Action The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAction(action = {}) { + return { + "completed_at": n => { action.completedAt = n.getDateValue(); }, + "id": n => { action.id = n.getNumberValue(); }, + "region": n => { action.region = n.getObjectValue(createRegionFromDiscriminatorValue); }, + "region_slug": n => { action.regionSlug = n.getStringValue(); }, + "resource_id": n => { action.resourceId = n.getNumberValue(); }, + "resource_type": n => { action.resourceType = n.getStringValue(); }, + "started_at": n => { action.startedAt = n.getDateValue(); }, + "status": n => { action.status = n.getEnumValue(Action_statusObject) ?? Action_statusObject.InProgress; }, + "type": n => { action.type = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Action_link The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAction_link(action_link = {}) { + return { + "href": n => { action_link.href = n.getStringValue(); }, + "id": n => { action_link.id = n.getNumberValue(); }, + "rel": n => { action_link.rel = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Addons_app_info The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAddons_app_info(addons_app_info = {}) { + return { + "app_slug": n => { addons_app_info.appSlug = n.getStringValue(); }, + "eula": n => { addons_app_info.eula = n.getStringValue(); }, + "plans": n => { addons_app_info.plans = n.getCollectionOfObjectValues(createAddons_planFromDiscriminatorValue); }, + "tos": n => { addons_app_info.tos = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Addons_app_metadata The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAddons_app_metadata(addons_app_metadata = {}) { + return { + "description": n => { addons_app_metadata.description = n.getStringValue(); }, + "display_name": n => { addons_app_metadata.displayName = n.getStringValue(); }, + "id": n => { addons_app_metadata.id = n.getNumberValue(); }, + "name": n => { addons_app_metadata.name = n.getStringValue(); }, + "options": n => { addons_app_metadata.options = n.getCollectionOfPrimitiveValues(); }, + "type": n => { addons_app_metadata.type = n.getEnumValue(Addons_app_metadata_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Addons_dimension_volume_with_price The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAddons_dimension_volume_with_price(addons_dimension_volume_with_price = {}) { + return { + "id": n => { addons_dimension_volume_with_price.id = n.getNumberValue(); }, + "low_volume": n => { addons_dimension_volume_with_price.lowVolume = n.getNumberValue(); }, + "max_volume": n => { addons_dimension_volume_with_price.maxVolume = n.getNumberValue(); }, + "price_per_unit": n => { addons_dimension_volume_with_price.pricePerUnit = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Addons_dimension_with_price The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAddons_dimension_with_price(addons_dimension_with_price = {}) { + return { + "display_name": n => { addons_dimension_with_price.displayName = n.getStringValue(); }, + "feature_name": n => { addons_dimension_with_price.featureName = n.getStringValue(); }, + "id": n => { addons_dimension_with_price.id = n.getNumberValue(); }, + "sku": n => { addons_dimension_with_price.sku = n.getStringValue(); }, + "slug": n => { addons_dimension_with_price.slug = n.getStringValue(); }, + "volumes": n => { addons_dimension_with_price.volumes = n.getCollectionOfObjectValues(createAddons_dimension_volume_with_priceFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Addons_feature The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAddons_feature(addons_feature = {}) { + return { + "created_at": n => { addons_feature.createdAt = n.getDateValue(); }, + "id": n => { addons_feature.id = n.getNumberValue(); }, + "name": n => { addons_feature.name = n.getStringValue(); }, + "type": n => { addons_feature.type = n.getEnumValue(Addons_feature_typeObject); }, + "unit": n => { addons_feature.unit = n.getEnumValue(Addons_feature_unitObject); }, + "updated_at": n => { addons_feature.updatedAt = n.getDateValue(); }, + "value": n => { addons_feature.value = n.getBooleanValue() ?? n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Addons_plan The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAddons_plan(addons_plan = {}) { + return { + "active": n => { addons_plan.active = n.getBooleanValue(); }, + "app_id": n => { addons_plan.appId = n.getNumberValue(); }, + "available": n => { addons_plan.available = n.getBooleanValue(); }, + "by_default": n => { addons_plan.byDefault = n.getBooleanValue(); }, + "created_at": n => { addons_plan.createdAt = n.getDateValue(); }, + "description": n => { addons_plan.description = n.getStringValue(); }, + "dimensions": n => { addons_plan.dimensions = n.getCollectionOfObjectValues(createAddons_dimension_with_priceFromDiscriminatorValue); }, + "display_name": n => { addons_plan.displayName = n.getStringValue(); }, + "features": n => { addons_plan.features = n.getCollectionOfObjectValues(createAddons_featureFromDiscriminatorValue); }, + "id": n => { addons_plan.id = n.getNumberValue(); }, + "price_per_month": n => { addons_plan.pricePerMonth = n.getNumberValue(); }, + "slug": n => { addons_plan.slug = n.getStringValue(); }, + "state": n => { addons_plan.state = n.getEnumValue(Addons_plan_stateObject); }, + "updated_at": n => { addons_plan.updatedAt = n.getDateValue(); }, + "uuid": n => { addons_plan.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Addons_resource The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAddons_resource(addons_resource = {}) { + return { + "app_name": n => { addons_resource.appName = n.getStringValue(); }, + "app_slug": n => { addons_resource.appSlug = n.getStringValue(); }, + "has_config": n => { addons_resource.hasConfig = n.getBooleanValue(); }, + "message": n => { addons_resource.message = n.getStringValue(); }, + "metadata": n => { addons_resource.metadata = n.getCollectionOfObjectValues(createAddons_resource_metadataFromDiscriminatorValue); }, + "name": n => { addons_resource.name = n.getStringValue(); }, + "plan_name": n => { addons_resource.planName = n.getStringValue(); }, + "plan_price_per_month": n => { addons_resource.planPricePerMonth = n.getNumberValue(); }, + "plan_slug": n => { addons_resource.planSlug = n.getStringValue(); }, + "sso_url": n => { addons_resource.ssoUrl = n.getStringValue(); }, + "state": n => { addons_resource.state = n.getEnumValue(Addons_resource_stateObject); }, + "uuid": n => { addons_resource.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Addons_resource_metadata The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAddons_resource_metadata(addons_resource_metadata = {}) { + return { + "name": n => { addons_resource_metadata.name = n.getStringValue(); }, + "value": n => { addons_resource_metadata.value = n.getBooleanValue() ?? n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Addons_resource_new The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAddons_resource_new(addons_resource_new = {}) { + return { + "app_slug": n => { addons_resource_new.appSlug = n.getStringValue(); }, + "fleet_uuid": n => { addons_resource_new.fleetUuid = n.getStringValue(); }, + "linked_droplet_id": n => { addons_resource_new.linkedDropletId = n.getNumberValue(); }, + "metadata": n => { addons_resource_new.metadata = n.getCollectionOfObjectValues(createAddons_resource_metadataFromDiscriminatorValue); }, + "name": n => { addons_resource_new.name = n.getStringValue(); }, + "plan_slug": n => { addons_resource_new.planSlug = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Alert The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAlert(alert = {}) { + return { + "comparison": n => { alert.comparison = n.getEnumValue(Alert_comparisonObject); }, + "id": n => { alert.id = n.getGuidValue(); }, + "name": n => { alert.name = n.getStringValue(); }, + "notifications": n => { alert.notifications = n.getObjectValue(createNotificationFromDiscriminatorValue); }, + "period": n => { alert.period = n.getEnumValue(Alert_periodObject); }, + "threshold": n => { alert.threshold = n.getNumberValue(); }, + "type": n => { alert.type = n.getEnumValue(Alert_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Alert_policy The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAlert_policy(alert_policy = {}) { + return { + "alerts": n => { alert_policy.alerts = n.getObjectValue(createAlertsFromDiscriminatorValue); }, + "compare": n => { alert_policy.compare = n.getEnumValue(Alert_policy_compareObject); }, + "description": n => { alert_policy.description = n.getStringValue(); }, + "enabled": n => { alert_policy.enabled = n.getBooleanValue(); }, + "entities": n => { alert_policy.entities = n.getCollectionOfPrimitiveValues(); }, + "tags": n => { alert_policy.tags = n.getCollectionOfPrimitiveValues(); }, + "type": n => { alert_policy.type = n.getEnumValue(Alert_policy_typeObject); }, + "uuid": n => { alert_policy.uuid = n.getStringValue(); }, + "value": n => { alert_policy.value = n.getNumberValue(); }, + "window": n => { alert_policy.window = n.getEnumValue(Alert_policy_windowObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Alert_policy_request The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAlert_policy_request(alert_policy_request = {}) { + return { + "alerts": n => { alert_policy_request.alerts = n.getObjectValue(createAlertsFromDiscriminatorValue); }, + "compare": n => { alert_policy_request.compare = n.getEnumValue(Alert_policy_request_compareObject); }, + "description": n => { alert_policy_request.description = n.getStringValue(); }, + "enabled": n => { alert_policy_request.enabled = n.getBooleanValue(); }, + "entities": n => { alert_policy_request.entities = n.getCollectionOfPrimitiveValues(); }, + "tags": n => { alert_policy_request.tags = n.getCollectionOfPrimitiveValues(); }, + "type": n => { alert_policy_request.type = n.getEnumValue(Alert_policy_request_typeObject); }, + "value": n => { alert_policy_request.value = n.getNumberValue(); }, + "window": n => { alert_policy_request.window = n.getEnumValue(Alert_policy_request_windowObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Alert_updatable The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAlert_updatable(alert_updatable = {}) { + return { + "comparison": n => { alert_updatable.comparison = n.getEnumValue(Alert_updatable_comparisonObject); }, + "name": n => { alert_updatable.name = n.getStringValue(); }, + "notifications": n => { alert_updatable.notifications = n.getObjectValue(createNotificationFromDiscriminatorValue); }, + "period": n => { alert_updatable.period = n.getEnumValue(Alert_updatable_periodObject); }, + "threshold": n => { alert_updatable.threshold = n.getNumberValue(); }, + "type": n => { alert_updatable.type = n.getEnumValue(Alert_updatable_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Alerts The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAlerts(alerts = {}) { + return { + "email": n => { alerts.email = n.getCollectionOfPrimitiveValues(); }, + "slack": n => { alerts.slack = n.getCollectionOfObjectValues(createSlack_detailsFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Amd_gpu_device_metrics_exporter_plugin The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAmd_gpu_device_metrics_exporter_plugin(amd_gpu_device_metrics_exporter_plugin = {}) { + return { + "enabled": n => { amd_gpu_device_metrics_exporter_plugin.enabled = n.getBooleanValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Amd_gpu_device_plugin The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAmd_gpu_device_plugin(amd_gpu_device_plugin = {}) { + return { + "enabled": n => { amd_gpu_device_plugin.enabled = n.getBooleanValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiAgent The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAgent(apiAgent = {}) { + return { + "anthropic_api_key": n => { apiAgent.anthropicApiKey = n.getObjectValue(createApiAnthropicAPIKeyInfoFromDiscriminatorValue); }, + "api_key_infos": n => { apiAgent.apiKeyInfos = n.getCollectionOfObjectValues(createApiAgentAPIKeyInfoFromDiscriminatorValue); }, + "api_keys": n => { apiAgent.apiKeys = n.getCollectionOfObjectValues(createApiAgentAPIKeyFromDiscriminatorValue); }, + "chatbot": n => { apiAgent.chatbot = n.getObjectValue(createApiChatbotFromDiscriminatorValue); }, + "chatbot_identifiers": n => { apiAgent.chatbotIdentifiers = n.getCollectionOfObjectValues(createApiAgentChatbotIdentifierFromDiscriminatorValue); }, + "child_agents": n => { apiAgent.childAgents = n.getCollectionOfObjectValues(createApiAgentFromDiscriminatorValue); }, + "conversation_logs_enabled": n => { apiAgent.conversationLogsEnabled = n.getBooleanValue(); }, + "created_at": n => { apiAgent.createdAt = n.getDateValue(); }, + "deployment": n => { apiAgent.deployment = n.getObjectValue(createApiDeploymentFromDiscriminatorValue); }, + "description": n => { apiAgent.description = n.getStringValue(); }, + "functions": n => { apiAgent.functions = n.getCollectionOfObjectValues(createApiAgentFunctionFromDiscriminatorValue); }, + "guardrails": n => { apiAgent.guardrails = n.getCollectionOfObjectValues(createApiAgentGuardrailFromDiscriminatorValue); }, + "if_case": n => { apiAgent.ifCase = n.getStringValue(); }, + "instruction": n => { apiAgent.instruction = n.getStringValue(); }, + "k": n => { apiAgent.k = n.getNumberValue(); }, + "knowledge_bases": n => { apiAgent.knowledgeBases = n.getCollectionOfObjectValues(createApiKnowledgeBaseFromDiscriminatorValue); }, + "logging_config": n => { apiAgent.loggingConfig = n.getObjectValue(createApiAgentLoggingConfigFromDiscriminatorValue); }, + "max_tokens": n => { apiAgent.maxTokens = n.getNumberValue(); }, + "model": n => { apiAgent.model = n.getObjectValue(createApiModelFromDiscriminatorValue); }, + "model_provider_key": n => { apiAgent.modelProviderKey = n.getObjectValue(createApiModelProviderKeyInfoFromDiscriminatorValue); }, + "name": n => { apiAgent.name = n.getStringValue(); }, + "openai_api_key": n => { apiAgent.openaiApiKey = n.getObjectValue(createApiOpenAIAPIKeyInfoFromDiscriminatorValue); }, + "parent_agents": n => { apiAgent.parentAgents = n.getCollectionOfObjectValues(createApiAgentFromDiscriminatorValue); }, + "project_id": n => { apiAgent.projectId = n.getStringValue(); }, + "provide_citations": n => { apiAgent.provideCitations = n.getBooleanValue(); }, + "region": n => { apiAgent.region = n.getStringValue(); }, + "retrieval_method": n => { apiAgent.retrievalMethod = n.getEnumValue(ApiRetrievalMethodObject) ?? ApiRetrievalMethodObject.RETRIEVAL_METHOD_UNKNOWN; }, + "route_created_at": n => { apiAgent.routeCreatedAt = n.getDateValue(); }, + "route_created_by": n => { apiAgent.routeCreatedBy = n.getStringValue(); }, + "route_name": n => { apiAgent.routeName = n.getStringValue(); }, + "route_uuid": n => { apiAgent.routeUuid = n.getStringValue(); }, + "tags": n => { apiAgent.tags = n.getCollectionOfPrimitiveValues(); }, + "temperature": n => { apiAgent.temperature = n.getNumberValue(); }, + "template": n => { apiAgent.template = n.getObjectValue(createApiAgentTemplateFromDiscriminatorValue); }, + "top_p": n => { apiAgent.topP = n.getNumberValue(); }, + "updated_at": n => { apiAgent.updatedAt = n.getDateValue(); }, + "url": n => { apiAgent.url = n.getStringValue(); }, + "user_id": n => { apiAgent.userId = n.getStringValue(); }, + "uuid": n => { apiAgent.uuid = n.getStringValue(); }, + "version_hash": n => { apiAgent.versionHash = n.getStringValue(); }, + "vpc_egress_ips": n => { apiAgent.vpcEgressIps = n.getCollectionOfPrimitiveValues(); }, + "vpc_uuid": n => { apiAgent.vpcUuid = n.getStringValue(); }, + "workspace": n => { apiAgent.workspace = n.getObjectValue(createApiWorkspaceFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiAgentAPIKey The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAgentAPIKey(apiAgentAPIKey = {}) { + return { + "api_key": n => { apiAgentAPIKey.apiKey = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiAgentAPIKeyInfo The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAgentAPIKeyInfo(apiAgentAPIKeyInfo = {}) { + return { + "created_at": n => { apiAgentAPIKeyInfo.createdAt = n.getDateValue(); }, + "created_by": n => { apiAgentAPIKeyInfo.createdBy = n.getStringValue(); }, + "deleted_at": n => { apiAgentAPIKeyInfo.deletedAt = n.getDateValue(); }, + "name": n => { apiAgentAPIKeyInfo.name = n.getStringValue(); }, + "secret_key": n => { apiAgentAPIKeyInfo.secretKey = n.getStringValue(); }, + "uuid": n => { apiAgentAPIKeyInfo.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiAgentChatbotIdentifier The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAgentChatbotIdentifier(apiAgentChatbotIdentifier = {}) { + return { + "agent_chatbot_identifier": n => { apiAgentChatbotIdentifier.agentChatbotIdentifier = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiAgentChildRelationshipVerion The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAgentChildRelationshipVerion(apiAgentChildRelationshipVerion = {}) { + return { + "agent_name": n => { apiAgentChildRelationshipVerion.agentName = n.getStringValue(); }, + "child_agent_uuid": n => { apiAgentChildRelationshipVerion.childAgentUuid = n.getStringValue(); }, + "if_case": n => { apiAgentChildRelationshipVerion.ifCase = n.getStringValue(); }, + "is_deleted": n => { apiAgentChildRelationshipVerion.isDeleted = n.getBooleanValue(); }, + "route_name": n => { apiAgentChildRelationshipVerion.routeName = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiAgentFunction The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAgentFunction(apiAgentFunction = {}) { + return { + "api_key": n => { apiAgentFunction.apiKey = n.getStringValue(); }, + "created_at": n => { apiAgentFunction.createdAt = n.getDateValue(); }, + "created_by": n => { apiAgentFunction.createdBy = n.getStringValue(); }, + "description": n => { apiAgentFunction.description = n.getStringValue(); }, + "faas_name": n => { apiAgentFunction.faasName = n.getStringValue(); }, + "faas_namespace": n => { apiAgentFunction.faasNamespace = n.getStringValue(); }, + "input_schema": n => { apiAgentFunction.inputSchema = n.getObjectValue(createApiAgentFunction_input_schemaFromDiscriminatorValue); }, + "name": n => { apiAgentFunction.name = n.getStringValue(); }, + "output_schema": n => { apiAgentFunction.outputSchema = n.getObjectValue(createApiAgentFunction_output_schemaFromDiscriminatorValue); }, + "updated_at": n => { apiAgentFunction.updatedAt = n.getDateValue(); }, + "url": n => { apiAgentFunction.url = n.getStringValue(); }, + "uuid": n => { apiAgentFunction.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiAgentFunction_input_schema The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAgentFunction_input_schema(apiAgentFunction_input_schema = {}) { + return {}; +} +/** + * The deserialization information for the current model + * @param ApiAgentFunction_output_schema The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAgentFunction_output_schema(apiAgentFunction_output_schema = {}) { + return {}; +} +/** + * The deserialization information for the current model + * @param ApiAgentFunctionVersion The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAgentFunctionVersion(apiAgentFunctionVersion = {}) { + return { + "description": n => { apiAgentFunctionVersion.description = n.getStringValue(); }, + "faas_name": n => { apiAgentFunctionVersion.faasName = n.getStringValue(); }, + "faas_namespace": n => { apiAgentFunctionVersion.faasNamespace = n.getStringValue(); }, + "is_deleted": n => { apiAgentFunctionVersion.isDeleted = n.getBooleanValue(); }, + "name": n => { apiAgentFunctionVersion.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiAgentGuardrail The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAgentGuardrail(apiAgentGuardrail = {}) { + return { + "agent_uuid": n => { apiAgentGuardrail.agentUuid = n.getStringValue(); }, + "created_at": n => { apiAgentGuardrail.createdAt = n.getDateValue(); }, + "default_response": n => { apiAgentGuardrail.defaultResponse = n.getStringValue(); }, + "description": n => { apiAgentGuardrail.description = n.getStringValue(); }, + "guardrail_uuid": n => { apiAgentGuardrail.guardrailUuid = n.getStringValue(); }, + "is_attached": n => { apiAgentGuardrail.isAttached = n.getBooleanValue(); }, + "is_default": n => { apiAgentGuardrail.isDefault = n.getBooleanValue(); }, + "metadata": n => { apiAgentGuardrail.metadata = n.getObjectValue(createApiAgentGuardrail_metadataFromDiscriminatorValue); }, + "name": n => { apiAgentGuardrail.name = n.getStringValue(); }, + "priority": n => { apiAgentGuardrail.priority = n.getNumberValue(); }, + "type": n => { apiAgentGuardrail.type = n.getEnumValue(ApiGuardrailTypeObject) ?? ApiGuardrailTypeObject.GUARDRAIL_TYPE_UNKNOWN; }, + "updated_at": n => { apiAgentGuardrail.updatedAt = n.getDateValue(); }, + "uuid": n => { apiAgentGuardrail.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiAgentGuardrail_metadata The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAgentGuardrail_metadata(apiAgentGuardrail_metadata = {}) { + return {}; +} +/** + * The deserialization information for the current model + * @param ApiAgentGuardrailInput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAgentGuardrailInput(apiAgentGuardrailInput = {}) { + return { + "guardrail_uuid": n => { apiAgentGuardrailInput.guardrailUuid = n.getStringValue(); }, + "priority": n => { apiAgentGuardrailInput.priority = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiAgentGuardrailVersion The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAgentGuardrailVersion(apiAgentGuardrailVersion = {}) { + return { + "is_deleted": n => { apiAgentGuardrailVersion.isDeleted = n.getBooleanValue(); }, + "name": n => { apiAgentGuardrailVersion.name = n.getStringValue(); }, + "priority": n => { apiAgentGuardrailVersion.priority = n.getNumberValue(); }, + "uuid": n => { apiAgentGuardrailVersion.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiAgentKnowledgeBaseVersion The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAgentKnowledgeBaseVersion(apiAgentKnowledgeBaseVersion = {}) { + return { + "is_deleted": n => { apiAgentKnowledgeBaseVersion.isDeleted = n.getBooleanValue(); }, + "name": n => { apiAgentKnowledgeBaseVersion.name = n.getStringValue(); }, + "uuid": n => { apiAgentKnowledgeBaseVersion.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiAgentLoggingConfig The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAgentLoggingConfig(apiAgentLoggingConfig = {}) { + return { + "galileo_project_id": n => { apiAgentLoggingConfig.galileoProjectId = n.getStringValue(); }, + "galileo_project_name": n => { apiAgentLoggingConfig.galileoProjectName = n.getStringValue(); }, + "insights_enabled": n => { apiAgentLoggingConfig.insightsEnabled = n.getBooleanValue(); }, + "insights_enabled_at": n => { apiAgentLoggingConfig.insightsEnabledAt = n.getDateValue(); }, + "log_stream_id": n => { apiAgentLoggingConfig.logStreamId = n.getStringValue(); }, + "log_stream_name": n => { apiAgentLoggingConfig.logStreamName = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiAgentPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAgentPublic(apiAgentPublic = {}) { + return { + "chatbot": n => { apiAgentPublic.chatbot = n.getObjectValue(createApiChatbotFromDiscriminatorValue); }, + "chatbot_identifiers": n => { apiAgentPublic.chatbotIdentifiers = n.getCollectionOfObjectValues(createApiAgentChatbotIdentifierFromDiscriminatorValue); }, + "created_at": n => { apiAgentPublic.createdAt = n.getDateValue(); }, + "deployment": n => { apiAgentPublic.deployment = n.getObjectValue(createApiDeploymentFromDiscriminatorValue); }, + "description": n => { apiAgentPublic.description = n.getStringValue(); }, + "if_case": n => { apiAgentPublic.ifCase = n.getStringValue(); }, + "instruction": n => { apiAgentPublic.instruction = n.getStringValue(); }, + "k": n => { apiAgentPublic.k = n.getNumberValue(); }, + "max_tokens": n => { apiAgentPublic.maxTokens = n.getNumberValue(); }, + "model": n => { apiAgentPublic.model = n.getObjectValue(createApiModelFromDiscriminatorValue); }, + "name": n => { apiAgentPublic.name = n.getStringValue(); }, + "project_id": n => { apiAgentPublic.projectId = n.getStringValue(); }, + "provide_citations": n => { apiAgentPublic.provideCitations = n.getBooleanValue(); }, + "region": n => { apiAgentPublic.region = n.getStringValue(); }, + "retrieval_method": n => { apiAgentPublic.retrievalMethod = n.getEnumValue(ApiRetrievalMethodObject) ?? ApiRetrievalMethodObject.RETRIEVAL_METHOD_UNKNOWN; }, + "route_created_at": n => { apiAgentPublic.routeCreatedAt = n.getDateValue(); }, + "route_created_by": n => { apiAgentPublic.routeCreatedBy = n.getStringValue(); }, + "route_name": n => { apiAgentPublic.routeName = n.getStringValue(); }, + "route_uuid": n => { apiAgentPublic.routeUuid = n.getStringValue(); }, + "tags": n => { apiAgentPublic.tags = n.getCollectionOfPrimitiveValues(); }, + "temperature": n => { apiAgentPublic.temperature = n.getNumberValue(); }, + "template": n => { apiAgentPublic.template = n.getObjectValue(createApiAgentTemplateFromDiscriminatorValue); }, + "top_p": n => { apiAgentPublic.topP = n.getNumberValue(); }, + "updated_at": n => { apiAgentPublic.updatedAt = n.getDateValue(); }, + "url": n => { apiAgentPublic.url = n.getStringValue(); }, + "user_id": n => { apiAgentPublic.userId = n.getStringValue(); }, + "uuid": n => { apiAgentPublic.uuid = n.getStringValue(); }, + "version_hash": n => { apiAgentPublic.versionHash = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiAgentTemplate The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAgentTemplate(apiAgentTemplate = {}) { + return { + "created_at": n => { apiAgentTemplate.createdAt = n.getDateValue(); }, + "description": n => { apiAgentTemplate.description = n.getStringValue(); }, + "guardrails": n => { apiAgentTemplate.guardrails = n.getCollectionOfObjectValues(createApiAgentTemplateGuardrailFromDiscriminatorValue); }, + "instruction": n => { apiAgentTemplate.instruction = n.getStringValue(); }, + "k": n => { apiAgentTemplate.k = n.getNumberValue(); }, + "knowledge_bases": n => { apiAgentTemplate.knowledgeBases = n.getCollectionOfObjectValues(createApiKnowledgeBaseFromDiscriminatorValue); }, + "long_description": n => { apiAgentTemplate.longDescription = n.getStringValue(); }, + "max_tokens": n => { apiAgentTemplate.maxTokens = n.getNumberValue(); }, + "model": n => { apiAgentTemplate.model = n.getObjectValue(createApiModelFromDiscriminatorValue); }, + "name": n => { apiAgentTemplate.name = n.getStringValue(); }, + "short_description": n => { apiAgentTemplate.shortDescription = n.getStringValue(); }, + "summary": n => { apiAgentTemplate.summary = n.getStringValue(); }, + "tags": n => { apiAgentTemplate.tags = n.getCollectionOfPrimitiveValues(); }, + "temperature": n => { apiAgentTemplate.temperature = n.getNumberValue(); }, + "template_type": n => { apiAgentTemplate.templateType = n.getEnumValue(ApiAgentTemplateTypeObject) ?? ApiAgentTemplateTypeObject.AGENT_TEMPLATE_TYPE_STANDARD; }, + "top_p": n => { apiAgentTemplate.topP = n.getNumberValue(); }, + "updated_at": n => { apiAgentTemplate.updatedAt = n.getDateValue(); }, + "uuid": n => { apiAgentTemplate.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiAgentTemplateGuardrail The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAgentTemplateGuardrail(apiAgentTemplateGuardrail = {}) { + return { + "priority": n => { apiAgentTemplateGuardrail.priority = n.getNumberValue(); }, + "uuid": n => { apiAgentTemplateGuardrail.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiAgentVersion The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAgentVersion(apiAgentVersion = {}) { + return { + "agent_uuid": n => { apiAgentVersion.agentUuid = n.getStringValue(); }, + "attached_child_agents": n => { apiAgentVersion.attachedChildAgents = n.getCollectionOfObjectValues(createApiAgentChildRelationshipVerionFromDiscriminatorValue); }, + "attached_functions": n => { apiAgentVersion.attachedFunctions = n.getCollectionOfObjectValues(createApiAgentFunctionVersionFromDiscriminatorValue); }, + "attached_guardrails": n => { apiAgentVersion.attachedGuardrails = n.getCollectionOfObjectValues(createApiAgentGuardrailVersionFromDiscriminatorValue); }, + "attached_knowledgebases": n => { apiAgentVersion.attachedKnowledgebases = n.getCollectionOfObjectValues(createApiAgentKnowledgeBaseVersionFromDiscriminatorValue); }, + "can_rollback": n => { apiAgentVersion.canRollback = n.getBooleanValue(); }, + "created_at": n => { apiAgentVersion.createdAt = n.getDateValue(); }, + "created_by_email": n => { apiAgentVersion.createdByEmail = n.getStringValue(); }, + "currently_applied": n => { apiAgentVersion.currentlyApplied = n.getBooleanValue(); }, + "description": n => { apiAgentVersion.description = n.getStringValue(); }, + "id": n => { apiAgentVersion.id = n.getStringValue(); }, + "instruction": n => { apiAgentVersion.instruction = n.getStringValue(); }, + "k": n => { apiAgentVersion.k = n.getNumberValue(); }, + "max_tokens": n => { apiAgentVersion.maxTokens = n.getNumberValue(); }, + "model_name": n => { apiAgentVersion.modelName = n.getStringValue(); }, + "name": n => { apiAgentVersion.name = n.getStringValue(); }, + "provide_citations": n => { apiAgentVersion.provideCitations = n.getBooleanValue(); }, + "retrieval_method": n => { apiAgentVersion.retrievalMethod = n.getEnumValue(ApiRetrievalMethodObject) ?? ApiRetrievalMethodObject.RETRIEVAL_METHOD_UNKNOWN; }, + "tags": n => { apiAgentVersion.tags = n.getCollectionOfPrimitiveValues(); }, + "temperature": n => { apiAgentVersion.temperature = n.getNumberValue(); }, + "top_p": n => { apiAgentVersion.topP = n.getNumberValue(); }, + "trigger_action": n => { apiAgentVersion.triggerAction = n.getStringValue(); }, + "version_hash": n => { apiAgentVersion.versionHash = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiAgreement The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAgreement(apiAgreement = {}) { + return { + "description": n => { apiAgreement.description = n.getStringValue(); }, + "name": n => { apiAgreement.name = n.getStringValue(); }, + "url": n => { apiAgreement.url = n.getStringValue(); }, + "uuid": n => { apiAgreement.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiAnthropicAPIKeyInfo The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAnthropicAPIKeyInfo(apiAnthropicAPIKeyInfo = {}) { + return { + "created_at": n => { apiAnthropicAPIKeyInfo.createdAt = n.getDateValue(); }, + "created_by": n => { apiAnthropicAPIKeyInfo.createdBy = n.getStringValue(); }, + "deleted_at": n => { apiAnthropicAPIKeyInfo.deletedAt = n.getDateValue(); }, + "name": n => { apiAnthropicAPIKeyInfo.name = n.getStringValue(); }, + "updated_at": n => { apiAnthropicAPIKeyInfo.updatedAt = n.getDateValue(); }, + "uuid": n => { apiAnthropicAPIKeyInfo.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiAuditHeader The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAuditHeader(apiAuditHeader = {}) { + return { + "actor_id": n => { apiAuditHeader.actorId = n.getStringValue(); }, + "actor_ip": n => { apiAuditHeader.actorIp = n.getStringValue(); }, + "actor_uuid": n => { apiAuditHeader.actorUuid = n.getStringValue(); }, + "context_urn": n => { apiAuditHeader.contextUrn = n.getStringValue(); }, + "origin_application": n => { apiAuditHeader.originApplication = n.getStringValue(); }, + "user_id": n => { apiAuditHeader.userId = n.getStringValue(); }, + "user_uuid": n => { apiAuditHeader.userUuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiAWSDataSource The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAWSDataSource(apiAWSDataSource = {}) { + return { + "bucket_name": n => { apiAWSDataSource.bucketName = n.getStringValue(); }, + "item_path": n => { apiAWSDataSource.itemPath = n.getStringValue(); }, + "key_id": n => { apiAWSDataSource.keyId = n.getStringValue(); }, + "region": n => { apiAWSDataSource.region = n.getStringValue(); }, + "secret_key": n => { apiAWSDataSource.secretKey = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiAWSDataSourceDisplay The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiAWSDataSourceDisplay(apiAWSDataSourceDisplay = {}) { + return { + "bucket_name": n => { apiAWSDataSourceDisplay.bucketName = n.getStringValue(); }, + "item_path": n => { apiAWSDataSourceDisplay.itemPath = n.getStringValue(); }, + "region": n => { apiAWSDataSourceDisplay.region = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCancelKnowledgeBaseIndexingJobInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCancelKnowledgeBaseIndexingJobInputPublic(apiCancelKnowledgeBaseIndexingJobInputPublic = {}) { + return { + "uuid": n => { apiCancelKnowledgeBaseIndexingJobInputPublic.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCancelKnowledgeBaseIndexingJobOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCancelKnowledgeBaseIndexingJobOutput(apiCancelKnowledgeBaseIndexingJobOutput = {}) { + return { + "job": n => { apiCancelKnowledgeBaseIndexingJobOutput.job = n.getObjectValue(createApiIndexingJobFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiChatbot The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiChatbot(apiChatbot = {}) { + return { + "allowed_domains": n => { apiChatbot.allowedDomains = n.getCollectionOfPrimitiveValues(); }, + "button_background_color": n => { apiChatbot.buttonBackgroundColor = n.getStringValue(); }, + "logo": n => { apiChatbot.logo = n.getStringValue(); }, + "name": n => { apiChatbot.name = n.getStringValue(); }, + "primary_color": n => { apiChatbot.primaryColor = n.getStringValue(); }, + "secondary_color": n => { apiChatbot.secondaryColor = n.getStringValue(); }, + "starting_message": n => { apiChatbot.startingMessage = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiChunkingOptions The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiChunkingOptions(apiChunkingOptions = {}) { + return { + "child_chunk_size": n => { apiChunkingOptions.childChunkSize = n.getNumberValue(); }, + "max_chunk_size": n => { apiChunkingOptions.maxChunkSize = n.getNumberValue(); }, + "parent_chunk_size": n => { apiChunkingOptions.parentChunkSize = n.getNumberValue(); }, + "semantic_threshold": n => { apiChunkingOptions.semanticThreshold = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateAgentAPIKeyInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateAgentAPIKeyInputPublic(apiCreateAgentAPIKeyInputPublic = {}) { + return { + "agent_uuid": n => { apiCreateAgentAPIKeyInputPublic.agentUuid = n.getStringValue(); }, + "name": n => { apiCreateAgentAPIKeyInputPublic.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateAgentAPIKeyOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateAgentAPIKeyOutput(apiCreateAgentAPIKeyOutput = {}) { + return { + "api_key_info": n => { apiCreateAgentAPIKeyOutput.apiKeyInfo = n.getObjectValue(createApiAgentAPIKeyInfoFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateAgentInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateAgentInputPublic(apiCreateAgentInputPublic = {}) { + return { + "anthropic_key_uuid": n => { apiCreateAgentInputPublic.anthropicKeyUuid = n.getStringValue(); }, + "description": n => { apiCreateAgentInputPublic.description = n.getStringValue(); }, + "instruction": n => { apiCreateAgentInputPublic.instruction = n.getStringValue(); }, + "knowledge_base_uuid": n => { apiCreateAgentInputPublic.knowledgeBaseUuid = n.getCollectionOfPrimitiveValues(); }, + "model_provider_key_uuid": n => { apiCreateAgentInputPublic.modelProviderKeyUuid = n.getStringValue(); }, + "model_uuid": n => { apiCreateAgentInputPublic.modelUuid = n.getStringValue(); }, + "name": n => { apiCreateAgentInputPublic.name = n.getStringValue(); }, + "open_ai_key_uuid": n => { apiCreateAgentInputPublic.openAiKeyUuid = n.getStringValue(); }, + "project_id": n => { apiCreateAgentInputPublic.projectId = n.getStringValue(); }, + "region": n => { apiCreateAgentInputPublic.region = n.getStringValue(); }, + "tags": n => { apiCreateAgentInputPublic.tags = n.getCollectionOfPrimitiveValues(); }, + "workspace_uuid": n => { apiCreateAgentInputPublic.workspaceUuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateAgentOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateAgentOutput(apiCreateAgentOutput = {}) { + return { + "agent": n => { apiCreateAgentOutput.agent = n.getObjectValue(createApiAgentFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateAnthropicAPIKeyInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateAnthropicAPIKeyInputPublic(apiCreateAnthropicAPIKeyInputPublic = {}) { + return { + "api_key": n => { apiCreateAnthropicAPIKeyInputPublic.apiKey = n.getStringValue(); }, + "name": n => { apiCreateAnthropicAPIKeyInputPublic.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateAnthropicAPIKeyOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateAnthropicAPIKeyOutput(apiCreateAnthropicAPIKeyOutput = {}) { + return { + "api_key_info": n => { apiCreateAnthropicAPIKeyOutput.apiKeyInfo = n.getObjectValue(createApiAnthropicAPIKeyInfoFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateDataSourceFileUploadPresignedUrlsInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateDataSourceFileUploadPresignedUrlsInputPublic(apiCreateDataSourceFileUploadPresignedUrlsInputPublic = {}) { + return { + "files": n => { apiCreateDataSourceFileUploadPresignedUrlsInputPublic.files = n.getCollectionOfObjectValues(createApiPresignedUrlFileFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateDataSourceFileUploadPresignedUrlsOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateDataSourceFileUploadPresignedUrlsOutput(apiCreateDataSourceFileUploadPresignedUrlsOutput = {}) { + return { + "request_id": n => { apiCreateDataSourceFileUploadPresignedUrlsOutput.requestId = n.getStringValue(); }, + "uploads": n => { apiCreateDataSourceFileUploadPresignedUrlsOutput.uploads = n.getCollectionOfObjectValues(createApiFilePresignedUrlResponseFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateEvaluationDatasetInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateEvaluationDatasetInputPublic(apiCreateEvaluationDatasetInputPublic = {}) { + return { + "dataset_type": n => { apiCreateEvaluationDatasetInputPublic.datasetType = n.getEnumValue(ApiEvaluationDatasetTypeObject) ?? ApiEvaluationDatasetTypeObject.EVALUATION_DATASET_TYPE_UNKNOWN; }, + "file_upload_dataset": n => { apiCreateEvaluationDatasetInputPublic.fileUploadDataset = n.getObjectValue(createApiFileUploadDataSourceFromDiscriminatorValue); }, + "name": n => { apiCreateEvaluationDatasetInputPublic.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateEvaluationDatasetOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateEvaluationDatasetOutput(apiCreateEvaluationDatasetOutput = {}) { + return { + "evaluation_dataset_uuid": n => { apiCreateEvaluationDatasetOutput.evaluationDatasetUuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateEvaluationTestCaseInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateEvaluationTestCaseInputPublic(apiCreateEvaluationTestCaseInputPublic = {}) { + return { + "agent_workspace_name": n => { apiCreateEvaluationTestCaseInputPublic.agentWorkspaceName = n.getStringValue(); }, + "dataset_uuid": n => { apiCreateEvaluationTestCaseInputPublic.datasetUuid = n.getStringValue(); }, + "description": n => { apiCreateEvaluationTestCaseInputPublic.description = n.getStringValue(); }, + "metrics": n => { apiCreateEvaluationTestCaseInputPublic.metrics = n.getCollectionOfPrimitiveValues(); }, + "name": n => { apiCreateEvaluationTestCaseInputPublic.name = n.getStringValue(); }, + "star_metric": n => { apiCreateEvaluationTestCaseInputPublic.starMetric = n.getObjectValue(createApiStarMetricFromDiscriminatorValue); }, + "workspace_uuid": n => { apiCreateEvaluationTestCaseInputPublic.workspaceUuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateEvaluationTestCaseOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateEvaluationTestCaseOutput(apiCreateEvaluationTestCaseOutput = {}) { + return { + "test_case_uuid": n => { apiCreateEvaluationTestCaseOutput.testCaseUuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateKnowledgeBaseDataSourceInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateKnowledgeBaseDataSourceInputPublic(apiCreateKnowledgeBaseDataSourceInputPublic = {}) { + return { + "aws_data_source": n => { apiCreateKnowledgeBaseDataSourceInputPublic.awsDataSource = n.getObjectValue(createApiAWSDataSourceFromDiscriminatorValue); }, + "chunking_algorithm": n => { apiCreateKnowledgeBaseDataSourceInputPublic.chunkingAlgorithm = n.getEnumValue(ApiChunkingAlgorithmObject) ?? ApiChunkingAlgorithmObject.CHUNKING_ALGORITHM_SECTION_BASED; }, + "chunking_options": n => { apiCreateKnowledgeBaseDataSourceInputPublic.chunkingOptions = n.getObjectValue(createApiChunkingOptionsFromDiscriminatorValue); }, + "knowledge_base_uuid": n => { apiCreateKnowledgeBaseDataSourceInputPublic.knowledgeBaseUuid = n.getStringValue(); }, + "spaces_data_source": n => { apiCreateKnowledgeBaseDataSourceInputPublic.spacesDataSource = n.getObjectValue(createApiSpacesDataSourceFromDiscriminatorValue); }, + "web_crawler_data_source": n => { apiCreateKnowledgeBaseDataSourceInputPublic.webCrawlerDataSource = n.getObjectValue(createApiWebCrawlerDataSourceFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateKnowledgeBaseDataSourceOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateKnowledgeBaseDataSourceOutput(apiCreateKnowledgeBaseDataSourceOutput = {}) { + return { + "knowledge_base_data_source": n => { apiCreateKnowledgeBaseDataSourceOutput.knowledgeBaseDataSource = n.getObjectValue(createApiKnowledgeBaseDataSourceFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateKnowledgeBaseInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateKnowledgeBaseInputPublic(apiCreateKnowledgeBaseInputPublic = {}) { + return { + "database_id": n => { apiCreateKnowledgeBaseInputPublic.databaseId = n.getStringValue(); }, + "datasources": n => { apiCreateKnowledgeBaseInputPublic.datasources = n.getCollectionOfObjectValues(createApiKBDataSourceFromDiscriminatorValue); }, + "embedding_model_uuid": n => { apiCreateKnowledgeBaseInputPublic.embeddingModelUuid = n.getStringValue(); }, + "name": n => { apiCreateKnowledgeBaseInputPublic.name = n.getStringValue(); }, + "project_id": n => { apiCreateKnowledgeBaseInputPublic.projectId = n.getStringValue(); }, + "region": n => { apiCreateKnowledgeBaseInputPublic.region = n.getStringValue(); }, + "tags": n => { apiCreateKnowledgeBaseInputPublic.tags = n.getCollectionOfPrimitiveValues(); }, + "vpc_uuid": n => { apiCreateKnowledgeBaseInputPublic.vpcUuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateKnowledgeBaseOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateKnowledgeBaseOutput(apiCreateKnowledgeBaseOutput = {}) { + return { + "knowledge_base": n => { apiCreateKnowledgeBaseOutput.knowledgeBase = n.getObjectValue(createApiKnowledgeBaseFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateModelAPIKeyInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateModelAPIKeyInputPublic(apiCreateModelAPIKeyInputPublic = {}) { + return { + "name": n => { apiCreateModelAPIKeyInputPublic.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateModelAPIKeyOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateModelAPIKeyOutput(apiCreateModelAPIKeyOutput = {}) { + return { + "api_key_info": n => { apiCreateModelAPIKeyOutput.apiKeyInfo = n.getObjectValue(createApiModelAPIKeyInfoFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateOpenAIAPIKeyInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateOpenAIAPIKeyInputPublic(apiCreateOpenAIAPIKeyInputPublic = {}) { + return { + "api_key": n => { apiCreateOpenAIAPIKeyInputPublic.apiKey = n.getStringValue(); }, + "name": n => { apiCreateOpenAIAPIKeyInputPublic.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateOpenAIAPIKeyOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateOpenAIAPIKeyOutput(apiCreateOpenAIAPIKeyOutput = {}) { + return { + "api_key_info": n => { apiCreateOpenAIAPIKeyOutput.apiKeyInfo = n.getObjectValue(createApiOpenAIAPIKeyInfoFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateScheduledIndexingInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateScheduledIndexingInputPublic(apiCreateScheduledIndexingInputPublic = {}) { + return { + "days": n => { apiCreateScheduledIndexingInputPublic.days = n.getCollectionOfPrimitiveValues(); }, + "knowledge_base_uuid": n => { apiCreateScheduledIndexingInputPublic.knowledgeBaseUuid = n.getStringValue(); }, + "time": n => { apiCreateScheduledIndexingInputPublic.time = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateScheduledIndexingOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateScheduledIndexingOutput(apiCreateScheduledIndexingOutput = {}) { + return { + "indexing_info": n => { apiCreateScheduledIndexingOutput.indexingInfo = n.getObjectValue(createApiScheduledIndexingInfoFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateWorkspaceInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateWorkspaceInputPublic(apiCreateWorkspaceInputPublic = {}) { + return { + "agent_uuids": n => { apiCreateWorkspaceInputPublic.agentUuids = n.getCollectionOfPrimitiveValues(); }, + "description": n => { apiCreateWorkspaceInputPublic.description = n.getStringValue(); }, + "name": n => { apiCreateWorkspaceInputPublic.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiCreateWorkspaceOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiCreateWorkspaceOutput(apiCreateWorkspaceOutput = {}) { + return { + "workspace": n => { apiCreateWorkspaceOutput.workspace = n.getObjectValue(createApiWorkspaceFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiDeleteAgentAPIKeyOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiDeleteAgentAPIKeyOutput(apiDeleteAgentAPIKeyOutput = {}) { + return { + "api_key_info": n => { apiDeleteAgentAPIKeyOutput.apiKeyInfo = n.getObjectValue(createApiAgentAPIKeyInfoFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiDeleteAgentOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiDeleteAgentOutput(apiDeleteAgentOutput = {}) { + return { + "agent": n => { apiDeleteAgentOutput.agent = n.getObjectValue(createApiAgentFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiDeleteAnthropicAPIKeyOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiDeleteAnthropicAPIKeyOutput(apiDeleteAnthropicAPIKeyOutput = {}) { + return { + "api_key_info": n => { apiDeleteAnthropicAPIKeyOutput.apiKeyInfo = n.getObjectValue(createApiAnthropicAPIKeyInfoFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiDeleteKnowledgeBaseDataSourceOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiDeleteKnowledgeBaseDataSourceOutput(apiDeleteKnowledgeBaseDataSourceOutput = {}) { + return { + "data_source_uuid": n => { apiDeleteKnowledgeBaseDataSourceOutput.dataSourceUuid = n.getStringValue(); }, + "knowledge_base_uuid": n => { apiDeleteKnowledgeBaseDataSourceOutput.knowledgeBaseUuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiDeleteKnowledgeBaseOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiDeleteKnowledgeBaseOutput(apiDeleteKnowledgeBaseOutput = {}) { + return { + "uuid": n => { apiDeleteKnowledgeBaseOutput.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiDeleteModelAPIKeyOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiDeleteModelAPIKeyOutput(apiDeleteModelAPIKeyOutput = {}) { + return { + "api_key_info": n => { apiDeleteModelAPIKeyOutput.apiKeyInfo = n.getObjectValue(createApiModelAPIKeyInfoFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiDeleteOpenAIAPIKeyOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiDeleteOpenAIAPIKeyOutput(apiDeleteOpenAIAPIKeyOutput = {}) { + return { + "api_key_info": n => { apiDeleteOpenAIAPIKeyOutput.apiKeyInfo = n.getObjectValue(createApiOpenAIAPIKeyInfoFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiDeleteScheduledIndexingOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiDeleteScheduledIndexingOutput(apiDeleteScheduledIndexingOutput = {}) { + return { + "indexing_info": n => { apiDeleteScheduledIndexingOutput.indexingInfo = n.getObjectValue(createApiScheduledIndexingInfoFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiDeleteWorkspaceOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiDeleteWorkspaceOutput(apiDeleteWorkspaceOutput = {}) { + return { + "workspace_uuid": n => { apiDeleteWorkspaceOutput.workspaceUuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiDeployment The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiDeployment(apiDeployment = {}) { + return { + "created_at": n => { apiDeployment.createdAt = n.getDateValue(); }, + "name": n => { apiDeployment.name = n.getStringValue(); }, + "status": n => { apiDeployment.status = n.getEnumValue(ApiDeploymentStatusObject) ?? ApiDeploymentStatusObject.STATUS_UNKNOWN; }, + "updated_at": n => { apiDeployment.updatedAt = n.getDateValue(); }, + "url": n => { apiDeployment.url = n.getStringValue(); }, + "uuid": n => { apiDeployment.uuid = n.getStringValue(); }, + "visibility": n => { apiDeployment.visibility = n.getEnumValue(ApiDeploymentVisibilityObject) ?? ApiDeploymentVisibilityObject.VISIBILITY_UNKNOWN; }, + }; +} +/** + * The deserialization information for the current model + * @param ApiDropboxDataSource The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiDropboxDataSource(apiDropboxDataSource = {}) { + return { + "folder": n => { apiDropboxDataSource.folder = n.getStringValue(); }, + "refresh_token": n => { apiDropboxDataSource.refreshToken = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiDropboxDataSourceDisplay The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiDropboxDataSourceDisplay(apiDropboxDataSourceDisplay = {}) { + return { + "folder": n => { apiDropboxDataSourceDisplay.folder = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiDropboxOauth2GetTokensInput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiDropboxOauth2GetTokensInput(apiDropboxOauth2GetTokensInput = {}) { + return { + "code": n => { apiDropboxOauth2GetTokensInput.code = n.getStringValue(); }, + "redirect_url": n => { apiDropboxOauth2GetTokensInput.redirectUrl = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiDropboxOauth2GetTokensOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiDropboxOauth2GetTokensOutput(apiDropboxOauth2GetTokensOutput = {}) { + return { + "refresh_token": n => { apiDropboxOauth2GetTokensOutput.refreshToken = n.getStringValue(); }, + "token": n => { apiDropboxOauth2GetTokensOutput.token = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiEvaluationDataset The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiEvaluationDataset(apiEvaluationDataset = {}) { + return { + "created_at": n => { apiEvaluationDataset.createdAt = n.getDateValue(); }, + "dataset_name": n => { apiEvaluationDataset.datasetName = n.getStringValue(); }, + "dataset_uuid": n => { apiEvaluationDataset.datasetUuid = n.getStringValue(); }, + "file_size": n => { apiEvaluationDataset.fileSize = n.getStringValue(); }, + "has_ground_truth": n => { apiEvaluationDataset.hasGroundTruth = n.getBooleanValue(); }, + "row_count": n => { apiEvaluationDataset.rowCount = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiEvaluationMetric The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiEvaluationMetric(apiEvaluationMetric = {}) { + return { + "category": n => { apiEvaluationMetric.category = n.getEnumValue(ApiEvaluationMetricCategoryObject) ?? ApiEvaluationMetricCategoryObject.METRIC_CATEGORY_UNSPECIFIED; }, + "description": n => { apiEvaluationMetric.description = n.getStringValue(); }, + "inverted": n => { apiEvaluationMetric.inverted = n.getBooleanValue(); }, + "is_metric_goal": n => { apiEvaluationMetric.isMetricGoal = n.getBooleanValue(); }, + "metric_name": n => { apiEvaluationMetric.metricName = n.getStringValue(); }, + "metric_rank": n => { apiEvaluationMetric.metricRank = n.getNumberValue(); }, + "metric_type": n => { apiEvaluationMetric.metricType = n.getEnumValue(ApiEvaluationMetricTypeObject) ?? ApiEvaluationMetricTypeObject.METRIC_TYPE_UNSPECIFIED; }, + "metric_uuid": n => { apiEvaluationMetric.metricUuid = n.getStringValue(); }, + "metric_value_type": n => { apiEvaluationMetric.metricValueType = n.getEnumValue(ApiEvaluationMetricValueTypeObject) ?? ApiEvaluationMetricValueTypeObject.METRIC_VALUE_TYPE_UNSPECIFIED; }, + "range_max": n => { apiEvaluationMetric.rangeMax = n.getNumberValue(); }, + "range_min": n => { apiEvaluationMetric.rangeMin = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiEvaluationMetricResult The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiEvaluationMetricResult(apiEvaluationMetricResult = {}) { + return { + "error_description": n => { apiEvaluationMetricResult.errorDescription = n.getStringValue(); }, + "metric_name": n => { apiEvaluationMetricResult.metricName = n.getStringValue(); }, + "metric_value_type": n => { apiEvaluationMetricResult.metricValueType = n.getEnumValue(ApiEvaluationMetricValueTypeObject) ?? ApiEvaluationMetricValueTypeObject.METRIC_VALUE_TYPE_UNSPECIFIED; }, + "number_value": n => { apiEvaluationMetricResult.numberValue = n.getNumberValue(); }, + "reasoning": n => { apiEvaluationMetricResult.reasoning = n.getStringValue(); }, + "string_value": n => { apiEvaluationMetricResult.stringValue = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiEvaluationRun The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiEvaluationRun(apiEvaluationRun = {}) { + return { + "agent_deleted": n => { apiEvaluationRun.agentDeleted = n.getBooleanValue(); }, + "agent_deployment_name": n => { apiEvaluationRun.agentDeploymentName = n.getStringValue(); }, + "agent_name": n => { apiEvaluationRun.agentName = n.getStringValue(); }, + "agent_uuid": n => { apiEvaluationRun.agentUuid = n.getStringValue(); }, + "agent_version_hash": n => { apiEvaluationRun.agentVersionHash = n.getStringValue(); }, + "agent_workspace_uuid": n => { apiEvaluationRun.agentWorkspaceUuid = n.getStringValue(); }, + "created_by_user_email": n => { apiEvaluationRun.createdByUserEmail = n.getStringValue(); }, + "created_by_user_id": n => { apiEvaluationRun.createdByUserId = n.getStringValue(); }, + "error_description": n => { apiEvaluationRun.errorDescription = n.getStringValue(); }, + "evaluation_run_uuid": n => { apiEvaluationRun.evaluationRunUuid = n.getStringValue(); }, + "evaluation_test_case_workspace_uuid": n => { apiEvaluationRun.evaluationTestCaseWorkspaceUuid = n.getStringValue(); }, + "finished_at": n => { apiEvaluationRun.finishedAt = n.getDateValue(); }, + "pass_status": n => { apiEvaluationRun.passStatus = n.getBooleanValue(); }, + "queued_at": n => { apiEvaluationRun.queuedAt = n.getDateValue(); }, + "run_level_metric_results": n => { apiEvaluationRun.runLevelMetricResults = n.getCollectionOfObjectValues(createApiEvaluationMetricResultFromDiscriminatorValue); }, + "run_name": n => { apiEvaluationRun.runName = n.getStringValue(); }, + "star_metric_result": n => { apiEvaluationRun.starMetricResult = n.getObjectValue(createApiEvaluationMetricResultFromDiscriminatorValue); }, + "started_at": n => { apiEvaluationRun.startedAt = n.getDateValue(); }, + "status": n => { apiEvaluationRun.status = n.getEnumValue(ApiEvaluationRunStatusObject) ?? ApiEvaluationRunStatusObject.EVALUATION_RUN_STATUS_UNSPECIFIED; }, + "test_case_description": n => { apiEvaluationRun.testCaseDescription = n.getStringValue(); }, + "test_case_name": n => { apiEvaluationRun.testCaseName = n.getStringValue(); }, + "test_case_uuid": n => { apiEvaluationRun.testCaseUuid = n.getStringValue(); }, + "test_case_version": n => { apiEvaluationRun.testCaseVersion = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiEvaluationTestCase The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiEvaluationTestCase(apiEvaluationTestCase = {}) { + return { + "archived_at": n => { apiEvaluationTestCase.archivedAt = n.getDateValue(); }, + "created_at": n => { apiEvaluationTestCase.createdAt = n.getDateValue(); }, + "created_by_user_email": n => { apiEvaluationTestCase.createdByUserEmail = n.getStringValue(); }, + "created_by_user_id": n => { apiEvaluationTestCase.createdByUserId = n.getStringValue(); }, + "dataset": n => { apiEvaluationTestCase.dataset = n.getObjectValue(createApiEvaluationDatasetFromDiscriminatorValue); }, + "dataset_name": n => { apiEvaluationTestCase.datasetName = n.getStringValue(); }, + "dataset_uuid": n => { apiEvaluationTestCase.datasetUuid = n.getStringValue(); }, + "description": n => { apiEvaluationTestCase.description = n.getStringValue(); }, + "latest_version_number_of_runs": n => { apiEvaluationTestCase.latestVersionNumberOfRuns = n.getNumberValue(); }, + "metrics": n => { apiEvaluationTestCase.metrics = n.getCollectionOfObjectValues(createApiEvaluationMetricFromDiscriminatorValue); }, + "name": n => { apiEvaluationTestCase.name = n.getStringValue(); }, + "star_metric": n => { apiEvaluationTestCase.starMetric = n.getObjectValue(createApiStarMetricFromDiscriminatorValue); }, + "test_case_uuid": n => { apiEvaluationTestCase.testCaseUuid = n.getStringValue(); }, + "total_runs": n => { apiEvaluationTestCase.totalRuns = n.getNumberValue(); }, + "updated_at": n => { apiEvaluationTestCase.updatedAt = n.getDateValue(); }, + "updated_by_user_email": n => { apiEvaluationTestCase.updatedByUserEmail = n.getStringValue(); }, + "updated_by_user_id": n => { apiEvaluationTestCase.updatedByUserId = n.getStringValue(); }, + "version": n => { apiEvaluationTestCase.version = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiEvaluationTestCaseMetricList The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiEvaluationTestCaseMetricList(apiEvaluationTestCaseMetricList = {}) { + return { + "metric_uuids": n => { apiEvaluationTestCaseMetricList.metricUuids = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiEvaluationTraceSpan The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiEvaluationTraceSpan(apiEvaluationTraceSpan = {}) { + return { + "created_at": n => { apiEvaluationTraceSpan.createdAt = n.getDateValue(); }, + "input": n => { apiEvaluationTraceSpan.input = n.getObjectValue(createApiEvaluationTraceSpan_inputFromDiscriminatorValue); }, + "name": n => { apiEvaluationTraceSpan.name = n.getStringValue(); }, + "output": n => { apiEvaluationTraceSpan.output = n.getObjectValue(createApiEvaluationTraceSpan_outputFromDiscriminatorValue); }, + "retriever_chunks": n => { apiEvaluationTraceSpan.retrieverChunks = n.getCollectionOfObjectValues(createApiPromptChunkFromDiscriminatorValue); }, + "span_level_metric_results": n => { apiEvaluationTraceSpan.spanLevelMetricResults = n.getCollectionOfObjectValues(createApiEvaluationMetricResultFromDiscriminatorValue); }, + "type": n => { apiEvaluationTraceSpan.type = n.getEnumValue(ApiTraceSpanTypeObject) ?? ApiTraceSpanTypeObject.TRACE_SPAN_TYPE_UNKNOWN; }, + }; +} +/** + * The deserialization information for the current model + * @param ApiEvaluationTraceSpan_input The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiEvaluationTraceSpan_input(apiEvaluationTraceSpan_input = {}) { + return {}; +} +/** + * The deserialization information for the current model + * @param ApiEvaluationTraceSpan_output The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiEvaluationTraceSpan_output(apiEvaluationTraceSpan_output = {}) { + return {}; +} +/** + * The deserialization information for the current model + * @param ApiFilePresignedUrlResponse The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiFilePresignedUrlResponse(apiFilePresignedUrlResponse = {}) { + return { + "expires_at": n => { apiFilePresignedUrlResponse.expiresAt = n.getDateValue(); }, + "object_key": n => { apiFilePresignedUrlResponse.objectKey = n.getStringValue(); }, + "original_file_name": n => { apiFilePresignedUrlResponse.originalFileName = n.getStringValue(); }, + "presigned_url": n => { apiFilePresignedUrlResponse.presignedUrl = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiFileUploadDataSource The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiFileUploadDataSource(apiFileUploadDataSource = {}) { + return { + "original_file_name": n => { apiFileUploadDataSource.originalFileName = n.getStringValue(); }, + "size_in_bytes": n => { apiFileUploadDataSource.sizeInBytes = n.getStringValue(); }, + "stored_object_key": n => { apiFileUploadDataSource.storedObjectKey = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiGenerateOauth2URLOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiGenerateOauth2URLOutput(apiGenerateOauth2URLOutput = {}) { + return { + "url": n => { apiGenerateOauth2URLOutput.url = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiGetAgentOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiGetAgentOutput(apiGetAgentOutput = {}) { + return { + "agent": n => { apiGetAgentOutput.agent = n.getObjectValue(createApiAgentFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiGetAgentUsageOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiGetAgentUsageOutput(apiGetAgentUsageOutput = {}) { + return { + "log_insights_usage": n => { apiGetAgentUsageOutput.logInsightsUsage = n.getObjectValue(createApiResourceUsageFromDiscriminatorValue); }, + "usage": n => { apiGetAgentUsageOutput.usage = n.getObjectValue(createApiResourceUsageFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiGetAnthropicAPIKeyOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiGetAnthropicAPIKeyOutput(apiGetAnthropicAPIKeyOutput = {}) { + return { + "api_key_info": n => { apiGetAnthropicAPIKeyOutput.apiKeyInfo = n.getObjectValue(createApiAnthropicAPIKeyInfoFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiGetChildrenOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiGetChildrenOutput(apiGetChildrenOutput = {}) { + return { + "children": n => { apiGetChildrenOutput.children = n.getCollectionOfObjectValues(createApiAgentFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiGetEvaluationRunOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiGetEvaluationRunOutput(apiGetEvaluationRunOutput = {}) { + return { + "evaluation_run": n => { apiGetEvaluationRunOutput.evaluationRun = n.getObjectValue(createApiEvaluationRunFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiGetEvaluationRunPromptResultsOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiGetEvaluationRunPromptResultsOutput(apiGetEvaluationRunPromptResultsOutput = {}) { + return { + "prompt": n => { apiGetEvaluationRunPromptResultsOutput.prompt = n.getObjectValue(createApiPromptFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiGetEvaluationRunResultsOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiGetEvaluationRunResultsOutput(apiGetEvaluationRunResultsOutput = {}) { + return { + "evaluation_run": n => { apiGetEvaluationRunResultsOutput.evaluationRun = n.getObjectValue(createApiEvaluationRunFromDiscriminatorValue); }, + "links": n => { apiGetEvaluationRunResultsOutput.links = n.getObjectValue(createApiLinksFromDiscriminatorValue); }, + "meta": n => { apiGetEvaluationRunResultsOutput.meta = n.getObjectValue(createApiMetaFromDiscriminatorValue); }, + "prompts": n => { apiGetEvaluationRunResultsOutput.prompts = n.getCollectionOfObjectValues(createApiPromptFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiGetEvaluationTestCaseOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiGetEvaluationTestCaseOutput(apiGetEvaluationTestCaseOutput = {}) { + return { + "evaluation_test_case": n => { apiGetEvaluationTestCaseOutput.evaluationTestCase = n.getObjectValue(createApiEvaluationTestCaseFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiGetIndexingJobDetailsSignedURLOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiGetIndexingJobDetailsSignedURLOutput(apiGetIndexingJobDetailsSignedURLOutput = {}) { + return { + "signed_url": n => { apiGetIndexingJobDetailsSignedURLOutput.signedUrl = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiGetKnowledgeBaseIndexingJobOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiGetKnowledgeBaseIndexingJobOutput(apiGetKnowledgeBaseIndexingJobOutput = {}) { + return { + "job": n => { apiGetKnowledgeBaseIndexingJobOutput.job = n.getObjectValue(createApiIndexingJobFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiGetKnowledgeBaseOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiGetKnowledgeBaseOutput(apiGetKnowledgeBaseOutput = {}) { + return { + "database_status": n => { apiGetKnowledgeBaseOutput.databaseStatus = n.getEnumValue(DbaasClusterStatusObject) ?? DbaasClusterStatusObject.CREATING; }, + "knowledge_base": n => { apiGetKnowledgeBaseOutput.knowledgeBase = n.getObjectValue(createApiKnowledgeBaseFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiGetOpenAIAPIKeyOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiGetOpenAIAPIKeyOutput(apiGetOpenAIAPIKeyOutput = {}) { + return { + "api_key_info": n => { apiGetOpenAIAPIKeyOutput.apiKeyInfo = n.getObjectValue(createApiOpenAIAPIKeyInfoFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiGetScheduledIndexingOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiGetScheduledIndexingOutput(apiGetScheduledIndexingOutput = {}) { + return { + "indexing_info": n => { apiGetScheduledIndexingOutput.indexingInfo = n.getObjectValue(createApiScheduledIndexingInfoFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiGetWorkspaceOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiGetWorkspaceOutput(apiGetWorkspaceOutput = {}) { + return { + "workspace": n => { apiGetWorkspaceOutput.workspace = n.getObjectValue(createApiWorkspaceFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiGoogleDriveDataSource The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiGoogleDriveDataSource(apiGoogleDriveDataSource = {}) { + return { + "folder_id": n => { apiGoogleDriveDataSource.folderId = n.getStringValue(); }, + "refresh_token": n => { apiGoogleDriveDataSource.refreshToken = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiGoogleDriveDataSourceDisplay The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiGoogleDriveDataSourceDisplay(apiGoogleDriveDataSourceDisplay = {}) { + return { + "folder_id": n => { apiGoogleDriveDataSourceDisplay.folderId = n.getStringValue(); }, + "folder_name": n => { apiGoogleDriveDataSourceDisplay.folderName = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiIndexedDataSource The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiIndexedDataSource(apiIndexedDataSource = {}) { + return { + "completed_at": n => { apiIndexedDataSource.completedAt = n.getDateValue(); }, + "data_source_uuid": n => { apiIndexedDataSource.dataSourceUuid = n.getStringValue(); }, + "error_details": n => { apiIndexedDataSource.errorDetails = n.getStringValue(); }, + "error_msg": n => { apiIndexedDataSource.errorMsg = n.getStringValue(); }, + "failed_item_count": n => { apiIndexedDataSource.failedItemCount = n.getStringValue(); }, + "indexed_file_count": n => { apiIndexedDataSource.indexedFileCount = n.getStringValue(); }, + "indexed_item_count": n => { apiIndexedDataSource.indexedItemCount = n.getStringValue(); }, + "removed_item_count": n => { apiIndexedDataSource.removedItemCount = n.getStringValue(); }, + "skipped_item_count": n => { apiIndexedDataSource.skippedItemCount = n.getStringValue(); }, + "started_at": n => { apiIndexedDataSource.startedAt = n.getDateValue(); }, + "status": n => { apiIndexedDataSource.status = n.getEnumValue(ApiIndexedDataSourceStatusObject) ?? ApiIndexedDataSourceStatusObject.DATA_SOURCE_STATUS_UNKNOWN; }, + "total_bytes": n => { apiIndexedDataSource.totalBytes = n.getStringValue(); }, + "total_bytes_indexed": n => { apiIndexedDataSource.totalBytesIndexed = n.getStringValue(); }, + "total_file_count": n => { apiIndexedDataSource.totalFileCount = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiIndexingJob The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiIndexingJob(apiIndexingJob = {}) { + return { + "completed_datasources": n => { apiIndexingJob.completedDatasources = n.getNumberValue(); }, + "created_at": n => { apiIndexingJob.createdAt = n.getDateValue(); }, + "data_source_jobs": n => { apiIndexingJob.dataSourceJobs = n.getCollectionOfObjectValues(createApiIndexedDataSourceFromDiscriminatorValue); }, + "data_source_uuids": n => { apiIndexingJob.dataSourceUuids = n.getCollectionOfPrimitiveValues(); }, + "finished_at": n => { apiIndexingJob.finishedAt = n.getDateValue(); }, + "is_report_available": n => { apiIndexingJob.isReportAvailable = n.getBooleanValue(); }, + "knowledge_base_uuid": n => { apiIndexingJob.knowledgeBaseUuid = n.getStringValue(); }, + "phase": n => { apiIndexingJob.phase = n.getEnumValue(ApiBatchJobPhaseObject) ?? ApiBatchJobPhaseObject.BATCH_JOB_PHASE_UNKNOWN; }, + "started_at": n => { apiIndexingJob.startedAt = n.getDateValue(); }, + "status": n => { apiIndexingJob.status = n.getEnumValue(ApiIndexJobStatusObject) ?? ApiIndexJobStatusObject.INDEX_JOB_STATUS_UNKNOWN; }, + "tokens": n => { apiIndexingJob.tokens = n.getNumberValue(); }, + "total_datasources": n => { apiIndexingJob.totalDatasources = n.getNumberValue(); }, + "total_tokens": n => { apiIndexingJob.totalTokens = n.getStringValue(); }, + "updated_at": n => { apiIndexingJob.updatedAt = n.getDateValue(); }, + "uuid": n => { apiIndexingJob.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiKBDataSource The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiKBDataSource(apiKBDataSource = {}) { + return { + "aws_data_source": n => { apiKBDataSource.awsDataSource = n.getObjectValue(createApiAWSDataSourceFromDiscriminatorValue); }, + "bucket_name": n => { apiKBDataSource.bucketName = n.getStringValue(); }, + "bucket_region": n => { apiKBDataSource.bucketRegion = n.getStringValue(); }, + "chunking_algorithm": n => { apiKBDataSource.chunkingAlgorithm = n.getEnumValue(ApiChunkingAlgorithmObject) ?? ApiChunkingAlgorithmObject.CHUNKING_ALGORITHM_SECTION_BASED; }, + "chunking_options": n => { apiKBDataSource.chunkingOptions = n.getObjectValue(createApiChunkingOptionsFromDiscriminatorValue); }, + "dropbox_data_source": n => { apiKBDataSource.dropboxDataSource = n.getObjectValue(createApiDropboxDataSourceFromDiscriminatorValue); }, + "file_upload_data_source": n => { apiKBDataSource.fileUploadDataSource = n.getObjectValue(createApiFileUploadDataSourceFromDiscriminatorValue); }, + "google_drive_data_source": n => { apiKBDataSource.googleDriveDataSource = n.getObjectValue(createApiGoogleDriveDataSourceFromDiscriminatorValue); }, + "item_path": n => { apiKBDataSource.itemPath = n.getStringValue(); }, + "spaces_data_source": n => { apiKBDataSource.spacesDataSource = n.getObjectValue(createApiSpacesDataSourceFromDiscriminatorValue); }, + "web_crawler_data_source": n => { apiKBDataSource.webCrawlerDataSource = n.getObjectValue(createApiWebCrawlerDataSourceFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiKnowledgeBase The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiKnowledgeBase(apiKnowledgeBase = {}) { + return { + "added_to_agent_at": n => { apiKnowledgeBase.addedToAgentAt = n.getDateValue(); }, + "created_at": n => { apiKnowledgeBase.createdAt = n.getDateValue(); }, + "database_id": n => { apiKnowledgeBase.databaseId = n.getStringValue(); }, + "embedding_model_uuid": n => { apiKnowledgeBase.embeddingModelUuid = n.getStringValue(); }, + "is_public": n => { apiKnowledgeBase.isPublic = n.getBooleanValue(); }, + "last_indexing_job": n => { apiKnowledgeBase.lastIndexingJob = n.getObjectValue(createApiIndexingJobFromDiscriminatorValue); }, + "name": n => { apiKnowledgeBase.name = n.getStringValue(); }, + "project_id": n => { apiKnowledgeBase.projectId = n.getStringValue(); }, + "region": n => { apiKnowledgeBase.region = n.getStringValue(); }, + "tags": n => { apiKnowledgeBase.tags = n.getCollectionOfPrimitiveValues(); }, + "updated_at": n => { apiKnowledgeBase.updatedAt = n.getDateValue(); }, + "user_id": n => { apiKnowledgeBase.userId = n.getStringValue(); }, + "uuid": n => { apiKnowledgeBase.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiKnowledgeBaseDataSource The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiKnowledgeBaseDataSource(apiKnowledgeBaseDataSource = {}) { + return { + "aws_data_source": n => { apiKnowledgeBaseDataSource.awsDataSource = n.getObjectValue(createApiAWSDataSourceDisplayFromDiscriminatorValue); }, + "bucket_name": n => { apiKnowledgeBaseDataSource.bucketName = n.getStringValue(); }, + "chunking_algorithm": n => { apiKnowledgeBaseDataSource.chunkingAlgorithm = n.getEnumValue(ApiChunkingAlgorithmObject) ?? ApiChunkingAlgorithmObject.CHUNKING_ALGORITHM_SECTION_BASED; }, + "chunking_options": n => { apiKnowledgeBaseDataSource.chunkingOptions = n.getObjectValue(createApiChunkingOptionsFromDiscriminatorValue); }, + "created_at": n => { apiKnowledgeBaseDataSource.createdAt = n.getDateValue(); }, + "dropbox_data_source": n => { apiKnowledgeBaseDataSource.dropboxDataSource = n.getObjectValue(createApiDropboxDataSourceDisplayFromDiscriminatorValue); }, + "file_upload_data_source": n => { apiKnowledgeBaseDataSource.fileUploadDataSource = n.getObjectValue(createApiFileUploadDataSourceFromDiscriminatorValue); }, + "google_drive_data_source": n => { apiKnowledgeBaseDataSource.googleDriveDataSource = n.getObjectValue(createApiGoogleDriveDataSourceDisplayFromDiscriminatorValue); }, + "item_path": n => { apiKnowledgeBaseDataSource.itemPath = n.getStringValue(); }, + "last_datasource_indexing_job": n => { apiKnowledgeBaseDataSource.lastDatasourceIndexingJob = n.getObjectValue(createApiIndexedDataSourceFromDiscriminatorValue); }, + "region": n => { apiKnowledgeBaseDataSource.region = n.getStringValue(); }, + "spaces_data_source": n => { apiKnowledgeBaseDataSource.spacesDataSource = n.getObjectValue(createApiSpacesDataSourceFromDiscriminatorValue); }, + "updated_at": n => { apiKnowledgeBaseDataSource.updatedAt = n.getDateValue(); }, + "uuid": n => { apiKnowledgeBaseDataSource.uuid = n.getStringValue(); }, + "web_crawler_data_source": n => { apiKnowledgeBaseDataSource.webCrawlerDataSource = n.getObjectValue(createApiWebCrawlerDataSourceFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiLinkAgentFunctionInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiLinkAgentFunctionInputPublic(apiLinkAgentFunctionInputPublic = {}) { + return { + "agent_uuid": n => { apiLinkAgentFunctionInputPublic.agentUuid = n.getStringValue(); }, + "description": n => { apiLinkAgentFunctionInputPublic.description = n.getStringValue(); }, + "faas_name": n => { apiLinkAgentFunctionInputPublic.faasName = n.getStringValue(); }, + "faas_namespace": n => { apiLinkAgentFunctionInputPublic.faasNamespace = n.getStringValue(); }, + "function_name": n => { apiLinkAgentFunctionInputPublic.functionName = n.getStringValue(); }, + "input_schema": n => { apiLinkAgentFunctionInputPublic.inputSchema = n.getObjectValue(createApiLinkAgentFunctionInputPublic_input_schemaFromDiscriminatorValue); }, + "output_schema": n => { apiLinkAgentFunctionInputPublic.outputSchema = n.getObjectValue(createApiLinkAgentFunctionInputPublic_output_schemaFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiLinkAgentFunctionInputPublic_input_schema The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiLinkAgentFunctionInputPublic_input_schema(apiLinkAgentFunctionInputPublic_input_schema = {}) { + return {}; +} +/** + * The deserialization information for the current model + * @param ApiLinkAgentFunctionInputPublic_output_schema The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiLinkAgentFunctionInputPublic_output_schema(apiLinkAgentFunctionInputPublic_output_schema = {}) { + return {}; +} +/** + * The deserialization information for the current model + * @param ApiLinkAgentFunctionOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiLinkAgentFunctionOutput(apiLinkAgentFunctionOutput = {}) { + return { + "agent": n => { apiLinkAgentFunctionOutput.agent = n.getObjectValue(createApiAgentFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiLinkAgentGuardrailOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiLinkAgentGuardrailOutput(apiLinkAgentGuardrailOutput = {}) { + return { + "agent": n => { apiLinkAgentGuardrailOutput.agent = n.getObjectValue(createApiAgentFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiLinkAgentGuardrailsInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiLinkAgentGuardrailsInputPublic(apiLinkAgentGuardrailsInputPublic = {}) { + return { + "agent_uuid": n => { apiLinkAgentGuardrailsInputPublic.agentUuid = n.getStringValue(); }, + "guardrails": n => { apiLinkAgentGuardrailsInputPublic.guardrails = n.getCollectionOfObjectValues(createApiAgentGuardrailInputFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiLinkAgentInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiLinkAgentInputPublic(apiLinkAgentInputPublic = {}) { + return { + "child_agent_uuid": n => { apiLinkAgentInputPublic.childAgentUuid = n.getStringValue(); }, + "if_case": n => { apiLinkAgentInputPublic.ifCase = n.getStringValue(); }, + "parent_agent_uuid": n => { apiLinkAgentInputPublic.parentAgentUuid = n.getStringValue(); }, + "route_name": n => { apiLinkAgentInputPublic.routeName = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiLinkAgentOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiLinkAgentOutput(apiLinkAgentOutput = {}) { + return { + "child_agent_uuid": n => { apiLinkAgentOutput.childAgentUuid = n.getStringValue(); }, + "parent_agent_uuid": n => { apiLinkAgentOutput.parentAgentUuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiLinkKnowledgeBaseOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiLinkKnowledgeBaseOutput(apiLinkKnowledgeBaseOutput = {}) { + return { + "agent": n => { apiLinkKnowledgeBaseOutput.agent = n.getObjectValue(createApiAgentFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiLinks The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiLinks(apiLinks = {}) { + return { + "pages": n => { apiLinks.pages = n.getObjectValue(createApiPagesFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiListAgentAPIKeysOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiListAgentAPIKeysOutput(apiListAgentAPIKeysOutput = {}) { + return { + "api_key_infos": n => { apiListAgentAPIKeysOutput.apiKeyInfos = n.getCollectionOfObjectValues(createApiAgentAPIKeyInfoFromDiscriminatorValue); }, + "links": n => { apiListAgentAPIKeysOutput.links = n.getObjectValue(createApiLinksFromDiscriminatorValue); }, + "meta": n => { apiListAgentAPIKeysOutput.meta = n.getObjectValue(createApiMetaFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiListAgentsByAnthropicKeyOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiListAgentsByAnthropicKeyOutput(apiListAgentsByAnthropicKeyOutput = {}) { + return { + "agents": n => { apiListAgentsByAnthropicKeyOutput.agents = n.getCollectionOfObjectValues(createApiAgentFromDiscriminatorValue); }, + "links": n => { apiListAgentsByAnthropicKeyOutput.links = n.getObjectValue(createApiLinksFromDiscriminatorValue); }, + "meta": n => { apiListAgentsByAnthropicKeyOutput.meta = n.getObjectValue(createApiMetaFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiListAgentsByOpenAIKeyOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiListAgentsByOpenAIKeyOutput(apiListAgentsByOpenAIKeyOutput = {}) { + return { + "agents": n => { apiListAgentsByOpenAIKeyOutput.agents = n.getCollectionOfObjectValues(createApiAgentFromDiscriminatorValue); }, + "links": n => { apiListAgentsByOpenAIKeyOutput.links = n.getObjectValue(createApiLinksFromDiscriminatorValue); }, + "meta": n => { apiListAgentsByOpenAIKeyOutput.meta = n.getObjectValue(createApiMetaFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiListAgentsByWorkspaceOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiListAgentsByWorkspaceOutput(apiListAgentsByWorkspaceOutput = {}) { + return { + "agents": n => { apiListAgentsByWorkspaceOutput.agents = n.getCollectionOfObjectValues(createApiAgentFromDiscriminatorValue); }, + "links": n => { apiListAgentsByWorkspaceOutput.links = n.getObjectValue(createApiLinksFromDiscriminatorValue); }, + "meta": n => { apiListAgentsByWorkspaceOutput.meta = n.getObjectValue(createApiMetaFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiListAgentsOutputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiListAgentsOutputPublic(apiListAgentsOutputPublic = {}) { + return { + "agents": n => { apiListAgentsOutputPublic.agents = n.getCollectionOfObjectValues(createApiAgentPublicFromDiscriminatorValue); }, + "links": n => { apiListAgentsOutputPublic.links = n.getObjectValue(createApiLinksFromDiscriminatorValue); }, + "meta": n => { apiListAgentsOutputPublic.meta = n.getObjectValue(createApiMetaFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiListAgentVersionsOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiListAgentVersionsOutput(apiListAgentVersionsOutput = {}) { + return { + "agent_versions": n => { apiListAgentVersionsOutput.agentVersions = n.getCollectionOfObjectValues(createApiAgentVersionFromDiscriminatorValue); }, + "links": n => { apiListAgentVersionsOutput.links = n.getObjectValue(createApiLinksFromDiscriminatorValue); }, + "meta": n => { apiListAgentVersionsOutput.meta = n.getObjectValue(createApiMetaFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiListAnthropicAPIKeysOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiListAnthropicAPIKeysOutput(apiListAnthropicAPIKeysOutput = {}) { + return { + "api_key_infos": n => { apiListAnthropicAPIKeysOutput.apiKeyInfos = n.getCollectionOfObjectValues(createApiAnthropicAPIKeyInfoFromDiscriminatorValue); }, + "links": n => { apiListAnthropicAPIKeysOutput.links = n.getObjectValue(createApiLinksFromDiscriminatorValue); }, + "meta": n => { apiListAnthropicAPIKeysOutput.meta = n.getObjectValue(createApiMetaFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiListEvaluationMetricsOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiListEvaluationMetricsOutput(apiListEvaluationMetricsOutput = {}) { + return { + "metrics": n => { apiListEvaluationMetricsOutput.metrics = n.getCollectionOfObjectValues(createApiEvaluationMetricFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiListEvaluationRunsByTestCaseOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiListEvaluationRunsByTestCaseOutput(apiListEvaluationRunsByTestCaseOutput = {}) { + return { + "evaluation_runs": n => { apiListEvaluationRunsByTestCaseOutput.evaluationRuns = n.getCollectionOfObjectValues(createApiEvaluationRunFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiListEvaluationTestCasesByWorkspaceOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiListEvaluationTestCasesByWorkspaceOutput(apiListEvaluationTestCasesByWorkspaceOutput = {}) { + return { + "evaluation_test_cases": n => { apiListEvaluationTestCasesByWorkspaceOutput.evaluationTestCases = n.getCollectionOfObjectValues(createApiEvaluationTestCaseFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiListEvaluationTestCasesOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiListEvaluationTestCasesOutput(apiListEvaluationTestCasesOutput = {}) { + return { + "evaluation_test_cases": n => { apiListEvaluationTestCasesOutput.evaluationTestCases = n.getCollectionOfObjectValues(createApiEvaluationTestCaseFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiListIndexingJobDataSourcesOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiListIndexingJobDataSourcesOutput(apiListIndexingJobDataSourcesOutput = {}) { + return { + "indexed_data_sources": n => { apiListIndexingJobDataSourcesOutput.indexedDataSources = n.getCollectionOfObjectValues(createApiIndexedDataSourceFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiListKnowledgeBaseDataSourcesOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiListKnowledgeBaseDataSourcesOutput(apiListKnowledgeBaseDataSourcesOutput = {}) { + return { + "knowledge_base_data_sources": n => { apiListKnowledgeBaseDataSourcesOutput.knowledgeBaseDataSources = n.getCollectionOfObjectValues(createApiKnowledgeBaseDataSourceFromDiscriminatorValue); }, + "links": n => { apiListKnowledgeBaseDataSourcesOutput.links = n.getObjectValue(createApiLinksFromDiscriminatorValue); }, + "meta": n => { apiListKnowledgeBaseDataSourcesOutput.meta = n.getObjectValue(createApiMetaFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiListKnowledgeBaseIndexingJobsOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiListKnowledgeBaseIndexingJobsOutput(apiListKnowledgeBaseIndexingJobsOutput = {}) { + return { + "jobs": n => { apiListKnowledgeBaseIndexingJobsOutput.jobs = n.getCollectionOfObjectValues(createApiIndexingJobFromDiscriminatorValue); }, + "links": n => { apiListKnowledgeBaseIndexingJobsOutput.links = n.getObjectValue(createApiLinksFromDiscriminatorValue); }, + "meta": n => { apiListKnowledgeBaseIndexingJobsOutput.meta = n.getObjectValue(createApiMetaFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiListKnowledgeBasesOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiListKnowledgeBasesOutput(apiListKnowledgeBasesOutput = {}) { + return { + "knowledge_bases": n => { apiListKnowledgeBasesOutput.knowledgeBases = n.getCollectionOfObjectValues(createApiKnowledgeBaseFromDiscriminatorValue); }, + "links": n => { apiListKnowledgeBasesOutput.links = n.getObjectValue(createApiLinksFromDiscriminatorValue); }, + "meta": n => { apiListKnowledgeBasesOutput.meta = n.getObjectValue(createApiMetaFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiListModelAPIKeysOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiListModelAPIKeysOutput(apiListModelAPIKeysOutput = {}) { + return { + "api_key_infos": n => { apiListModelAPIKeysOutput.apiKeyInfos = n.getCollectionOfObjectValues(createApiModelAPIKeyInfoFromDiscriminatorValue); }, + "links": n => { apiListModelAPIKeysOutput.links = n.getObjectValue(createApiLinksFromDiscriminatorValue); }, + "meta": n => { apiListModelAPIKeysOutput.meta = n.getObjectValue(createApiMetaFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiListModelsOutputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiListModelsOutputPublic(apiListModelsOutputPublic = {}) { + return { + "links": n => { apiListModelsOutputPublic.links = n.getObjectValue(createApiLinksFromDiscriminatorValue); }, + "meta": n => { apiListModelsOutputPublic.meta = n.getObjectValue(createApiMetaFromDiscriminatorValue); }, + "models": n => { apiListModelsOutputPublic.models = n.getCollectionOfObjectValues(createApiModelPublicFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiListOpenAIAPIKeysOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiListOpenAIAPIKeysOutput(apiListOpenAIAPIKeysOutput = {}) { + return { + "api_key_infos": n => { apiListOpenAIAPIKeysOutput.apiKeyInfos = n.getCollectionOfObjectValues(createApiOpenAIAPIKeyInfoFromDiscriminatorValue); }, + "links": n => { apiListOpenAIAPIKeysOutput.links = n.getObjectValue(createApiLinksFromDiscriminatorValue); }, + "meta": n => { apiListOpenAIAPIKeysOutput.meta = n.getObjectValue(createApiMetaFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiListRegionsOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiListRegionsOutput(apiListRegionsOutput = {}) { + return { + "regions": n => { apiListRegionsOutput.regions = n.getCollectionOfObjectValues(createGenaiapiRegionFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiListWorkspacesOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiListWorkspacesOutput(apiListWorkspacesOutput = {}) { + return { + "workspaces": n => { apiListWorkspacesOutput.workspaces = n.getCollectionOfObjectValues(createApiWorkspaceFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiMeta The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiMeta(apiMeta = {}) { + return { + "page": n => { apiMeta.page = n.getNumberValue(); }, + "pages": n => { apiMeta.pages = n.getNumberValue(); }, + "total": n => { apiMeta.total = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiModel The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiModel(apiModel = {}) { + return { + "agreement": n => { apiModel.agreement = n.getObjectValue(createApiAgreementFromDiscriminatorValue); }, + "created_at": n => { apiModel.createdAt = n.getDateValue(); }, + "inference_name": n => { apiModel.inferenceName = n.getStringValue(); }, + "inference_version": n => { apiModel.inferenceVersion = n.getStringValue(); }, + "is_foundational": n => { apiModel.isFoundational = n.getBooleanValue(); }, + "kb_default_chunk_size": n => { apiModel.kbDefaultChunkSize = n.getNumberValue(); }, + "kb_max_chunk_size": n => { apiModel.kbMaxChunkSize = n.getNumberValue(); }, + "kb_min_chunk_size": n => { apiModel.kbMinChunkSize = n.getNumberValue(); }, + "metadata": n => { apiModel.metadata = n.getObjectValue(createApiModel_metadataFromDiscriminatorValue); }, + "name": n => { apiModel.name = n.getStringValue(); }, + "parent_uuid": n => { apiModel.parentUuid = n.getStringValue(); }, + "provider": n => { apiModel.provider = n.getEnumValue(ApiModelProviderObject) ?? ApiModelProviderObject.MODEL_PROVIDER_DIGITALOCEAN; }, + "updated_at": n => { apiModel.updatedAt = n.getDateValue(); }, + "upload_complete": n => { apiModel.uploadComplete = n.getBooleanValue(); }, + "url": n => { apiModel.url = n.getStringValue(); }, + "usecases": n => { apiModel.usecases = n.getCollectionOfEnumValues(ApiModelUsecaseObject); }, + "uuid": n => { apiModel.uuid = n.getStringValue(); }, + "version": n => { apiModel.version = n.getObjectValue(createApiModelVersionFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiModel_metadata The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiModel_metadata(apiModel_metadata = {}) { + return {}; +} +/** + * The deserialization information for the current model + * @param ApiModelAPIKeyInfo The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiModelAPIKeyInfo(apiModelAPIKeyInfo = {}) { + return { + "created_at": n => { apiModelAPIKeyInfo.createdAt = n.getDateValue(); }, + "created_by": n => { apiModelAPIKeyInfo.createdBy = n.getStringValue(); }, + "deleted_at": n => { apiModelAPIKeyInfo.deletedAt = n.getDateValue(); }, + "name": n => { apiModelAPIKeyInfo.name = n.getStringValue(); }, + "secret_key": n => { apiModelAPIKeyInfo.secretKey = n.getStringValue(); }, + "uuid": n => { apiModelAPIKeyInfo.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiModelProviderKeyInfo The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiModelProviderKeyInfo(apiModelProviderKeyInfo = {}) { + return { + "api_key_uuid": n => { apiModelProviderKeyInfo.apiKeyUuid = n.getStringValue(); }, + "created_at": n => { apiModelProviderKeyInfo.createdAt = n.getDateValue(); }, + "created_by": n => { apiModelProviderKeyInfo.createdBy = n.getStringValue(); }, + "deleted_at": n => { apiModelProviderKeyInfo.deletedAt = n.getDateValue(); }, + "models": n => { apiModelProviderKeyInfo.models = n.getCollectionOfObjectValues(createApiModelFromDiscriminatorValue); }, + "name": n => { apiModelProviderKeyInfo.name = n.getStringValue(); }, + "provider": n => { apiModelProviderKeyInfo.provider = n.getEnumValue(ApiModelProviderObject) ?? ApiModelProviderObject.MODEL_PROVIDER_DIGITALOCEAN; }, + "updated_at": n => { apiModelProviderKeyInfo.updatedAt = n.getDateValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiModelPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiModelPublic(apiModelPublic = {}) { + return { + "agreement": n => { apiModelPublic.agreement = n.getObjectValue(createApiAgreementFromDiscriminatorValue); }, + "created_at": n => { apiModelPublic.createdAt = n.getDateValue(); }, + "id": n => { apiModelPublic.id = n.getStringValue(); }, + "is_foundational": n => { apiModelPublic.isFoundational = n.getBooleanValue(); }, + "kb_default_chunk_size": n => { apiModelPublic.kbDefaultChunkSize = n.getNumberValue(); }, + "kb_max_chunk_size": n => { apiModelPublic.kbMaxChunkSize = n.getNumberValue(); }, + "kb_min_chunk_size": n => { apiModelPublic.kbMinChunkSize = n.getNumberValue(); }, + "name": n => { apiModelPublic.name = n.getStringValue(); }, + "parent_uuid": n => { apiModelPublic.parentUuid = n.getStringValue(); }, + "updated_at": n => { apiModelPublic.updatedAt = n.getDateValue(); }, + "upload_complete": n => { apiModelPublic.uploadComplete = n.getBooleanValue(); }, + "url": n => { apiModelPublic.url = n.getStringValue(); }, + "uuid": n => { apiModelPublic.uuid = n.getStringValue(); }, + "version": n => { apiModelPublic.version = n.getObjectValue(createApiModelVersionFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiModelVersion The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiModelVersion(apiModelVersion = {}) { + return { + "major": n => { apiModelVersion.major = n.getNumberValue(); }, + "minor": n => { apiModelVersion.minor = n.getNumberValue(); }, + "patch": n => { apiModelVersion.patch = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiMoveAgentsToWorkspaceInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiMoveAgentsToWorkspaceInputPublic(apiMoveAgentsToWorkspaceInputPublic = {}) { + return { + "agent_uuids": n => { apiMoveAgentsToWorkspaceInputPublic.agentUuids = n.getCollectionOfPrimitiveValues(); }, + "workspace_uuid": n => { apiMoveAgentsToWorkspaceInputPublic.workspaceUuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiMoveAgentsToWorkspaceOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiMoveAgentsToWorkspaceOutput(apiMoveAgentsToWorkspaceOutput = {}) { + return { + "workspace": n => { apiMoveAgentsToWorkspaceOutput.workspace = n.getObjectValue(createApiWorkspaceFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiOpenAIAPIKeyInfo The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiOpenAIAPIKeyInfo(apiOpenAIAPIKeyInfo = {}) { + return { + "created_at": n => { apiOpenAIAPIKeyInfo.createdAt = n.getDateValue(); }, + "created_by": n => { apiOpenAIAPIKeyInfo.createdBy = n.getStringValue(); }, + "deleted_at": n => { apiOpenAIAPIKeyInfo.deletedAt = n.getDateValue(); }, + "models": n => { apiOpenAIAPIKeyInfo.models = n.getCollectionOfObjectValues(createApiModelFromDiscriminatorValue); }, + "name": n => { apiOpenAIAPIKeyInfo.name = n.getStringValue(); }, + "updated_at": n => { apiOpenAIAPIKeyInfo.updatedAt = n.getDateValue(); }, + "uuid": n => { apiOpenAIAPIKeyInfo.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiPages The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiPages(apiPages = {}) { + return { + "first": n => { apiPages.first = n.getStringValue(); }, + "last": n => { apiPages.last = n.getStringValue(); }, + "next": n => { apiPages.next = n.getStringValue(); }, + "previous": n => { apiPages.previous = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiPresignedUrlFile The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiPresignedUrlFile(apiPresignedUrlFile = {}) { + return { + "file_name": n => { apiPresignedUrlFile.fileName = n.getStringValue(); }, + "file_size": n => { apiPresignedUrlFile.fileSize = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiPrompt The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiPrompt(apiPrompt = {}) { + return { + "evaluation_trace_spans": n => { apiPrompt.evaluationTraceSpans = n.getCollectionOfObjectValues(createApiEvaluationTraceSpanFromDiscriminatorValue); }, + "ground_truth": n => { apiPrompt.groundTruth = n.getStringValue(); }, + "input": n => { apiPrompt.input = n.getStringValue(); }, + "input_tokens": n => { apiPrompt.inputTokens = n.getStringValue(); }, + "output": n => { apiPrompt.output = n.getStringValue(); }, + "output_tokens": n => { apiPrompt.outputTokens = n.getStringValue(); }, + "prompt_chunks": n => { apiPrompt.promptChunks = n.getCollectionOfObjectValues(createApiPromptChunkFromDiscriminatorValue); }, + "prompt_id": n => { apiPrompt.promptId = n.getNumberValue(); }, + "prompt_level_metric_results": n => { apiPrompt.promptLevelMetricResults = n.getCollectionOfObjectValues(createApiEvaluationMetricResultFromDiscriminatorValue); }, + "trace_id": n => { apiPrompt.traceId = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiPromptChunk The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiPromptChunk(apiPromptChunk = {}) { + return { + "chunk_usage_pct": n => { apiPromptChunk.chunkUsagePct = n.getNumberValue(); }, + "chunk_used": n => { apiPromptChunk.chunkUsed = n.getBooleanValue(); }, + "index_uuid": n => { apiPromptChunk.indexUuid = n.getStringValue(); }, + "source_name": n => { apiPromptChunk.sourceName = n.getStringValue(); }, + "text": n => { apiPromptChunk.text = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiRegenerateAgentAPIKeyOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiRegenerateAgentAPIKeyOutput(apiRegenerateAgentAPIKeyOutput = {}) { + return { + "api_key_info": n => { apiRegenerateAgentAPIKeyOutput.apiKeyInfo = n.getObjectValue(createApiAgentAPIKeyInfoFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiRegenerateModelAPIKeyOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiRegenerateModelAPIKeyOutput(apiRegenerateModelAPIKeyOutput = {}) { + return { + "api_key_info": n => { apiRegenerateModelAPIKeyOutput.apiKeyInfo = n.getObjectValue(createApiModelAPIKeyInfoFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiResourceUsage The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiResourceUsage(apiResourceUsage = {}) { + return { + "measurements": n => { apiResourceUsage.measurements = n.getCollectionOfObjectValues(createApiUsageMeasurementFromDiscriminatorValue); }, + "resource_uuid": n => { apiResourceUsage.resourceUuid = n.getStringValue(); }, + "start": n => { apiResourceUsage.start = n.getDateValue(); }, + "stop": n => { apiResourceUsage.stop = n.getDateValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiRollbackToAgentVersionInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiRollbackToAgentVersionInputPublic(apiRollbackToAgentVersionInputPublic = {}) { + return { + "uuid": n => { apiRollbackToAgentVersionInputPublic.uuid = n.getStringValue(); }, + "version_hash": n => { apiRollbackToAgentVersionInputPublic.versionHash = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiRollbackToAgentVersionOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiRollbackToAgentVersionOutput(apiRollbackToAgentVersionOutput = {}) { + return { + "audit_header": n => { apiRollbackToAgentVersionOutput.auditHeader = n.getObjectValue(createApiAuditHeaderFromDiscriminatorValue); }, + "version_hash": n => { apiRollbackToAgentVersionOutput.versionHash = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiRunEvaluationTestCaseInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiRunEvaluationTestCaseInputPublic(apiRunEvaluationTestCaseInputPublic = {}) { + return { + "agent_deployment_names": n => { apiRunEvaluationTestCaseInputPublic.agentDeploymentNames = n.getCollectionOfPrimitiveValues(); }, + "agent_uuids": n => { apiRunEvaluationTestCaseInputPublic.agentUuids = n.getCollectionOfPrimitiveValues(); }, + "run_name": n => { apiRunEvaluationTestCaseInputPublic.runName = n.getStringValue(); }, + "test_case_uuid": n => { apiRunEvaluationTestCaseInputPublic.testCaseUuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiRunEvaluationTestCaseOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiRunEvaluationTestCaseOutput(apiRunEvaluationTestCaseOutput = {}) { + return { + "evaluation_run_uuids": n => { apiRunEvaluationTestCaseOutput.evaluationRunUuids = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiScheduledIndexingInfo The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiScheduledIndexingInfo(apiScheduledIndexingInfo = {}) { + return { + "created_at": n => { apiScheduledIndexingInfo.createdAt = n.getDateValue(); }, + "days": n => { apiScheduledIndexingInfo.days = n.getCollectionOfPrimitiveValues(); }, + "deleted_at": n => { apiScheduledIndexingInfo.deletedAt = n.getDateValue(); }, + "is_active": n => { apiScheduledIndexingInfo.isActive = n.getBooleanValue(); }, + "knowledge_base_uuid": n => { apiScheduledIndexingInfo.knowledgeBaseUuid = n.getStringValue(); }, + "last_ran_at": n => { apiScheduledIndexingInfo.lastRanAt = n.getDateValue(); }, + "next_run_at": n => { apiScheduledIndexingInfo.nextRunAt = n.getDateValue(); }, + "time": n => { apiScheduledIndexingInfo.time = n.getStringValue(); }, + "updated_at": n => { apiScheduledIndexingInfo.updatedAt = n.getDateValue(); }, + "uuid": n => { apiScheduledIndexingInfo.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiSpacesDataSource The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiSpacesDataSource(apiSpacesDataSource = {}) { + return { + "bucket_name": n => { apiSpacesDataSource.bucketName = n.getStringValue(); }, + "item_path": n => { apiSpacesDataSource.itemPath = n.getStringValue(); }, + "region": n => { apiSpacesDataSource.region = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiStarMetric The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiStarMetric(apiStarMetric = {}) { + return { + "metric_uuid": n => { apiStarMetric.metricUuid = n.getStringValue(); }, + "name": n => { apiStarMetric.name = n.getStringValue(); }, + "success_threshold": n => { apiStarMetric.successThreshold = n.getNumberValue(); }, + "success_threshold_pct": n => { apiStarMetric.successThresholdPct = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiStartKnowledgeBaseIndexingJobInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiStartKnowledgeBaseIndexingJobInputPublic(apiStartKnowledgeBaseIndexingJobInputPublic = {}) { + return { + "data_source_uuids": n => { apiStartKnowledgeBaseIndexingJobInputPublic.dataSourceUuids = n.getCollectionOfPrimitiveValues(); }, + "knowledge_base_uuid": n => { apiStartKnowledgeBaseIndexingJobInputPublic.knowledgeBaseUuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiStartKnowledgeBaseIndexingJobOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiStartKnowledgeBaseIndexingJobOutput(apiStartKnowledgeBaseIndexingJobOutput = {}) { + return { + "job": n => { apiStartKnowledgeBaseIndexingJobOutput.job = n.getObjectValue(createApiIndexingJobFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUnlinkAgentFunctionOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUnlinkAgentFunctionOutput(apiUnlinkAgentFunctionOutput = {}) { + return { + "agent": n => { apiUnlinkAgentFunctionOutput.agent = n.getObjectValue(createApiAgentFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUnlinkAgentGuardrailOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUnlinkAgentGuardrailOutput(apiUnlinkAgentGuardrailOutput = {}) { + return { + "agent": n => { apiUnlinkAgentGuardrailOutput.agent = n.getObjectValue(createApiAgentFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUnlinkAgentOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUnlinkAgentOutput(apiUnlinkAgentOutput = {}) { + return { + "child_agent_uuid": n => { apiUnlinkAgentOutput.childAgentUuid = n.getStringValue(); }, + "parent_agent_uuid": n => { apiUnlinkAgentOutput.parentAgentUuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUnlinkKnowledgeBaseOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUnlinkKnowledgeBaseOutput(apiUnlinkKnowledgeBaseOutput = {}) { + return { + "agent": n => { apiUnlinkKnowledgeBaseOutput.agent = n.getObjectValue(createApiAgentFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateAgentAPIKeyInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateAgentAPIKeyInputPublic(apiUpdateAgentAPIKeyInputPublic = {}) { + return { + "agent_uuid": n => { apiUpdateAgentAPIKeyInputPublic.agentUuid = n.getStringValue(); }, + "api_key_uuid": n => { apiUpdateAgentAPIKeyInputPublic.apiKeyUuid = n.getStringValue(); }, + "name": n => { apiUpdateAgentAPIKeyInputPublic.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateAgentAPIKeyOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateAgentAPIKeyOutput(apiUpdateAgentAPIKeyOutput = {}) { + return { + "api_key_info": n => { apiUpdateAgentAPIKeyOutput.apiKeyInfo = n.getObjectValue(createApiAgentAPIKeyInfoFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateAgentDeploymentVisbilityOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateAgentDeploymentVisbilityOutput(apiUpdateAgentDeploymentVisbilityOutput = {}) { + return { + "agent": n => { apiUpdateAgentDeploymentVisbilityOutput.agent = n.getObjectValue(createApiAgentFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateAgentDeploymentVisibilityInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateAgentDeploymentVisibilityInputPublic(apiUpdateAgentDeploymentVisibilityInputPublic = {}) { + return { + "uuid": n => { apiUpdateAgentDeploymentVisibilityInputPublic.uuid = n.getStringValue(); }, + "visibility": n => { apiUpdateAgentDeploymentVisibilityInputPublic.visibility = n.getEnumValue(ApiDeploymentVisibilityObject) ?? ApiDeploymentVisibilityObject.VISIBILITY_UNKNOWN; }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateAgentFunctionInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateAgentFunctionInputPublic(apiUpdateAgentFunctionInputPublic = {}) { + return { + "agent_uuid": n => { apiUpdateAgentFunctionInputPublic.agentUuid = n.getStringValue(); }, + "description": n => { apiUpdateAgentFunctionInputPublic.description = n.getStringValue(); }, + "faas_name": n => { apiUpdateAgentFunctionInputPublic.faasName = n.getStringValue(); }, + "faas_namespace": n => { apiUpdateAgentFunctionInputPublic.faasNamespace = n.getStringValue(); }, + "function_name": n => { apiUpdateAgentFunctionInputPublic.functionName = n.getStringValue(); }, + "function_uuid": n => { apiUpdateAgentFunctionInputPublic.functionUuid = n.getStringValue(); }, + "input_schema": n => { apiUpdateAgentFunctionInputPublic.inputSchema = n.getObjectValue(createApiUpdateAgentFunctionInputPublic_input_schemaFromDiscriminatorValue); }, + "output_schema": n => { apiUpdateAgentFunctionInputPublic.outputSchema = n.getObjectValue(createApiUpdateAgentFunctionInputPublic_output_schemaFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateAgentFunctionInputPublic_input_schema The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateAgentFunctionInputPublic_input_schema(apiUpdateAgentFunctionInputPublic_input_schema = {}) { + return {}; +} +/** + * The deserialization information for the current model + * @param ApiUpdateAgentFunctionInputPublic_output_schema The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateAgentFunctionInputPublic_output_schema(apiUpdateAgentFunctionInputPublic_output_schema = {}) { + return {}; +} +/** + * The deserialization information for the current model + * @param ApiUpdateAgentFunctionOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateAgentFunctionOutput(apiUpdateAgentFunctionOutput = {}) { + return { + "agent": n => { apiUpdateAgentFunctionOutput.agent = n.getObjectValue(createApiAgentFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateAgentInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateAgentInputPublic(apiUpdateAgentInputPublic = {}) { + return { + "agent_log_insights_enabled": n => { apiUpdateAgentInputPublic.agentLogInsightsEnabled = n.getBooleanValue(); }, + "allowed_domains": n => { apiUpdateAgentInputPublic.allowedDomains = n.getCollectionOfPrimitiveValues(); }, + "anthropic_key_uuid": n => { apiUpdateAgentInputPublic.anthropicKeyUuid = n.getStringValue(); }, + "conversation_logs_enabled": n => { apiUpdateAgentInputPublic.conversationLogsEnabled = n.getBooleanValue(); }, + "description": n => { apiUpdateAgentInputPublic.description = n.getStringValue(); }, + "instruction": n => { apiUpdateAgentInputPublic.instruction = n.getStringValue(); }, + "k": n => { apiUpdateAgentInputPublic.k = n.getNumberValue(); }, + "max_tokens": n => { apiUpdateAgentInputPublic.maxTokens = n.getNumberValue(); }, + "model_provider_key_uuid": n => { apiUpdateAgentInputPublic.modelProviderKeyUuid = n.getStringValue(); }, + "model_uuid": n => { apiUpdateAgentInputPublic.modelUuid = n.getStringValue(); }, + "name": n => { apiUpdateAgentInputPublic.name = n.getStringValue(); }, + "open_ai_key_uuid": n => { apiUpdateAgentInputPublic.openAiKeyUuid = n.getStringValue(); }, + "project_id": n => { apiUpdateAgentInputPublic.projectId = n.getStringValue(); }, + "provide_citations": n => { apiUpdateAgentInputPublic.provideCitations = n.getBooleanValue(); }, + "retrieval_method": n => { apiUpdateAgentInputPublic.retrievalMethod = n.getEnumValue(ApiRetrievalMethodObject) ?? ApiRetrievalMethodObject.RETRIEVAL_METHOD_UNKNOWN; }, + "tags": n => { apiUpdateAgentInputPublic.tags = n.getCollectionOfPrimitiveValues(); }, + "temperature": n => { apiUpdateAgentInputPublic.temperature = n.getNumberValue(); }, + "top_p": n => { apiUpdateAgentInputPublic.topP = n.getNumberValue(); }, + "uuid": n => { apiUpdateAgentInputPublic.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateAgentOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateAgentOutput(apiUpdateAgentOutput = {}) { + return { + "agent": n => { apiUpdateAgentOutput.agent = n.getObjectValue(createApiAgentFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateAnthropicAPIKeyInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateAnthropicAPIKeyInputPublic(apiUpdateAnthropicAPIKeyInputPublic = {}) { + return { + "api_key": n => { apiUpdateAnthropicAPIKeyInputPublic.apiKey = n.getStringValue(); }, + "api_key_uuid": n => { apiUpdateAnthropicAPIKeyInputPublic.apiKeyUuid = n.getStringValue(); }, + "name": n => { apiUpdateAnthropicAPIKeyInputPublic.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateAnthropicAPIKeyOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateAnthropicAPIKeyOutput(apiUpdateAnthropicAPIKeyOutput = {}) { + return { + "api_key_info": n => { apiUpdateAnthropicAPIKeyOutput.apiKeyInfo = n.getObjectValue(createApiAnthropicAPIKeyInfoFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateEvaluationTestCaseInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateEvaluationTestCaseInputPublic(apiUpdateEvaluationTestCaseInputPublic = {}) { + return { + "dataset_uuid": n => { apiUpdateEvaluationTestCaseInputPublic.datasetUuid = n.getStringValue(); }, + "description": n => { apiUpdateEvaluationTestCaseInputPublic.description = n.getStringValue(); }, + "metrics": n => { apiUpdateEvaluationTestCaseInputPublic.metrics = n.getObjectValue(createApiEvaluationTestCaseMetricListFromDiscriminatorValue); }, + "name": n => { apiUpdateEvaluationTestCaseInputPublic.name = n.getStringValue(); }, + "star_metric": n => { apiUpdateEvaluationTestCaseInputPublic.starMetric = n.getObjectValue(createApiStarMetricFromDiscriminatorValue); }, + "test_case_uuid": n => { apiUpdateEvaluationTestCaseInputPublic.testCaseUuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateEvaluationTestCaseOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateEvaluationTestCaseOutput(apiUpdateEvaluationTestCaseOutput = {}) { + return { + "test_case_uuid": n => { apiUpdateEvaluationTestCaseOutput.testCaseUuid = n.getStringValue(); }, + "version": n => { apiUpdateEvaluationTestCaseOutput.version = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateKnowledgeBaseDataSourceInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateKnowledgeBaseDataSourceInputPublic(apiUpdateKnowledgeBaseDataSourceInputPublic = {}) { + return { + "chunking_algorithm": n => { apiUpdateKnowledgeBaseDataSourceInputPublic.chunkingAlgorithm = n.getEnumValue(ApiChunkingAlgorithmObject) ?? ApiChunkingAlgorithmObject.CHUNKING_ALGORITHM_SECTION_BASED; }, + "chunking_options": n => { apiUpdateKnowledgeBaseDataSourceInputPublic.chunkingOptions = n.getObjectValue(createApiChunkingOptionsFromDiscriminatorValue); }, + "data_source_uuid": n => { apiUpdateKnowledgeBaseDataSourceInputPublic.dataSourceUuid = n.getStringValue(); }, + "knowledge_base_uuid": n => { apiUpdateKnowledgeBaseDataSourceInputPublic.knowledgeBaseUuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateKnowledgeBaseDataSourceOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateKnowledgeBaseDataSourceOutput(apiUpdateKnowledgeBaseDataSourceOutput = {}) { + return { + "knowledge_base_data_source": n => { apiUpdateKnowledgeBaseDataSourceOutput.knowledgeBaseDataSource = n.getObjectValue(createApiKnowledgeBaseDataSourceFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateKnowledgeBaseInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateKnowledgeBaseInputPublic(apiUpdateKnowledgeBaseInputPublic = {}) { + return { + "database_id": n => { apiUpdateKnowledgeBaseInputPublic.databaseId = n.getStringValue(); }, + "embedding_model_uuid": n => { apiUpdateKnowledgeBaseInputPublic.embeddingModelUuid = n.getStringValue(); }, + "name": n => { apiUpdateKnowledgeBaseInputPublic.name = n.getStringValue(); }, + "project_id": n => { apiUpdateKnowledgeBaseInputPublic.projectId = n.getStringValue(); }, + "tags": n => { apiUpdateKnowledgeBaseInputPublic.tags = n.getCollectionOfPrimitiveValues(); }, + "uuid": n => { apiUpdateKnowledgeBaseInputPublic.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateKnowledgeBaseOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateKnowledgeBaseOutput(apiUpdateKnowledgeBaseOutput = {}) { + return { + "knowledge_base": n => { apiUpdateKnowledgeBaseOutput.knowledgeBase = n.getObjectValue(createApiKnowledgeBaseFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateLinkedAgentInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateLinkedAgentInputPublic(apiUpdateLinkedAgentInputPublic = {}) { + return { + "child_agent_uuid": n => { apiUpdateLinkedAgentInputPublic.childAgentUuid = n.getStringValue(); }, + "if_case": n => { apiUpdateLinkedAgentInputPublic.ifCase = n.getStringValue(); }, + "parent_agent_uuid": n => { apiUpdateLinkedAgentInputPublic.parentAgentUuid = n.getStringValue(); }, + "route_name": n => { apiUpdateLinkedAgentInputPublic.routeName = n.getStringValue(); }, + "uuid": n => { apiUpdateLinkedAgentInputPublic.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateLinkedAgentOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateLinkedAgentOutput(apiUpdateLinkedAgentOutput = {}) { + return { + "child_agent_uuid": n => { apiUpdateLinkedAgentOutput.childAgentUuid = n.getStringValue(); }, + "parent_agent_uuid": n => { apiUpdateLinkedAgentOutput.parentAgentUuid = n.getStringValue(); }, + "rollback": n => { apiUpdateLinkedAgentOutput.rollback = n.getBooleanValue(); }, + "uuid": n => { apiUpdateLinkedAgentOutput.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateModelAPIKeyInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateModelAPIKeyInputPublic(apiUpdateModelAPIKeyInputPublic = {}) { + return { + "api_key_uuid": n => { apiUpdateModelAPIKeyInputPublic.apiKeyUuid = n.getStringValue(); }, + "name": n => { apiUpdateModelAPIKeyInputPublic.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateModelAPIKeyOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateModelAPIKeyOutput(apiUpdateModelAPIKeyOutput = {}) { + return { + "api_key_info": n => { apiUpdateModelAPIKeyOutput.apiKeyInfo = n.getObjectValue(createApiModelAPIKeyInfoFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateOpenAIAPIKeyInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateOpenAIAPIKeyInputPublic(apiUpdateOpenAIAPIKeyInputPublic = {}) { + return { + "api_key": n => { apiUpdateOpenAIAPIKeyInputPublic.apiKey = n.getStringValue(); }, + "api_key_uuid": n => { apiUpdateOpenAIAPIKeyInputPublic.apiKeyUuid = n.getStringValue(); }, + "name": n => { apiUpdateOpenAIAPIKeyInputPublic.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateOpenAIAPIKeyOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateOpenAIAPIKeyOutput(apiUpdateOpenAIAPIKeyOutput = {}) { + return { + "api_key_info": n => { apiUpdateOpenAIAPIKeyOutput.apiKeyInfo = n.getObjectValue(createApiOpenAIAPIKeyInfoFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateWorkspaceInputPublic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateWorkspaceInputPublic(apiUpdateWorkspaceInputPublic = {}) { + return { + "description": n => { apiUpdateWorkspaceInputPublic.description = n.getStringValue(); }, + "name": n => { apiUpdateWorkspaceInputPublic.name = n.getStringValue(); }, + "workspace_uuid": n => { apiUpdateWorkspaceInputPublic.workspaceUuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUpdateWorkspaceOutput The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUpdateWorkspaceOutput(apiUpdateWorkspaceOutput = {}) { + return { + "workspace": n => { apiUpdateWorkspaceOutput.workspace = n.getObjectValue(createApiWorkspaceFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiUsageMeasurement The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiUsageMeasurement(apiUsageMeasurement = {}) { + return { + "tokens": n => { apiUsageMeasurement.tokens = n.getNumberValue(); }, + "usage_type": n => { apiUsageMeasurement.usageType = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiWebCrawlerDataSource The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiWebCrawlerDataSource(apiWebCrawlerDataSource = {}) { + return { + "base_url": n => { apiWebCrawlerDataSource.baseUrl = n.getStringValue(); }, + "crawling_option": n => { apiWebCrawlerDataSource.crawlingOption = n.getEnumValue(ApiCrawlingOptionObject) ?? ApiCrawlingOptionObject.UNKNOWN; }, + "embed_media": n => { apiWebCrawlerDataSource.embedMedia = n.getBooleanValue(); }, + "exclude_tags": n => { apiWebCrawlerDataSource.excludeTags = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param ApiWorkspace The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApiWorkspace(apiWorkspace = {}) { + return { + "agents": n => { apiWorkspace.agents = n.getCollectionOfObjectValues(createApiAgentFromDiscriminatorValue); }, + "created_at": n => { apiWorkspace.createdAt = n.getDateValue(); }, + "created_by": n => { apiWorkspace.createdBy = n.getStringValue(); }, + "created_by_email": n => { apiWorkspace.createdByEmail = n.getStringValue(); }, + "deleted_at": n => { apiWorkspace.deletedAt = n.getDateValue(); }, + "description": n => { apiWorkspace.description = n.getStringValue(); }, + "evaluation_test_cases": n => { apiWorkspace.evaluationTestCases = n.getCollectionOfObjectValues(createApiEvaluationTestCaseFromDiscriminatorValue); }, + "name": n => { apiWorkspace.name = n.getStringValue(); }, + "updated_at": n => { apiWorkspace.updatedAt = n.getDateValue(); }, + "uuid": n => { apiWorkspace.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp(app = {}) { + return { + "active_deployment": n => { app.activeDeployment = n.getObjectValue(createApps_deploymentFromDiscriminatorValue); }, + "created_at": n => { app.createdAt = n.getDateValue(); }, + "dedicated_ips": n => { app.dedicatedIps = n.getCollectionOfObjectValues(createApps_dedicated_egress_ipFromDiscriminatorValue); }, + "default_ingress": n => { app.defaultIngress = n.getStringValue(); }, + "domains": n => { app.domains = n.getCollectionOfObjectValues(createApps_domainFromDiscriminatorValue); }, + "id": n => { app.id = n.getStringValue(); }, + "in_progress_deployment": n => { app.inProgressDeployment = n.getObjectValue(createApps_deploymentFromDiscriminatorValue); }, + "last_deployment_created_at": n => { app.lastDeploymentCreatedAt = n.getDateValue(); }, + "live_domain": n => { app.liveDomain = n.getStringValue(); }, + "live_url": n => { app.liveUrl = n.getStringValue(); }, + "live_url_base": n => { app.liveUrlBase = n.getStringValue(); }, + "owner_uuid": n => { app.ownerUuid = n.getStringValue(); }, + "pending_deployment": n => { app.pendingDeployment = n.getObjectValue(createApps_deploymentFromDiscriminatorValue); }, + "pinned_deployment": n => { app.pinnedDeployment = n.getObjectValue(createApps_deploymentFromDiscriminatorValue); }, + "project_id": n => { app.projectId = n.getStringValue(); }, + "region": n => { app.region = n.getObjectValue(createApps_regionFromDiscriminatorValue); }, + "spec": n => { app.spec = n.getObjectValue(createApp_specFromDiscriminatorValue); }, + "tier_slug": n => { app.tierSlug = n.getStringValue(); }, + "updated_at": n => { app.updatedAt = n.getDateValue(); }, + "vpc": n => { app.vpc = n.getObjectValue(createApps_vpcFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_alert The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_alert(app_alert = {}) { + return { + "component_name": n => { app_alert.componentName = n.getStringValue(); }, + "emails": n => { app_alert.emails = n.getCollectionOfPrimitiveValues(); }, + "id": n => { app_alert.id = n.getStringValue(); }, + "phase": n => { app_alert.phase = n.getEnumValue(App_alert_phaseObject) ?? App_alert_phaseObject.UNKNOWN; }, + "progress": n => { app_alert.progress = n.getObjectValue(createApp_alert_progressFromDiscriminatorValue); }, + "slack_webhooks": n => { app_alert.slackWebhooks = n.getCollectionOfObjectValues(createApp_alert_slack_webhookFromDiscriminatorValue); }, + "spec": n => { app_alert.spec = n.getObjectValue(createApp_alert_specFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_alert_progress The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_alert_progress(app_alert_progress = {}) { + return { + "steps": n => { app_alert_progress.steps = n.getCollectionOfObjectValues(createApp_alert_progress_stepFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_alert_progress_step The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_alert_progress_step(app_alert_progress_step = {}) { + return { + "ended_at": n => { app_alert_progress_step.endedAt = n.getDateValue(); }, + "name": n => { app_alert_progress_step.name = n.getStringValue(); }, + "reason": n => { app_alert_progress_step.reason = n.getObjectValue(createApp_alert_progress_step_reasonFromDiscriminatorValue); }, + "started_at": n => { app_alert_progress_step.startedAt = n.getDateValue(); }, + "status": n => { app_alert_progress_step.status = n.getEnumValue(App_alert_progress_step_statusObject) ?? App_alert_progress_step_statusObject.UNKNOWN; }, + }; +} +/** + * The deserialization information for the current model + * @param App_alert_progress_step_reason The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_alert_progress_step_reason(app_alert_progress_step_reason = {}) { + return { + "code": n => { app_alert_progress_step_reason.code = n.getStringValue(); }, + "message": n => { app_alert_progress_step_reason.message = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_alert_slack_webhook The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_alert_slack_webhook(app_alert_slack_webhook = {}) { + return { + "channel": n => { app_alert_slack_webhook.channel = n.getStringValue(); }, + "url": n => { app_alert_slack_webhook.url = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_alert_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_alert_spec(app_alert_spec = {}) { + return { + "disabled": n => { app_alert_spec.disabled = n.getBooleanValue(); }, + "operator": n => { app_alert_spec.operator = n.getEnumValue(App_alert_spec_operatorObject) ?? App_alert_spec_operatorObject.UNSPECIFIED_OPERATOR; }, + "rule": n => { app_alert_spec.rule = n.getEnumValue(App_alert_spec_ruleObject) ?? App_alert_spec_ruleObject.UNSPECIFIED_RULE; }, + "value": n => { app_alert_spec.value = n.getNumberValue(); }, + "window": n => { app_alert_spec.window = n.getEnumValue(App_alert_spec_windowObject) ?? App_alert_spec_windowObject.UNSPECIFIED_WINDOW; }, + }; +} +/** + * The deserialization information for the current model + * @param App_component_base The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_component_base(app_component_base = {}) { + return { + "bitbucket": n => { app_component_base.bitbucket = n.getObjectValue(createApps_bitbucket_source_specFromDiscriminatorValue); }, + "build_command": n => { app_component_base.buildCommand = n.getStringValue(); }, + "dockerfile_path": n => { app_component_base.dockerfilePath = n.getStringValue(); }, + "environment_slug": n => { app_component_base.environmentSlug = n.getStringValue(); }, + "envs": n => { app_component_base.envs = n.getCollectionOfObjectValues(createApp_variable_definitionFromDiscriminatorValue); }, + "git": n => { app_component_base.git = n.getObjectValue(createApps_git_source_specFromDiscriminatorValue); }, + "github": n => { app_component_base.github = n.getObjectValue(createApps_github_source_specFromDiscriminatorValue); }, + "gitlab": n => { app_component_base.gitlab = n.getObjectValue(createApps_gitlab_source_specFromDiscriminatorValue); }, + "image": n => { app_component_base.image = n.getObjectValue(createApps_image_source_specFromDiscriminatorValue); }, + "log_destinations": n => { app_component_base.logDestinations = n.getCollectionOfObjectValues(createApp_log_destination_definitionFromDiscriminatorValue); }, + "name": n => { app_component_base.name = n.getStringValue(); }, + "run_command": n => { app_component_base.runCommand = n.getStringValue(); }, + "source_dir": n => { app_component_base.sourceDir = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_component_health The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_component_health(app_component_health = {}) { + return { + "cpu_usage_percent": n => { app_component_health.cpuUsagePercent = n.getNumberValue(); }, + "memory_usage_percent": n => { app_component_health.memoryUsagePercent = n.getNumberValue(); }, + "name": n => { app_component_health.name = n.getStringValue(); }, + "replicas_desired": n => { app_component_health.replicasDesired = n.getNumberValue(); }, + "replicas_ready": n => { app_component_health.replicasReady = n.getNumberValue(); }, + "state": n => { app_component_health.state = n.getEnumValue(App_component_health_stateObject) ?? App_component_health_stateObject.UNKNOWN; }, + }; +} +/** + * The deserialization information for the current model + * @param App_database_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_database_spec(app_database_spec = {}) { + return { + "cluster_name": n => { app_database_spec.clusterName = n.getStringValue(); }, + "db_name": n => { app_database_spec.dbName = n.getStringValue(); }, + "db_user": n => { app_database_spec.dbUser = n.getStringValue(); }, + "engine": n => { app_database_spec.engine = n.getEnumValue(App_database_spec_engineObject) ?? App_database_spec_engineObject.UNSET; }, + "name": n => { app_database_spec.name = n.getStringValue(); }, + "production": n => { app_database_spec.production = n.getBooleanValue(); }, + "version": n => { app_database_spec.version = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_domain_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_domain_spec(app_domain_spec = {}) { + return { + "domain": n => { app_domain_spec.domain = n.getStringValue(); }, + "minimum_tls_version": n => { app_domain_spec.minimumTlsVersion = n.getEnumValue(App_domain_spec_minimum_tls_versionObject); }, + "type": n => { app_domain_spec.type = n.getEnumValue(App_domain_spec_typeObject) ?? App_domain_spec_typeObject.UNSPECIFIED; }, + "wildcard": n => { app_domain_spec.wildcard = n.getBooleanValue(); }, + "zone": n => { app_domain_spec.zone = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_domain_validation The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_domain_validation(app_domain_validation = {}) { + return { + "txt_name": n => { app_domain_validation.txtName = n.getStringValue(); }, + "txt_value": n => { app_domain_validation.txtValue = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_egress_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_egress_spec(app_egress_spec = {}) { + return { + "type": n => { app_egress_spec.type = n.getEnumValue(App_egress_type_specObject) ?? App_egress_type_specObject.AUTOASSIGN; }, + }; +} +/** + * The deserialization information for the current model + * @param App_functions_component_health The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_functions_component_health(app_functions_component_health = {}) { + return { + "functions_component_health_metrics": n => { app_functions_component_health.functionsComponentHealthMetrics = n.getCollectionOfObjectValues(createApp_functions_component_health_functions_component_health_metricsFromDiscriminatorValue); }, + "name": n => { app_functions_component_health.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_functions_component_health_functions_component_health_metrics The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_functions_component_health_functions_component_health_metrics(app_functions_component_health_functions_component_health_metrics = {}) { + return { + "metric_label": n => { app_functions_component_health_functions_component_health_metrics.metricLabel = n.getStringValue(); }, + "metric_value": n => { app_functions_component_health_functions_component_health_metrics.metricValue = n.getNumberValue(); }, + "time_window": n => { app_functions_component_health_functions_component_health_metrics.timeWindow = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_functions_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_functions_spec(app_functions_spec = {}) { + return { + "alerts": n => { app_functions_spec.alerts = n.getCollectionOfObjectValues(createApp_alert_specFromDiscriminatorValue); }, + "bitbucket": n => { app_functions_spec.bitbucket = n.getObjectValue(createApps_bitbucket_source_specFromDiscriminatorValue); }, + "cors": n => { app_functions_spec.cors = n.getObjectValue(createApps_cors_policyFromDiscriminatorValue); }, + "envs": n => { app_functions_spec.envs = n.getCollectionOfObjectValues(createApp_variable_definitionFromDiscriminatorValue); }, + "git": n => { app_functions_spec.git = n.getObjectValue(createApps_git_source_specFromDiscriminatorValue); }, + "github": n => { app_functions_spec.github = n.getObjectValue(createApps_github_source_specFromDiscriminatorValue); }, + "gitlab": n => { app_functions_spec.gitlab = n.getObjectValue(createApps_gitlab_source_specFromDiscriminatorValue); }, + "log_destinations": n => { app_functions_spec.logDestinations = n.getCollectionOfObjectValues(createApp_log_destination_definitionFromDiscriminatorValue); }, + "name": n => { app_functions_spec.name = n.getStringValue(); }, + "routes": n => { app_functions_spec.routes = n.getCollectionOfObjectValues(createApp_route_specFromDiscriminatorValue); }, + "source_dir": n => { app_functions_spec.sourceDir = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_health The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_health(app_health = {}) { + return { + "components": n => { app_health.components = n.getCollectionOfObjectValues(createApp_component_healthFromDiscriminatorValue); }, + "functions_components": n => { app_health.functionsComponents = n.getCollectionOfObjectValues(createApp_functions_component_healthFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_health_check_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_health_check_spec(app_health_check_spec = {}) { + return { + "failure_threshold": n => { app_health_check_spec.failureThreshold = n.getNumberValue(); }, + "http_path": n => { app_health_check_spec.httpPath = n.getStringValue(); }, + "initial_delay_seconds": n => { app_health_check_spec.initialDelaySeconds = n.getNumberValue(); }, + "period_seconds": n => { app_health_check_spec.periodSeconds = n.getNumberValue(); }, + "port": n => { app_health_check_spec.port = n.getNumberValue(); }, + "success_threshold": n => { app_health_check_spec.successThreshold = n.getNumberValue(); }, + "timeout_seconds": n => { app_health_check_spec.timeoutSeconds = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_health_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_health_response(app_health_response = {}) { + return { + "app_health": n => { app_health_response.appHealth = n.getObjectValue(createApp_healthFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_ingress_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_ingress_spec(app_ingress_spec = {}) { + return { + "rules": n => { app_ingress_spec.rules = n.getCollectionOfObjectValues(createApp_ingress_spec_ruleFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_ingress_spec_rule The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_ingress_spec_rule(app_ingress_spec_rule = {}) { + return { + "component": n => { app_ingress_spec_rule.component = n.getObjectValue(createApp_ingress_spec_rule_routing_componentFromDiscriminatorValue); }, + "cors": n => { app_ingress_spec_rule.cors = n.getObjectValue(createApps_cors_policyFromDiscriminatorValue); }, + "match": n => { app_ingress_spec_rule.match = n.getObjectValue(createApp_ingress_spec_rule_matchFromDiscriminatorValue); }, + "redirect": n => { app_ingress_spec_rule.redirect = n.getObjectValue(createApp_ingress_spec_rule_routing_redirectFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_ingress_spec_rule_match The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_ingress_spec_rule_match(app_ingress_spec_rule_match = {}) { + return { + "authority": n => { app_ingress_spec_rule_match.authority = n.getObjectValue(createApp_ingress_spec_rule_string_match_exactFromDiscriminatorValue); }, + "path": n => { app_ingress_spec_rule_match.path = n.getObjectValue(createApp_ingress_spec_rule_string_match_prefixFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_ingress_spec_rule_routing_component The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_ingress_spec_rule_routing_component(app_ingress_spec_rule_routing_component = {}) { + return { + "name": n => { app_ingress_spec_rule_routing_component.name = n.getStringValue(); }, + "preserve_path_prefix": n => { app_ingress_spec_rule_routing_component.preservePathPrefix = n.getStringValue(); }, + "rewrite": n => { app_ingress_spec_rule_routing_component.rewrite = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_ingress_spec_rule_routing_redirect The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_ingress_spec_rule_routing_redirect(app_ingress_spec_rule_routing_redirect = {}) { + return { + "authority": n => { app_ingress_spec_rule_routing_redirect.authority = n.getStringValue(); }, + "port": n => { app_ingress_spec_rule_routing_redirect.port = n.getNumberValue(); }, + "redirect_code": n => { app_ingress_spec_rule_routing_redirect.redirectCode = n.getNumberValue(); }, + "scheme": n => { app_ingress_spec_rule_routing_redirect.scheme = n.getStringValue(); }, + "uri": n => { app_ingress_spec_rule_routing_redirect.uri = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_ingress_spec_rule_string_match_exact The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_ingress_spec_rule_string_match_exact(app_ingress_spec_rule_string_match_exact = {}) { + return { + "exact": n => { app_ingress_spec_rule_string_match_exact.exact = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_ingress_spec_rule_string_match_prefix The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_ingress_spec_rule_string_match_prefix(app_ingress_spec_rule_string_match_prefix = {}) { + return { + "prefix": n => { app_ingress_spec_rule_string_match_prefix.prefix = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_instance The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_instance(app_instance = {}) { + return { + "component_name": n => { app_instance.componentName = n.getStringValue(); }, + "component_type": n => { app_instance.componentType = n.getEnumValue(App_instance_component_typeObject); }, + "instance_alias": n => { app_instance.instanceAlias = n.getStringValue(); }, + "instance_name": n => { app_instance.instanceName = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_instances The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_instances(app_instances = {}) { + return { + "instances": n => { app_instances.instances = n.getCollectionOfObjectValues(createApp_instanceFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_job_invocation The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_job_invocation(app_job_invocation = {}) { + return { + "completed_at": n => { app_job_invocation.completedAt = n.getDateValue(); }, + "created_at": n => { app_job_invocation.createdAt = n.getDateValue(); }, + "deployment_id": n => { app_job_invocation.deploymentId = n.getStringValue(); }, + "id": n => { app_job_invocation.id = n.getStringValue(); }, + "job_name": n => { app_job_invocation.jobName = n.getStringValue(); }, + "phase": n => { app_job_invocation.phase = n.getEnumValue(App_job_invocation_phaseObject); }, + "started_at": n => { app_job_invocation.startedAt = n.getDateValue(); }, + "trigger": n => { app_job_invocation.trigger = n.getObjectValue(createApp_job_invocation_triggerFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_job_invocation_trigger The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_job_invocation_trigger(app_job_invocation_trigger = {}) { + return { + "manual": n => { app_job_invocation_trigger.manual = n.getObjectValue(createApp_job_invocation_trigger_manualFromDiscriminatorValue); }, + "scheduled": n => { app_job_invocation_trigger.scheduled = n.getObjectValue(createApp_job_invocation_trigger_scheduledFromDiscriminatorValue); }, + "type": n => { app_job_invocation_trigger.type = n.getEnumValue(App_job_invocation_trigger_typeObject) ?? App_job_invocation_trigger_typeObject.UNKNOWN; }, + }; +} +/** + * The deserialization information for the current model + * @param App_job_invocation_trigger_manual The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_job_invocation_trigger_manual(app_job_invocation_trigger_manual = {}) { + return { + "user": n => { app_job_invocation_trigger_manual.user = n.getObjectValue(createApp_job_invocation_trigger_manual_userFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_job_invocation_trigger_manual_user The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_job_invocation_trigger_manual_user(app_job_invocation_trigger_manual_user = {}) { + return { + "email": n => { app_job_invocation_trigger_manual_user.email = n.getStringValue(); }, + "full_name": n => { app_job_invocation_trigger_manual_user.fullName = n.getStringValue(); }, + "uuid": n => { app_job_invocation_trigger_manual_user.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_job_invocation_trigger_scheduled The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_job_invocation_trigger_scheduled(app_job_invocation_trigger_scheduled = {}) { + return { + "schedule": n => { app_job_invocation_trigger_scheduled.schedule = n.getObjectValue(createApp_job_invocation_trigger_scheduled_scheduleFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_job_invocation_trigger_scheduled_schedule The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_job_invocation_trigger_scheduled_schedule(app_job_invocation_trigger_scheduled_schedule = {}) { + return { + "cron": n => { app_job_invocation_trigger_scheduled_schedule.cron = n.getStringValue(); }, + "time_zone": n => { app_job_invocation_trigger_scheduled_schedule.timeZone = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_job_invocations The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_job_invocations(app_job_invocations = {}) { + return { + ...deserializeIntoPagination(app_job_invocations), + "job_invocations": n => { app_job_invocations.jobInvocations = n.getCollectionOfObjectValues(createApp_job_invocationFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_job_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_job_spec(app_job_spec = {}) { + return { + "autoscaling": n => { app_job_spec.autoscaling = n.getObjectValue(createApp_job_spec_autoscalingFromDiscriminatorValue); }, + "bitbucket": n => { app_job_spec.bitbucket = n.getObjectValue(createApps_bitbucket_source_specFromDiscriminatorValue); }, + "build_command": n => { app_job_spec.buildCommand = n.getStringValue(); }, + "dockerfile_path": n => { app_job_spec.dockerfilePath = n.getStringValue(); }, + "environment_slug": n => { app_job_spec.environmentSlug = n.getStringValue(); }, + "envs": n => { app_job_spec.envs = n.getCollectionOfObjectValues(createApp_variable_definitionFromDiscriminatorValue); }, + "git": n => { app_job_spec.git = n.getObjectValue(createApps_git_source_specFromDiscriminatorValue); }, + "github": n => { app_job_spec.github = n.getObjectValue(createApps_github_source_specFromDiscriminatorValue); }, + "gitlab": n => { app_job_spec.gitlab = n.getObjectValue(createApps_gitlab_source_specFromDiscriminatorValue); }, + "image": n => { app_job_spec.image = n.getObjectValue(createApps_image_source_specFromDiscriminatorValue); }, + "instance_count": n => { app_job_spec.instanceCount = n.getNumberValue(); }, + "instance_size_slug": n => { app_job_spec.instanceSizeSlug = n.getStringValue(); }, + "kind": n => { app_job_spec.kind = n.getEnumValue(App_job_spec_kindObject) ?? App_job_spec_kindObject.UNSPECIFIED; }, + "log_destinations": n => { app_job_spec.logDestinations = n.getCollectionOfObjectValues(createApp_log_destination_definitionFromDiscriminatorValue); }, + "name": n => { app_job_spec.name = n.getStringValue(); }, + "run_command": n => { app_job_spec.runCommand = n.getStringValue(); }, + "source_dir": n => { app_job_spec.sourceDir = n.getStringValue(); }, + "termination": n => { app_job_spec.termination = n.getObjectValue(createApp_job_spec_terminationFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_job_spec_autoscaling The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_job_spec_autoscaling(app_job_spec_autoscaling = {}) { + return { + "max_instance_count": n => { app_job_spec_autoscaling.maxInstanceCount = n.getNumberValue(); }, + "metrics": n => { app_job_spec_autoscaling.metrics = n.getObjectValue(createApp_job_spec_autoscaling_metricsFromDiscriminatorValue); }, + "min_instance_count": n => { app_job_spec_autoscaling.minInstanceCount = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_job_spec_autoscaling_metrics The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_job_spec_autoscaling_metrics(app_job_spec_autoscaling_metrics = {}) { + return { + "cpu": n => { app_job_spec_autoscaling_metrics.cpu = n.getObjectValue(createApp_job_spec_autoscaling_metrics_cpuFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_job_spec_autoscaling_metrics_cpu The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_job_spec_autoscaling_metrics_cpu(app_job_spec_autoscaling_metrics_cpu = {}) { + return { + "percent": n => { app_job_spec_autoscaling_metrics_cpu.percent = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_job_spec_termination The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_job_spec_termination(app_job_spec_termination = {}) { + return { + "grace_period_seconds": n => { app_job_spec_termination.gracePeriodSeconds = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_log_destination_datadog_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_log_destination_datadog_spec(app_log_destination_datadog_spec = {}) { + return { + "api_key": n => { app_log_destination_datadog_spec.apiKey = n.getStringValue(); }, + "endpoint": n => { app_log_destination_datadog_spec.endpoint = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_log_destination_definition The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_log_destination_definition(app_log_destination_definition = {}) { + return { + "datadog": n => { app_log_destination_definition.datadog = n.getObjectValue(createApp_log_destination_datadog_specFromDiscriminatorValue); }, + "logtail": n => { app_log_destination_definition.logtail = n.getObjectValue(createApp_log_destination_logtail_specFromDiscriminatorValue); }, + "name": n => { app_log_destination_definition.name = n.getStringValue(); }, + "open_search": n => { app_log_destination_definition.openSearch = n.getObjectValue(createApp_log_destination_open_search_specFromDiscriminatorValue); }, + "papertrail": n => { app_log_destination_definition.papertrail = n.getObjectValue(createApp_log_destination_papertrail_specFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_log_destination_logtail_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_log_destination_logtail_spec(app_log_destination_logtail_spec = {}) { + return { + "token": n => { app_log_destination_logtail_spec.token = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_log_destination_open_search_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_log_destination_open_search_spec(app_log_destination_open_search_spec = {}) { + return { + "basic_auth": n => { app_log_destination_open_search_spec.basicAuth = n.getObjectValue(createApp_log_destination_open_search_spec_basic_authFromDiscriminatorValue); }, + "cluster_name": n => { app_log_destination_open_search_spec.clusterName = n.getStringValue(); }, + "endpoint": n => { app_log_destination_open_search_spec.endpoint = n.getStringValue(); }, + "index_name": n => { app_log_destination_open_search_spec.indexName = n.getStringValue() ?? "logs"; }, + }; +} +/** + * The deserialization information for the current model + * @param App_log_destination_open_search_spec_basic_auth The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_log_destination_open_search_spec_basic_auth(app_log_destination_open_search_spec_basic_auth = {}) { + return { + "password": n => { app_log_destination_open_search_spec_basic_auth.password = n.getStringValue(); }, + "user": n => { app_log_destination_open_search_spec_basic_auth.user = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_log_destination_papertrail_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_log_destination_papertrail_spec(app_log_destination_papertrail_spec = {}) { + return { + "endpoint": n => { app_log_destination_papertrail_spec.endpoint = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_maintenance_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_maintenance_spec(app_maintenance_spec = {}) { + return { + "archive": n => { app_maintenance_spec.archive = n.getBooleanValue(); }, + "enabled": n => { app_maintenance_spec.enabled = n.getBooleanValue(); }, + "offline_page_url": n => { app_maintenance_spec.offlinePageUrl = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_metrics_bandwidth_usage The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_metrics_bandwidth_usage(app_metrics_bandwidth_usage = {}) { + return { + "app_bandwidth_usage": n => { app_metrics_bandwidth_usage.appBandwidthUsage = n.getCollectionOfObjectValues(createApp_metrics_bandwidth_usage_detailsFromDiscriminatorValue); }, + "date": n => { app_metrics_bandwidth_usage.date = n.getDateValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_metrics_bandwidth_usage_details The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_metrics_bandwidth_usage_details(app_metrics_bandwidth_usage_details = {}) { + return { + "app_id": n => { app_metrics_bandwidth_usage_details.appId = n.getStringValue(); }, + "bandwidth_bytes": n => { app_metrics_bandwidth_usage_details.bandwidthBytes = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_metrics_bandwidth_usage_request The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_metrics_bandwidth_usage_request(app_metrics_bandwidth_usage_request = {}) { + return { + "app_ids": n => { app_metrics_bandwidth_usage_request.appIds = n.getCollectionOfPrimitiveValues(); }, + "date": n => { app_metrics_bandwidth_usage_request.date = n.getDateValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_propose The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_propose(app_propose = {}) { + return { + "app_id": n => { app_propose.appId = n.getStringValue(); }, + "spec": n => { app_propose.spec = n.getObjectValue(createApp_specFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_propose_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_propose_response(app_propose_response = {}) { + return { + "app_cost": n => { app_propose_response.appCost = n.getNumberValue(); }, + "app_is_static": n => { app_propose_response.appIsStatic = n.getBooleanValue(); }, + "app_name_available": n => { app_propose_response.appNameAvailable = n.getBooleanValue(); }, + "app_name_suggestion": n => { app_propose_response.appNameSuggestion = n.getStringValue(); }, + "app_tier_downgrade_cost": n => { app_propose_response.appTierDowngradeCost = n.getNumberValue(); }, + "existing_static_apps": n => { app_propose_response.existingStaticApps = n.getStringValue(); }, + "spec": n => { app_propose_response.spec = n.getObjectValue(createApp_specFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_response(app_response = {}) { + return { + "app": n => { app_response.app = n.getObjectValue(createAppFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_rollback_validation_condition The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_rollback_validation_condition(app_rollback_validation_condition = {}) { + return { + "code": n => { app_rollback_validation_condition.code = n.getEnumValue(App_rollback_validation_condition_codeObject); }, + "components": n => { app_rollback_validation_condition.components = n.getCollectionOfPrimitiveValues(); }, + "message": n => { app_rollback_validation_condition.message = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_route_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_route_spec(app_route_spec = {}) { + return { + "path": n => { app_route_spec.path = n.getStringValue(); }, + "preserve_path_prefix": n => { app_route_spec.preservePathPrefix = n.getBooleanValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_service_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_service_spec(app_service_spec = {}) { + return { + "autoscaling": n => { app_service_spec.autoscaling = n.getObjectValue(createApp_service_spec_autoscalingFromDiscriminatorValue); }, + "bitbucket": n => { app_service_spec.bitbucket = n.getObjectValue(createApps_bitbucket_source_specFromDiscriminatorValue); }, + "build_command": n => { app_service_spec.buildCommand = n.getStringValue(); }, + "cors": n => { app_service_spec.cors = n.getObjectValue(createApps_cors_policyFromDiscriminatorValue); }, + "dockerfile_path": n => { app_service_spec.dockerfilePath = n.getStringValue(); }, + "environment_slug": n => { app_service_spec.environmentSlug = n.getStringValue(); }, + "envs": n => { app_service_spec.envs = n.getCollectionOfObjectValues(createApp_variable_definitionFromDiscriminatorValue); }, + "git": n => { app_service_spec.git = n.getObjectValue(createApps_git_source_specFromDiscriminatorValue); }, + "github": n => { app_service_spec.github = n.getObjectValue(createApps_github_source_specFromDiscriminatorValue); }, + "gitlab": n => { app_service_spec.gitlab = n.getObjectValue(createApps_gitlab_source_specFromDiscriminatorValue); }, + "health_check": n => { app_service_spec.healthCheck = n.getObjectValue(createApp_service_spec_health_checkFromDiscriminatorValue); }, + "http_port": n => { app_service_spec.httpPort = n.getNumberValue(); }, + "image": n => { app_service_spec.image = n.getObjectValue(createApps_image_source_specFromDiscriminatorValue); }, + "instance_count": n => { app_service_spec.instanceCount = n.getNumberValue(); }, + "instance_size_slug": n => { app_service_spec.instanceSizeSlug = n.getStringValue(); }, + "internal_ports": n => { app_service_spec.internalPorts = n.getCollectionOfPrimitiveValues(); }, + "liveness_health_check": n => { app_service_spec.livenessHealthCheck = n.getObjectValue(createApp_health_check_specFromDiscriminatorValue); }, + "log_destinations": n => { app_service_spec.logDestinations = n.getCollectionOfObjectValues(createApp_log_destination_definitionFromDiscriminatorValue); }, + "name": n => { app_service_spec.name = n.getStringValue(); }, + "protocol": n => { app_service_spec.protocol = n.getEnumValue(App_service_spec_protocolObject); }, + "routes": n => { app_service_spec.routes = n.getCollectionOfObjectValues(createApp_route_specFromDiscriminatorValue); }, + "run_command": n => { app_service_spec.runCommand = n.getStringValue(); }, + "source_dir": n => { app_service_spec.sourceDir = n.getStringValue(); }, + "termination": n => { app_service_spec.termination = n.getObjectValue(createApp_service_spec_terminationFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_service_spec_autoscaling The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_service_spec_autoscaling(app_service_spec_autoscaling = {}) { + return { + "max_instance_count": n => { app_service_spec_autoscaling.maxInstanceCount = n.getNumberValue(); }, + "metrics": n => { app_service_spec_autoscaling.metrics = n.getObjectValue(createApp_service_spec_autoscaling_metricsFromDiscriminatorValue); }, + "min_instance_count": n => { app_service_spec_autoscaling.minInstanceCount = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_service_spec_autoscaling_metrics The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_service_spec_autoscaling_metrics(app_service_spec_autoscaling_metrics = {}) { + return { + "cpu": n => { app_service_spec_autoscaling_metrics.cpu = n.getObjectValue(createApp_service_spec_autoscaling_metrics_cpuFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_service_spec_autoscaling_metrics_cpu The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_service_spec_autoscaling_metrics_cpu(app_service_spec_autoscaling_metrics_cpu = {}) { + return { + "percent": n => { app_service_spec_autoscaling_metrics_cpu.percent = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_service_spec_health_check The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_service_spec_health_check(app_service_spec_health_check = {}) { + return { + "failure_threshold": n => { app_service_spec_health_check.failureThreshold = n.getNumberValue(); }, + "http_path": n => { app_service_spec_health_check.httpPath = n.getStringValue(); }, + "initial_delay_seconds": n => { app_service_spec_health_check.initialDelaySeconds = n.getNumberValue(); }, + "period_seconds": n => { app_service_spec_health_check.periodSeconds = n.getNumberValue(); }, + "port": n => { app_service_spec_health_check.port = n.getNumberValue(); }, + "success_threshold": n => { app_service_spec_health_check.successThreshold = n.getNumberValue(); }, + "timeout_seconds": n => { app_service_spec_health_check.timeoutSeconds = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_service_spec_termination The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_service_spec_termination(app_service_spec_termination = {}) { + return { + "drain_seconds": n => { app_service_spec_termination.drainSeconds = n.getNumberValue(); }, + "grace_period_seconds": n => { app_service_spec_termination.gracePeriodSeconds = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_spec(app_spec = {}) { + return { + "databases": n => { app_spec.databases = n.getCollectionOfObjectValues(createApp_database_specFromDiscriminatorValue); }, + "disable_edge_cache": n => { app_spec.disableEdgeCache = n.getBooleanValue(); }, + "disable_email_obfuscation": n => { app_spec.disableEmailObfuscation = n.getBooleanValue(); }, + "domains": n => { app_spec.domains = n.getCollectionOfObjectValues(createApp_domain_specFromDiscriminatorValue); }, + "egress": n => { app_spec.egress = n.getObjectValue(createApp_egress_specFromDiscriminatorValue); }, + "enhanced_threat_control_enabled": n => { app_spec.enhancedThreatControlEnabled = n.getBooleanValue(); }, + "functions": n => { app_spec.functions = n.getCollectionOfObjectValues(createApp_functions_specFromDiscriminatorValue); }, + "ingress": n => { app_spec.ingress = n.getObjectValue(createApp_ingress_specFromDiscriminatorValue); }, + "jobs": n => { app_spec.jobs = n.getCollectionOfObjectValues(createApp_job_specFromDiscriminatorValue); }, + "maintenance": n => { app_spec.maintenance = n.getObjectValue(createApp_maintenance_specFromDiscriminatorValue); }, + "name": n => { app_spec.name = n.getStringValue(); }, + "region": n => { app_spec.region = n.getEnumValue(App_spec_regionObject); }, + "services": n => { app_spec.services = n.getCollectionOfObjectValues(createApp_service_specFromDiscriminatorValue); }, + "static_sites": n => { app_spec.staticSites = n.getCollectionOfObjectValues(createApp_static_site_specFromDiscriminatorValue); }, + "vpc": n => { app_spec.vpc = n.getObjectValue(createApps_vpcFromDiscriminatorValue); }, + "workers": n => { app_spec.workers = n.getCollectionOfObjectValues(createApp_worker_specFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_static_site_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_static_site_spec(app_static_site_spec = {}) { + return { + ...deserializeIntoApp_component_base(app_static_site_spec), + "catchall_document": n => { app_static_site_spec.catchallDocument = n.getStringValue(); }, + "cors": n => { app_static_site_spec.cors = n.getObjectValue(createApps_cors_policyFromDiscriminatorValue); }, + "error_document": n => { app_static_site_spec.errorDocument = n.getStringValue() ?? "404.html"; }, + "index_document": n => { app_static_site_spec.indexDocument = n.getStringValue() ?? "index.html"; }, + "output_dir": n => { app_static_site_spec.outputDir = n.getStringValue(); }, + "routes": n => { app_static_site_spec.routes = n.getCollectionOfObjectValues(createApp_route_specFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_variable_definition The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_variable_definition(app_variable_definition = {}) { + return { + "key": n => { app_variable_definition.key = n.getStringValue(); }, + "scope": n => { app_variable_definition.scope = n.getEnumValue(App_variable_definition_scopeObject) ?? App_variable_definition_scopeObject.RUN_AND_BUILD_TIME; }, + "type": n => { app_variable_definition.type = n.getEnumValue(App_variable_definition_typeObject) ?? App_variable_definition_typeObject.GENERAL; }, + "value": n => { app_variable_definition.value = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_worker_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_worker_spec(app_worker_spec = {}) { + return { + "autoscaling": n => { app_worker_spec.autoscaling = n.getObjectValue(createApp_worker_spec_autoscalingFromDiscriminatorValue); }, + "bitbucket": n => { app_worker_spec.bitbucket = n.getObjectValue(createApps_bitbucket_source_specFromDiscriminatorValue); }, + "build_command": n => { app_worker_spec.buildCommand = n.getStringValue(); }, + "dockerfile_path": n => { app_worker_spec.dockerfilePath = n.getStringValue(); }, + "environment_slug": n => { app_worker_spec.environmentSlug = n.getStringValue(); }, + "envs": n => { app_worker_spec.envs = n.getCollectionOfObjectValues(createApp_variable_definitionFromDiscriminatorValue); }, + "git": n => { app_worker_spec.git = n.getObjectValue(createApps_git_source_specFromDiscriminatorValue); }, + "github": n => { app_worker_spec.github = n.getObjectValue(createApps_github_source_specFromDiscriminatorValue); }, + "gitlab": n => { app_worker_spec.gitlab = n.getObjectValue(createApps_gitlab_source_specFromDiscriminatorValue); }, + "image": n => { app_worker_spec.image = n.getObjectValue(createApps_image_source_specFromDiscriminatorValue); }, + "instance_count": n => { app_worker_spec.instanceCount = n.getNumberValue(); }, + "instance_size_slug": n => { app_worker_spec.instanceSizeSlug = n.getStringValue(); }, + "liveness_health_check": n => { app_worker_spec.livenessHealthCheck = n.getObjectValue(createApp_health_check_specFromDiscriminatorValue); }, + "log_destinations": n => { app_worker_spec.logDestinations = n.getCollectionOfObjectValues(createApp_log_destination_definitionFromDiscriminatorValue); }, + "name": n => { app_worker_spec.name = n.getStringValue(); }, + "run_command": n => { app_worker_spec.runCommand = n.getStringValue(); }, + "source_dir": n => { app_worker_spec.sourceDir = n.getStringValue(); }, + "termination": n => { app_worker_spec.termination = n.getObjectValue(createApp_worker_spec_terminationFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_worker_spec_autoscaling The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_worker_spec_autoscaling(app_worker_spec_autoscaling = {}) { + return { + "max_instance_count": n => { app_worker_spec_autoscaling.maxInstanceCount = n.getNumberValue(); }, + "metrics": n => { app_worker_spec_autoscaling.metrics = n.getObjectValue(createApp_worker_spec_autoscaling_metricsFromDiscriminatorValue); }, + "min_instance_count": n => { app_worker_spec_autoscaling.minInstanceCount = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_worker_spec_autoscaling_metrics The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_worker_spec_autoscaling_metrics(app_worker_spec_autoscaling_metrics = {}) { + return { + "cpu": n => { app_worker_spec_autoscaling_metrics.cpu = n.getObjectValue(createApp_worker_spec_autoscaling_metrics_cpuFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param App_worker_spec_autoscaling_metrics_cpu The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_worker_spec_autoscaling_metrics_cpu(app_worker_spec_autoscaling_metrics_cpu = {}) { + return { + "percent": n => { app_worker_spec_autoscaling_metrics_cpu.percent = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param App_worker_spec_termination The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApp_worker_spec_termination(app_worker_spec_termination = {}) { + return { + "grace_period_seconds": n => { app_worker_spec_termination.gracePeriodSeconds = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_alert_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_alert_response(apps_alert_response = {}) { + return { + "alert": n => { apps_alert_response.alert = n.getObjectValue(createApp_alertFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_assign_app_alert_destinations_request The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_assign_app_alert_destinations_request(apps_assign_app_alert_destinations_request = {}) { + return { + "emails": n => { apps_assign_app_alert_destinations_request.emails = n.getCollectionOfPrimitiveValues(); }, + "slack_webhooks": n => { apps_assign_app_alert_destinations_request.slackWebhooks = n.getCollectionOfObjectValues(createApp_alert_slack_webhookFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_bitbucket_source_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_bitbucket_source_spec(apps_bitbucket_source_spec = {}) { + return { + "branch": n => { apps_bitbucket_source_spec.branch = n.getStringValue(); }, + "deploy_on_push": n => { apps_bitbucket_source_spec.deployOnPush = n.getBooleanValue(); }, + "repo": n => { apps_bitbucket_source_spec.repo = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_cors_policy The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_cors_policy(apps_cors_policy = {}) { + return { + "allow_credentials": n => { apps_cors_policy.allowCredentials = n.getBooleanValue(); }, + "allow_headers": n => { apps_cors_policy.allowHeaders = n.getCollectionOfPrimitiveValues(); }, + "allow_methods": n => { apps_cors_policy.allowMethods = n.getCollectionOfPrimitiveValues(); }, + "allow_origins": n => { apps_cors_policy.allowOrigins = n.getCollectionOfObjectValues(createApps_string_matchFromDiscriminatorValue); }, + "expose_headers": n => { apps_cors_policy.exposeHeaders = n.getCollectionOfPrimitiveValues(); }, + "max_age": n => { apps_cors_policy.maxAge = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_create_app_request The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_create_app_request(apps_create_app_request = {}) { + return { + "project_id": n => { apps_create_app_request.projectId = n.getStringValue(); }, + "spec": n => { apps_create_app_request.spec = n.getObjectValue(createApp_specFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_create_deployment_request The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_create_deployment_request(apps_create_deployment_request = {}) { + return { + "force_build": n => { apps_create_deployment_request.forceBuild = n.getBooleanValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_dedicated_egress_ip The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_dedicated_egress_ip(apps_dedicated_egress_ip = {}) { + return { + "id": n => { apps_dedicated_egress_ip.id = n.getStringValue(); }, + "ip": n => { apps_dedicated_egress_ip.ip = n.getStringValue(); }, + "status": n => { apps_dedicated_egress_ip.status = n.getEnumValue(Apps_dedicated_egress_ip_statusObject) ?? Apps_dedicated_egress_ip_statusObject.UNKNOWN; }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_delete_app_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_delete_app_response(apps_delete_app_response = {}) { + return { + "id": n => { apps_delete_app_response.id = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_deployment The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_deployment(apps_deployment = {}) { + return { + "cause": n => { apps_deployment.cause = n.getStringValue(); }, + "cloned_from": n => { apps_deployment.clonedFrom = n.getStringValue(); }, + "created_at": n => { apps_deployment.createdAt = n.getDateValue(); }, + "functions": n => { apps_deployment.functions = n.getCollectionOfObjectValues(createApps_deployment_functionsFromDiscriminatorValue); }, + "id": n => { apps_deployment.id = n.getStringValue(); }, + "jobs": n => { apps_deployment.jobs = n.getCollectionOfObjectValues(createApps_deployment_jobFromDiscriminatorValue); }, + "phase": n => { apps_deployment.phase = n.getEnumValue(Apps_deployment_phaseObject) ?? Apps_deployment_phaseObject.UNKNOWN; }, + "phase_last_updated_at": n => { apps_deployment.phaseLastUpdatedAt = n.getDateValue(); }, + "progress": n => { apps_deployment.progress = n.getObjectValue(createApps_deployment_progressFromDiscriminatorValue); }, + "services": n => { apps_deployment.services = n.getCollectionOfObjectValues(createApps_deployment_serviceFromDiscriminatorValue); }, + "spec": n => { apps_deployment.spec = n.getObjectValue(createApp_specFromDiscriminatorValue); }, + "static_sites": n => { apps_deployment.staticSites = n.getCollectionOfObjectValues(createApps_deployment_static_siteFromDiscriminatorValue); }, + "tier_slug": n => { apps_deployment.tierSlug = n.getStringValue(); }, + "updated_at": n => { apps_deployment.updatedAt = n.getDateValue(); }, + "workers": n => { apps_deployment.workers = n.getCollectionOfObjectValues(createApps_deployment_workerFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_deployment_functions The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_deployment_functions(apps_deployment_functions = {}) { + return { + "name": n => { apps_deployment_functions.name = n.getStringValue(); }, + "namespace": n => { apps_deployment_functions.namespace = n.getStringValue(); }, + "source_commit_hash": n => { apps_deployment_functions.sourceCommitHash = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_deployment_job The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_deployment_job(apps_deployment_job = {}) { + return { + "name": n => { apps_deployment_job.name = n.getStringValue(); }, + "source_commit_hash": n => { apps_deployment_job.sourceCommitHash = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_deployment_progress The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_deployment_progress(apps_deployment_progress = {}) { + return { + "error_steps": n => { apps_deployment_progress.errorSteps = n.getNumberValue(); }, + "pending_steps": n => { apps_deployment_progress.pendingSteps = n.getNumberValue(); }, + "running_steps": n => { apps_deployment_progress.runningSteps = n.getNumberValue(); }, + "steps": n => { apps_deployment_progress.steps = n.getCollectionOfObjectValues(createApps_deployment_progress_stepFromDiscriminatorValue); }, + "success_steps": n => { apps_deployment_progress.successSteps = n.getNumberValue(); }, + "summary_steps": n => { apps_deployment_progress.summarySteps = n.getCollectionOfObjectValues(createApps_deployment_progress_stepFromDiscriminatorValue); }, + "total_steps": n => { apps_deployment_progress.totalSteps = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_deployment_progress_step The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_deployment_progress_step(apps_deployment_progress_step = {}) { + return { + "component_name": n => { apps_deployment_progress_step.componentName = n.getStringValue(); }, + "ended_at": n => { apps_deployment_progress_step.endedAt = n.getDateValue(); }, + "message_base": n => { apps_deployment_progress_step.messageBase = n.getStringValue(); }, + "name": n => { apps_deployment_progress_step.name = n.getStringValue(); }, + "reason": n => { apps_deployment_progress_step.reason = n.getObjectValue(createApps_deployment_progress_step_reasonFromDiscriminatorValue); }, + "started_at": n => { apps_deployment_progress_step.startedAt = n.getDateValue(); }, + "status": n => { apps_deployment_progress_step.status = n.getEnumValue(Apps_deployment_progress_step_statusObject) ?? Apps_deployment_progress_step_statusObject.UNKNOWN; }, + "steps": n => { apps_deployment_progress_step.steps = n.getCollectionOfObjectValues(createApps_deployment_progress_step_stepsFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_deployment_progress_step_reason The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_deployment_progress_step_reason(apps_deployment_progress_step_reason = {}) { + return { + "code": n => { apps_deployment_progress_step_reason.code = n.getStringValue(); }, + "message": n => { apps_deployment_progress_step_reason.message = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_deployment_progress_step_steps The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_deployment_progress_step_steps(apps_deployment_progress_step_steps = {}) { + return {}; +} +/** + * The deserialization information for the current model + * @param Apps_deployment_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_deployment_response(apps_deployment_response = {}) { + return { + "deployment": n => { apps_deployment_response.deployment = n.getObjectValue(createApps_deploymentFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_deployment_service The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_deployment_service(apps_deployment_service = {}) { + return { + "name": n => { apps_deployment_service.name = n.getStringValue(); }, + "source_commit_hash": n => { apps_deployment_service.sourceCommitHash = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_deployment_static_site The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_deployment_static_site(apps_deployment_static_site = {}) { + return { + "name": n => { apps_deployment_static_site.name = n.getStringValue(); }, + "source_commit_hash": n => { apps_deployment_static_site.sourceCommitHash = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_deployment_worker The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_deployment_worker(apps_deployment_worker = {}) { + return { + "name": n => { apps_deployment_worker.name = n.getStringValue(); }, + "source_commit_hash": n => { apps_deployment_worker.sourceCommitHash = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_deployments_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_deployments_response(apps_deployments_response = {}) { + return { + "deployments": n => { apps_deployments_response.deployments = n.getCollectionOfObjectValues(createApps_deploymentFromDiscriminatorValue); }, + "links": n => { apps_deployments_response.links = n.getObjectValue(createPage_linksFromDiscriminatorValue); }, + "meta": n => { apps_deployments_response.meta = n.getObjectValue(createMeta_propertiesFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_domain The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_domain(apps_domain = {}) { + return { + "certificate_expires_at": n => { apps_domain.certificateExpiresAt = n.getDateValue(); }, + "id": n => { apps_domain.id = n.getStringValue(); }, + "phase": n => { apps_domain.phase = n.getEnumValue(Apps_domain_phaseObject) ?? Apps_domain_phaseObject.UNKNOWN; }, + "progress": n => { apps_domain.progress = n.getObjectValue(createApps_domain_progressFromDiscriminatorValue); }, + "rotate_validation_records": n => { apps_domain.rotateValidationRecords = n.getBooleanValue(); }, + "spec": n => { apps_domain.spec = n.getObjectValue(createApp_domain_specFromDiscriminatorValue); }, + "validations": n => { apps_domain.validations = n.getCollectionOfObjectValues(createApp_domain_validationFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_domain_progress The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_domain_progress(apps_domain_progress = {}) { + return { + "steps": n => { apps_domain_progress.steps = n.getCollectionOfObjectValues(createApps_domain_progress_stepsFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_domain_progress_steps The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_domain_progress_steps(apps_domain_progress_steps = {}) { + return {}; +} +/** + * The deserialization information for the current model + * @param Apps_get_exec_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_get_exec_response(apps_get_exec_response = {}) { + return { + "url": n => { apps_get_exec_response.url = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_get_instance_size_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_get_instance_size_response(apps_get_instance_size_response = {}) { + return { + "instance_size": n => { apps_get_instance_size_response.instanceSize = n.getObjectValue(createApps_instance_sizeFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_get_logs_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_get_logs_response(apps_get_logs_response = {}) { + return { + "historic_urls": n => { apps_get_logs_response.historicUrls = n.getCollectionOfPrimitiveValues(); }, + "live_url": n => { apps_get_logs_response.liveUrl = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_git_source_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_git_source_spec(apps_git_source_spec = {}) { + return { + "branch": n => { apps_git_source_spec.branch = n.getStringValue(); }, + "repo_clone_url": n => { apps_git_source_spec.repoCloneUrl = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_github_source_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_github_source_spec(apps_github_source_spec = {}) { + return { + "branch": n => { apps_github_source_spec.branch = n.getStringValue(); }, + "deploy_on_push": n => { apps_github_source_spec.deployOnPush = n.getBooleanValue(); }, + "repo": n => { apps_github_source_spec.repo = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_gitlab_source_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_gitlab_source_spec(apps_gitlab_source_spec = {}) { + return { + "branch": n => { apps_gitlab_source_spec.branch = n.getStringValue(); }, + "deploy_on_push": n => { apps_gitlab_source_spec.deployOnPush = n.getBooleanValue(); }, + "repo": n => { apps_gitlab_source_spec.repo = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_image_source_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_image_source_spec(apps_image_source_spec = {}) { + return { + "deploy_on_push": n => { apps_image_source_spec.deployOnPush = n.getObjectValue(createApps_image_source_spec_deploy_on_pushFromDiscriminatorValue); }, + "digest": n => { apps_image_source_spec.digest = n.getStringValue(); }, + "registry": n => { apps_image_source_spec.registry = n.getStringValue(); }, + "registry_credentials": n => { apps_image_source_spec.registryCredentials = n.getStringValue(); }, + "registry_type": n => { apps_image_source_spec.registryType = n.getEnumValue(Apps_image_source_spec_registry_typeObject); }, + "repository": n => { apps_image_source_spec.repository = n.getStringValue(); }, + "tag": n => { apps_image_source_spec.tag = n.getStringValue() ?? "latest"; }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_image_source_spec_deploy_on_push The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_image_source_spec_deploy_on_push(apps_image_source_spec_deploy_on_push = {}) { + return { + "enabled": n => { apps_image_source_spec_deploy_on_push.enabled = n.getBooleanValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_instance_size The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_instance_size(apps_instance_size = {}) { + return { + "bandwidth_allowance_gib": n => { apps_instance_size.bandwidthAllowanceGib = n.getStringValue(); }, + "cpus": n => { apps_instance_size.cpus = n.getStringValue(); }, + "cpu_type": n => { apps_instance_size.cpuType = n.getEnumValue(Instance_size_cpu_typeObject) ?? Instance_size_cpu_typeObject.UNSPECIFIED; }, + "deprecation_intent": n => { apps_instance_size.deprecationIntent = n.getBooleanValue(); }, + "memory_bytes": n => { apps_instance_size.memoryBytes = n.getStringValue(); }, + "name": n => { apps_instance_size.name = n.getStringValue(); }, + "scalable": n => { apps_instance_size.scalable = n.getBooleanValue(); }, + "single_instance_only": n => { apps_instance_size.singleInstanceOnly = n.getBooleanValue(); }, + "slug": n => { apps_instance_size.slug = n.getStringValue(); }, + "tier_downgrade_to": n => { apps_instance_size.tierDowngradeTo = n.getStringValue(); }, + "tier_slug": n => { apps_instance_size.tierSlug = n.getStringValue(); }, + "tier_upgrade_to": n => { apps_instance_size.tierUpgradeTo = n.getStringValue(); }, + "usd_per_month": n => { apps_instance_size.usdPerMonth = n.getStringValue(); }, + "usd_per_second": n => { apps_instance_size.usdPerSecond = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_list_alerts_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_list_alerts_response(apps_list_alerts_response = {}) { + return { + "alerts": n => { apps_list_alerts_response.alerts = n.getCollectionOfObjectValues(createApp_alertFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_list_instance_sizes_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_list_instance_sizes_response(apps_list_instance_sizes_response = {}) { + return { + "discount_percent": n => { apps_list_instance_sizes_response.discountPercent = n.getNumberValue(); }, + "instance_sizes": n => { apps_list_instance_sizes_response.instanceSizes = n.getCollectionOfObjectValues(createApps_instance_sizeFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_list_regions_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_list_regions_response(apps_list_regions_response = {}) { + return { + "regions": n => { apps_list_regions_response.regions = n.getCollectionOfObjectValues(createApps_regionFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_region The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_region(apps_region = {}) { + return { + "continent": n => { apps_region.continent = n.getStringValue(); }, + "data_centers": n => { apps_region.dataCenters = n.getCollectionOfPrimitiveValues(); }, + "default": n => { apps_region.defaultEscaped = n.getBooleanValue(); }, + "disabled": n => { apps_region.disabled = n.getBooleanValue(); }, + "flag": n => { apps_region.flag = n.getStringValue(); }, + "label": n => { apps_region.label = n.getStringValue(); }, + "reason": n => { apps_region.reason = n.getStringValue(); }, + "slug": n => { apps_region.slug = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_response(apps_response = {}) { + return { + "apps": n => { apps_response.apps = n.getCollectionOfObjectValues(createAppFromDiscriminatorValue); }, + "links": n => { apps_response.links = n.getObjectValue(createPage_linksFromDiscriminatorValue); }, + "meta": n => { apps_response.meta = n.getObjectValue(createMeta_propertiesFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_restart_request The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_restart_request(apps_restart_request = {}) { + return { + "components": n => { apps_restart_request.components = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_rollback_app_request The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_rollback_app_request(apps_rollback_app_request = {}) { + return { + "deployment_id": n => { apps_rollback_app_request.deploymentId = n.getStringValue(); }, + "skip_pin": n => { apps_rollback_app_request.skipPin = n.getBooleanValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_string_match The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_string_match(apps_string_match = {}) { + return { + "exact": n => { apps_string_match.exact = n.getStringValue(); }, + "prefix": n => { apps_string_match.prefix = n.getStringValue(); }, + "regex": n => { apps_string_match.regex = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_update_app_request The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_update_app_request(apps_update_app_request = {}) { + return { + "spec": n => { apps_update_app_request.spec = n.getObjectValue(createApp_specFromDiscriminatorValue); }, + "update_all_source_versions": n => { apps_update_app_request.updateAllSourceVersions = n.getBooleanValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_vpc The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_vpc(apps_vpc = {}) { + return { + "egress_ips": n => { apps_vpc.egressIps = n.getCollectionOfObjectValues(createApps_vpc_egress_ipFromDiscriminatorValue); }, + "id": n => { apps_vpc.id = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Apps_vpc_egress_ip The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoApps_vpc_egress_ip(apps_vpc_egress_ip = {}) { + return { + "ip": n => { apps_vpc_egress_ip.ip = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Associated_kubernetes_resource The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAssociated_kubernetes_resource(associated_kubernetes_resource = {}) { + return { + "id": n => { associated_kubernetes_resource.id = n.getStringValue(); }, + "name": n => { associated_kubernetes_resource.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Associated_kubernetes_resources The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAssociated_kubernetes_resources(associated_kubernetes_resources = {}) { + return { + "load_balancers": n => { associated_kubernetes_resources.loadBalancers = n.getCollectionOfObjectValues(createAssociated_kubernetes_resourceFromDiscriminatorValue); }, + "volumes": n => { associated_kubernetes_resources.volumes = n.getCollectionOfObjectValues(createAssociated_kubernetes_resourceFromDiscriminatorValue); }, + "volume_snapshots": n => { associated_kubernetes_resources.volumeSnapshots = n.getCollectionOfObjectValues(createAssociated_kubernetes_resourceFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Associated_resource The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAssociated_resource(associated_resource = {}) { + return { + "cost": n => { associated_resource.cost = n.getStringValue(); }, + "id": n => { associated_resource.id = n.getStringValue(); }, + "name": n => { associated_resource.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Associated_resource_status The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAssociated_resource_status(associated_resource_status = {}) { + return { + "completed_at": n => { associated_resource_status.completedAt = n.getDateValue(); }, + "droplet": n => { associated_resource_status.droplet = n.getObjectValue(createDestroyed_associated_resourceFromDiscriminatorValue); }, + "failures": n => { associated_resource_status.failures = n.getNumberValue(); }, + "resources": n => { associated_resource_status.resources = n.getObjectValue(createAssociated_resource_status_resourcesFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Associated_resource_status_resources The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAssociated_resource_status_resources(associated_resource_status_resources = {}) { + return { + "floating_ips": n => { associated_resource_status_resources.floatingIps = n.getCollectionOfObjectValues(createDestroyed_associated_resourceFromDiscriminatorValue); }, + "reserved_ips": n => { associated_resource_status_resources.reservedIps = n.getCollectionOfObjectValues(createDestroyed_associated_resourceFromDiscriminatorValue); }, + "snapshots": n => { associated_resource_status_resources.snapshots = n.getCollectionOfObjectValues(createDestroyed_associated_resourceFromDiscriminatorValue); }, + "volumes": n => { associated_resource_status_resources.volumes = n.getCollectionOfObjectValues(createDestroyed_associated_resourceFromDiscriminatorValue); }, + "volume_snapshots": n => { associated_resource_status_resources.volumeSnapshots = n.getCollectionOfObjectValues(createDestroyed_associated_resourceFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Autoscale_pool The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAutoscale_pool(autoscale_pool = {}) { + return { + "active_resources_count": n => { autoscale_pool.activeResourcesCount = n.getNumberValue(); }, + "config": n => { autoscale_pool.config = n.getObjectValue(createAutoscale_pool_dynamic_configFromDiscriminatorValue) ?? n.getObjectValue(createAutoscale_pool_static_configFromDiscriminatorValue); }, + "created_at": n => { autoscale_pool.createdAt = n.getDateValue(); }, + "current_utilization": n => { autoscale_pool.currentUtilization = n.getObjectValue(createCurrent_utilizationFromDiscriminatorValue); }, + "droplet_template": n => { autoscale_pool.dropletTemplate = n.getObjectValue(createAutoscale_pool_droplet_templateFromDiscriminatorValue); }, + "id": n => { autoscale_pool.id = n.getStringValue(); }, + "name": n => { autoscale_pool.name = n.getStringValue(); }, + "status": n => { autoscale_pool.status = n.getEnumValue(Autoscale_pool_statusObject); }, + "updated_at": n => { autoscale_pool.updatedAt = n.getDateValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Autoscale_pool_config The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAutoscale_pool_config(autoscale_pool_config = {}) { + return { + ...deserializeIntoAutoscale_pool_dynamic_config(autoscale_pool_config), + ...deserializeIntoAutoscale_pool_static_config(autoscale_pool_config), + }; +} +/** + * The deserialization information for the current model + * @param Autoscale_pool_create The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAutoscale_pool_create(autoscale_pool_create = {}) { + return { + "config": n => { autoscale_pool_create.config = n.getObjectValue(createAutoscale_pool_dynamic_configFromDiscriminatorValue) ?? n.getObjectValue(createAutoscale_pool_static_configFromDiscriminatorValue); }, + "droplet_template": n => { autoscale_pool_create.dropletTemplate = n.getObjectValue(createAutoscale_pool_droplet_templateFromDiscriminatorValue); }, + "name": n => { autoscale_pool_create.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Autoscale_pool_create_config The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAutoscale_pool_create_config(autoscale_pool_create_config = {}) { + return { + ...deserializeIntoAutoscale_pool_dynamic_config(autoscale_pool_create_config), + ...deserializeIntoAutoscale_pool_static_config(autoscale_pool_create_config), + }; +} +/** + * The deserialization information for the current model + * @param Autoscale_pool_droplet_template The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAutoscale_pool_droplet_template(autoscale_pool_droplet_template = {}) { + return { + "image": n => { autoscale_pool_droplet_template.image = n.getStringValue(); }, + "ipv6": n => { autoscale_pool_droplet_template.ipv6 = n.getBooleanValue(); }, + "name": n => { autoscale_pool_droplet_template.name = n.getStringValue(); }, + "project_id": n => { autoscale_pool_droplet_template.projectId = n.getStringValue(); }, + "region": n => { autoscale_pool_droplet_template.region = n.getEnumValue(Autoscale_pool_droplet_template_regionObject); }, + "size": n => { autoscale_pool_droplet_template.size = n.getStringValue(); }, + "ssh_keys": n => { autoscale_pool_droplet_template.sshKeys = n.getCollectionOfPrimitiveValues(); }, + "tags": n => { autoscale_pool_droplet_template.tags = n.getCollectionOfPrimitiveValues(); }, + "user_data": n => { autoscale_pool_droplet_template.userData = n.getStringValue(); }, + "vpc_uuid": n => { autoscale_pool_droplet_template.vpcUuid = n.getStringValue(); }, + "with_droplet_agent": n => { autoscale_pool_droplet_template.withDropletAgent = n.getBooleanValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Autoscale_pool_dynamic_config The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAutoscale_pool_dynamic_config(autoscale_pool_dynamic_config = {}) { + return { + "cooldown_minutes": n => { autoscale_pool_dynamic_config.cooldownMinutes = n.getNumberValue(); }, + "max_instances": n => { autoscale_pool_dynamic_config.maxInstances = n.getNumberValue(); }, + "min_instances": n => { autoscale_pool_dynamic_config.minInstances = n.getNumberValue(); }, + "target_cpu_utilization": n => { autoscale_pool_dynamic_config.targetCpuUtilization = n.getNumberValue(); }, + "target_memory_utilization": n => { autoscale_pool_dynamic_config.targetMemoryUtilization = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Autoscale_pool_static_config The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAutoscale_pool_static_config(autoscale_pool_static_config = {}) { + return { + "target_number_instances": n => { autoscale_pool_static_config.targetNumberInstances = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Backup The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoBackup(backup = {}) { + return { + "created_at": n => { backup.createdAt = n.getDateValue(); }, + "incremental": n => { backup.incremental = n.getBooleanValue(); }, + "size_gigabytes": n => { backup.sizeGigabytes = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Backward_links The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoBackward_links(backward_links = {}) { + return { + "first": n => { backward_links.first = n.getStringValue(); }, + "prev": n => { backward_links.prev = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Balance The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoBalance(balance = {}) { + return { + "account_balance": n => { balance.accountBalance = n.getStringValue(); }, + "generated_at": n => { balance.generatedAt = n.getDateValue(); }, + "month_to_date_balance": n => { balance.monthToDateBalance = n.getStringValue(); }, + "month_to_date_usage": n => { balance.monthToDateUsage = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Billing_address The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoBilling_address(billing_address = {}) { + return { + "address_line1": n => { billing_address.addressLine1 = n.getStringValue(); }, + "address_line2": n => { billing_address.addressLine2 = n.getStringValue(); }, + "city": n => { billing_address.city = n.getStringValue(); }, + "country_iso2_code": n => { billing_address.countryIso2Code = n.getStringValue(); }, + "created_at": n => { billing_address.createdAt = n.getStringValue(); }, + "postal_code": n => { billing_address.postalCode = n.getStringValue(); }, + "region": n => { billing_address.region = n.getStringValue(); }, + "updated_at": n => { billing_address.updatedAt = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Billing_data_point The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoBilling_data_point(billing_data_point = {}) { + return { + "description": n => { billing_data_point.description = n.getStringValue(); }, + "group_description": n => { billing_data_point.groupDescription = n.getStringValue(); }, + "region": n => { billing_data_point.region = n.getStringValue(); }, + "sku": n => { billing_data_point.sku = n.getStringValue(); }, + "start_date": n => { billing_data_point.startDate = n.getDateOnlyValue(); }, + "total_amount": n => { billing_data_point.totalAmount = n.getStringValue(); }, + "usage_team_urn": n => { billing_data_point.usageTeamUrn = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Billing_history The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoBilling_history(billing_history = {}) { + return { + "amount": n => { billing_history.amount = n.getStringValue(); }, + "date": n => { billing_history.date = n.getDateValue(); }, + "description": n => { billing_history.description = n.getStringValue(); }, + "invoice_id": n => { billing_history.invoiceId = n.getStringValue(); }, + "invoice_uuid": n => { billing_history.invoiceUuid = n.getStringValue(); }, + "type": n => { billing_history.type = n.getEnumValue(Billing_history_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Byoip_prefix The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoByoip_prefix(byoip_prefix = {}) { + return { + "advertised": n => { byoip_prefix.advertised = n.getBooleanValue(); }, + "failure_reason": n => { byoip_prefix.failureReason = n.getStringValue(); }, + "locked": n => { byoip_prefix.locked = n.getBooleanValue(); }, + "name": n => { byoip_prefix.name = n.getStringValue(); }, + "prefix": n => { byoip_prefix.prefix = n.getStringValue(); }, + "project_id": n => { byoip_prefix.projectId = n.getStringValue(); }, + "region": n => { byoip_prefix.region = n.getStringValue(); }, + "status": n => { byoip_prefix.status = n.getStringValue(); }, + "uuid": n => { byoip_prefix.uuid = n.getStringValue(); }, + "validations": n => { byoip_prefix.validations = n.getCollectionOfObjectValues(createByoip_prefix_validationsFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Byoip_prefix_create The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoByoip_prefix_create(byoip_prefix_create = {}) { + return { + "prefix": n => { byoip_prefix_create.prefix = n.getStringValue(); }, + "region": n => { byoip_prefix_create.region = n.getStringValue(); }, + "signature": n => { byoip_prefix_create.signature = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Byoip_prefix_resource The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoByoip_prefix_resource(byoip_prefix_resource = {}) { + return { + "assigned_at": n => { byoip_prefix_resource.assignedAt = n.getDateValue(); }, + "byoip": n => { byoip_prefix_resource.byoip = n.getStringValue(); }, + "id": n => { byoip_prefix_resource.id = n.getNumberValue(); }, + "region": n => { byoip_prefix_resource.region = n.getStringValue(); }, + "resource": n => { byoip_prefix_resource.resource = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Byoip_prefix_update The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoByoip_prefix_update(byoip_prefix_update = {}) { + return { + "advertise": n => { byoip_prefix_update.advertise = n.getBooleanValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Byoip_prefix_validations The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoByoip_prefix_validations(byoip_prefix_validations = {}) { + return { + "name": n => { byoip_prefix_validations.name = n.getStringValue(); }, + "note": n => { byoip_prefix_validations.note = n.getStringValue(); }, + "status": n => { byoip_prefix_validations.status = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Ca The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCa(ca = {}) { + return { + "certificate": n => { ca.certificate = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Cdn_endpoint The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCdn_endpoint(cdn_endpoint = {}) { + return { + "certificate_id": n => { cdn_endpoint.certificateId = n.getGuidValue(); }, + "created_at": n => { cdn_endpoint.createdAt = n.getDateValue(); }, + "custom_domain": n => { cdn_endpoint.customDomain = n.getStringValue(); }, + "endpoint": n => { cdn_endpoint.endpoint = n.getStringValue(); }, + "id": n => { cdn_endpoint.id = n.getGuidValue(); }, + "origin": n => { cdn_endpoint.origin = n.getStringValue(); }, + "ttl": n => { cdn_endpoint.ttl = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Certificate The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCertificate(certificate = {}) { + return { + "created_at": n => { certificate.createdAt = n.getDateValue(); }, + "dns_names": n => { certificate.dnsNames = n.getCollectionOfPrimitiveValues(); }, + "id": n => { certificate.id = n.getGuidValue(); }, + "name": n => { certificate.name = n.getStringValue(); }, + "not_after": n => { certificate.notAfter = n.getDateValue(); }, + "sha1_fingerprint": n => { certificate.sha1Fingerprint = n.getStringValue(); }, + "state": n => { certificate.state = n.getEnumValue(Certificate_stateObject); }, + "type": n => { certificate.type = n.getEnumValue(Certificate_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Certificate_create_base The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCertificate_create_base(certificate_create_base = {}) { + return { + "name": n => { certificate_create_base.name = n.getStringValue(); }, + "type": n => { certificate_create_base.type = n.getEnumValue(Certificate_create_base_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Certificate_request_custom The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCertificate_request_custom(certificate_request_custom = {}) { + return { + ...deserializeIntoCertificate_create_base(certificate_request_custom), + "certificate_chain": n => { certificate_request_custom.certificateChain = n.getStringValue(); }, + "leaf_certificate": n => { certificate_request_custom.leafCertificate = n.getStringValue(); }, + "private_key": n => { certificate_request_custom.privateKey = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Certificate_request_lets_encrypt The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCertificate_request_lets_encrypt(certificate_request_lets_encrypt = {}) { + return { + ...deserializeIntoCertificate_create_base(certificate_request_lets_encrypt), + "dns_names": n => { certificate_request_lets_encrypt.dnsNames = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Check The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCheck(check = {}) { + return { + "enabled": n => { check.enabled = n.getBooleanValue(); }, + "id": n => { check.id = n.getGuidValue(); }, + "name": n => { check.name = n.getStringValue(); }, + "regions": n => { check.regions = n.getCollectionOfEnumValues(Check_regionsObject); }, + "target": n => { check.target = n.getStringValue(); }, + "type": n => { check.type = n.getEnumValue(Check_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Check_updatable The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCheck_updatable(check_updatable = {}) { + return { + "enabled": n => { check_updatable.enabled = n.getBooleanValue(); }, + "name": n => { check_updatable.name = n.getStringValue(); }, + "regions": n => { check_updatable.regions = n.getCollectionOfEnumValues(Check_updatable_regionsObject); }, + "target": n => { check_updatable.target = n.getStringValue(); }, + "type": n => { check_updatable.type = n.getEnumValue(Check_updatable_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Cluster The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCluster(cluster = {}) { + return { + "amd_gpu_device_metrics_exporter_plugin": n => { cluster.amdGpuDeviceMetricsExporterPlugin = n.getObjectValue(createAmd_gpu_device_metrics_exporter_pluginFromDiscriminatorValue); }, + "amd_gpu_device_plugin": n => { cluster.amdGpuDevicePlugin = n.getObjectValue(createAmd_gpu_device_pluginFromDiscriminatorValue); }, + "auto_upgrade": n => { cluster.autoUpgrade = n.getBooleanValue(); }, + "cluster_autoscaler_configuration": n => { cluster.clusterAutoscalerConfiguration = n.getObjectValue(createCluster_autoscaler_configurationFromDiscriminatorValue); }, + "cluster_subnet": n => { cluster.clusterSubnet = n.getStringValue(); }, + "control_plane_firewall": n => { cluster.controlPlaneFirewall = n.getObjectValue(createControl_plane_firewallFromDiscriminatorValue); }, + "created_at": n => { cluster.createdAt = n.getDateValue(); }, + "endpoint": n => { cluster.endpoint = n.getStringValue(); }, + "ha": n => { cluster.ha = n.getBooleanValue(); }, + "id": n => { cluster.id = n.getGuidValue(); }, + "ipv4": n => { cluster.ipv4 = n.getStringValue(); }, + "maintenance_policy": n => { cluster.maintenancePolicy = n.getObjectValue(createMaintenance_policyFromDiscriminatorValue); }, + "name": n => { cluster.name = n.getStringValue(); }, + "node_pools": n => { cluster.nodePools = n.getCollectionOfObjectValues(createKubernetes_node_poolFromDiscriminatorValue); }, + "nvidia_gpu_device_plugin": n => { cluster.nvidiaGpuDevicePlugin = n.getObjectValue(createNvidia_gpu_device_pluginFromDiscriminatorValue); }, + "rdma_shared_dev_plugin": n => { cluster.rdmaSharedDevPlugin = n.getObjectValue(createRdma_shared_dev_pluginFromDiscriminatorValue); }, + "region": n => { cluster.region = n.getStringValue(); }, + "registry_enabled": n => { cluster.registryEnabled = n.getBooleanValue(); }, + "routing_agent": n => { cluster.routingAgent = n.getObjectValue(createRouting_agentFromDiscriminatorValue); }, + "service_subnet": n => { cluster.serviceSubnet = n.getStringValue(); }, + "status": n => { cluster.status = n.getObjectValue(createCluster_statusFromDiscriminatorValue); }, + "surge_upgrade": n => { cluster.surgeUpgrade = n.getBooleanValue(); }, + "tags": n => { cluster.tags = n.getCollectionOfPrimitiveValues(); }, + "updated_at": n => { cluster.updatedAt = n.getDateValue(); }, + "version": n => { cluster.version = n.getStringValue(); }, + "vpc_uuid": n => { cluster.vpcUuid = n.getGuidValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Cluster_autoscaler_configuration The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCluster_autoscaler_configuration(cluster_autoscaler_configuration = {}) { + return { + "expanders": n => { cluster_autoscaler_configuration.expanders = n.getCollectionOfEnumValues(Cluster_autoscaler_configuration_expandersObject); }, + "scale_down_unneeded_time": n => { cluster_autoscaler_configuration.scaleDownUnneededTime = n.getStringValue(); }, + "scale_down_utilization_threshold": n => { cluster_autoscaler_configuration.scaleDownUtilizationThreshold = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Cluster_read The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCluster_read(cluster_read = {}) { + return { + "amd_gpu_device_metrics_exporter_plugin": n => { cluster_read.amdGpuDeviceMetricsExporterPlugin = n.getObjectValue(createAmd_gpu_device_metrics_exporter_pluginFromDiscriminatorValue); }, + "amd_gpu_device_plugin": n => { cluster_read.amdGpuDevicePlugin = n.getObjectValue(createAmd_gpu_device_pluginFromDiscriminatorValue); }, + "auto_upgrade": n => { cluster_read.autoUpgrade = n.getBooleanValue(); }, + "cluster_autoscaler_configuration": n => { cluster_read.clusterAutoscalerConfiguration = n.getObjectValue(createCluster_autoscaler_configurationFromDiscriminatorValue); }, + "cluster_subnet": n => { cluster_read.clusterSubnet = n.getStringValue(); }, + "control_plane_firewall": n => { cluster_read.controlPlaneFirewall = n.getObjectValue(createControl_plane_firewallFromDiscriminatorValue); }, + "created_at": n => { cluster_read.createdAt = n.getDateValue(); }, + "endpoint": n => { cluster_read.endpoint = n.getStringValue(); }, + "ha": n => { cluster_read.ha = n.getBooleanValue(); }, + "id": n => { cluster_read.id = n.getGuidValue(); }, + "ipv4": n => { cluster_read.ipv4 = n.getStringValue(); }, + "maintenance_policy": n => { cluster_read.maintenancePolicy = n.getObjectValue(createMaintenance_policyFromDiscriminatorValue); }, + "name": n => { cluster_read.name = n.getStringValue(); }, + "node_pools": n => { cluster_read.nodePools = n.getCollectionOfObjectValues(createKubernetes_node_poolFromDiscriminatorValue); }, + "nvidia_gpu_device_plugin": n => { cluster_read.nvidiaGpuDevicePlugin = n.getObjectValue(createNvidia_gpu_device_pluginFromDiscriminatorValue); }, + "rdma_shared_dev_plugin": n => { cluster_read.rdmaSharedDevPlugin = n.getObjectValue(createRdma_shared_dev_pluginFromDiscriminatorValue); }, + "region": n => { cluster_read.region = n.getStringValue(); }, + "registries": n => { cluster_read.registries = n.getCollectionOfPrimitiveValues(); }, + "registry_enabled": n => { cluster_read.registryEnabled = n.getBooleanValue(); }, + "routing_agent": n => { cluster_read.routingAgent = n.getObjectValue(createRouting_agentFromDiscriminatorValue); }, + "service_subnet": n => { cluster_read.serviceSubnet = n.getStringValue(); }, + "status": n => { cluster_read.status = n.getObjectValue(createCluster_read_statusFromDiscriminatorValue); }, + "surge_upgrade": n => { cluster_read.surgeUpgrade = n.getBooleanValue(); }, + "tags": n => { cluster_read.tags = n.getCollectionOfPrimitiveValues(); }, + "updated_at": n => { cluster_read.updatedAt = n.getDateValue(); }, + "version": n => { cluster_read.version = n.getStringValue(); }, + "vpc_uuid": n => { cluster_read.vpcUuid = n.getGuidValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Cluster_read_status The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCluster_read_status(cluster_read_status = {}) { + return { + "message": n => { cluster_read_status.message = n.getStringValue(); }, + "state": n => { cluster_read_status.state = n.getEnumValue(Cluster_read_status_stateObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Cluster_registries The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCluster_registries(cluster_registries = {}) { + return { + "cluster_uuids": n => { cluster_registries.clusterUuids = n.getCollectionOfPrimitiveValues(); }, + "registries": n => { cluster_registries.registries = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Cluster_registry The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCluster_registry(cluster_registry = {}) { + return { + "cluster_uuids": n => { cluster_registry.clusterUuids = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Cluster_status The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCluster_status(cluster_status = {}) { + return { + "message": n => { cluster_status.message = n.getStringValue(); }, + "state": n => { cluster_status.state = n.getEnumValue(Cluster_status_stateObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Cluster_update The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCluster_update(cluster_update = {}) { + return { + "amd_gpu_device_metrics_exporter_plugin": n => { cluster_update.amdGpuDeviceMetricsExporterPlugin = n.getObjectValue(createAmd_gpu_device_metrics_exporter_pluginFromDiscriminatorValue); }, + "amd_gpu_device_plugin": n => { cluster_update.amdGpuDevicePlugin = n.getObjectValue(createAmd_gpu_device_pluginFromDiscriminatorValue); }, + "auto_upgrade": n => { cluster_update.autoUpgrade = n.getBooleanValue(); }, + "cluster_autoscaler_configuration": n => { cluster_update.clusterAutoscalerConfiguration = n.getObjectValue(createCluster_autoscaler_configurationFromDiscriminatorValue); }, + "control_plane_firewall": n => { cluster_update.controlPlaneFirewall = n.getObjectValue(createControl_plane_firewallFromDiscriminatorValue); }, + "ha": n => { cluster_update.ha = n.getBooleanValue(); }, + "maintenance_policy": n => { cluster_update.maintenancePolicy = n.getObjectValue(createMaintenance_policyFromDiscriminatorValue); }, + "name": n => { cluster_update.name = n.getStringValue(); }, + "nvidia_gpu_device_plugin": n => { cluster_update.nvidiaGpuDevicePlugin = n.getObjectValue(createNvidia_gpu_device_pluginFromDiscriminatorValue); }, + "rdma_shared_dev_plugin": n => { cluster_update.rdmaSharedDevPlugin = n.getObjectValue(createRdma_shared_dev_pluginFromDiscriminatorValue); }, + "routing_agent": n => { cluster_update.routingAgent = n.getObjectValue(createRouting_agentFromDiscriminatorValue); }, + "surge_upgrade": n => { cluster_update.surgeUpgrade = n.getBooleanValue(); }, + "tags": n => { cluster_update.tags = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Clusterlint_request The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoClusterlint_request(clusterlint_request = {}) { + return { + "exclude_checks": n => { clusterlint_request.excludeChecks = n.getCollectionOfPrimitiveValues(); }, + "exclude_groups": n => { clusterlint_request.excludeGroups = n.getCollectionOfPrimitiveValues(); }, + "include_checks": n => { clusterlint_request.includeChecks = n.getCollectionOfPrimitiveValues(); }, + "include_groups": n => { clusterlint_request.includeGroups = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Clusterlint_results The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoClusterlint_results(clusterlint_results = {}) { + return { + "completed_at": n => { clusterlint_results.completedAt = n.getDateValue(); }, + "diagnostics": n => { clusterlint_results.diagnostics = n.getCollectionOfObjectValues(createClusterlint_results_diagnosticsFromDiscriminatorValue); }, + "requested_at": n => { clusterlint_results.requestedAt = n.getDateValue(); }, + "run_id": n => { clusterlint_results.runId = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Clusterlint_results_diagnostics The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoClusterlint_results_diagnostics(clusterlint_results_diagnostics = {}) { + return { + "check_name": n => { clusterlint_results_diagnostics.checkName = n.getStringValue(); }, + "message": n => { clusterlint_results_diagnostics.message = n.getStringValue(); }, + "object": n => { clusterlint_results_diagnostics.object = n.getObjectValue(createClusterlint_results_diagnostics_objectFromDiscriminatorValue); }, + "severity": n => { clusterlint_results_diagnostics.severity = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Clusterlint_results_diagnostics_object The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoClusterlint_results_diagnostics_object(clusterlint_results_diagnostics_object = {}) { + return { + "kind": n => { clusterlint_results_diagnostics_object.kind = n.getStringValue(); }, + "name": n => { clusterlint_results_diagnostics_object.name = n.getStringValue(); }, + "namespace": n => { clusterlint_results_diagnostics_object.namespace = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Connection_pool The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoConnection_pool(connection_pool = {}) { + return { + "connection": n => { connection_pool.connection = n.getObjectValue(createDatabase_connectionFromDiscriminatorValue); }, + "db": n => { connection_pool.db = n.getStringValue(); }, + "mode": n => { connection_pool.mode = n.getStringValue(); }, + "name": n => { connection_pool.name = n.getStringValue(); }, + "private_connection": n => { connection_pool.privateConnection = n.getObjectValue(createDatabase_connectionFromDiscriminatorValue); }, + "size": n => { connection_pool.size = n.getNumberValue(); }, + "standby_connection": n => { connection_pool.standbyConnection = n.getObjectValue(createDatabase_connectionFromDiscriminatorValue); }, + "standby_private_connection": n => { connection_pool.standbyPrivateConnection = n.getObjectValue(createDatabase_connectionFromDiscriminatorValue); }, + "user": n => { connection_pool.user = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Connection_pool_update The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoConnection_pool_update(connection_pool_update = {}) { + return { + "db": n => { connection_pool_update.db = n.getStringValue(); }, + "mode": n => { connection_pool_update.mode = n.getStringValue(); }, + "size": n => { connection_pool_update.size = n.getNumberValue(); }, + "user": n => { connection_pool_update.user = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Connection_pools The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoConnection_pools(connection_pools = {}) { + return { + "pools": n => { connection_pools.pools = n.getCollectionOfObjectValues(createConnection_poolFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Control_plane_firewall The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoControl_plane_firewall(control_plane_firewall = {}) { + return { + "allowed_addresses": n => { control_plane_firewall.allowedAddresses = n.getCollectionOfPrimitiveValues(); }, + "enabled": n => { control_plane_firewall.enabled = n.getBooleanValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Create_namespace The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCreate_namespace(create_namespace = {}) { + return { + "label": n => { create_namespace.label = n.getStringValue(); }, + "region": n => { create_namespace.region = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Create_trigger The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCreate_trigger(create_trigger = {}) { + return { + "function": n => { create_trigger.functionEscaped = n.getStringValue(); }, + "is_enabled": n => { create_trigger.isEnabled = n.getBooleanValue(); }, + "name": n => { create_trigger.name = n.getStringValue(); }, + "scheduled_details": n => { create_trigger.scheduledDetails = n.getObjectValue(createScheduled_detailsFromDiscriminatorValue); }, + "type": n => { create_trigger.type = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Credentials The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCredentials(credentials = {}) { + return { + "certificate_authority_data": n => { credentials.certificateAuthorityData = n.getByteArrayValue(); }, + "client_certificate_data": n => { credentials.clientCertificateData = n.getByteArrayValue(); }, + "client_key_data": n => { credentials.clientKeyData = n.getByteArrayValue(); }, + "expires_at": n => { credentials.expiresAt = n.getDateValue(); }, + "server": n => { credentials.server = n.getStringValue(); }, + "token": n => { credentials.token = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Current_utilization The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCurrent_utilization(current_utilization = {}) { + return { + "cpu": n => { current_utilization.cpu = n.getNumberValue(); }, + "memory": n => { current_utilization.memory = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Database The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDatabase(database = {}) { + return { + "name": n => { database.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Database_autoscale_params The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDatabase_autoscale_params(database_autoscale_params = {}) { + return { + "storage": n => { database_autoscale_params.storage = n.getObjectValue(createDatabase_storage_autoscale_paramsFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Database_backup The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDatabase_backup(database_backup = {}) { + return { + "backup_created_at": n => { database_backup.backupCreatedAt = n.getDateValue(); }, + "database_name": n => { database_backup.databaseName = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Database_cluster The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDatabase_cluster(database_cluster = {}) { + return { + "autoscale": n => { database_cluster.autoscale = n.getObjectValue(createDatabase_autoscale_paramsFromDiscriminatorValue); }, + "connection": n => { database_cluster.connection = n.getObjectValue(createDatabase_connectionFromDiscriminatorValue); }, + "created_at": n => { database_cluster.createdAt = n.getDateValue(); }, + "db_names": n => { database_cluster.dbNames = n.getCollectionOfPrimitiveValues(); }, + "do_settings": n => { database_cluster.doSettings = n.getObjectValue(createDo_settingsFromDiscriminatorValue); }, + "engine": n => { database_cluster.engine = n.getEnumValue(Database_cluster_engineObject); }, + "id": n => { database_cluster.id = n.getGuidValue(); }, + "maintenance_window": n => { database_cluster.maintenanceWindow = n.getObjectValue(createDatabase_maintenance_windowFromDiscriminatorValue); }, + "metrics_endpoints": n => { database_cluster.metricsEndpoints = n.getCollectionOfObjectValues(createDatabase_service_endpointFromDiscriminatorValue); }, + "name": n => { database_cluster.name = n.getStringValue(); }, + "num_nodes": n => { database_cluster.numNodes = n.getNumberValue(); }, + "private_connection": n => { database_cluster.privateConnection = n.getObjectValue(createDatabase_connectionFromDiscriminatorValue); }, + "private_network_uuid": n => { database_cluster.privateNetworkUuid = n.getStringValue(); }, + "project_id": n => { database_cluster.projectId = n.getGuidValue(); }, + "region": n => { database_cluster.region = n.getStringValue(); }, + "rules": n => { database_cluster.rules = n.getCollectionOfObjectValues(createFirewall_ruleFromDiscriminatorValue); }, + "schema_registry_connection": n => { database_cluster.schemaRegistryConnection = n.getObjectValue(createSchema_registry_connectionFromDiscriminatorValue); }, + "semantic_version": n => { database_cluster.semanticVersion = n.getStringValue(); }, + "size": n => { database_cluster.size = n.getStringValue(); }, + "standby_connection": n => { database_cluster.standbyConnection = n.getObjectValue(createDatabase_connectionFromDiscriminatorValue); }, + "standby_private_connection": n => { database_cluster.standbyPrivateConnection = n.getObjectValue(createDatabase_connectionFromDiscriminatorValue); }, + "status": n => { database_cluster.status = n.getEnumValue(Database_cluster_statusObject); }, + "storage_size_mib": n => { database_cluster.storageSizeMib = n.getNumberValue(); }, + "tags": n => { database_cluster.tags = n.getCollectionOfPrimitiveValues(); }, + "ui_connection": n => { database_cluster.uiConnection = n.getObjectValue(createOpensearch_connectionFromDiscriminatorValue); }, + "users": n => { database_cluster.users = n.getCollectionOfObjectValues(createDatabase_userFromDiscriminatorValue); }, + "version": n => { database_cluster.version = n.getStringValue(); }, + "version_end_of_availability": n => { database_cluster.versionEndOfAvailability = n.getStringValue(); }, + "version_end_of_life": n => { database_cluster.versionEndOfLife = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Database_cluster_read The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDatabase_cluster_read(database_cluster_read = {}) { + return { + "connection": n => { database_cluster_read.connection = n.getObjectValue(createDatabase_connectionFromDiscriminatorValue); }, + "created_at": n => { database_cluster_read.createdAt = n.getDateValue(); }, + "db_names": n => { database_cluster_read.dbNames = n.getCollectionOfPrimitiveValues(); }, + "do_settings": n => { database_cluster_read.doSettings = n.getObjectValue(createDo_settingsFromDiscriminatorValue); }, + "engine": n => { database_cluster_read.engine = n.getEnumValue(Database_cluster_read_engineObject); }, + "id": n => { database_cluster_read.id = n.getGuidValue(); }, + "maintenance_window": n => { database_cluster_read.maintenanceWindow = n.getObjectValue(createDatabase_maintenance_windowFromDiscriminatorValue); }, + "metrics_endpoints": n => { database_cluster_read.metricsEndpoints = n.getCollectionOfObjectValues(createDatabase_service_endpointFromDiscriminatorValue); }, + "name": n => { database_cluster_read.name = n.getStringValue(); }, + "num_nodes": n => { database_cluster_read.numNodes = n.getNumberValue(); }, + "private_connection": n => { database_cluster_read.privateConnection = n.getObjectValue(createDatabase_connectionFromDiscriminatorValue); }, + "private_network_uuid": n => { database_cluster_read.privateNetworkUuid = n.getStringValue(); }, + "project_id": n => { database_cluster_read.projectId = n.getGuidValue(); }, + "region": n => { database_cluster_read.region = n.getStringValue(); }, + "rules": n => { database_cluster_read.rules = n.getCollectionOfObjectValues(createFirewall_ruleFromDiscriminatorValue); }, + "schema_registry_connection": n => { database_cluster_read.schemaRegistryConnection = n.getObjectValue(createSchema_registry_connectionFromDiscriminatorValue); }, + "semantic_version": n => { database_cluster_read.semanticVersion = n.getStringValue(); }, + "size": n => { database_cluster_read.size = n.getStringValue(); }, + "standby_connection": n => { database_cluster_read.standbyConnection = n.getObjectValue(createDatabase_connectionFromDiscriminatorValue); }, + "standby_private_connection": n => { database_cluster_read.standbyPrivateConnection = n.getObjectValue(createDatabase_connectionFromDiscriminatorValue); }, + "status": n => { database_cluster_read.status = n.getEnumValue(Database_cluster_read_statusObject); }, + "storage_size_mib": n => { database_cluster_read.storageSizeMib = n.getNumberValue(); }, + "tags": n => { database_cluster_read.tags = n.getCollectionOfPrimitiveValues(); }, + "ui_connection": n => { database_cluster_read.uiConnection = n.getObjectValue(createOpensearch_connectionFromDiscriminatorValue); }, + "users": n => { database_cluster_read.users = n.getCollectionOfObjectValues(createDatabase_userFromDiscriminatorValue); }, + "version": n => { database_cluster_read.version = n.getStringValue(); }, + "version_end_of_availability": n => { database_cluster_read.versionEndOfAvailability = n.getStringValue(); }, + "version_end_of_life": n => { database_cluster_read.versionEndOfLife = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Database_cluster_resize The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDatabase_cluster_resize(database_cluster_resize = {}) { + return { + "num_nodes": n => { database_cluster_resize.numNodes = n.getNumberValue(); }, + "size": n => { database_cluster_resize.size = n.getStringValue(); }, + "storage_size_mib": n => { database_cluster_resize.storageSizeMib = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Database_config The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDatabase_config(database_config = {}) { + return { + "config": n => { database_config.config = n.getObjectValue(createKafka_advanced_configFromDiscriminatorValue) ?? n.getObjectValue(createMongo_advanced_configFromDiscriminatorValue) ?? n.getObjectValue(createMysql_advanced_configFromDiscriminatorValue) ?? n.getObjectValue(createOpensearch_advanced_configFromDiscriminatorValue) ?? n.getObjectValue(createPostgres_advanced_configFromDiscriminatorValue) ?? n.getObjectValue(createRedis_advanced_configFromDiscriminatorValue) ?? n.getObjectValue(createValkey_advanced_configFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Database_config_config The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDatabase_config_config(database_config_config = {}) { + return { + ...deserializeIntoKafka_advanced_config(database_config_config), + ...deserializeIntoMongo_advanced_config(database_config_config), + ...deserializeIntoMysql_advanced_config(database_config_config), + ...deserializeIntoOpensearch_advanced_config(database_config_config), + ...deserializeIntoPostgres_advanced_config(database_config_config), + ...deserializeIntoRedis_advanced_config(database_config_config), + ...deserializeIntoValkey_advanced_config(database_config_config), + }; +} +/** + * The deserialization information for the current model + * @param Database_connection The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDatabase_connection(database_connection = {}) { + return { + "database": n => { database_connection.database = n.getStringValue(); }, + "host": n => { database_connection.host = n.getStringValue(); }, + "password": n => { database_connection.password = n.getStringValue(); }, + "port": n => { database_connection.port = n.getNumberValue(); }, + "ssl": n => { database_connection.ssl = n.getBooleanValue(); }, + "uri": n => { database_connection.uri = n.getStringValue(); }, + "user": n => { database_connection.user = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Database_kafka_schema_create The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDatabase_kafka_schema_create(database_kafka_schema_create = {}) { + return { + "schema": n => { database_kafka_schema_create.schema = n.getStringValue(); }, + "schema_type": n => { database_kafka_schema_create.schemaType = n.getEnumValue(Database_kafka_schema_create_schema_typeObject); }, + "subject_name": n => { database_kafka_schema_create.subjectName = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Database_layout_option The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDatabase_layout_option(database_layout_option = {}) { + return { + "num_nodes": n => { database_layout_option.numNodes = n.getNumberValue(); }, + "sizes": n => { database_layout_option.sizes = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Database_maintenance_window The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDatabase_maintenance_window(database_maintenance_window = {}) { + return { + "day": n => { database_maintenance_window.day = n.getStringValue(); }, + "description": n => { database_maintenance_window.description = n.getCollectionOfPrimitiveValues(); }, + "hour": n => { database_maintenance_window.hour = n.getStringValue(); }, + "pending": n => { database_maintenance_window.pending = n.getBooleanValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Database_metrics_credentials The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDatabase_metrics_credentials(database_metrics_credentials = {}) { + return { + "credentials": n => { database_metrics_credentials.credentials = n.getObjectValue(createDatabases_basic_auth_credentialsFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Database_replica The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDatabase_replica(database_replica = {}) { + return { + "connection": n => { database_replica.connection = n.getObjectValue(createDatabase_connectionFromDiscriminatorValue); }, + "created_at": n => { database_replica.createdAt = n.getDateValue(); }, + "do_settings": n => { database_replica.doSettings = n.getObjectValue(createDo_settingsFromDiscriminatorValue); }, + "id": n => { database_replica.id = n.getGuidValue(); }, + "name": n => { database_replica.name = n.getStringValue(); }, + "private_connection": n => { database_replica.privateConnection = n.getObjectValue(createDatabase_connectionFromDiscriminatorValue); }, + "private_network_uuid": n => { database_replica.privateNetworkUuid = n.getStringValue(); }, + "region": n => { database_replica.region = n.getStringValue(); }, + "size": n => { database_replica.size = n.getStringValue(); }, + "status": n => { database_replica.status = n.getEnumValue(Database_replica_statusObject); }, + "storage_size_mib": n => { database_replica.storageSizeMib = n.getNumberValue(); }, + "tags": n => { database_replica.tags = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Database_replica_read The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDatabase_replica_read(database_replica_read = {}) { + return { + "connection": n => { database_replica_read.connection = n.getObjectValue(createDatabase_connectionFromDiscriminatorValue); }, + "created_at": n => { database_replica_read.createdAt = n.getDateValue(); }, + "do_settings": n => { database_replica_read.doSettings = n.getObjectValue(createDo_settingsFromDiscriminatorValue); }, + "id": n => { database_replica_read.id = n.getGuidValue(); }, + "name": n => { database_replica_read.name = n.getStringValue(); }, + "private_connection": n => { database_replica_read.privateConnection = n.getObjectValue(createDatabase_connectionFromDiscriminatorValue); }, + "private_network_uuid": n => { database_replica_read.privateNetworkUuid = n.getStringValue(); }, + "region": n => { database_replica_read.region = n.getStringValue(); }, + "size": n => { database_replica_read.size = n.getStringValue(); }, + "status": n => { database_replica_read.status = n.getEnumValue(Database_replica_read_statusObject); }, + "storage_size_mib": n => { database_replica_read.storageSizeMib = n.getNumberValue(); }, + "tags": n => { database_replica_read.tags = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Database_service_endpoint The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDatabase_service_endpoint(database_service_endpoint = {}) { + return { + "host": n => { database_service_endpoint.host = n.getStringValue(); }, + "port": n => { database_service_endpoint.port = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Database_storage_autoscale_params The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDatabase_storage_autoscale_params(database_storage_autoscale_params = {}) { + return { + "enabled": n => { database_storage_autoscale_params.enabled = n.getBooleanValue(); }, + "increment_gib": n => { database_storage_autoscale_params.incrementGib = n.getNumberValue(); }, + "threshold_percent": n => { database_storage_autoscale_params.thresholdPercent = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Database_user The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDatabase_user(database_user = {}) { + return { + "access_cert": n => { database_user.accessCert = n.getStringValue(); }, + "access_key": n => { database_user.accessKey = n.getStringValue(); }, + "mysql_settings": n => { database_user.mysqlSettings = n.getObjectValue(createMysql_settingsFromDiscriminatorValue); }, + "name": n => { database_user.name = n.getStringValue(); }, + "password": n => { database_user.password = n.getStringValue(); }, + "role": n => { database_user.role = n.getEnumValue(Database_user_roleObject); }, + "settings": n => { database_user.settings = n.getObjectValue(createUser_settingsFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Database_version_availability The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDatabase_version_availability(database_version_availability = {}) { + return { + "end_of_availability": n => { database_version_availability.endOfAvailability = n.getStringValue(); }, + "end_of_life": n => { database_version_availability.endOfLife = n.getStringValue(); }, + "version": n => { database_version_availability.version = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Databases_basic_auth_credentials The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDatabases_basic_auth_credentials(databases_basic_auth_credentials = {}) { + return { + "basic_auth_password": n => { databases_basic_auth_credentials.basicAuthPassword = n.getStringValue(); }, + "basic_auth_username": n => { databases_basic_auth_credentials.basicAuthUsername = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Datadog_logsink The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDatadog_logsink(datadog_logsink = {}) { + return { + "datadog_api_key": n => { datadog_logsink.datadogApiKey = n.getStringValue(); }, + "site": n => { datadog_logsink.site = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Destination The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDestination(destination = {}) { + return { + "config": n => { destination.config = n.getObjectValue(createOpensearch_configFromDiscriminatorValue); }, + "id": n => { destination.id = n.getStringValue(); }, + "name": n => { destination.name = n.getStringValue(); }, + "type": n => { destination.type = n.getEnumValue(Destination_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Destination_omit_credentials The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDestination_omit_credentials(destination_omit_credentials = {}) { + return { + "config": n => { destination_omit_credentials.config = n.getObjectValue(createOpensearch_config_omit_credentialsFromDiscriminatorValue); }, + "id": n => { destination_omit_credentials.id = n.getStringValue(); }, + "name": n => { destination_omit_credentials.name = n.getStringValue(); }, + "type": n => { destination_omit_credentials.type = n.getEnumValue(Destination_omit_credentials_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Destination_request The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDestination_request(destination_request = {}) { + return { + "config": n => { destination_request.config = n.getObjectValue(createOpensearch_config_requestFromDiscriminatorValue); }, + "name": n => { destination_request.name = n.getStringValue(); }, + "type": n => { destination_request.type = n.getEnumValue(Destination_request_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Destroy_associated_kubernetes_resources The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDestroy_associated_kubernetes_resources(destroy_associated_kubernetes_resources = {}) { + return { + "load_balancers": n => { destroy_associated_kubernetes_resources.loadBalancers = n.getCollectionOfPrimitiveValues(); }, + "volumes": n => { destroy_associated_kubernetes_resources.volumes = n.getCollectionOfPrimitiveValues(); }, + "volume_snapshots": n => { destroy_associated_kubernetes_resources.volumeSnapshots = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Destroyed_associated_resource The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDestroyed_associated_resource(destroyed_associated_resource = {}) { + return { + "destroyed_at": n => { destroyed_associated_resource.destroyedAt = n.getDateValue(); }, + "error_message": n => { destroyed_associated_resource.errorMessage = n.getStringValue(); }, + "id": n => { destroyed_associated_resource.id = n.getStringValue(); }, + "name": n => { destroyed_associated_resource.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Disk_info The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDisk_info(disk_info = {}) { + return { + "size": n => { disk_info.size = n.getObjectValue(createDisk_info_sizeFromDiscriminatorValue); }, + "type": n => { disk_info.type = n.getEnumValue(Disk_info_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Disk_info_size The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDisk_info_size(disk_info_size = {}) { + return { + "amount": n => { disk_info_size.amount = n.getNumberValue(); }, + "unit": n => { disk_info_size.unit = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Do_settings The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDo_settings(do_settings = {}) { + return { + "service_cnames": n => { do_settings.serviceCnames = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Docker_credentials The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDocker_credentials(docker_credentials = {}) { + return { + "auths": n => { docker_credentials.auths = n.getObjectValue(createDocker_credentials_authsFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Docker_credentials_auths The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDocker_credentials_auths(docker_credentials_auths = {}) { + return { + "registry.digitalocean.com": n => { docker_credentials_auths.registryDigitaloceanCom = n.getObjectValue(createDocker_credentials_auths_registryDigitaloceanComFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Docker_credentials_auths_registryDigitaloceanCom The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDocker_credentials_auths_registryDigitaloceanCom(docker_credentials_auths_registryDigitaloceanCom = {}) { + return { + "auth": n => { docker_credentials_auths_registryDigitaloceanCom.auth = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Domain The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDomain(domain = {}) { + return { + "ip_address": n => { domain.ipAddress = n.getStringValue(); }, + "name": n => { domain.name = n.getStringValue(); }, + "ttl": n => { domain.ttl = n.getNumberValue(); }, + "zone_file": n => { domain.zoneFile = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Domain_record The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDomain_record(domain_record = {}) { + return { + "data": n => { domain_record.data = n.getStringValue(); }, + "flags": n => { domain_record.flags = n.getNumberValue(); }, + "id": n => { domain_record.id = n.getNumberValue(); }, + "name": n => { domain_record.name = n.getStringValue(); }, + "port": n => { domain_record.port = n.getNumberValue(); }, + "priority": n => { domain_record.priority = n.getNumberValue(); }, + "tag": n => { domain_record.tag = n.getStringValue(); }, + "ttl": n => { domain_record.ttl = n.getNumberValue(); }, + "type": n => { domain_record.type = n.getStringValue(); }, + "weight": n => { domain_record.weight = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Domain_record_a The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDomain_record_a(domain_record_a = {}) { + return { + ...deserializeIntoDomain_record(domain_record_a), + }; +} +/** + * The deserialization information for the current model + * @param Domain_record_aaaa The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDomain_record_aaaa(domain_record_aaaa = {}) { + return { + ...deserializeIntoDomain_record(domain_record_aaaa), + }; +} +/** + * The deserialization information for the current model + * @param Domain_record_caa The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDomain_record_caa(domain_record_caa = {}) { + return { + ...deserializeIntoDomain_record(domain_record_caa), + }; +} +/** + * The deserialization information for the current model + * @param Domain_record_cname The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDomain_record_cname(domain_record_cname = {}) { + return { + ...deserializeIntoDomain_record(domain_record_cname), + }; +} +/** + * The deserialization information for the current model + * @param Domain_record_mx The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDomain_record_mx(domain_record_mx = {}) { + return { + ...deserializeIntoDomain_record(domain_record_mx), + }; +} +/** + * The deserialization information for the current model + * @param Domain_record_ns The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDomain_record_ns(domain_record_ns = {}) { + return { + ...deserializeIntoDomain_record(domain_record_ns), + }; +} +/** + * The deserialization information for the current model + * @param Domain_record_soa The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDomain_record_soa(domain_record_soa = {}) { + return { + ...deserializeIntoDomain_record(domain_record_soa), + }; +} +/** + * The deserialization information for the current model + * @param Domain_record_srv The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDomain_record_srv(domain_record_srv = {}) { + return { + ...deserializeIntoDomain_record(domain_record_srv), + }; +} +/** + * The deserialization information for the current model + * @param Domain_record_txt The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDomain_record_txt(domain_record_txt = {}) { + return { + ...deserializeIntoDomain_record(domain_record_txt), + }; +} +/** + * The deserialization information for the current model + * @param Domains The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDomains(domains = {}) { + return { + "certificate_id": n => { domains.certificateId = n.getStringValue(); }, + "is_managed": n => { domains.isManaged = n.getBooleanValue(); }, + "name": n => { domains.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Droplet The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDroplet(droplet = {}) { + return { + "backup_ids": n => { droplet.backupIds = n.getCollectionOfPrimitiveValues(); }, + "created_at": n => { droplet.createdAt = n.getDateValue(); }, + "disk": n => { droplet.disk = n.getNumberValue(); }, + "disk_info": n => { droplet.diskInfo = n.getCollectionOfObjectValues(createDisk_infoFromDiscriminatorValue); }, + "features": n => { droplet.features = n.getCollectionOfPrimitiveValues(); }, + "gpu_info": n => { droplet.gpuInfo = n.getObjectValue(createGpu_infoFromDiscriminatorValue); }, + "id": n => { droplet.id = n.getNumberValue(); }, + "image": n => { droplet.image = n.getObjectValue(createImageFromDiscriminatorValue); }, + "kernel": n => { droplet.kernel = n.getObjectValue(createKernelFromDiscriminatorValue); }, + "locked": n => { droplet.locked = n.getBooleanValue(); }, + "memory": n => { droplet.memory = n.getNumberValue(); }, + "name": n => { droplet.name = n.getStringValue(); }, + "networks": n => { droplet.networks = n.getObjectValue(createDroplet_networksFromDiscriminatorValue); }, + "next_backup_window": n => { droplet.nextBackupWindow = n.getObjectValue(createDroplet_next_backup_windowFromDiscriminatorValue); }, + "region": n => { droplet.region = n.getObjectValue(createRegionFromDiscriminatorValue); }, + "size": n => { droplet.size = n.getObjectValue(createSizeFromDiscriminatorValue); }, + "size_slug": n => { droplet.sizeSlug = n.getStringValue(); }, + "snapshot_ids": n => { droplet.snapshotIds = n.getCollectionOfPrimitiveValues(); }, + "status": n => { droplet.status = n.getEnumValue(Droplet_statusObject); }, + "tags": n => { droplet.tags = n.getCollectionOfPrimitiveValues(); }, + "vcpus": n => { droplet.vcpus = n.getNumberValue(); }, + "volume_ids": n => { droplet.volumeIds = n.getCollectionOfPrimitiveValues(); }, + "vpc_uuid": n => { droplet.vpcUuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Droplet_action The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDroplet_action(droplet_action = {}) { + return { + "type": n => { droplet_action.type = n.getEnumValue(Droplet_action_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Droplet_action_change_backup_policy The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDroplet_action_change_backup_policy(droplet_action_change_backup_policy = {}) { + return { + ...deserializeIntoDroplet_action(droplet_action_change_backup_policy), + "backup_policy": n => { droplet_action_change_backup_policy.backupPolicy = n.getObjectValue(createDroplet_backup_policyFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Droplet_action_change_kernel The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDroplet_action_change_kernel(droplet_action_change_kernel = {}) { + return { + ...deserializeIntoDroplet_action(droplet_action_change_kernel), + "kernel": n => { droplet_action_change_kernel.kernel = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Droplet_action_enable_backups The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDroplet_action_enable_backups(droplet_action_enable_backups = {}) { + return { + ...deserializeIntoDroplet_action(droplet_action_enable_backups), + "backup_policy": n => { droplet_action_enable_backups.backupPolicy = n.getObjectValue(createDroplet_backup_policyFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Droplet_action_rebuild The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDroplet_action_rebuild(droplet_action_rebuild = {}) { + return { + ...deserializeIntoDroplet_action(droplet_action_rebuild), + "image": n => { droplet_action_rebuild.image = n.getNumberValue() ?? n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Droplet_action_rename The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDroplet_action_rename(droplet_action_rename = {}) { + return { + ...deserializeIntoDroplet_action(droplet_action_rename), + "name": n => { droplet_action_rename.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Droplet_action_resize The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDroplet_action_resize(droplet_action_resize = {}) { + return { + ...deserializeIntoDroplet_action(droplet_action_resize), + "disk": n => { droplet_action_resize.disk = n.getBooleanValue(); }, + "size": n => { droplet_action_resize.size = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Droplet_action_restore The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDroplet_action_restore(droplet_action_restore = {}) { + return { + ...deserializeIntoDroplet_action(droplet_action_restore), + "image": n => { droplet_action_restore.image = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Droplet_action_snapshot The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDroplet_action_snapshot(droplet_action_snapshot = {}) { + return { + ...deserializeIntoDroplet_action(droplet_action_snapshot), + "name": n => { droplet_action_snapshot.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Droplet_backup_policy The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDroplet_backup_policy(droplet_backup_policy = {}) { + return { + "hour": n => { droplet_backup_policy.hour = n.getNumberValue(); }, + "plan": n => { droplet_backup_policy.plan = n.getEnumValue(Droplet_backup_policy_planObject); }, + "retention_period_days": n => { droplet_backup_policy.retentionPeriodDays = n.getNumberValue(); }, + "weekday": n => { droplet_backup_policy.weekday = n.getEnumValue(Droplet_backup_policy_weekdayObject); }, + "window_length_hours": n => { droplet_backup_policy.windowLengthHours = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Droplet_backup_policy_record The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDroplet_backup_policy_record(droplet_backup_policy_record = {}) { + return { + "backup_enabled": n => { droplet_backup_policy_record.backupEnabled = n.getBooleanValue(); }, + "backup_policy": n => { droplet_backup_policy_record.backupPolicy = n.getObjectValue(createDroplet_backup_policyFromDiscriminatorValue); }, + "droplet_id": n => { droplet_backup_policy_record.dropletId = n.getNumberValue(); }, + "next_backup_window": n => { droplet_backup_policy_record.nextBackupWindow = n.getObjectValue(createDroplet_next_backup_windowFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Droplet_create The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDroplet_create(droplet_create = {}) { + return { + "backup_policy": n => { droplet_create.backupPolicy = n.getObjectValue(createDroplet_backup_policyFromDiscriminatorValue); }, + "backups": n => { droplet_create.backups = n.getBooleanValue(); }, + "image": n => { droplet_create.image = n.getNumberValue() ?? n.getStringValue(); }, + "ipv6": n => { droplet_create.ipv6 = n.getBooleanValue(); }, + "monitoring": n => { droplet_create.monitoring = n.getBooleanValue(); }, + "private_networking": n => { droplet_create.privateNetworking = n.getBooleanValue(); }, + "region": n => { droplet_create.region = n.getStringValue(); }, + "size": n => { droplet_create.size = n.getStringValue(); }, + "ssh_keys": n => { droplet_create.sshKeys = n.getCollectionOfPrimitiveValues(); }, + "tags": n => { droplet_create.tags = n.getCollectionOfPrimitiveValues(); }, + "user_data": n => { droplet_create.userData = n.getStringValue(); }, + "volumes": n => { droplet_create.volumes = n.getCollectionOfPrimitiveValues(); }, + "vpc_uuid": n => { droplet_create.vpcUuid = n.getStringValue(); }, + "with_droplet_agent": n => { droplet_create.withDropletAgent = n.getBooleanValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Droplet_multi_create The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDroplet_multi_create(droplet_multi_create = {}) { + return { + ...deserializeIntoDroplet_create(droplet_multi_create), + "names": n => { droplet_multi_create.names = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Droplet_networks The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDroplet_networks(droplet_networks = {}) { + return { + "v4": n => { droplet_networks.v4 = n.getCollectionOfObjectValues(createNetwork_v4FromDiscriminatorValue); }, + "v6": n => { droplet_networks.v6 = n.getCollectionOfObjectValues(createNetwork_v6FromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Droplet_next_backup_window The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDroplet_next_backup_window(droplet_next_backup_window = {}) { + return { + "end": n => { droplet_next_backup_window.end = n.getDateValue(); }, + "start": n => { droplet_next_backup_window.start = n.getDateValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Droplet_single_create The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDroplet_single_create(droplet_single_create = {}) { + return { + ...deserializeIntoDroplet_create(droplet_single_create), + "name": n => { droplet_single_create.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Droplet_snapshot The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDroplet_snapshot(droplet_snapshot = {}) { + return { + ...deserializeIntoSnapshots_base(droplet_snapshot), + "id": n => { droplet_snapshot.id = n.getNumberValue(); }, + "type": n => { droplet_snapshot.type = n.getEnumValue(Droplet_snapshot_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Elasticsearch_logsink The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoElasticsearch_logsink(elasticsearch_logsink = {}) { + return { + "ca": n => { elasticsearch_logsink.ca = n.getStringValue(); }, + "index_days_max": n => { elasticsearch_logsink.indexDaysMax = n.getNumberValue(); }, + "index_prefix": n => { elasticsearch_logsink.indexPrefix = n.getStringValue(); }, + "timeout": n => { elasticsearch_logsink.timeout = n.getNumberValue(); }, + "url": n => { elasticsearch_logsink.url = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Error_with_root_causes The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoError_with_root_causes(error_with_root_causes = {}) { + return { + "error": n => { error_with_root_causes.errorEscaped = n.getStringValue(); }, + "messages": n => { error_with_root_causes.messages = n.getCollectionOfPrimitiveValues(); }, + "root_causes": n => { error_with_root_causes.rootCauses = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param ErrorEscaped The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoErrorEscaped(errorEscaped = {}) { + return { + "id": n => { errorEscaped.id = n.getStringValue(); }, + "message": n => { errorEscaped.messageEscaped = n.getStringValue(); }, + "request_id": n => { errorEscaped.requestId = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Events_logs The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoEvents_logs(events_logs = {}) { + return { + "cluster_name": n => { events_logs.clusterName = n.getStringValue(); }, + "create_time": n => { events_logs.createTime = n.getStringValue(); }, + "event_type": n => { events_logs.eventType = n.getEnumValue(Events_logs_event_typeObject); }, + "id": n => { events_logs.id = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Firewall The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoFirewall(firewall = {}) { + return { + ...deserializeIntoFirewall_rules(firewall), + "created_at": n => { firewall.createdAt = n.getDateValue(); }, + "droplet_ids": n => { firewall.dropletIds = n.getCollectionOfPrimitiveValues(); }, + "id": n => { firewall.id = n.getStringValue(); }, + "name": n => { firewall.name = n.getStringValue(); }, + "pending_changes": n => { firewall.pendingChanges = n.getCollectionOfObjectValues(createFirewall_pending_changesFromDiscriminatorValue); }, + "status": n => { firewall.status = n.getEnumValue(Firewall_statusObject); }, + "tags": n => { firewall.tags = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Firewall_pending_changes The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoFirewall_pending_changes(firewall_pending_changes = {}) { + return { + "droplet_id": n => { firewall_pending_changes.dropletId = n.getNumberValue(); }, + "removing": n => { firewall_pending_changes.removing = n.getBooleanValue(); }, + "status": n => { firewall_pending_changes.status = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Firewall_rule The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoFirewall_rule(firewall_rule = {}) { + return { + "cluster_uuid": n => { firewall_rule.clusterUuid = n.getStringValue(); }, + "created_at": n => { firewall_rule.createdAt = n.getDateValue(); }, + "description": n => { firewall_rule.description = n.getStringValue(); }, + "type": n => { firewall_rule.type = n.getEnumValue(Firewall_rule_typeObject); }, + "uuid": n => { firewall_rule.uuid = n.getStringValue(); }, + "value": n => { firewall_rule.value = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Firewall_rule_base The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoFirewall_rule_base(firewall_rule_base = {}) { + return { + "ports": n => { firewall_rule_base.ports = n.getStringValue(); }, + "protocol": n => { firewall_rule_base.protocol = n.getEnumValue(Firewall_rule_base_protocolObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Firewall_rule_target The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoFirewall_rule_target(firewall_rule_target = {}) { + return { + "addresses": n => { firewall_rule_target.addresses = n.getCollectionOfPrimitiveValues(); }, + "droplet_ids": n => { firewall_rule_target.dropletIds = n.getCollectionOfPrimitiveValues(); }, + "kubernetes_ids": n => { firewall_rule_target.kubernetesIds = n.getCollectionOfPrimitiveValues(); }, + "load_balancer_uids": n => { firewall_rule_target.loadBalancerUids = n.getCollectionOfPrimitiveValues(); }, + "tags": n => { firewall_rule_target.tags = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Firewall_rules The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoFirewall_rules(firewall_rules = {}) { + return { + "inbound_rules": n => { firewall_rules.inboundRules = n.getCollectionOfObjectValues(createFirewall_rules_inbound_rulesFromDiscriminatorValue); }, + "outbound_rules": n => { firewall_rules.outboundRules = n.getCollectionOfObjectValues(createFirewall_rules_outbound_rulesFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Firewall_rules_inbound_rules The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoFirewall_rules_inbound_rules(firewall_rules_inbound_rules = {}) { + return { + ...deserializeIntoFirewall_rule_base(firewall_rules_inbound_rules), + "sources": n => { firewall_rules_inbound_rules.sources = n.getObjectValue(createFirewall_rule_targetFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Firewall_rules_outbound_rules The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoFirewall_rules_outbound_rules(firewall_rules_outbound_rules = {}) { + return { + ...deserializeIntoFirewall_rule_base(firewall_rules_outbound_rules), + "destinations": n => { firewall_rules_outbound_rules.destinations = n.getObjectValue(createFirewall_rule_targetFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Floating_ip The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoFloating_ip(floating_ip = {}) { + return { + "droplet": n => { floating_ip.droplet = n.getObjectValue(createDropletFromDiscriminatorValue); }, + "ip": n => { floating_ip.ip = n.getStringValue(); }, + "locked": n => { floating_ip.locked = n.getBooleanValue(); }, + "project_id": n => { floating_ip.projectId = n.getGuidValue(); }, + "region": n => { floating_ip.region = n.getObjectValue(createRegionFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Floating_ip_action_assign The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoFloating_ip_action_assign(floating_ip_action_assign = {}) { + return { + ...deserializeIntoFloatingIPsAction(floating_ip_action_assign), + "droplet_id": n => { floating_ip_action_assign.dropletId = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Floating_ip_action_unassign The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoFloating_ip_action_unassign(floating_ip_action_unassign = {}) { + return { + ...deserializeIntoFloatingIPsAction(floating_ip_action_unassign), + }; +} +/** + * The deserialization information for the current model + * @param Floating_ip_createMember1 The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoFloating_ip_createMember1(floating_ip_createMember1 = {}) { + return { + "droplet_id": n => { floating_ip_createMember1.dropletId = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Floating_ip_createMember2 The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoFloating_ip_createMember2(floating_ip_createMember2 = {}) { + return { + "project_id": n => { floating_ip_createMember2.projectId = n.getGuidValue(); }, + "region": n => { floating_ip_createMember2.region = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param FloatingIPsAction The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoFloatingIPsAction(floatingIPsAction = {}) { + return { + "type": n => { floatingIPsAction.type = n.getEnumValue(FloatingIPsAction_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Forward_links The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoForward_links(forward_links = {}) { + return { + "last": n => { forward_links.last = n.getStringValue(); }, + "next": n => { forward_links.next = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Forwarding_rule The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoForwarding_rule(forwarding_rule = {}) { + return { + "certificate_id": n => { forwarding_rule.certificateId = n.getStringValue(); }, + "entry_port": n => { forwarding_rule.entryPort = n.getNumberValue(); }, + "entry_protocol": n => { forwarding_rule.entryProtocol = n.getEnumValue(Forwarding_rule_entry_protocolObject); }, + "target_port": n => { forwarding_rule.targetPort = n.getNumberValue(); }, + "target_protocol": n => { forwarding_rule.targetProtocol = n.getEnumValue(Forwarding_rule_target_protocolObject); }, + "tls_passthrough": n => { forwarding_rule.tlsPassthrough = n.getBooleanValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Garbage_collection The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoGarbage_collection(garbage_collection = {}) { + return { + "blobs_deleted": n => { garbage_collection.blobsDeleted = n.getNumberValue(); }, + "created_at": n => { garbage_collection.createdAt = n.getDateValue(); }, + "freed_bytes": n => { garbage_collection.freedBytes = n.getNumberValue(); }, + "registry_name": n => { garbage_collection.registryName = n.getStringValue(); }, + "status": n => { garbage_collection.status = n.getEnumValue(Garbage_collection_statusObject); }, + "updated_at": n => { garbage_collection.updatedAt = n.getDateValue(); }, + "uuid": n => { garbage_collection.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param GenaiapiRegion The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoGenaiapiRegion(genaiapiRegion = {}) { + return { + "inference_url": n => { genaiapiRegion.inferenceUrl = n.getStringValue(); }, + "region": n => { genaiapiRegion.region = n.getStringValue(); }, + "serves_batch": n => { genaiapiRegion.servesBatch = n.getBooleanValue(); }, + "serves_inference": n => { genaiapiRegion.servesInference = n.getBooleanValue(); }, + "stream_inference_url": n => { genaiapiRegion.streamInferenceUrl = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Glb_settings The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoGlb_settings(glb_settings = {}) { + return { + "cdn": n => { glb_settings.cdn = n.getObjectValue(createGlb_settings_cdnFromDiscriminatorValue); }, + "failover_threshold": n => { glb_settings.failoverThreshold = n.getNumberValue(); }, + "region_priorities": n => { glb_settings.regionPriorities = n.getObjectValue(createGlb_settings_region_prioritiesFromDiscriminatorValue); }, + "target_port": n => { glb_settings.targetPort = n.getNumberValue(); }, + "target_protocol": n => { glb_settings.targetProtocol = n.getEnumValue(Glb_settings_target_protocolObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Glb_settings_cdn The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoGlb_settings_cdn(glb_settings_cdn = {}) { + return { + "is_enabled": n => { glb_settings_cdn.isEnabled = n.getBooleanValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Glb_settings_region_priorities The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoGlb_settings_region_priorities(glb_settings_region_priorities = {}) { + return {}; +} +/** + * The deserialization information for the current model + * @param Gpu_info The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoGpu_info(gpu_info = {}) { + return { + "count": n => { gpu_info.count = n.getNumberValue(); }, + "model": n => { gpu_info.model = n.getStringValue(); }, + "vram": n => { gpu_info.vram = n.getObjectValue(createGpu_info_vramFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Gpu_info_vram The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoGpu_info_vram(gpu_info_vram = {}) { + return { + "amount": n => { gpu_info_vram.amount = n.getNumberValue(); }, + "unit": n => { gpu_info_vram.unit = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Grant The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoGrant(grant = {}) { + return { + "bucket": n => { grant.bucket = n.getStringValue(); }, + "permission": n => { grant.permission = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Health_check The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoHealth_check(health_check = {}) { + return { + "check_interval_seconds": n => { health_check.checkIntervalSeconds = n.getNumberValue(); }, + "healthy_threshold": n => { health_check.healthyThreshold = n.getNumberValue(); }, + "path": n => { health_check.path = n.getStringValue() ?? "/"; }, + "port": n => { health_check.port = n.getNumberValue(); }, + "protocol": n => { health_check.protocol = n.getEnumValue(Health_check_protocolObject) ?? Health_check_protocolObject.Http; }, + "response_timeout_seconds": n => { health_check.responseTimeoutSeconds = n.getNumberValue(); }, + "unhealthy_threshold": n => { health_check.unhealthyThreshold = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param History The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoHistory(history = {}) { + return { + "created_at": n => { history.createdAt = n.getDateValue(); }, + "current_instance_count": n => { history.currentInstanceCount = n.getNumberValue(); }, + "desired_instance_count": n => { history.desiredInstanceCount = n.getNumberValue(); }, + "history_event_id": n => { history.historyEventId = n.getStringValue(); }, + "reason": n => { history.reason = n.getEnumValue(History_reasonObject); }, + "status": n => { history.status = n.getEnumValue(History_statusObject); }, + "updated_at": n => { history.updatedAt = n.getDateValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Image The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoImage(image = {}) { + return { + "created_at": n => { image.createdAt = n.getDateValue(); }, + "description": n => { image.description = n.getStringValue(); }, + "distribution": n => { image.distribution = n.getEnumValue(DistributionObject); }, + "error_message": n => { image.errorMessage = n.getStringValue(); }, + "id": n => { image.id = n.getNumberValue(); }, + "min_disk_size": n => { image.minDiskSize = n.getNumberValue(); }, + "name": n => { image.name = n.getStringValue(); }, + "public": n => { image.public = n.getBooleanValue(); }, + "regions": n => { image.regions = n.getCollectionOfEnumValues(Region_slugObject); }, + "size_gigabytes": n => { image.sizeGigabytes = n.getNumberValue(); }, + "slug": n => { image.slug = n.getStringValue(); }, + "status": n => { image.status = n.getEnumValue(Image_statusObject); }, + "tags": n => { image.tags = n.getCollectionOfPrimitiveValues(); }, + "type": n => { image.type = n.getEnumValue(Image_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Image_action_base The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoImage_action_base(image_action_base = {}) { + return { + "type": n => { image_action_base.type = n.getEnumValue(Image_action_base_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Image_action_transfer The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoImage_action_transfer(image_action_transfer = {}) { + return { + ...deserializeIntoImage_action_base(image_action_transfer), + "region": n => { image_action_transfer.region = n.getEnumValue(Region_slugObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Image_new_custom The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoImage_new_custom(image_new_custom = {}) { + return { + ...deserializeIntoImage_update(image_new_custom), + "region": n => { image_new_custom.region = n.getEnumValue(Region_slugObject); }, + "tags": n => { image_new_custom.tags = n.getCollectionOfPrimitiveValues(); }, + "url": n => { image_new_custom.url = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Image_update The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoImage_update(image_update = {}) { + return { + "description": n => { image_update.description = n.getStringValue(); }, + "distribution": n => { image_update.distribution = n.getEnumValue(DistributionObject); }, + "name": n => { image_update.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Invoice_item The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoInvoice_item(invoice_item = {}) { + return { + "amount": n => { invoice_item.amount = n.getStringValue(); }, + "description": n => { invoice_item.description = n.getStringValue(); }, + "duration": n => { invoice_item.duration = n.getStringValue(); }, + "duration_unit": n => { invoice_item.durationUnit = n.getStringValue(); }, + "end_time": n => { invoice_item.endTime = n.getStringValue(); }, + "group_description": n => { invoice_item.groupDescription = n.getStringValue(); }, + "product": n => { invoice_item.product = n.getStringValue(); }, + "project_name": n => { invoice_item.projectName = n.getStringValue(); }, + "resource_id": n => { invoice_item.resourceId = n.getStringValue(); }, + "resource_uuid": n => { invoice_item.resourceUuid = n.getStringValue(); }, + "start_time": n => { invoice_item.startTime = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Invoice_preview The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoInvoice_preview(invoice_preview = {}) { + return { + "amount": n => { invoice_preview.amount = n.getStringValue(); }, + "invoice_id": n => { invoice_preview.invoiceId = n.getStringValue(); }, + "invoice_period": n => { invoice_preview.invoicePeriod = n.getStringValue(); }, + "invoice_uuid": n => { invoice_preview.invoiceUuid = n.getStringValue(); }, + "updated_at": n => { invoice_preview.updatedAt = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Invoice_summary The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoInvoice_summary(invoice_summary = {}) { + return { + "amount": n => { invoice_summary.amount = n.getStringValue(); }, + "billing_period": n => { invoice_summary.billingPeriod = n.getStringValue(); }, + "credits_and_adjustments": n => { invoice_summary.creditsAndAdjustments = n.getObjectValue(createSimple_chargeFromDiscriminatorValue); }, + "invoice_id": n => { invoice_summary.invoiceId = n.getStringValue(); }, + "invoice_uuid": n => { invoice_summary.invoiceUuid = n.getStringValue(); }, + "overages": n => { invoice_summary.overages = n.getObjectValue(createSimple_chargeFromDiscriminatorValue); }, + "product_charges": n => { invoice_summary.productCharges = n.getObjectValue(createProduct_usage_chargesFromDiscriminatorValue); }, + "taxes": n => { invoice_summary.taxes = n.getObjectValue(createSimple_chargeFromDiscriminatorValue); }, + "user_billing_address": n => { invoice_summary.userBillingAddress = n.getObjectValue(createBilling_addressFromDiscriminatorValue); }, + "user_company": n => { invoice_summary.userCompany = n.getStringValue(); }, + "user_email": n => { invoice_summary.userEmail = n.getStringValue(); }, + "user_name": n => { invoice_summary.userName = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Kafka_advanced_config The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKafka_advanced_config(kafka_advanced_config = {}) { + return { + "auto_create_topics_enable": n => { kafka_advanced_config.autoCreateTopicsEnable = n.getBooleanValue(); }, + "compression_type": n => { kafka_advanced_config.compressionType = n.getEnumValue(Kafka_advanced_config_compression_typeObject); }, + "connections_max_idle_ms": n => { kafka_advanced_config.connectionsMaxIdleMs = n.getNumberValue(); }, + "default_replication_factor": n => { kafka_advanced_config.defaultReplicationFactor = n.getNumberValue(); }, + "group_initial_rebalance_delay_ms": n => { kafka_advanced_config.groupInitialRebalanceDelayMs = n.getNumberValue(); }, + "group_max_session_timeout_ms": n => { kafka_advanced_config.groupMaxSessionTimeoutMs = n.getNumberValue(); }, + "group_min_session_timeout_ms": n => { kafka_advanced_config.groupMinSessionTimeoutMs = n.getNumberValue(); }, + "log_cleaner_delete_retention_ms": n => { kafka_advanced_config.logCleanerDeleteRetentionMs = n.getNumberValue(); }, + "log_cleaner_max_compaction_lag_ms": n => { kafka_advanced_config.logCleanerMaxCompactionLagMs = n.getNumberValue(); }, + "log_cleaner_min_cleanable_ratio": n => { kafka_advanced_config.logCleanerMinCleanableRatio = n.getNumberValue(); }, + "log_cleaner_min_compaction_lag_ms": n => { kafka_advanced_config.logCleanerMinCompactionLagMs = n.getNumberValue(); }, + "log_cleanup_policy": n => { kafka_advanced_config.logCleanupPolicy = n.getEnumValue(Kafka_advanced_config_log_cleanup_policyObject); }, + "log_flush_interval_messages": n => { kafka_advanced_config.logFlushIntervalMessages = n.getNumberValue(); }, + "log_flush_interval_ms": n => { kafka_advanced_config.logFlushIntervalMs = n.getNumberValue(); }, + "log_index_interval_bytes": n => { kafka_advanced_config.logIndexIntervalBytes = n.getNumberValue(); }, + "log_index_size_max_bytes": n => { kafka_advanced_config.logIndexSizeMaxBytes = n.getNumberValue(); }, + "log_message_downconversion_enable": n => { kafka_advanced_config.logMessageDownconversionEnable = n.getBooleanValue(); }, + "log_message_timestamp_difference_max_ms": n => { kafka_advanced_config.logMessageTimestampDifferenceMaxMs = n.getNumberValue(); }, + "log_message_timestamp_type": n => { kafka_advanced_config.logMessageTimestampType = n.getEnumValue(Kafka_advanced_config_log_message_timestamp_typeObject); }, + "log_preallocate": n => { kafka_advanced_config.logPreallocate = n.getBooleanValue(); }, + "log_retention_bytes": n => { kafka_advanced_config.logRetentionBytes = n.getNumberValue(); }, + "log_retention_hours": n => { kafka_advanced_config.logRetentionHours = n.getNumberValue(); }, + "log_retention_ms": n => { kafka_advanced_config.logRetentionMs = n.getNumberValue(); }, + "log_roll_jitter_ms": n => { kafka_advanced_config.logRollJitterMs = n.getNumberValue(); }, + "log_roll_ms": n => { kafka_advanced_config.logRollMs = n.getNumberValue(); }, + "log_segment_bytes": n => { kafka_advanced_config.logSegmentBytes = n.getNumberValue(); }, + "log_segment_delete_delay_ms": n => { kafka_advanced_config.logSegmentDeleteDelayMs = n.getNumberValue(); }, + "max_connections_per_ip": n => { kafka_advanced_config.maxConnectionsPerIp = n.getNumberValue(); }, + "max_incremental_fetch_session_cache_slots": n => { kafka_advanced_config.maxIncrementalFetchSessionCacheSlots = n.getNumberValue(); }, + "message_max_bytes": n => { kafka_advanced_config.messageMaxBytes = n.getNumberValue(); }, + "min_insync_replicas": n => { kafka_advanced_config.minInsyncReplicas = n.getNumberValue(); }, + "num_partitions": n => { kafka_advanced_config.numPartitions = n.getNumberValue(); }, + "offsets_retention_minutes": n => { kafka_advanced_config.offsetsRetentionMinutes = n.getNumberValue(); }, + "producer_purgatory_purge_interval_requests": n => { kafka_advanced_config.producerPurgatoryPurgeIntervalRequests = n.getNumberValue(); }, + "replica_fetch_max_bytes": n => { kafka_advanced_config.replicaFetchMaxBytes = n.getNumberValue(); }, + "replica_fetch_response_max_bytes": n => { kafka_advanced_config.replicaFetchResponseMaxBytes = n.getNumberValue(); }, + "schema_registry": n => { kafka_advanced_config.schemaRegistry = n.getBooleanValue(); }, + "socket_request_max_bytes": n => { kafka_advanced_config.socketRequestMaxBytes = n.getNumberValue(); }, + "transaction_remove_expired_transaction_cleanup_interval_ms": n => { kafka_advanced_config.transactionRemoveExpiredTransactionCleanupIntervalMs = n.getNumberValue(); }, + "transaction_state_log_segment_bytes": n => { kafka_advanced_config.transactionStateLogSegmentBytes = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Kafka_schema_verbose The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKafka_schema_verbose(kafka_schema_verbose = {}) { + return { + "schema": n => { kafka_schema_verbose.schema = n.getStringValue(); }, + "schema_id": n => { kafka_schema_verbose.schemaId = n.getNumberValue(); }, + "schema_type": n => { kafka_schema_verbose.schemaType = n.getEnumValue(Kafka_schema_verbose_schema_typeObject); }, + "subject_name": n => { kafka_schema_verbose.subjectName = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Kafka_schema_version_verbose The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKafka_schema_version_verbose(kafka_schema_version_verbose = {}) { + return { + "schema": n => { kafka_schema_version_verbose.schema = n.getStringValue(); }, + "schema_id": n => { kafka_schema_version_verbose.schemaId = n.getNumberValue(); }, + "schema_type": n => { kafka_schema_version_verbose.schemaType = n.getEnumValue(Kafka_schema_version_verbose_schema_typeObject); }, + "subject_name": n => { kafka_schema_version_verbose.subjectName = n.getStringValue(); }, + "version": n => { kafka_schema_version_verbose.version = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Kafka_topic The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKafka_topic(kafka_topic = {}) { + return { + ...deserializeIntoKafka_topic_base(kafka_topic), + "state": n => { kafka_topic.state = n.getEnumValue(Kafka_topic_stateObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Kafka_topic_base The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKafka_topic_base(kafka_topic_base = {}) { + return { + "name": n => { kafka_topic_base.name = n.getStringValue(); }, + "partition_count": n => { kafka_topic_base.partitionCount = n.getNumberValue(); }, + "replication_factor": n => { kafka_topic_base.replicationFactor = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Kafka_topic_config The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKafka_topic_config(kafka_topic_config = {}) { + return { + "cleanup_policy": n => { kafka_topic_config.cleanupPolicy = n.getEnumValue(Kafka_topic_config_cleanup_policyObject) ?? Kafka_topic_config_cleanup_policyObject.Delete; }, + "compression_type": n => { kafka_topic_config.compressionType = n.getEnumValue(Kafka_topic_config_compression_typeObject) ?? Kafka_topic_config_compression_typeObject.Producer; }, + "delete_retention_ms": n => { kafka_topic_config.deleteRetentionMs = n.getNumberValue(); }, + "file_delete_delay_ms": n => { kafka_topic_config.fileDeleteDelayMs = n.getNumberValue(); }, + "flush_messages": n => { kafka_topic_config.flushMessages = n.getNumberValue(); }, + "flush_ms": n => { kafka_topic_config.flushMs = n.getNumberValue(); }, + "index_interval_bytes": n => { kafka_topic_config.indexIntervalBytes = n.getNumberValue(); }, + "max_compaction_lag_ms": n => { kafka_topic_config.maxCompactionLagMs = n.getNumberValue(); }, + "max_message_bytes": n => { kafka_topic_config.maxMessageBytes = n.getNumberValue(); }, + "message_down_conversion_enable": n => { kafka_topic_config.messageDownConversionEnable = n.getBooleanValue(); }, + "message_format_version": n => { kafka_topic_config.messageFormatVersion = n.getEnumValue(Kafka_topic_config_message_format_versionObject) ?? Kafka_topic_config_message_format_versionObject.ThreeZeroIV1; }, + "message_timestamp_type": n => { kafka_topic_config.messageTimestampType = n.getEnumValue(Kafka_topic_config_message_timestamp_typeObject) ?? Kafka_topic_config_message_timestamp_typeObject.Create_time; }, + "min_cleanable_dirty_ratio": n => { kafka_topic_config.minCleanableDirtyRatio = n.getNumberValue(); }, + "min_compaction_lag_ms": n => { kafka_topic_config.minCompactionLagMs = n.getNumberValue(); }, + "min_insync_replicas": n => { kafka_topic_config.minInsyncReplicas = n.getNumberValue(); }, + "preallocate": n => { kafka_topic_config.preallocate = n.getBooleanValue(); }, + "retention_bytes": n => { kafka_topic_config.retentionBytes = n.getNumberValue(); }, + "retention_ms": n => { kafka_topic_config.retentionMs = n.getNumberValue(); }, + "segment_bytes": n => { kafka_topic_config.segmentBytes = n.getNumberValue(); }, + "segment_jitter_ms": n => { kafka_topic_config.segmentJitterMs = n.getNumberValue(); }, + "segment_ms": n => { kafka_topic_config.segmentMs = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Kafka_topic_create The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKafka_topic_create(kafka_topic_create = {}) { + return { + ...deserializeIntoKafka_topic_base(kafka_topic_create), + "config": n => { kafka_topic_create.config = n.getObjectValue(createKafka_topic_configFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Kafka_topic_partition The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKafka_topic_partition(kafka_topic_partition = {}) { + return { + "consumer_groups": n => { kafka_topic_partition.consumerGroups = n.getCollectionOfObjectValues(createKafka_topic_partition_consumer_groupsFromDiscriminatorValue); }, + "earliest_offset": n => { kafka_topic_partition.earliestOffset = n.getNumberValue(); }, + "id": n => { kafka_topic_partition.id = n.getNumberValue(); }, + "in_sync_replicas": n => { kafka_topic_partition.inSyncReplicas = n.getNumberValue(); }, + "size": n => { kafka_topic_partition.size = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Kafka_topic_partition_consumer_groups The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKafka_topic_partition_consumer_groups(kafka_topic_partition_consumer_groups = {}) { + return { + "group_name": n => { kafka_topic_partition_consumer_groups.groupName = n.getStringValue(); }, + "offset": n => { kafka_topic_partition_consumer_groups.offset = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Kafka_topic_update The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKafka_topic_update(kafka_topic_update = {}) { + return { + "config": n => { kafka_topic_update.config = n.getObjectValue(createKafka_topic_configFromDiscriminatorValue); }, + "partition_count": n => { kafka_topic_update.partitionCount = n.getNumberValue(); }, + "replication_factor": n => { kafka_topic_update.replicationFactor = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Kafka_topic_verbose The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKafka_topic_verbose(kafka_topic_verbose = {}) { + return { + "config": n => { kafka_topic_verbose.config = n.getObjectValue(createKafka_topic_configFromDiscriminatorValue); }, + "name": n => { kafka_topic_verbose.name = n.getStringValue(); }, + "partitions": n => { kafka_topic_verbose.partitions = n.getCollectionOfObjectValues(createKafka_topic_partitionFromDiscriminatorValue); }, + "replication_factor": n => { kafka_topic_verbose.replicationFactor = n.getNumberValue(); }, + "state": n => { kafka_topic_verbose.state = n.getEnumValue(Kafka_topic_verbose_stateObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Kernel The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKernel(kernel = {}) { + return { + "id": n => { kernel.id = n.getNumberValue(); }, + "name": n => { kernel.name = n.getStringValue(); }, + "version": n => { kernel.version = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Key The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKey(key = {}) { + return { + "access_key": n => { key.accessKey = n.getStringValue(); }, + "created_at": n => { key.createdAt = n.getDateValue(); }, + "grants": n => { key.grants = n.getCollectionOfObjectValues(createGrantFromDiscriminatorValue); }, + "name": n => { key.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Key_create_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKey_create_response(key_create_response = {}) { + return { + ...deserializeIntoKey(key_create_response), + "secret_key": n => { key_create_response.secretKey = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Kubernetes_node_pool The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKubernetes_node_pool(kubernetes_node_pool = {}) { + return { + "auto_scale": n => { kubernetes_node_pool.autoScale = n.getBooleanValue(); }, + "count": n => { kubernetes_node_pool.count = n.getNumberValue(); }, + "id": n => { kubernetes_node_pool.id = n.getGuidValue(); }, + "labels": n => { kubernetes_node_pool.labels = n.getObjectValue(createKubernetes_node_pool_labelsFromDiscriminatorValue); }, + "max_nodes": n => { kubernetes_node_pool.maxNodes = n.getNumberValue(); }, + "min_nodes": n => { kubernetes_node_pool.minNodes = n.getNumberValue(); }, + "name": n => { kubernetes_node_pool.name = n.getStringValue(); }, + "nodes": n => { kubernetes_node_pool.nodes = n.getCollectionOfObjectValues(createNodeFromDiscriminatorValue); }, + "size": n => { kubernetes_node_pool.size = n.getStringValue(); }, + "tags": n => { kubernetes_node_pool.tags = n.getCollectionOfPrimitiveValues(); }, + "taints": n => { kubernetes_node_pool.taints = n.getCollectionOfObjectValues(createKubernetes_node_pool_taintFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Kubernetes_node_pool_labels The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKubernetes_node_pool_labels(kubernetes_node_pool_labels = {}) { + return {}; +} +/** + * The deserialization information for the current model + * @param Kubernetes_node_pool_taint The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKubernetes_node_pool_taint(kubernetes_node_pool_taint = {}) { + return { + "effect": n => { kubernetes_node_pool_taint.effect = n.getEnumValue(Kubernetes_node_pool_taint_effectObject); }, + "key": n => { kubernetes_node_pool_taint.key = n.getStringValue(); }, + "value": n => { kubernetes_node_pool_taint.value = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Kubernetes_node_pool_update The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKubernetes_node_pool_update(kubernetes_node_pool_update = {}) { + return { + "auto_scale": n => { kubernetes_node_pool_update.autoScale = n.getBooleanValue(); }, + "count": n => { kubernetes_node_pool_update.count = n.getNumberValue(); }, + "id": n => { kubernetes_node_pool_update.id = n.getGuidValue(); }, + "labels": n => { kubernetes_node_pool_update.labels = n.getObjectValue(createKubernetes_node_pool_update_labelsFromDiscriminatorValue); }, + "max_nodes": n => { kubernetes_node_pool_update.maxNodes = n.getNumberValue(); }, + "min_nodes": n => { kubernetes_node_pool_update.minNodes = n.getNumberValue(); }, + "name": n => { kubernetes_node_pool_update.name = n.getStringValue(); }, + "nodes": n => { kubernetes_node_pool_update.nodes = n.getCollectionOfObjectValues(createNodeFromDiscriminatorValue); }, + "tags": n => { kubernetes_node_pool_update.tags = n.getCollectionOfPrimitiveValues(); }, + "taints": n => { kubernetes_node_pool_update.taints = n.getCollectionOfObjectValues(createKubernetes_node_pool_taintFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Kubernetes_node_pool_update_labels The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKubernetes_node_pool_update_labels(kubernetes_node_pool_update_labels = {}) { + return {}; +} +/** + * The deserialization information for the current model + * @param Kubernetes_options The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKubernetes_options(kubernetes_options = {}) { + return { + "options": n => { kubernetes_options.options = n.getObjectValue(createKubernetes_options_optionsFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Kubernetes_options_options The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKubernetes_options_options(kubernetes_options_options = {}) { + return { + "regions": n => { kubernetes_options_options.regions = n.getCollectionOfObjectValues(createKubernetes_regionFromDiscriminatorValue); }, + "sizes": n => { kubernetes_options_options.sizes = n.getCollectionOfObjectValues(createKubernetes_sizeFromDiscriminatorValue); }, + "versions": n => { kubernetes_options_options.versions = n.getCollectionOfObjectValues(createKubernetes_versionFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Kubernetes_region The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKubernetes_region(kubernetes_region = {}) { + return { + "name": n => { kubernetes_region.name = n.getStringValue(); }, + "slug": n => { kubernetes_region.slug = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Kubernetes_size The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKubernetes_size(kubernetes_size = {}) { + return { + "name": n => { kubernetes_size.name = n.getStringValue(); }, + "slug": n => { kubernetes_size.slug = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Kubernetes_version The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoKubernetes_version(kubernetes_version = {}) { + return { + "kubernetes_version": n => { kubernetes_version.kubernetesVersion = n.getStringValue(); }, + "slug": n => { kubernetes_version.slug = n.getStringValue(); }, + "supported_features": n => { kubernetes_version.supportedFeatures = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Lb_firewall The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoLb_firewall(lb_firewall = {}) { + return { + "allow": n => { lb_firewall.allow = n.getCollectionOfPrimitiveValues(); }, + "deny": n => { lb_firewall.deny = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Load_balancer The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoLoad_balancer(load_balancer = {}) { + return { + ...deserializeIntoLoad_balancer_base(load_balancer), + "droplet_ids": n => { load_balancer.dropletIds = n.getCollectionOfPrimitiveValues(); }, + "region": n => { load_balancer.region = n.getObjectValue(createLoad_balancer_regionFromDiscriminatorValue); }, + "tag": n => { load_balancer.tag = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Load_balancer_base The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoLoad_balancer_base(load_balancer_base = {}) { + return { + "algorithm": n => { load_balancer_base.algorithm = n.getEnumValue(Load_balancer_base_algorithmObject) ?? Load_balancer_base_algorithmObject.Round_robin; }, + "created_at": n => { load_balancer_base.createdAt = n.getDateValue(); }, + "disable_lets_encrypt_dns_records": n => { load_balancer_base.disableLetsEncryptDnsRecords = n.getBooleanValue(); }, + "domains": n => { load_balancer_base.domains = n.getCollectionOfObjectValues(createDomainsFromDiscriminatorValue); }, + "enable_backend_keepalive": n => { load_balancer_base.enableBackendKeepalive = n.getBooleanValue(); }, + "enable_proxy_protocol": n => { load_balancer_base.enableProxyProtocol = n.getBooleanValue(); }, + "firewall": n => { load_balancer_base.firewall = n.getObjectValue(createLb_firewallFromDiscriminatorValue); }, + "forwarding_rules": n => { load_balancer_base.forwardingRules = n.getCollectionOfObjectValues(createForwarding_ruleFromDiscriminatorValue); }, + "glb_settings": n => { load_balancer_base.glbSettings = n.getObjectValue(createGlb_settingsFromDiscriminatorValue); }, + "health_check": n => { load_balancer_base.healthCheck = n.getObjectValue(createHealth_checkFromDiscriminatorValue); }, + "http_idle_timeout_seconds": n => { load_balancer_base.httpIdleTimeoutSeconds = n.getNumberValue(); }, + "id": n => { load_balancer_base.id = n.getGuidValue(); }, + "ip": n => { load_balancer_base.ip = n.getStringValue(); }, + "ipv6": n => { load_balancer_base.ipv6 = n.getStringValue(); }, + "name": n => { load_balancer_base.name = n.getStringValue(); }, + "network": n => { load_balancer_base.network = n.getEnumValue(Load_balancer_base_networkObject) ?? Load_balancer_base_networkObject.EXTERNAL; }, + "network_stack": n => { load_balancer_base.networkStack = n.getEnumValue(Load_balancer_base_network_stackObject) ?? Load_balancer_base_network_stackObject.IPV4; }, + "project_id": n => { load_balancer_base.projectId = n.getStringValue(); }, + "redirect_http_to_https": n => { load_balancer_base.redirectHttpToHttps = n.getBooleanValue(); }, + "size": n => { load_balancer_base.size = n.getEnumValue(Load_balancer_base_sizeObject) ?? Load_balancer_base_sizeObject.LbSmall; }, + "size_unit": n => { load_balancer_base.sizeUnit = n.getNumberValue(); }, + "status": n => { load_balancer_base.status = n.getEnumValue(Load_balancer_base_statusObject); }, + "sticky_sessions": n => { load_balancer_base.stickySessions = n.getObjectValue(createSticky_sessionsFromDiscriminatorValue); }, + "target_load_balancer_ids": n => { load_balancer_base.targetLoadBalancerIds = n.getCollectionOfPrimitiveValues(); }, + "tls_cipher_policy": n => { load_balancer_base.tlsCipherPolicy = n.getEnumValue(Load_balancer_base_tls_cipher_policyObject) ?? Load_balancer_base_tls_cipher_policyObject.DEFAULTEscaped; }, + "type": n => { load_balancer_base.type = n.getEnumValue(Load_balancer_base_typeObject) ?? Load_balancer_base_typeObject.REGIONAL; }, + "vpc_uuid": n => { load_balancer_base.vpcUuid = n.getGuidValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Load_balancer_region The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoLoad_balancer_region(load_balancer_region = {}) { + return { + ...deserializeIntoRegion(load_balancer_region), + }; +} +/** + * The deserialization information for the current model + * @param Logsink_base The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoLogsink_base(logsink_base = {}) { + return { + "sink_name": n => { logsink_base.sinkName = n.getStringValue(); }, + "sink_type": n => { logsink_base.sinkType = n.getEnumValue(Logsink_base_sink_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Logsink_base_verbose The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoLogsink_base_verbose(logsink_base_verbose = {}) { + return { + "sink_id": n => { logsink_base_verbose.sinkId = n.getStringValue(); }, + "sink_name": n => { logsink_base_verbose.sinkName = n.getStringValue(); }, + "sink_type": n => { logsink_base_verbose.sinkType = n.getEnumValue(Logsink_base_verbose_sink_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Logsink_create The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoLogsink_create(logsink_create = {}) { + return { + ...deserializeIntoLogsink_base(logsink_create), + "config": n => { logsink_create.config = n.getObjectValue(createDatadog_logsinkFromDiscriminatorValue) ?? n.getObjectValue(createElasticsearch_logsinkFromDiscriminatorValue) ?? n.getObjectValue(createOpensearch_logsinkFromDiscriminatorValue) ?? n.getObjectValue(createRsyslog_logsinkFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Logsink_create_config The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoLogsink_create_config(logsink_create_config = {}) { + return { + ...deserializeIntoDatadog_logsink(logsink_create_config), + ...deserializeIntoElasticsearch_logsink(logsink_create_config), + ...deserializeIntoOpensearch_logsink(logsink_create_config), + ...deserializeIntoRsyslog_logsink(logsink_create_config), + }; +} +/** + * The deserialization information for the current model + * @param Logsink_schema The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoLogsink_schema(logsink_schema = {}) { + return { + ...deserializeIntoLogsink_verbose(logsink_schema), + }; +} +/** + * The deserialization information for the current model + * @param Logsink_update The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoLogsink_update(logsink_update = {}) { + return { + "config": n => { logsink_update.config = n.getObjectValue(createDatadog_logsinkFromDiscriminatorValue) ?? n.getObjectValue(createElasticsearch_logsinkFromDiscriminatorValue) ?? n.getObjectValue(createOpensearch_logsinkFromDiscriminatorValue) ?? n.getObjectValue(createRsyslog_logsinkFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Logsink_update_config The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoLogsink_update_config(logsink_update_config = {}) { + return { + ...deserializeIntoDatadog_logsink(logsink_update_config), + ...deserializeIntoElasticsearch_logsink(logsink_update_config), + ...deserializeIntoOpensearch_logsink(logsink_update_config), + ...deserializeIntoRsyslog_logsink(logsink_update_config), + }; +} +/** + * The deserialization information for the current model + * @param Logsink_verbose The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoLogsink_verbose(logsink_verbose = {}) { + return { + ...deserializeIntoLogsink_base_verbose(logsink_verbose), + "config": n => { logsink_verbose.config = n.getObjectValue(createDatadog_logsinkFromDiscriminatorValue) ?? n.getObjectValue(createElasticsearch_logsinkFromDiscriminatorValue) ?? n.getObjectValue(createOpensearch_logsinkFromDiscriminatorValue) ?? n.getObjectValue(createRsyslog_logsinkFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Logsink_verbose_config The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoLogsink_verbose_config(logsink_verbose_config = {}) { + return { + ...deserializeIntoDatadog_logsink(logsink_verbose_config), + ...deserializeIntoElasticsearch_logsink(logsink_verbose_config), + ...deserializeIntoOpensearch_logsink(logsink_verbose_config), + ...deserializeIntoRsyslog_logsink(logsink_verbose_config), + }; +} +/** + * The deserialization information for the current model + * @param Maintenance_policy The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoMaintenance_policy(maintenance_policy = {}) { + return { + "day": n => { maintenance_policy.day = n.getEnumValue(Maintenance_policy_dayObject); }, + "duration": n => { maintenance_policy.duration = n.getStringValue(); }, + "start_time": n => { maintenance_policy.startTime = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Member The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoMember(member = {}) { + return { + "created_at": n => { member.createdAt = n.getDateValue(); }, + "current_utilization": n => { member.currentUtilization = n.getObjectValue(createMember_current_utilizationFromDiscriminatorValue); }, + "droplet_id": n => { member.dropletId = n.getNumberValue(); }, + "health_status": n => { member.healthStatus = n.getStringValue(); }, + "status": n => { member.status = n.getEnumValue(Member_statusObject); }, + "updated_at": n => { member.updatedAt = n.getDateValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Member_current_utilization The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoMember_current_utilization(member_current_utilization = {}) { + return { + "cpu": n => { member_current_utilization.cpu = n.getNumberValue(); }, + "memory": n => { member_current_utilization.memory = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Meta_properties The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoMeta_properties(meta_properties = {}) { + return { + "total": n => { meta_properties.total = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Metrics The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoMetrics(metrics = {}) { + return { + "data": n => { metrics.data = n.getObjectValue(createMetrics_dataFromDiscriminatorValue); }, + "status": n => { metrics.status = n.getEnumValue(Metrics_statusObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Metrics_data The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoMetrics_data(metrics_data = {}) { + return { + "result": n => { metrics_data.result = n.getCollectionOfObjectValues(createMetrics_resultFromDiscriminatorValue); }, + "resultType": n => { metrics_data.resultType = n.getEnumValue(Metrics_data_resultTypeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Metrics_result The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoMetrics_result(metrics_result = {}) { + return { + "metric": n => { metrics_result.metric = n.getObjectValue(createMetrics_result_metricFromDiscriminatorValue); }, + "values": n => { metrics_result.values = n.getObjectValue(createUntypedNodeFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Metrics_result_metric The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoMetrics_result_metric(metrics_result_metric = {}) { + return {}; +} +/** + * The deserialization information for the current model + * @param Mongo_advanced_config The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoMongo_advanced_config(mongo_advanced_config = {}) { + return { + "default_read_concern": n => { mongo_advanced_config.defaultReadConcern = n.getEnumValue(Mongo_advanced_config_default_read_concernObject) ?? Mongo_advanced_config_default_read_concernObject.Local; }, + "default_write_concern": n => { mongo_advanced_config.defaultWriteConcern = n.getStringValue() ?? "majority"; }, + "slow_op_threshold_ms": n => { mongo_advanced_config.slowOpThresholdMs = n.getNumberValue(); }, + "transaction_lifetime_limit_seconds": n => { mongo_advanced_config.transactionLifetimeLimitSeconds = n.getNumberValue(); }, + "verbosity": n => { mongo_advanced_config.verbosity = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Multiregistry The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoMultiregistry(multiregistry = {}) { + return { + ...deserializeIntoRegistry_base(multiregistry), + }; +} +/** + * The deserialization information for the current model + * @param Multiregistry_create The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoMultiregistry_create(multiregistry_create = {}) { + return { + "name": n => { multiregistry_create.name = n.getStringValue(); }, + "region": n => { multiregistry_create.region = n.getEnumValue(Multiregistry_create_regionObject); }, + "subscription_tier_slug": n => { multiregistry_create.subscriptionTierSlug = n.getEnumValue(Multiregistry_create_subscription_tier_slugObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Mysql_advanced_config The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoMysql_advanced_config(mysql_advanced_config = {}) { + return { + "backup_hour": n => { mysql_advanced_config.backupHour = n.getNumberValue(); }, + "backup_minute": n => { mysql_advanced_config.backupMinute = n.getNumberValue(); }, + "binlog_retention_period": n => { mysql_advanced_config.binlogRetentionPeriod = n.getNumberValue(); }, + "connect_timeout": n => { mysql_advanced_config.connectTimeout = n.getNumberValue(); }, + "default_time_zone": n => { mysql_advanced_config.defaultTimeZone = n.getStringValue(); }, + "group_concat_max_len": n => { mysql_advanced_config.groupConcatMaxLen = n.getNumberValue(); }, + "information_schema_stats_expiry": n => { mysql_advanced_config.informationSchemaStatsExpiry = n.getNumberValue(); }, + "innodb_change_buffer_max_size": n => { mysql_advanced_config.innodbChangeBufferMaxSize = n.getNumberValue(); }, + "innodb_flush_neighbors": n => { mysql_advanced_config.innodbFlushNeighbors = n.getNumberValue(); }, + "innodb_ft_min_token_size": n => { mysql_advanced_config.innodbFtMinTokenSize = n.getNumberValue(); }, + "innodb_ft_server_stopword_table": n => { mysql_advanced_config.innodbFtServerStopwordTable = n.getStringValue(); }, + "innodb_lock_wait_timeout": n => { mysql_advanced_config.innodbLockWaitTimeout = n.getNumberValue(); }, + "innodb_log_buffer_size": n => { mysql_advanced_config.innodbLogBufferSize = n.getNumberValue(); }, + "innodb_online_alter_log_max_size": n => { mysql_advanced_config.innodbOnlineAlterLogMaxSize = n.getNumberValue(); }, + "innodb_print_all_deadlocks": n => { mysql_advanced_config.innodbPrintAllDeadlocks = n.getBooleanValue(); }, + "innodb_read_io_threads": n => { mysql_advanced_config.innodbReadIoThreads = n.getNumberValue(); }, + "innodb_rollback_on_timeout": n => { mysql_advanced_config.innodbRollbackOnTimeout = n.getBooleanValue(); }, + "innodb_thread_concurrency": n => { mysql_advanced_config.innodbThreadConcurrency = n.getNumberValue(); }, + "innodb_write_io_threads": n => { mysql_advanced_config.innodbWriteIoThreads = n.getNumberValue(); }, + "interactive_timeout": n => { mysql_advanced_config.interactiveTimeout = n.getNumberValue(); }, + "internal_tmp_mem_storage_engine": n => { mysql_advanced_config.internalTmpMemStorageEngine = n.getEnumValue(Mysql_advanced_config_internal_tmp_mem_storage_engineObject); }, + "log_output": n => { mysql_advanced_config.logOutput = n.getEnumValue(Mysql_advanced_config_log_outputObject) ?? Mysql_advanced_config_log_outputObject.NONE; }, + "long_query_time": n => { mysql_advanced_config.longQueryTime = n.getNumberValue(); }, + "max_allowed_packet": n => { mysql_advanced_config.maxAllowedPacket = n.getNumberValue(); }, + "max_heap_table_size": n => { mysql_advanced_config.maxHeapTableSize = n.getNumberValue(); }, + "mysql_incremental_backup": n => { mysql_advanced_config.mysqlIncrementalBackup = n.getObjectValue(createMysql_incremental_backupFromDiscriminatorValue); }, + "net_buffer_length": n => { mysql_advanced_config.netBufferLength = n.getNumberValue(); }, + "net_read_timeout": n => { mysql_advanced_config.netReadTimeout = n.getNumberValue(); }, + "net_write_timeout": n => { mysql_advanced_config.netWriteTimeout = n.getNumberValue(); }, + "slow_query_log": n => { mysql_advanced_config.slowQueryLog = n.getBooleanValue(); }, + "sort_buffer_size": n => { mysql_advanced_config.sortBufferSize = n.getNumberValue(); }, + "sql_mode": n => { mysql_advanced_config.sqlMode = n.getStringValue(); }, + "sql_require_primary_key": n => { mysql_advanced_config.sqlRequirePrimaryKey = n.getBooleanValue(); }, + "tmp_table_size": n => { mysql_advanced_config.tmpTableSize = n.getNumberValue(); }, + "wait_timeout": n => { mysql_advanced_config.waitTimeout = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Mysql_incremental_backup The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoMysql_incremental_backup(mysql_incremental_backup = {}) { + return { + "enabled": n => { mysql_incremental_backup.enabled = n.getBooleanValue(); }, + "full_backup_week_schedule": n => { mysql_incremental_backup.fullBackupWeekSchedule = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Mysql_settings The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoMysql_settings(mysql_settings = {}) { + return { + "auth_plugin": n => { mysql_settings.authPlugin = n.getEnumValue(Mysql_settings_auth_pluginObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Namespace_info The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNamespace_info(namespace_info = {}) { + return { + "api_host": n => { namespace_info.apiHost = n.getStringValue(); }, + "created_at": n => { namespace_info.createdAt = n.getStringValue(); }, + "key": n => { namespace_info.key = n.getStringValue(); }, + "label": n => { namespace_info.label = n.getStringValue(); }, + "namespace": n => { namespace_info.namespace = n.getStringValue(); }, + "region": n => { namespace_info.region = n.getStringValue(); }, + "updated_at": n => { namespace_info.updatedAt = n.getStringValue(); }, + "uuid": n => { namespace_info.uuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Neighbor_ids The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNeighbor_ids(neighbor_ids = {}) { + return { + "neighbor_ids": n => { neighbor_ids.neighborIds = n.getObjectValue(createUntypedNodeFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Network_v4 The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNetwork_v4(network_v4 = {}) { + return { + "gateway": n => { network_v4.gateway = n.getStringValue(); }, + "ip_address": n => { network_v4.ipAddress = n.getStringValue(); }, + "netmask": n => { network_v4.netmask = n.getStringValue(); }, + "type": n => { network_v4.type = n.getEnumValue(Network_v4_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Network_v6 The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNetwork_v6(network_v6 = {}) { + return { + "gateway": n => { network_v6.gateway = n.getStringValue(); }, + "ip_address": n => { network_v6.ipAddress = n.getStringValue(); }, + "netmask": n => { network_v6.netmask = n.getNumberValue(); }, + "type": n => { network_v6.type = n.getEnumValue(Network_v6_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Nfs_action The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNfs_action(nfs_action = {}) { + return { + "region": n => { nfs_action.region = n.getStringValue(); }, + "type": n => { nfs_action.type = n.getEnumValue(Nfs_action_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Nfs_action_attach The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNfs_action_attach(nfs_action_attach = {}) { + return { + ...deserializeIntoNfs_action(nfs_action_attach), + "params": n => { nfs_action_attach.params = n.getObjectValue(createNfs_action_attach_paramsFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Nfs_action_attach_params The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNfs_action_attach_params(nfs_action_attach_params = {}) { + return { + "vpc_id": n => { nfs_action_attach_params.vpcId = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Nfs_action_detach The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNfs_action_detach(nfs_action_detach = {}) { + return { + ...deserializeIntoNfs_action(nfs_action_detach), + "params": n => { nfs_action_detach.params = n.getObjectValue(createNfs_action_detach_paramsFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Nfs_action_detach_params The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNfs_action_detach_params(nfs_action_detach_params = {}) { + return { + "vpc_id": n => { nfs_action_detach_params.vpcId = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Nfs_action_resize The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNfs_action_resize(nfs_action_resize = {}) { + return { + ...deserializeIntoNfs_action(nfs_action_resize), + "params": n => { nfs_action_resize.params = n.getObjectValue(createNfs_action_resize_paramsFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Nfs_action_resize_params The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNfs_action_resize_params(nfs_action_resize_params = {}) { + return { + "size_gib": n => { nfs_action_resize_params.sizeGib = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Nfs_action_snapshot The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNfs_action_snapshot(nfs_action_snapshot = {}) { + return { + ...deserializeIntoNfs_action(nfs_action_snapshot), + "params": n => { nfs_action_snapshot.params = n.getObjectValue(createNfs_action_snapshot_paramsFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Nfs_action_snapshot_params The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNfs_action_snapshot_params(nfs_action_snapshot_params = {}) { + return { + "name": n => { nfs_action_snapshot_params.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Nfs_action_switch_performance_tier The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNfs_action_switch_performance_tier(nfs_action_switch_performance_tier = {}) { + return { + ...deserializeIntoNfs_action(nfs_action_switch_performance_tier), + "params": n => { nfs_action_switch_performance_tier.params = n.getObjectValue(createNfs_action_switch_performance_tier_paramsFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Nfs_action_switch_performance_tier_params The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNfs_action_switch_performance_tier_params(nfs_action_switch_performance_tier_params = {}) { + return { + "performance_tier": n => { nfs_action_switch_performance_tier_params.performanceTier = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Nfs_actions_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNfs_actions_response(nfs_actions_response = {}) { + return { + "action": n => { nfs_actions_response.action = n.getObjectValue(createNfs_actions_response_actionFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Nfs_actions_response_action The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNfs_actions_response_action(nfs_actions_response_action = {}) { + return { + "region_slug": n => { nfs_actions_response_action.regionSlug = n.getStringValue(); }, + "resource_id": n => { nfs_actions_response_action.resourceId = n.getGuidValue(); }, + "resource_type": n => { nfs_actions_response_action.resourceType = n.getEnumValue(Nfs_actions_response_action_resource_typeObject); }, + "started_at": n => { nfs_actions_response_action.startedAt = n.getDateValue(); }, + "status": n => { nfs_actions_response_action.status = n.getEnumValue(Nfs_actions_response_action_statusObject); }, + "type": n => { nfs_actions_response_action.type = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Nfs_create_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNfs_create_response(nfs_create_response = {}) { + return { + "share": n => { nfs_create_response.share = n.getObjectValue(createNfs_responseFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Nfs_get_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNfs_get_response(nfs_get_response = {}) { + return { + "share": n => { nfs_get_response.share = n.getObjectValue(createNfs_responseFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Nfs_list_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNfs_list_response(nfs_list_response = {}) { + return { + "shares": n => { nfs_list_response.shares = n.getCollectionOfObjectValues(createNfs_responseFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Nfs_request The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNfs_request(nfs_request = {}) { + return { + "name": n => { nfs_request.name = n.getStringValue(); }, + "performance_tier": n => { nfs_request.performanceTier = n.getStringValue(); }, + "region": n => { nfs_request.region = n.getStringValue(); }, + "size_gib": n => { nfs_request.sizeGib = n.getNumberValue(); }, + "vpc_ids": n => { nfs_request.vpcIds = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Nfs_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNfs_response(nfs_response = {}) { + return { + "created_at": n => { nfs_response.createdAt = n.getDateValue(); }, + "host": n => { nfs_response.host = n.getStringValue(); }, + "id": n => { nfs_response.id = n.getStringValue(); }, + "mount_path": n => { nfs_response.mountPath = n.getStringValue(); }, + "name": n => { nfs_response.name = n.getStringValue(); }, + "region": n => { nfs_response.region = n.getStringValue(); }, + "size_gib": n => { nfs_response.sizeGib = n.getNumberValue(); }, + "status": n => { nfs_response.status = n.getEnumValue(Nfs_response_statusObject); }, + "vpc_ids": n => { nfs_response.vpcIds = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Nfs_snapshot_get_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNfs_snapshot_get_response(nfs_snapshot_get_response = {}) { + return { + "snapshot": n => { nfs_snapshot_get_response.snapshot = n.getObjectValue(createNfs_snapshot_responseFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Nfs_snapshot_list_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNfs_snapshot_list_response(nfs_snapshot_list_response = {}) { + return { + "snapshots": n => { nfs_snapshot_list_response.snapshots = n.getCollectionOfObjectValues(createNfs_snapshot_responseFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Nfs_snapshot_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNfs_snapshot_response(nfs_snapshot_response = {}) { + return { + "created_at": n => { nfs_snapshot_response.createdAt = n.getDateValue(); }, + "id": n => { nfs_snapshot_response.id = n.getStringValue(); }, + "name": n => { nfs_snapshot_response.name = n.getStringValue(); }, + "region": n => { nfs_snapshot_response.region = n.getStringValue(); }, + "share_id": n => { nfs_snapshot_response.shareId = n.getGuidValue(); }, + "size_gib": n => { nfs_snapshot_response.sizeGib = n.getNumberValue(); }, + "status": n => { nfs_snapshot_response.status = n.getEnumValue(Nfs_snapshot_response_statusObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Node The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNode(node = {}) { + return { + "created_at": n => { node.createdAt = n.getDateValue(); }, + "droplet_id": n => { node.dropletId = n.getStringValue(); }, + "id": n => { node.id = n.getGuidValue(); }, + "name": n => { node.name = n.getStringValue(); }, + "status": n => { node.status = n.getObjectValue(createNode_statusFromDiscriminatorValue); }, + "updated_at": n => { node.updatedAt = n.getDateValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Node_status The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNode_status(node_status = {}) { + return { + "state": n => { node_status.state = n.getEnumValue(Node_status_stateObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Notification The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNotification(notification = {}) { + return { + "email": n => { notification.email = n.getCollectionOfPrimitiveValues(); }, + "slack": n => { notification.slack = n.getCollectionOfObjectValues(createNotification_slackFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Notification_slack The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNotification_slack(notification_slack = {}) { + return { + "channel": n => { notification_slack.channel = n.getStringValue(); }, + "url": n => { notification_slack.url = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Nvidia_gpu_device_plugin The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoNvidia_gpu_device_plugin(nvidia_gpu_device_plugin = {}) { + return { + "enabled": n => { nvidia_gpu_device_plugin.enabled = n.getBooleanValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param OneClicks The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOneClicks(oneClicks = {}) { + return { + "slug": n => { oneClicks.slug = n.getStringValue(); }, + "type": n => { oneClicks.type = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param OneClicks_create The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOneClicks_create(oneClicks_create = {}) { + return { + "addon_slugs": n => { oneClicks_create.addonSlugs = n.getCollectionOfPrimitiveValues(); }, + "cluster_uuid": n => { oneClicks_create.clusterUuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Online_migration The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOnline_migration(online_migration = {}) { + return { + "created_at": n => { online_migration.createdAt = n.getStringValue(); }, + "id": n => { online_migration.id = n.getStringValue(); }, + "status": n => { online_migration.status = n.getEnumValue(Online_migration_statusObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Opensearch_advanced_config The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOpensearch_advanced_config(opensearch_advanced_config = {}) { + return { + "action_auto_create_index_enabled": n => { opensearch_advanced_config.actionAutoCreateIndexEnabled = n.getBooleanValue(); }, + "action_destructive_requires_name": n => { opensearch_advanced_config.actionDestructiveRequiresName = n.getBooleanValue(); }, + "cluster_max_shards_per_node": n => { opensearch_advanced_config.clusterMaxShardsPerNode = n.getNumberValue(); }, + "cluster_routing_allocation_node_concurrent_recoveries": n => { opensearch_advanced_config.clusterRoutingAllocationNodeConcurrentRecoveries = n.getNumberValue(); }, + "enable_security_audit": n => { opensearch_advanced_config.enableSecurityAudit = n.getBooleanValue(); }, + "http_max_content_length_bytes": n => { opensearch_advanced_config.httpMaxContentLengthBytes = n.getNumberValue(); }, + "http_max_header_size_bytes": n => { opensearch_advanced_config.httpMaxHeaderSizeBytes = n.getNumberValue(); }, + "http_max_initial_line_length_bytes": n => { opensearch_advanced_config.httpMaxInitialLineLengthBytes = n.getNumberValue(); }, + "indices_fielddata_cache_size_percentage": n => { opensearch_advanced_config.indicesFielddataCacheSizePercentage = n.getNumberValue(); }, + "indices_memory_index_buffer_size_percentage": n => { opensearch_advanced_config.indicesMemoryIndexBufferSizePercentage = n.getNumberValue(); }, + "indices_memory_max_index_buffer_size_mb": n => { opensearch_advanced_config.indicesMemoryMaxIndexBufferSizeMb = n.getNumberValue(); }, + "indices_memory_min_index_buffer_size_mb": n => { opensearch_advanced_config.indicesMemoryMinIndexBufferSizeMb = n.getNumberValue(); }, + "indices_queries_cache_size_percentage": n => { opensearch_advanced_config.indicesQueriesCacheSizePercentage = n.getNumberValue(); }, + "indices_query_bool_max_clause_count": n => { opensearch_advanced_config.indicesQueryBoolMaxClauseCount = n.getNumberValue(); }, + "indices_recovery_max_concurrent_file_chunks": n => { opensearch_advanced_config.indicesRecoveryMaxConcurrentFileChunks = n.getNumberValue(); }, + "indices_recovery_max_mb_per_sec": n => { opensearch_advanced_config.indicesRecoveryMaxMbPerSec = n.getNumberValue(); }, + "ism_enabled": n => { opensearch_advanced_config.ismEnabled = n.getBooleanValue(); }, + "ism_history_enabled": n => { opensearch_advanced_config.ismHistoryEnabled = n.getBooleanValue(); }, + "ism_history_max_age_hours": n => { opensearch_advanced_config.ismHistoryMaxAgeHours = n.getNumberValue(); }, + "ism_history_max_docs": n => { opensearch_advanced_config.ismHistoryMaxDocs = n.getNumberValue(); }, + "ism_history_rollover_check_period_hours": n => { opensearch_advanced_config.ismHistoryRolloverCheckPeriodHours = n.getNumberValue(); }, + "ism_history_rollover_retention_period_days": n => { opensearch_advanced_config.ismHistoryRolloverRetentionPeriodDays = n.getNumberValue(); }, + "keep_index_refresh_interval": n => { opensearch_advanced_config.keepIndexRefreshInterval = n.getBooleanValue(); }, + "knn_memory_circuit_breaker_enabled": n => { opensearch_advanced_config.knnMemoryCircuitBreakerEnabled = n.getBooleanValue(); }, + "knn_memory_circuit_breaker_limit": n => { opensearch_advanced_config.knnMemoryCircuitBreakerLimit = n.getNumberValue(); }, + "override_main_response_version": n => { opensearch_advanced_config.overrideMainResponseVersion = n.getBooleanValue(); }, + "plugins_alerting_filter_by_backend_roles_enabled": n => { opensearch_advanced_config.pluginsAlertingFilterByBackendRolesEnabled = n.getBooleanValue(); }, + "reindex_remote_whitelist": n => { opensearch_advanced_config.reindexRemoteWhitelist = n.getCollectionOfPrimitiveValues(); }, + "script_max_compilations_rate": n => { opensearch_advanced_config.scriptMaxCompilationsRate = n.getStringValue() ?? "use-context"; }, + "search_max_buckets": n => { opensearch_advanced_config.searchMaxBuckets = n.getNumberValue(); }, + "thread_pool_analyze_queue_size": n => { opensearch_advanced_config.threadPoolAnalyzeQueueSize = n.getNumberValue(); }, + "thread_pool_analyze_size": n => { opensearch_advanced_config.threadPoolAnalyzeSize = n.getNumberValue(); }, + "thread_pool_force_merge_size": n => { opensearch_advanced_config.threadPoolForceMergeSize = n.getNumberValue(); }, + "thread_pool_get_queue_size": n => { opensearch_advanced_config.threadPoolGetQueueSize = n.getNumberValue(); }, + "thread_pool_get_size": n => { opensearch_advanced_config.threadPoolGetSize = n.getNumberValue(); }, + "thread_pool_search_queue_size": n => { opensearch_advanced_config.threadPoolSearchQueueSize = n.getNumberValue(); }, + "thread_pool_search_size": n => { opensearch_advanced_config.threadPoolSearchSize = n.getNumberValue(); }, + "thread_pool_search_throttled_queue_size": n => { opensearch_advanced_config.threadPoolSearchThrottledQueueSize = n.getNumberValue(); }, + "thread_pool_search_throttled_size": n => { opensearch_advanced_config.threadPoolSearchThrottledSize = n.getNumberValue(); }, + "thread_pool_write_queue_size": n => { opensearch_advanced_config.threadPoolWriteQueueSize = n.getNumberValue(); }, + "thread_pool_write_size": n => { opensearch_advanced_config.threadPoolWriteSize = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Opensearch_config The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOpensearch_config(opensearch_config = {}) { + return { + "cluster_name": n => { opensearch_config.clusterName = n.getStringValue(); }, + "cluster_uuid": n => { opensearch_config.clusterUuid = n.getStringValue(); }, + "credentials": n => { opensearch_config.credentials = n.getObjectValue(createOpensearch_config_credentialsFromDiscriminatorValue); }, + "endpoint": n => { opensearch_config.endpoint = n.getStringValue(); }, + "id": n => { opensearch_config.id = n.getStringValue(); }, + "index_name": n => { opensearch_config.indexName = n.getStringValue(); }, + "retention_days": n => { opensearch_config.retentionDays = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Opensearch_config_credentials The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOpensearch_config_credentials(opensearch_config_credentials = {}) { + return { + "password": n => { opensearch_config_credentials.password = n.getStringValue(); }, + "username": n => { opensearch_config_credentials.username = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Opensearch_config_omit_credentials The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOpensearch_config_omit_credentials(opensearch_config_omit_credentials = {}) { + return { + "cluster_name": n => { opensearch_config_omit_credentials.clusterName = n.getStringValue(); }, + "cluster_uuid": n => { opensearch_config_omit_credentials.clusterUuid = n.getStringValue(); }, + "endpoint": n => { opensearch_config_omit_credentials.endpoint = n.getStringValue(); }, + "id": n => { opensearch_config_omit_credentials.id = n.getStringValue(); }, + "index_name": n => { opensearch_config_omit_credentials.indexName = n.getStringValue(); }, + "retention_days": n => { opensearch_config_omit_credentials.retentionDays = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Opensearch_config_request The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOpensearch_config_request(opensearch_config_request = {}) { + return { + "cluster_name": n => { opensearch_config_request.clusterName = n.getStringValue(); }, + "cluster_uuid": n => { opensearch_config_request.clusterUuid = n.getStringValue(); }, + "credentials": n => { opensearch_config_request.credentials = n.getObjectValue(createOpensearch_config_request_credentialsFromDiscriminatorValue); }, + "endpoint": n => { opensearch_config_request.endpoint = n.getStringValue(); }, + "index_name": n => { opensearch_config_request.indexName = n.getStringValue(); }, + "retention_days": n => { opensearch_config_request.retentionDays = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Opensearch_config_request_credentials The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOpensearch_config_request_credentials(opensearch_config_request_credentials = {}) { + return { + "password": n => { opensearch_config_request_credentials.password = n.getStringValue(); }, + "username": n => { opensearch_config_request_credentials.username = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Opensearch_connection The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOpensearch_connection(opensearch_connection = {}) { + return { + "host": n => { opensearch_connection.host = n.getStringValue(); }, + "password": n => { opensearch_connection.password = n.getStringValue(); }, + "port": n => { opensearch_connection.port = n.getNumberValue(); }, + "ssl": n => { opensearch_connection.ssl = n.getBooleanValue(); }, + "uri": n => { opensearch_connection.uri = n.getStringValue(); }, + "user": n => { opensearch_connection.user = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Opensearch_index The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOpensearch_index(opensearch_index = {}) { + return { + ...deserializeIntoOpensearch_index_base(opensearch_index), + "health": n => { opensearch_index.health = n.getEnumValue(Opensearch_index_healthObject); }, + "status": n => { opensearch_index.status = n.getEnumValue(Opensearch_index_statusObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Opensearch_index_base The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOpensearch_index_base(opensearch_index_base = {}) { + return { + "created_time": n => { opensearch_index_base.createdTime = n.getDateValue(); }, + "index_name": n => { opensearch_index_base.indexName = n.getStringValue(); }, + "number_of_replicas": n => { opensearch_index_base.numberOfReplicas = n.getNumberValue(); }, + "number_of_shards": n => { opensearch_index_base.numberOfShards = n.getNumberValue(); }, + "size": n => { opensearch_index_base.size = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Opensearch_logsink The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOpensearch_logsink(opensearch_logsink = {}) { + return { + "ca": n => { opensearch_logsink.ca = n.getStringValue(); }, + "index_days_max": n => { opensearch_logsink.indexDaysMax = n.getNumberValue(); }, + "index_prefix": n => { opensearch_logsink.indexPrefix = n.getStringValue(); }, + "timeout": n => { opensearch_logsink.timeout = n.getNumberValue(); }, + "url": n => { opensearch_logsink.url = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Options The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOptions(options = {}) { + return { + "options": n => { options.options = n.getObjectValue(createOptions_optionsFromDiscriminatorValue); }, + "version_availability": n => { options.versionAvailability = n.getObjectValue(createOptions_version_availabilityFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Options_options The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOptions_options(options_options = {}) { + return { + "kafka": n => { options_options.kafka = n.getObjectValue(createOptions_options_kafkaFromDiscriminatorValue); }, + "mongodb": n => { options_options.mongodb = n.getObjectValue(createOptions_options_mongodbFromDiscriminatorValue); }, + "mysql": n => { options_options.mysql = n.getObjectValue(createOptions_options_mysqlFromDiscriminatorValue); }, + "opensearch": n => { options_options.opensearch = n.getObjectValue(createOptions_options_opensearchFromDiscriminatorValue); }, + "pg": n => { options_options.pg = n.getObjectValue(createOptions_options_pgFromDiscriminatorValue); }, + "redis": n => { options_options.redis = n.getObjectValue(createOptions_options_redisFromDiscriminatorValue); }, + "valkey": n => { options_options.valkey = n.getObjectValue(createOptions_options_valkeyFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Options_options_kafka The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOptions_options_kafka(options_options_kafka = {}) { + return { + "layouts": n => { options_options_kafka.layouts = n.getCollectionOfObjectValues(createDatabase_layout_optionFromDiscriminatorValue); }, + "regions": n => { options_options_kafka.regions = n.getCollectionOfPrimitiveValues(); }, + "versions": n => { options_options_kafka.versions = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Options_options_mongodb The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOptions_options_mongodb(options_options_mongodb = {}) { + return { + "layouts": n => { options_options_mongodb.layouts = n.getCollectionOfObjectValues(createDatabase_layout_optionFromDiscriminatorValue); }, + "regions": n => { options_options_mongodb.regions = n.getCollectionOfPrimitiveValues(); }, + "versions": n => { options_options_mongodb.versions = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Options_options_mysql The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOptions_options_mysql(options_options_mysql = {}) { + return { + "layouts": n => { options_options_mysql.layouts = n.getCollectionOfObjectValues(createDatabase_layout_optionFromDiscriminatorValue); }, + "regions": n => { options_options_mysql.regions = n.getCollectionOfPrimitiveValues(); }, + "versions": n => { options_options_mysql.versions = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Options_options_opensearch The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOptions_options_opensearch(options_options_opensearch = {}) { + return { + "layouts": n => { options_options_opensearch.layouts = n.getCollectionOfObjectValues(createDatabase_layout_optionFromDiscriminatorValue); }, + "regions": n => { options_options_opensearch.regions = n.getCollectionOfPrimitiveValues(); }, + "versions": n => { options_options_opensearch.versions = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Options_options_pg The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOptions_options_pg(options_options_pg = {}) { + return { + "layouts": n => { options_options_pg.layouts = n.getCollectionOfObjectValues(createDatabase_layout_optionFromDiscriminatorValue); }, + "regions": n => { options_options_pg.regions = n.getCollectionOfPrimitiveValues(); }, + "versions": n => { options_options_pg.versions = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Options_options_redis The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOptions_options_redis(options_options_redis = {}) { + return { + "layouts": n => { options_options_redis.layouts = n.getCollectionOfObjectValues(createDatabase_layout_optionFromDiscriminatorValue); }, + "regions": n => { options_options_redis.regions = n.getCollectionOfPrimitiveValues(); }, + "versions": n => { options_options_redis.versions = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Options_options_valkey The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOptions_options_valkey(options_options_valkey = {}) { + return { + "layouts": n => { options_options_valkey.layouts = n.getCollectionOfObjectValues(createDatabase_layout_optionFromDiscriminatorValue); }, + "regions": n => { options_options_valkey.regions = n.getCollectionOfPrimitiveValues(); }, + "versions": n => { options_options_valkey.versions = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Options_version_availability The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOptions_version_availability(options_version_availability = {}) { + return { + "kafka": n => { options_version_availability.kafka = n.getCollectionOfObjectValues(createDatabase_version_availabilityFromDiscriminatorValue); }, + "mongodb": n => { options_version_availability.mongodb = n.getCollectionOfObjectValues(createDatabase_version_availabilityFromDiscriminatorValue); }, + "mysql": n => { options_version_availability.mysql = n.getCollectionOfObjectValues(createDatabase_version_availabilityFromDiscriminatorValue); }, + "opensearch": n => { options_version_availability.opensearch = n.getCollectionOfObjectValues(createDatabase_version_availabilityFromDiscriminatorValue); }, + "pg": n => { options_version_availability.pg = n.getCollectionOfObjectValues(createDatabase_version_availabilityFromDiscriminatorValue); }, + "redis": n => { options_version_availability.redis = n.getCollectionOfObjectValues(createDatabase_version_availabilityFromDiscriminatorValue); }, + "valkey": n => { options_version_availability.valkey = n.getCollectionOfObjectValues(createDatabase_version_availabilityFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Page_links The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoPage_links(page_links = {}) { + return { + "pages": n => { page_links.pages = n.getObjectValue(createBackward_linksFromDiscriminatorValue) ?? n.getObjectValue(createForward_linksFromDiscriminatorValue) ?? n.getObjectValue(createPage_links_pagesMember1FromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Page_links_pages The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoPage_links_pages(page_links_pages = {}) { + return { + ...deserializeIntoBackward_links(page_links_pages), + ...deserializeIntoForward_links(page_links_pages), + ...deserializeIntoPage_links_pagesMember1(page_links_pages), + }; +} +/** + * The deserialization information for the current model + * @param Page_links_pagesMember1 The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoPage_links_pagesMember1(page_links_pagesMember1 = {}) { + return {}; +} +/** + * The deserialization information for the current model + * @param Pagination The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoPagination(pagination = {}) { + return { + "links": n => { pagination.links = n.getObjectValue(createPage_linksFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Partner_attachment The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoPartner_attachment(partner_attachment = {}) { + return { + "bgp": n => { partner_attachment.bgp = n.getObjectValue(createPartner_attachment_bgpFromDiscriminatorValue); }, + "children": n => { partner_attachment.children = n.getCollectionOfPrimitiveValues(); }, + "connection_bandwidth_in_mbps": n => { partner_attachment.connectionBandwidthInMbps = n.getNumberValue(); }, + "created_at": n => { partner_attachment.createdAt = n.getDateValue(); }, + "id": n => { partner_attachment.id = n.getStringValue(); }, + "naas_provider": n => { partner_attachment.naasProvider = n.getStringValue(); }, + "name": n => { partner_attachment.name = n.getStringValue(); }, + "parent_uuid": n => { partner_attachment.parentUuid = n.getStringValue(); }, + "region": n => { partner_attachment.region = n.getStringValue(); }, + "state": n => { partner_attachment.state = n.getStringValue(); }, + "vpc_ids": n => { partner_attachment.vpcIds = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Partner_attachment_bgp The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoPartner_attachment_bgp(partner_attachment_bgp = {}) { + return { + "local_asn": n => { partner_attachment_bgp.localAsn = n.getNumberValue(); }, + "local_router_ip": n => { partner_attachment_bgp.localRouterIp = n.getStringValue(); }, + "peer_asn": n => { partner_attachment_bgp.peerAsn = n.getNumberValue(); }, + "peer_router_ip": n => { partner_attachment_bgp.peerRouterIp = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Partner_attachment_remote_route The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoPartner_attachment_remote_route(partner_attachment_remote_route = {}) { + return { + "cidr": n => { partner_attachment_remote_route.cidr = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Partner_attachment_updatableMember1 The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoPartner_attachment_updatableMember1(partner_attachment_updatableMember1 = {}) { + return { + "name": n => { partner_attachment_updatableMember1.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Partner_attachment_updatableMember2 The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoPartner_attachment_updatableMember2(partner_attachment_updatableMember2 = {}) { + return { + "vpc_ids": n => { partner_attachment_updatableMember2.vpcIds = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Partner_attachment_updatableMember3 The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoPartner_attachment_updatableMember3(partner_attachment_updatableMember3 = {}) { + return { + "bgp": n => { partner_attachment_updatableMember3.bgp = n.getObjectValue(createPartner_attachment_updatableMember3_bgpFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Partner_attachment_updatableMember3_bgp The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoPartner_attachment_updatableMember3_bgp(partner_attachment_updatableMember3_bgp = {}) { + return { + "auth_key": n => { partner_attachment_updatableMember3_bgp.authKey = n.getStringValue(); }, + "local_router_ip": n => { partner_attachment_updatableMember3_bgp.localRouterIp = n.getStringValue(); }, + "peer_router_asn": n => { partner_attachment_updatableMember3_bgp.peerRouterAsn = n.getNumberValue(); }, + "peer_router_ip": n => { partner_attachment_updatableMember3_bgp.peerRouterIp = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Partner_attachment_writable The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoPartner_attachment_writable(partner_attachment_writable = {}) { + return { + "bgp": n => { partner_attachment_writable.bgp = n.getObjectValue(createPartner_attachment_writable_bgpFromDiscriminatorValue); }, + "connection_bandwidth_in_mbps": n => { partner_attachment_writable.connectionBandwidthInMbps = n.getNumberValue(); }, + "naas_provider": n => { partner_attachment_writable.naasProvider = n.getStringValue(); }, + "name": n => { partner_attachment_writable.name = n.getStringValue(); }, + "parent_uuid": n => { partner_attachment_writable.parentUuid = n.getStringValue(); }, + "redundancy_zone": n => { partner_attachment_writable.redundancyZone = n.getEnumValue(Partner_attachment_writable_redundancy_zoneObject); }, + "region": n => { partner_attachment_writable.region = n.getEnumValue(Partner_attachment_writable_regionObject); }, + "vpc_ids": n => { partner_attachment_writable.vpcIds = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Partner_attachment_writable_bgp The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoPartner_attachment_writable_bgp(partner_attachment_writable_bgp = {}) { + return { + "auth_key": n => { partner_attachment_writable_bgp.authKey = n.getStringValue(); }, + "local_router_ip": n => { partner_attachment_writable_bgp.localRouterIp = n.getStringValue(); }, + "peer_router_asn": n => { partner_attachment_writable_bgp.peerRouterAsn = n.getNumberValue(); }, + "peer_router_ip": n => { partner_attachment_writable_bgp.peerRouterIp = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Pgbouncer_advanced_config The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoPgbouncer_advanced_config(pgbouncer_advanced_config = {}) { + return { + "autodb_idle_timeout": n => { pgbouncer_advanced_config.autodbIdleTimeout = n.getNumberValue(); }, + "autodb_max_db_connections": n => { pgbouncer_advanced_config.autodbMaxDbConnections = n.getNumberValue(); }, + "autodb_pool_mode": n => { pgbouncer_advanced_config.autodbPoolMode = n.getEnumValue(Pgbouncer_advanced_config_autodb_pool_modeObject); }, + "autodb_pool_size": n => { pgbouncer_advanced_config.autodbPoolSize = n.getNumberValue(); }, + "ignore_startup_parameters": n => { pgbouncer_advanced_config.ignoreStartupParameters = n.getCollectionOfEnumValues(Pgbouncer_advanced_config_ignore_startup_parametersObject); }, + "min_pool_size": n => { pgbouncer_advanced_config.minPoolSize = n.getNumberValue(); }, + "server_idle_timeout": n => { pgbouncer_advanced_config.serverIdleTimeout = n.getNumberValue(); }, + "server_lifetime": n => { pgbouncer_advanced_config.serverLifetime = n.getNumberValue(); }, + "server_reset_query_always": n => { pgbouncer_advanced_config.serverResetQueryAlways = n.getBooleanValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Postgres_advanced_config The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoPostgres_advanced_config(postgres_advanced_config = {}) { + return { + "autovacuum_analyze_scale_factor": n => { postgres_advanced_config.autovacuumAnalyzeScaleFactor = n.getNumberValue(); }, + "autovacuum_analyze_threshold": n => { postgres_advanced_config.autovacuumAnalyzeThreshold = n.getNumberValue(); }, + "autovacuum_freeze_max_age": n => { postgres_advanced_config.autovacuumFreezeMaxAge = n.getNumberValue(); }, + "autovacuum_max_workers": n => { postgres_advanced_config.autovacuumMaxWorkers = n.getNumberValue(); }, + "autovacuum_naptime": n => { postgres_advanced_config.autovacuumNaptime = n.getNumberValue(); }, + "autovacuum_vacuum_cost_delay": n => { postgres_advanced_config.autovacuumVacuumCostDelay = n.getNumberValue(); }, + "autovacuum_vacuum_cost_limit": n => { postgres_advanced_config.autovacuumVacuumCostLimit = n.getNumberValue(); }, + "autovacuum_vacuum_scale_factor": n => { postgres_advanced_config.autovacuumVacuumScaleFactor = n.getNumberValue(); }, + "autovacuum_vacuum_threshold": n => { postgres_advanced_config.autovacuumVacuumThreshold = n.getNumberValue(); }, + "backup_hour": n => { postgres_advanced_config.backupHour = n.getNumberValue(); }, + "backup_minute": n => { postgres_advanced_config.backupMinute = n.getNumberValue(); }, + "bgwriter_delay": n => { postgres_advanced_config.bgwriterDelay = n.getNumberValue(); }, + "bgwriter_flush_after": n => { postgres_advanced_config.bgwriterFlushAfter = n.getNumberValue(); }, + "bgwriter_lru_maxpages": n => { postgres_advanced_config.bgwriterLruMaxpages = n.getNumberValue(); }, + "bgwriter_lru_multiplier": n => { postgres_advanced_config.bgwriterLruMultiplier = n.getNumberValue(); }, + "deadlock_timeout": n => { postgres_advanced_config.deadlockTimeout = n.getNumberValue(); }, + "default_toast_compression": n => { postgres_advanced_config.defaultToastCompression = n.getEnumValue(Postgres_advanced_config_default_toast_compressionObject); }, + "idle_in_transaction_session_timeout": n => { postgres_advanced_config.idleInTransactionSessionTimeout = n.getNumberValue(); }, + "jit": n => { postgres_advanced_config.jit = n.getBooleanValue(); }, + "log_autovacuum_min_duration": n => { postgres_advanced_config.logAutovacuumMinDuration = n.getNumberValue(); }, + "log_error_verbosity": n => { postgres_advanced_config.logErrorVerbosity = n.getEnumValue(Postgres_advanced_config_log_error_verbosityObject); }, + "log_line_prefix": n => { postgres_advanced_config.logLinePrefix = n.getEnumValue(Postgres_advanced_config_log_line_prefixObject); }, + "log_min_duration_statement": n => { postgres_advanced_config.logMinDurationStatement = n.getNumberValue(); }, + "max_connections": n => { postgres_advanced_config.maxConnections = n.getNumberValue(); }, + "max_failover_replication_time_lag": n => { postgres_advanced_config.maxFailoverReplicationTimeLag = n.getNumberValue(); }, + "max_files_per_process": n => { postgres_advanced_config.maxFilesPerProcess = n.getNumberValue(); }, + "max_locks_per_transaction": n => { postgres_advanced_config.maxLocksPerTransaction = n.getNumberValue(); }, + "max_logical_replication_workers": n => { postgres_advanced_config.maxLogicalReplicationWorkers = n.getNumberValue(); }, + "max_parallel_workers": n => { postgres_advanced_config.maxParallelWorkers = n.getNumberValue(); }, + "max_parallel_workers_per_gather": n => { postgres_advanced_config.maxParallelWorkersPerGather = n.getNumberValue(); }, + "max_pred_locks_per_transaction": n => { postgres_advanced_config.maxPredLocksPerTransaction = n.getNumberValue(); }, + "max_prepared_transactions": n => { postgres_advanced_config.maxPreparedTransactions = n.getNumberValue(); }, + "max_replication_slots": n => { postgres_advanced_config.maxReplicationSlots = n.getNumberValue(); }, + "max_slot_wal_keep_size": n => { postgres_advanced_config.maxSlotWalKeepSize = n.getNumberValue(); }, + "max_stack_depth": n => { postgres_advanced_config.maxStackDepth = n.getNumberValue(); }, + "max_standby_archive_delay": n => { postgres_advanced_config.maxStandbyArchiveDelay = n.getNumberValue(); }, + "max_standby_streaming_delay": n => { postgres_advanced_config.maxStandbyStreamingDelay = n.getNumberValue(); }, + "max_wal_senders": n => { postgres_advanced_config.maxWalSenders = n.getNumberValue(); }, + "max_worker_processes": n => { postgres_advanced_config.maxWorkerProcesses = n.getNumberValue(); }, + "pgbouncer": n => { postgres_advanced_config.pgbouncer = n.getObjectValue(createPgbouncer_advanced_configFromDiscriminatorValue); }, + "pg_partman_bgw.interval": n => { postgres_advanced_config.pgPartmanBgwInterval = n.getNumberValue(); }, + "pg_partman_bgw.role": n => { postgres_advanced_config.pgPartmanBgwRole = n.getStringValue(); }, + "pg_stat_statements.track": n => { postgres_advanced_config.pgStatStatementsTrack = n.getEnumValue(Postgres_advanced_config_pg_stat_statementsTrackObject); }, + "shared_buffers_percentage": n => { postgres_advanced_config.sharedBuffersPercentage = n.getNumberValue(); }, + "stat_monitor_enable": n => { postgres_advanced_config.statMonitorEnable = n.getBooleanValue(); }, + "synchronous_replication": n => { postgres_advanced_config.synchronousReplication = n.getEnumValue(Postgres_advanced_config_synchronous_replicationObject); }, + "temp_file_limit": n => { postgres_advanced_config.tempFileLimit = n.getNumberValue(); }, + "timescaledb": n => { postgres_advanced_config.timescaledb = n.getObjectValue(createTimescaledb_advanced_configFromDiscriminatorValue); }, + "timezone": n => { postgres_advanced_config.timezone = n.getStringValue(); }, + "track_activity_query_size": n => { postgres_advanced_config.trackActivityQuerySize = n.getNumberValue(); }, + "track_commit_timestamp": n => { postgres_advanced_config.trackCommitTimestamp = n.getEnumValue(Postgres_advanced_config_track_commit_timestampObject); }, + "track_functions": n => { postgres_advanced_config.trackFunctions = n.getEnumValue(Postgres_advanced_config_track_functionsObject); }, + "track_io_timing": n => { postgres_advanced_config.trackIoTiming = n.getEnumValue(Postgres_advanced_config_track_io_timingObject); }, + "wal_sender_timeout": n => { postgres_advanced_config.walSenderTimeout = n.getNumberValue(); }, + "wal_writer_delay": n => { postgres_advanced_config.walWriterDelay = n.getNumberValue(); }, + "work_mem": n => { postgres_advanced_config.workMem = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Previous_outage The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoPrevious_outage(previous_outage = {}) { + return { + "duration_seconds": n => { previous_outage.durationSeconds = n.getNumberValue(); }, + "ended_at": n => { previous_outage.endedAt = n.getStringValue(); }, + "region": n => { previous_outage.region = n.getStringValue(); }, + "started_at": n => { previous_outage.startedAt = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Product_charge_item The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoProduct_charge_item(product_charge_item = {}) { + return { + "amount": n => { product_charge_item.amount = n.getStringValue(); }, + "count": n => { product_charge_item.count = n.getStringValue(); }, + "name": n => { product_charge_item.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Product_usage_charges The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoProduct_usage_charges(product_usage_charges = {}) { + return { + "amount": n => { product_usage_charges.amount = n.getStringValue(); }, + "items": n => { product_usage_charges.items = n.getCollectionOfObjectValues(createProduct_charge_itemFromDiscriminatorValue); }, + "name": n => { product_usage_charges.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Project The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoProject(project = {}) { + return { + ...deserializeIntoProject_base(project), + "is_default": n => { project.isDefault = n.getBooleanValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Project_assignment The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoProject_assignment(project_assignment = {}) { + return { + "resources": n => { project_assignment.resources = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Project_base The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoProject_base(project_base = {}) { + return { + "created_at": n => { project_base.createdAt = n.getDateValue(); }, + "description": n => { project_base.description = n.getStringValue(); }, + "environment": n => { project_base.environment = n.getEnumValue(Project_base_environmentObject); }, + "id": n => { project_base.id = n.getGuidValue(); }, + "name": n => { project_base.name = n.getStringValue(); }, + "owner_id": n => { project_base.ownerId = n.getNumberValue(); }, + "owner_uuid": n => { project_base.ownerUuid = n.getStringValue(); }, + "purpose": n => { project_base.purpose = n.getStringValue(); }, + "updated_at": n => { project_base.updatedAt = n.getDateValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Purge_cache The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoPurge_cache(purge_cache = {}) { + return { + "files": n => { purge_cache.files = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Rdma_shared_dev_plugin The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoRdma_shared_dev_plugin(rdma_shared_dev_plugin = {}) { + return { + "enabled": n => { rdma_shared_dev_plugin.enabled = n.getBooleanValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Redis_advanced_config The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoRedis_advanced_config(redis_advanced_config = {}) { + return { + "redis_acl_channels_default": n => { redis_advanced_config.redisAclChannelsDefault = n.getEnumValue(Redis_advanced_config_redis_acl_channels_defaultObject); }, + "redis_io_threads": n => { redis_advanced_config.redisIoThreads = n.getNumberValue(); }, + "redis_lfu_decay_time": n => { redis_advanced_config.redisLfuDecayTime = n.getNumberValue(); }, + "redis_lfu_log_factor": n => { redis_advanced_config.redisLfuLogFactor = n.getNumberValue(); }, + "redis_maxmemory_policy": n => { redis_advanced_config.redisMaxmemoryPolicy = n.getEnumValue(Redis_advanced_config_redis_maxmemory_policyObject); }, + "redis_notify_keyspace_events": n => { redis_advanced_config.redisNotifyKeyspaceEvents = n.getStringValue(); }, + "redis_number_of_databases": n => { redis_advanced_config.redisNumberOfDatabases = n.getNumberValue(); }, + "redis_persistence": n => { redis_advanced_config.redisPersistence = n.getEnumValue(Redis_advanced_config_redis_persistenceObject); }, + "redis_pubsub_client_output_buffer_limit": n => { redis_advanced_config.redisPubsubClientOutputBufferLimit = n.getNumberValue(); }, + "redis_ssl": n => { redis_advanced_config.redisSsl = n.getBooleanValue(); }, + "redis_timeout": n => { redis_advanced_config.redisTimeout = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Region The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoRegion(region = {}) { + return { + "available": n => { region.available = n.getBooleanValue(); }, + "features": n => { region.features = n.getCollectionOfPrimitiveValues(); }, + "name": n => { region.name = n.getStringValue(); }, + "sizes": n => { region.sizes = n.getCollectionOfPrimitiveValues(); }, + "slug": n => { region.slug = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Region_state The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoRegion_state(region_state = {}) { + return { + "status": n => { region_state.status = n.getEnumValue(Region_state_statusObject); }, + "status_changed_at": n => { region_state.statusChangedAt = n.getStringValue(); }, + "thirty_day_uptime_percentage": n => { region_state.thirtyDayUptimePercentage = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Regional_state The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoRegional_state(regional_state = {}) { + return { + "eu_west": n => { regional_state.euWest = n.getObjectValue(createRegion_stateFromDiscriminatorValue); }, + "us_east": n => { regional_state.usEast = n.getObjectValue(createRegion_stateFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Registry The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoRegistry(registry = {}) { + return { + ...deserializeIntoRegistry_base(registry), + "subscription": n => { registry.subscription = n.getObjectValue(createSubscriptionFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Registry_base The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoRegistry_base(registry_base = {}) { + return { + "created_at": n => { registry_base.createdAt = n.getDateValue(); }, + "name": n => { registry_base.name = n.getStringValue(); }, + "region": n => { registry_base.region = n.getStringValue(); }, + "storage_usage_bytes": n => { registry_base.storageUsageBytes = n.getNumberValue(); }, + "storage_usage_bytes_updated_at": n => { registry_base.storageUsageBytesUpdatedAt = n.getDateValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Registry_create The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoRegistry_create(registry_create = {}) { + return { + "name": n => { registry_create.name = n.getStringValue(); }, + "region": n => { registry_create.region = n.getEnumValue(Registry_create_regionObject); }, + "subscription_tier_slug": n => { registry_create.subscriptionTierSlug = n.getEnumValue(Registry_create_subscription_tier_slugObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Registry_run_gc The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoRegistry_run_gc(registry_run_gc = {}) { + return { + "type": n => { registry_run_gc.type = n.getEnumValue(Registry_run_gc_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Repository The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoRepository(repository = {}) { + return { + "latest_tag": n => { repository.latestTag = n.getObjectValue(createRepository_tagFromDiscriminatorValue); }, + "name": n => { repository.name = n.getStringValue(); }, + "registry_name": n => { repository.registryName = n.getStringValue(); }, + "tag_count": n => { repository.tagCount = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Repository_blob The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoRepository_blob(repository_blob = {}) { + return { + "compressed_size_bytes": n => { repository_blob.compressedSizeBytes = n.getNumberValue(); }, + "digest": n => { repository_blob.digest = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Repository_manifest The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoRepository_manifest(repository_manifest = {}) { + return { + "blobs": n => { repository_manifest.blobs = n.getCollectionOfObjectValues(createRepository_blobFromDiscriminatorValue); }, + "compressed_size_bytes": n => { repository_manifest.compressedSizeBytes = n.getNumberValue(); }, + "digest": n => { repository_manifest.digest = n.getStringValue(); }, + "registry_name": n => { repository_manifest.registryName = n.getStringValue(); }, + "repository": n => { repository_manifest.repository = n.getStringValue(); }, + "size_bytes": n => { repository_manifest.sizeBytes = n.getNumberValue(); }, + "tags": n => { repository_manifest.tags = n.getCollectionOfPrimitiveValues(); }, + "updated_at": n => { repository_manifest.updatedAt = n.getDateValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Repository_tag The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoRepository_tag(repository_tag = {}) { + return { + "compressed_size_bytes": n => { repository_tag.compressedSizeBytes = n.getNumberValue(); }, + "manifest_digest": n => { repository_tag.manifestDigest = n.getStringValue(); }, + "registry_name": n => { repository_tag.registryName = n.getStringValue(); }, + "repository": n => { repository_tag.repository = n.getStringValue(); }, + "size_bytes": n => { repository_tag.sizeBytes = n.getNumberValue(); }, + "tag": n => { repository_tag.tag = n.getStringValue(); }, + "updated_at": n => { repository_tag.updatedAt = n.getDateValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Repository_v2 The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoRepository_v2(repository_v2 = {}) { + return { + "latest_manifest": n => { repository_v2.latestManifest = n.getObjectValue(createRepository_manifestFromDiscriminatorValue); }, + "manifest_count": n => { repository_v2.manifestCount = n.getNumberValue(); }, + "name": n => { repository_v2.name = n.getStringValue(); }, + "registry_name": n => { repository_v2.registryName = n.getStringValue(); }, + "tag_count": n => { repository_v2.tagCount = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Reserved_ip The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoReserved_ip(reserved_ip = {}) { + return { + "droplet": n => { reserved_ip.droplet = n.getObjectValue(createDropletFromDiscriminatorValue); }, + "ip": n => { reserved_ip.ip = n.getStringValue(); }, + "locked": n => { reserved_ip.locked = n.getBooleanValue(); }, + "project_id": n => { reserved_ip.projectId = n.getGuidValue(); }, + "region": n => { reserved_ip.region = n.getObjectValue(createRegionFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Reserved_ip_action_assign The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoReserved_ip_action_assign(reserved_ip_action_assign = {}) { + return { + ...deserializeIntoReserved_ip_action_type(reserved_ip_action_assign), + "droplet_id": n => { reserved_ip_action_assign.dropletId = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Reserved_ip_action_type The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoReserved_ip_action_type(reserved_ip_action_type = {}) { + return { + "type": n => { reserved_ip_action_type.type = n.getEnumValue(Reserved_ip_action_type_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Reserved_ip_action_unassign The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoReserved_ip_action_unassign(reserved_ip_action_unassign = {}) { + return { + ...deserializeIntoReserved_ip_action_type(reserved_ip_action_unassign), + }; +} +/** + * The deserialization information for the current model + * @param Reserved_ip_createMember1 The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoReserved_ip_createMember1(reserved_ip_createMember1 = {}) { + return { + "droplet_id": n => { reserved_ip_createMember1.dropletId = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Reserved_ip_createMember2 The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoReserved_ip_createMember2(reserved_ip_createMember2 = {}) { + return { + "project_id": n => { reserved_ip_createMember2.projectId = n.getGuidValue(); }, + "region": n => { reserved_ip_createMember2.region = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Reserved_ipv6 The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoReserved_ipv6(reserved_ipv6 = {}) { + return { + "droplet": n => { reserved_ipv6.droplet = n.getObjectValue(createDropletFromDiscriminatorValue); }, + "ip": n => { reserved_ipv6.ip = n.getStringValue(); }, + "region_slug": n => { reserved_ipv6.regionSlug = n.getStringValue(); }, + "reserved_at": n => { reserved_ipv6.reservedAt = n.getDateValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Reserved_ipv6_action_assign The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoReserved_ipv6_action_assign(reserved_ipv6_action_assign = {}) { + return { + ...deserializeIntoReserved_ipv6_action_type(reserved_ipv6_action_assign), + "droplet_id": n => { reserved_ipv6_action_assign.dropletId = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Reserved_ipv6_action_type The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoReserved_ipv6_action_type(reserved_ipv6_action_type = {}) { + return { + "type": n => { reserved_ipv6_action_type.type = n.getEnumValue(Reserved_ipv6_action_type_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Reserved_ipv6_action_unassign The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoReserved_ipv6_action_unassign(reserved_ipv6_action_unassign = {}) { + return { + ...deserializeIntoReserved_ipv6_action_type(reserved_ipv6_action_unassign), + }; +} +/** + * The deserialization information for the current model + * @param Reserved_ipv6_create The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoReserved_ipv6_create(reserved_ipv6_create = {}) { + return { + "region_slug": n => { reserved_ipv6_create.regionSlug = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Resource The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoResource(resource = {}) { + return { + "assigned_at": n => { resource.assignedAt = n.getDateValue(); }, + "links": n => { resource.links = n.getObjectValue(createResource_linksFromDiscriminatorValue); }, + "status": n => { resource.status = n.getEnumValue(Resource_statusObject); }, + "urn": n => { resource.urn = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Resource_links The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoResource_links(resource_links = {}) { + return { + "self": n => { resource_links.self = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Routing_agent The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoRouting_agent(routing_agent = {}) { + return { + "enabled": n => { routing_agent.enabled = n.getBooleanValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Rsyslog_logsink The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoRsyslog_logsink(rsyslog_logsink = {}) { + return { + "ca": n => { rsyslog_logsink.ca = n.getStringValue(); }, + "cert": n => { rsyslog_logsink.cert = n.getStringValue(); }, + "format": n => { rsyslog_logsink.format = n.getEnumValue(Rsyslog_logsink_formatObject); }, + "key": n => { rsyslog_logsink.key = n.getStringValue(); }, + "logline": n => { rsyslog_logsink.logline = n.getStringValue(); }, + "port": n => { rsyslog_logsink.port = n.getNumberValue(); }, + "sd": n => { rsyslog_logsink.sd = n.getStringValue(); }, + "server": n => { rsyslog_logsink.server = n.getStringValue(); }, + "tls": n => { rsyslog_logsink.tls = n.getBooleanValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Scheduled_details The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoScheduled_details(scheduled_details = {}) { + return { + "body": n => { scheduled_details.body = n.getObjectValue(createScheduled_details_bodyFromDiscriminatorValue); }, + "cron": n => { scheduled_details.cron = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Scheduled_details_body The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoScheduled_details_body(scheduled_details_body = {}) { + return { + "name": n => { scheduled_details_body.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Schema_registry_connection The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoSchema_registry_connection(schema_registry_connection = {}) { + return { + "host": n => { schema_registry_connection.host = n.getStringValue(); }, + "password": n => { schema_registry_connection.password = n.getStringValue(); }, + "port": n => { schema_registry_connection.port = n.getNumberValue(); }, + "ssl": n => { schema_registry_connection.ssl = n.getBooleanValue(); }, + "uri": n => { schema_registry_connection.uri = n.getStringValue(); }, + "user": n => { schema_registry_connection.user = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Selective_destroy_associated_resource The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoSelective_destroy_associated_resource(selective_destroy_associated_resource = {}) { + return { + "floating_ips": n => { selective_destroy_associated_resource.floatingIps = n.getCollectionOfPrimitiveValues(); }, + "reserved_ips": n => { selective_destroy_associated_resource.reservedIps = n.getCollectionOfPrimitiveValues(); }, + "snapshots": n => { selective_destroy_associated_resource.snapshots = n.getCollectionOfPrimitiveValues(); }, + "volumes": n => { selective_destroy_associated_resource.volumes = n.getCollectionOfPrimitiveValues(); }, + "volume_snapshots": n => { selective_destroy_associated_resource.volumeSnapshots = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Simple_charge The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoSimple_charge(simple_charge = {}) { + return { + "amount": n => { simple_charge.amount = n.getStringValue(); }, + "name": n => { simple_charge.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Sink_resource The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoSink_resource(sink_resource = {}) { + return { + "name": n => { sink_resource.name = n.getStringValue(); }, + "urn": n => { sink_resource.urn = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Sinks_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoSinks_response(sinks_response = {}) { + return { + "destination": n => { sinks_response.destination = n.getObjectValue(createDestinationFromDiscriminatorValue); }, + "resources": n => { sinks_response.resources = n.getCollectionOfObjectValues(createSink_resourceFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Size The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoSize(size = {}) { + return { + "available": n => { size.available = n.getBooleanValue(); }, + "description": n => { size.description = n.getStringValue(); }, + "disk": n => { size.disk = n.getNumberValue(); }, + "disk_info": n => { size.diskInfo = n.getCollectionOfObjectValues(createDisk_infoFromDiscriminatorValue); }, + "gpu_info": n => { size.gpuInfo = n.getObjectValue(createGpu_infoFromDiscriminatorValue); }, + "memory": n => { size.memory = n.getNumberValue(); }, + "price_hourly": n => { size.priceHourly = n.getNumberValue(); }, + "price_monthly": n => { size.priceMonthly = n.getNumberValue(); }, + "regions": n => { size.regions = n.getCollectionOfPrimitiveValues(); }, + "slug": n => { size.slug = n.getStringValue(); }, + "transfer": n => { size.transfer = n.getNumberValue(); }, + "vcpus": n => { size.vcpus = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Slack_details The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoSlack_details(slack_details = {}) { + return { + "channel": n => { slack_details.channel = n.getStringValue(); }, + "url": n => { slack_details.url = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Snapshots The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoSnapshots(snapshots = {}) { + return { + ...deserializeIntoSnapshots_base(snapshots), + "id": n => { snapshots.id = n.getStringValue(); }, + "resource_id": n => { snapshots.resourceId = n.getStringValue(); }, + "resource_type": n => { snapshots.resourceType = n.getEnumValue(Snapshots_resource_typeObject); }, + "tags": n => { snapshots.tags = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Snapshots_base The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoSnapshots_base(snapshots_base = {}) { + return { + "created_at": n => { snapshots_base.createdAt = n.getDateValue(); }, + "min_disk_size": n => { snapshots_base.minDiskSize = n.getNumberValue(); }, + "name": n => { snapshots_base.name = n.getStringValue(); }, + "regions": n => { snapshots_base.regions = n.getCollectionOfPrimitiveValues(); }, + "size_gigabytes": n => { snapshots_base.sizeGigabytes = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Source_database The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoSource_database(source_database = {}) { + return { + "disable_ssl": n => { source_database.disableSsl = n.getBooleanValue(); }, + "ignore_dbs": n => { source_database.ignoreDbs = n.getCollectionOfPrimitiveValues(); }, + "source": n => { source_database.source = n.getObjectValue(createSource_database_sourceFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Source_database_source The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoSource_database_source(source_database_source = {}) { + return { + "dbname": n => { source_database_source.dbname = n.getStringValue(); }, + "host": n => { source_database_source.host = n.getStringValue(); }, + "password": n => { source_database_source.password = n.getStringValue(); }, + "port": n => { source_database_source.port = n.getNumberValue(); }, + "username": n => { source_database_source.username = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Sql_mode The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoSql_mode(sql_mode = {}) { + return { + "sql_mode": n => { sql_mode.sqlMode = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param SshKeys The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoSshKeys(sshKeys = {}) { + return { + "fingerprint": n => { sshKeys.fingerprint = n.getStringValue(); }, + "id": n => { sshKeys.id = n.getNumberValue(); }, + "name": n => { sshKeys.name = n.getStringValue(); }, + "public_key": n => { sshKeys.publicKey = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param State The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoState(state = {}) { + return { + "previous_outage": n => { state.previousOutage = n.getObjectValue(createPrevious_outageFromDiscriminatorValue); }, + "regions": n => { state.regions = n.getObjectValue(createRegional_stateFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Status_messages The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoStatus_messages(status_messages = {}) { + return { + "message": n => { status_messages.message = n.getStringValue(); }, + "timestamp": n => { status_messages.timestamp = n.getDateValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Sticky_sessions The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoSticky_sessions(sticky_sessions = {}) { + return { + "cookie_name": n => { sticky_sessions.cookieName = n.getStringValue(); }, + "cookie_ttl_seconds": n => { sticky_sessions.cookieTtlSeconds = n.getNumberValue(); }, + "type": n => { sticky_sessions.type = n.getEnumValue(Sticky_sessions_typeObject) ?? Sticky_sessions_typeObject.None; }, + }; +} +/** + * The deserialization information for the current model + * @param Subscription The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoSubscription(subscription = {}) { + return { + "created_at": n => { subscription.createdAt = n.getDateValue(); }, + "tier": n => { subscription.tier = n.getObjectValue(createSubscription_tier_baseFromDiscriminatorValue); }, + "updated_at": n => { subscription.updatedAt = n.getDateValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Subscription_tier_base The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoSubscription_tier_base(subscription_tier_base = {}) { + return { + "allow_storage_overage": n => { subscription_tier_base.allowStorageOverage = n.getBooleanValue(); }, + "included_bandwidth_bytes": n => { subscription_tier_base.includedBandwidthBytes = n.getNumberValue(); }, + "included_repositories": n => { subscription_tier_base.includedRepositories = n.getNumberValue(); }, + "included_storage_bytes": n => { subscription_tier_base.includedStorageBytes = n.getNumberValue(); }, + "monthly_price_in_cents": n => { subscription_tier_base.monthlyPriceInCents = n.getNumberValue(); }, + "name": n => { subscription_tier_base.name = n.getStringValue(); }, + "slug": n => { subscription_tier_base.slug = n.getStringValue(); }, + "storage_overage_price_in_cents": n => { subscription_tier_base.storageOveragePriceInCents = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Supported_droplet_backup_policy The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoSupported_droplet_backup_policy(supported_droplet_backup_policy = {}) { + return { + "name": n => { supported_droplet_backup_policy.name = n.getStringValue(); }, + "possible_days": n => { supported_droplet_backup_policy.possibleDays = n.getCollectionOfPrimitiveValues(); }, + "possible_window_starts": n => { supported_droplet_backup_policy.possibleWindowStarts = n.getCollectionOfPrimitiveValues(); }, + "retention_period_days": n => { supported_droplet_backup_policy.retentionPeriodDays = n.getNumberValue(); }, + "window_length_hours": n => { supported_droplet_backup_policy.windowLengthHours = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Tags The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoTags(tags = {}) { + return { + "name": n => { tags.name = n.getStringValue(); }, + "resources": n => { tags.resources = n.getObjectValue(createTags_resourcesFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Tags_metadata The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoTags_metadata(tags_metadata = {}) { + return { + "count": n => { tags_metadata.count = n.getNumberValue(); }, + "last_tagged_uri": n => { tags_metadata.lastTaggedUri = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Tags_resource The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoTags_resource(tags_resource = {}) { + return { + "resources": n => { tags_resource.resources = n.getCollectionOfObjectValues(createTags_resource_resourcesFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Tags_resource_resources The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoTags_resource_resources(tags_resource_resources = {}) { + return { + "resource_id": n => { tags_resource_resources.resourceId = n.getStringValue(); }, + "resource_type": n => { tags_resource_resources.resourceType = n.getEnumValue(Tags_resource_resources_resource_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Tags_resources The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoTags_resources(tags_resources = {}) { + return { + ...deserializeIntoTags_metadata(tags_resources), + "databases": n => { tags_resources.databases = n.getObjectValue(createTags_metadataFromDiscriminatorValue); }, + "droplets": n => { tags_resources.droplets = n.getObjectValue(createTags_metadataFromDiscriminatorValue); }, + "imgages": n => { tags_resources.imgages = n.getObjectValue(createTags_metadataFromDiscriminatorValue); }, + "volumes": n => { tags_resources.volumes = n.getObjectValue(createTags_metadataFromDiscriminatorValue); }, + "volume_snapshots": n => { tags_resources.volumeSnapshots = n.getObjectValue(createTags_metadataFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Timescaledb_advanced_config The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoTimescaledb_advanced_config(timescaledb_advanced_config = {}) { + return { + "max_background_workers": n => { timescaledb_advanced_config.maxBackgroundWorkers = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Trigger_info The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoTrigger_info(trigger_info = {}) { + return { + "created_at": n => { trigger_info.createdAt = n.getStringValue(); }, + "function": n => { trigger_info.functionEscaped = n.getStringValue(); }, + "is_enabled": n => { trigger_info.isEnabled = n.getBooleanValue(); }, + "name": n => { trigger_info.name = n.getStringValue(); }, + "namespace": n => { trigger_info.namespace = n.getStringValue(); }, + "scheduled_details": n => { trigger_info.scheduledDetails = n.getObjectValue(createScheduled_detailsFromDiscriminatorValue); }, + "scheduled_runs": n => { trigger_info.scheduledRuns = n.getObjectValue(createTrigger_info_scheduled_runsFromDiscriminatorValue); }, + "type": n => { trigger_info.type = n.getStringValue(); }, + "updated_at": n => { trigger_info.updatedAt = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Trigger_info_scheduled_runs The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoTrigger_info_scheduled_runs(trigger_info_scheduled_runs = {}) { + return { + "last_run_at": n => { trigger_info_scheduled_runs.lastRunAt = n.getStringValue(); }, + "next_run_at": n => { trigger_info_scheduled_runs.nextRunAt = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Update_endpoint The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoUpdate_endpoint(update_endpoint = {}) { + return { + "certificate_id": n => { update_endpoint.certificateId = n.getGuidValue(); }, + "custom_domain": n => { update_endpoint.customDomain = n.getStringValue(); }, + "ttl": n => { update_endpoint.ttl = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Update_registry The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoUpdate_registry(update_registry = {}) { + return { + "cancel": n => { update_registry.cancel = n.getBooleanValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Update_trigger The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoUpdate_trigger(update_trigger = {}) { + return { + "is_enabled": n => { update_trigger.isEnabled = n.getBooleanValue(); }, + "scheduled_details": n => { update_trigger.scheduledDetails = n.getObjectValue(createScheduled_detailsFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param User The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoUser(user = {}) { + return { + "kubernetes_cluster_user": n => { user.kubernetesClusterUser = n.getObjectValue(createUser_kubernetes_cluster_userFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param User_kubernetes_cluster_user The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoUser_kubernetes_cluster_user(user_kubernetes_cluster_user = {}) { + return { + "groups": n => { user_kubernetes_cluster_user.groups = n.getCollectionOfPrimitiveValues(); }, + "username": n => { user_kubernetes_cluster_user.username = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param User_settings The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoUser_settings(user_settings = {}) { + return { + "acl": n => { user_settings.acl = n.getCollectionOfObjectValues(createUser_settings_aclFromDiscriminatorValue); }, + "mongo_user_settings": n => { user_settings.mongoUserSettings = n.getObjectValue(createUser_settings_mongo_user_settingsFromDiscriminatorValue); }, + "opensearch_acl": n => { user_settings.opensearchAcl = n.getCollectionOfObjectValues(createUser_settings_opensearch_aclFromDiscriminatorValue); }, + "pg_allow_replication": n => { user_settings.pgAllowReplication = n.getBooleanValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param User_settings_acl The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoUser_settings_acl(user_settings_acl = {}) { + return { + "id": n => { user_settings_acl.id = n.getStringValue(); }, + "permission": n => { user_settings_acl.permission = n.getEnumValue(User_settings_acl_permissionObject); }, + "topic": n => { user_settings_acl.topic = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param User_settings_mongo_user_settings The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoUser_settings_mongo_user_settings(user_settings_mongo_user_settings = {}) { + return { + "databases": n => { user_settings_mongo_user_settings.databases = n.getCollectionOfPrimitiveValues(); }, + "role": n => { user_settings_mongo_user_settings.role = n.getEnumValue(User_settings_mongo_user_settings_roleObject); }, + }; +} +/** + * The deserialization information for the current model + * @param User_settings_opensearch_acl The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoUser_settings_opensearch_acl(user_settings_opensearch_acl = {}) { + return { + "index": n => { user_settings_opensearch_acl.index = n.getStringValue(); }, + "permission": n => { user_settings_opensearch_acl.permission = n.getEnumValue(User_settings_opensearch_acl_permissionObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Validate_registry The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoValidate_registry(validate_registry = {}) { + return { + "name": n => { validate_registry.name = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Valkey_advanced_config The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoValkey_advanced_config(valkey_advanced_config = {}) { + return { + "frequent_snapshots": n => { valkey_advanced_config.frequentSnapshots = n.getBooleanValue(); }, + "valkey_acl_channels_default": n => { valkey_advanced_config.valkeyAclChannelsDefault = n.getEnumValue(Valkey_advanced_config_valkey_acl_channels_defaultObject); }, + "valkey_active_expire_effort": n => { valkey_advanced_config.valkeyActiveExpireEffort = n.getNumberValue(); }, + "valkey_io_threads": n => { valkey_advanced_config.valkeyIoThreads = n.getNumberValue(); }, + "valkey_lfu_decay_time": n => { valkey_advanced_config.valkeyLfuDecayTime = n.getNumberValue(); }, + "valkey_lfu_log_factor": n => { valkey_advanced_config.valkeyLfuLogFactor = n.getNumberValue(); }, + "valkey_maxmemory_policy": n => { valkey_advanced_config.valkeyMaxmemoryPolicy = n.getEnumValue(Eviction_policy_modelObject); }, + "valkey_notify_keyspace_events": n => { valkey_advanced_config.valkeyNotifyKeyspaceEvents = n.getStringValue(); }, + "valkey_number_of_databases": n => { valkey_advanced_config.valkeyNumberOfDatabases = n.getNumberValue(); }, + "valkey_persistence": n => { valkey_advanced_config.valkeyPersistence = n.getEnumValue(Valkey_advanced_config_valkey_persistenceObject); }, + "valkey_pubsub_client_output_buffer_limit": n => { valkey_advanced_config.valkeyPubsubClientOutputBufferLimit = n.getNumberValue(); }, + "valkey_ssl": n => { valkey_advanced_config.valkeySsl = n.getBooleanValue(); }, + "valkey_timeout": n => { valkey_advanced_config.valkeyTimeout = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Version2 The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoVersion2(version2 = {}) { + return { + "version": n => { version2.version = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Volume_action_post_attach The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoVolume_action_post_attach(volume_action_post_attach = {}) { + return { + ...deserializeIntoVolume_action_post_base(volume_action_post_attach), + "droplet_id": n => { volume_action_post_attach.dropletId = n.getNumberValue(); }, + "tags": n => { volume_action_post_attach.tags = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Volume_action_post_base The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoVolume_action_post_base(volume_action_post_base = {}) { + return { + "region": n => { volume_action_post_base.region = n.getEnumValue(Region_slugObject); }, + "type": n => { volume_action_post_base.type = n.getEnumValue(Volume_action_post_base_typeObject); }, + }; +} +/** + * The deserialization information for the current model + * @param Volume_action_post_detach The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoVolume_action_post_detach(volume_action_post_detach = {}) { + return { + ...deserializeIntoVolume_action_post_base(volume_action_post_detach), + "droplet_id": n => { volume_action_post_detach.dropletId = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Volume_action_post_resize The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoVolume_action_post_resize(volume_action_post_resize = {}) { + return { + ...deserializeIntoVolume_action_post_base(volume_action_post_resize), + "size_gigabytes": n => { volume_action_post_resize.sizeGigabytes = n.getNumberValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Volume_base_read The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoVolume_base_read(volume_base_read = {}) { + return { + "created_at": n => { volume_base_read.createdAt = n.getStringValue(); }, + "description": n => { volume_base_read.description = n.getStringValue(); }, + "droplet_ids": n => { volume_base_read.dropletIds = n.getCollectionOfPrimitiveValues(); }, + "id": n => { volume_base_read.id = n.getStringValue(); }, + "name": n => { volume_base_read.name = n.getStringValue(); }, + "size_gigabytes": n => { volume_base_read.sizeGigabytes = n.getNumberValue(); }, + "tags": n => { volume_base_read.tags = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Volume_full The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoVolume_full(volume_full = {}) { + return { + ...deserializeIntoVolume_base_read(volume_full), + "filesystem_label": n => { volume_full.filesystemLabel = n.getStringValue(); }, + "filesystem_type": n => { volume_full.filesystemType = n.getStringValue(); }, + "region": n => { volume_full.region = n.getObjectValue(createRegionFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param VolumeAction The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoVolumeAction(volumeAction = {}) { + return { + ...deserializeIntoAction(volumeAction), + }; +} +/** + * The deserialization information for the current model + * @param Volumes_ext4 The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoVolumes_ext4(volumes_ext4 = {}) { + return { + "created_at": n => { volumes_ext4.createdAt = n.getStringValue(); }, + "description": n => { volumes_ext4.description = n.getStringValue(); }, + "droplet_ids": n => { volumes_ext4.dropletIds = n.getCollectionOfPrimitiveValues(); }, + "filesystem_label": n => { volumes_ext4.filesystemLabel = n.getStringValue(); }, + "filesystem_type": n => { volumes_ext4.filesystemType = n.getStringValue(); }, + "id": n => { volumes_ext4.id = n.getStringValue(); }, + "name": n => { volumes_ext4.name = n.getStringValue(); }, + "region": n => { volumes_ext4.region = n.getEnumValue(Region_slugObject); }, + "size_gigabytes": n => { volumes_ext4.sizeGigabytes = n.getNumberValue(); }, + "snapshot_id": n => { volumes_ext4.snapshotId = n.getStringValue(); }, + "tags": n => { volumes_ext4.tags = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Volumes_xfs The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoVolumes_xfs(volumes_xfs = {}) { + return { + "created_at": n => { volumes_xfs.createdAt = n.getStringValue(); }, + "description": n => { volumes_xfs.description = n.getStringValue(); }, + "droplet_ids": n => { volumes_xfs.dropletIds = n.getCollectionOfPrimitiveValues(); }, + "filesystem_label": n => { volumes_xfs.filesystemLabel = n.getStringValue(); }, + "filesystem_type": n => { volumes_xfs.filesystemType = n.getStringValue(); }, + "id": n => { volumes_xfs.id = n.getStringValue(); }, + "name": n => { volumes_xfs.name = n.getStringValue(); }, + "region": n => { volumes_xfs.region = n.getEnumValue(Region_slugObject); }, + "size_gigabytes": n => { volumes_xfs.sizeGigabytes = n.getNumberValue(); }, + "snapshot_id": n => { volumes_xfs.snapshotId = n.getStringValue(); }, + "tags": n => { volumes_xfs.tags = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Vpc The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoVpc(vpc = {}) { + return { + "created_at": n => { vpc.createdAt = n.getDateValue(); }, + "default": n => { vpc.defaultEscaped = n.getBooleanValue(); }, + "description": n => { vpc.description = n.getStringValue(); }, + "id": n => { vpc.id = n.getGuidValue(); }, + "ip_range": n => { vpc.ipRange = n.getStringValue(); }, + "name": n => { vpc.name = n.getStringValue(); }, + "region": n => { vpc.region = n.getStringValue(); }, + "urn": n => { vpc.urn = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Vpc_member The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoVpc_member(vpc_member = {}) { + return { + "created_at": n => { vpc_member.createdAt = n.getStringValue(); }, + "name": n => { vpc_member.name = n.getStringValue(); }, + "urn": n => { vpc_member.urn = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Vpc_nat_gateway_create The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoVpc_nat_gateway_create(vpc_nat_gateway_create = {}) { + return { + "icmp_timeout_seconds": n => { vpc_nat_gateway_create.icmpTimeoutSeconds = n.getNumberValue(); }, + "name": n => { vpc_nat_gateway_create.name = n.getStringValue(); }, + "region": n => { vpc_nat_gateway_create.region = n.getEnumValue(Vpc_nat_gateway_create_regionObject); }, + "size": n => { vpc_nat_gateway_create.size = n.getNumberValue(); }, + "tcp_timeout_seconds": n => { vpc_nat_gateway_create.tcpTimeoutSeconds = n.getNumberValue(); }, + "type": n => { vpc_nat_gateway_create.type = n.getEnumValue(Vpc_nat_gateway_create_typeObject); }, + "udp_timeout_seconds": n => { vpc_nat_gateway_create.udpTimeoutSeconds = n.getNumberValue(); }, + "vpcs": n => { vpc_nat_gateway_create.vpcs = n.getCollectionOfObjectValues(createVpc_nat_gateway_create_vpcsFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Vpc_nat_gateway_create_vpcs The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoVpc_nat_gateway_create_vpcs(vpc_nat_gateway_create_vpcs = {}) { + return { + "default_gateway": n => { vpc_nat_gateway_create_vpcs.defaultGateway = n.getBooleanValue(); }, + "vpc_uuid": n => { vpc_nat_gateway_create_vpcs.vpcUuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Vpc_nat_gateway_get The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoVpc_nat_gateway_get(vpc_nat_gateway_get = {}) { + return { + "created_at": n => { vpc_nat_gateway_get.createdAt = n.getDateValue(); }, + "egresses": n => { vpc_nat_gateway_get.egresses = n.getObjectValue(createVpc_nat_gateway_get_egressesFromDiscriminatorValue); }, + "icmp_timeout_seconds": n => { vpc_nat_gateway_get.icmpTimeoutSeconds = n.getNumberValue(); }, + "id": n => { vpc_nat_gateway_get.id = n.getStringValue(); }, + "name": n => { vpc_nat_gateway_get.name = n.getStringValue(); }, + "region": n => { vpc_nat_gateway_get.region = n.getEnumValue(Vpc_nat_gateway_get_regionObject); }, + "size": n => { vpc_nat_gateway_get.size = n.getNumberValue(); }, + "state": n => { vpc_nat_gateway_get.state = n.getEnumValue(Vpc_nat_gateway_get_stateObject); }, + "tcp_timeout_seconds": n => { vpc_nat_gateway_get.tcpTimeoutSeconds = n.getNumberValue(); }, + "type": n => { vpc_nat_gateway_get.type = n.getEnumValue(Vpc_nat_gateway_get_typeObject); }, + "udp_timeout_seconds": n => { vpc_nat_gateway_get.udpTimeoutSeconds = n.getNumberValue(); }, + "updated_at": n => { vpc_nat_gateway_get.updatedAt = n.getDateValue(); }, + "vpcs": n => { vpc_nat_gateway_get.vpcs = n.getCollectionOfObjectValues(createVpc_nat_gateway_get_vpcsFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Vpc_nat_gateway_get_egresses The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoVpc_nat_gateway_get_egresses(vpc_nat_gateway_get_egresses = {}) { + return { + "public_gateways": n => { vpc_nat_gateway_get_egresses.publicGateways = n.getCollectionOfObjectValues(createVpc_nat_gateway_get_egresses_public_gatewaysFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Vpc_nat_gateway_get_egresses_public_gateways The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoVpc_nat_gateway_get_egresses_public_gateways(vpc_nat_gateway_get_egresses_public_gateways = {}) { + return { + "ipv4": n => { vpc_nat_gateway_get_egresses_public_gateways.ipv4 = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Vpc_nat_gateway_get_vpcs The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoVpc_nat_gateway_get_vpcs(vpc_nat_gateway_get_vpcs = {}) { + return { + "gateway_ip": n => { vpc_nat_gateway_get_vpcs.gatewayIp = n.getStringValue(); }, + "vpc_uuid": n => { vpc_nat_gateway_get_vpcs.vpcUuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Vpc_nat_gateway_update The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoVpc_nat_gateway_update(vpc_nat_gateway_update = {}) { + return { + "icmp_timeout_seconds": n => { vpc_nat_gateway_update.icmpTimeoutSeconds = n.getNumberValue(); }, + "name": n => { vpc_nat_gateway_update.name = n.getStringValue(); }, + "size": n => { vpc_nat_gateway_update.size = n.getNumberValue(); }, + "tcp_timeout_seconds": n => { vpc_nat_gateway_update.tcpTimeoutSeconds = n.getNumberValue(); }, + "udp_timeout_seconds": n => { vpc_nat_gateway_update.udpTimeoutSeconds = n.getNumberValue(); }, + "vpcs": n => { vpc_nat_gateway_update.vpcs = n.getCollectionOfObjectValues(createVpc_nat_gateway_update_vpcsFromDiscriminatorValue); }, + }; +} +/** + * The deserialization information for the current model + * @param Vpc_nat_gateway_update_vpcs The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoVpc_nat_gateway_update_vpcs(vpc_nat_gateway_update_vpcs = {}) { + return { + "default_gateway": n => { vpc_nat_gateway_update_vpcs.defaultGateway = n.getBooleanValue(); }, + "vpc_uuid": n => { vpc_nat_gateway_update_vpcs.vpcUuid = n.getStringValue(); }, + }; +} +/** + * The deserialization information for the current model + * @param Vpc_peering The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoVpc_peering(vpc_peering = {}) { + return { + "created_at": n => { vpc_peering.createdAt = n.getDateValue(); }, + "id": n => { vpc_peering.id = n.getGuidValue(); }, + "name": n => { vpc_peering.name = n.getStringValue(); }, + "status": n => { vpc_peering.status = n.getEnumValue(Vpc_peering_statusObject); }, + "vpc_ids": n => { vpc_peering.vpcIds = n.getCollectionOfPrimitiveValues(); }, + }; +} +/** + * The deserialization information for the current model + * @param Vpc_peering_updatable The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoVpc_peering_updatable(vpc_peering_updatable = {}) { + return { + "name": n => { vpc_peering_updatable.name = n.getStringValue(); }, + }; +} +/** + * Serializes information the current object + * @param Account The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAccount(writer, account = {}, isSerializingDerivedType = false) { + if (!account || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("droplet_limit", account.dropletLimit); + writer.writeStringValue("email", account.email); + writer.writeBooleanValue("email_verified", account.emailVerified); + writer.writeNumberValue("floating_ip_limit", account.floatingIpLimit); + writer.writeStringValue("name", account.name); + writer.writeEnumValue("status", account.status ?? Account_statusObject.Active); + writer.writeStringValue("status_message", account.statusMessage); + writer.writeObjectValue("team", account.team, serializeAccount_team); + writer.writeStringValue("uuid", account.uuid); + writer.writeAdditionalData(account.additionalData); +} +/** + * Serializes information the current object + * @param Account_team The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAccount_team(writer, account_team = {}, isSerializingDerivedType = false) { + if (!account_team || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", account_team.name); + writer.writeStringValue("uuid", account_team.uuid); + writer.writeAdditionalData(account_team.additionalData); +} +/** + * Serializes information the current object + * @param Action The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAction(writer, action = {}, isSerializingDerivedType = false) { + if (!action || isSerializingDerivedType) { + return; + } + writer.writeDateValue("completed_at", action.completedAt); + writer.writeNumberValue("id", action.id); + writer.writeObjectValue("region", action.region, serializeRegion); + writer.writeStringValue("region_slug", action.regionSlug); + writer.writeNumberValue("resource_id", action.resourceId); + writer.writeStringValue("resource_type", action.resourceType); + writer.writeDateValue("started_at", action.startedAt); + writer.writeEnumValue("status", action.status ?? Action_statusObject.InProgress); + writer.writeStringValue("type", action.type); + writer.writeAdditionalData(action.additionalData); +} +/** + * Serializes information the current object + * @param Action_link The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAction_link(writer, action_link = {}, isSerializingDerivedType = false) { + if (!action_link || isSerializingDerivedType) { + return; + } + writer.writeStringValue("href", action_link.href); + writer.writeNumberValue("id", action_link.id); + writer.writeStringValue("rel", action_link.rel); + writer.writeAdditionalData(action_link.additionalData); +} +/** + * Serializes information the current object + * @param Addons_app_info The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAddons_app_info(writer, addons_app_info = {}, isSerializingDerivedType = false) { + if (!addons_app_info || isSerializingDerivedType) { + return; + } + writer.writeStringValue("app_slug", addons_app_info.appSlug); + writer.writeStringValue("eula", addons_app_info.eula); + writer.writeCollectionOfObjectValues("plans", addons_app_info.plans, serializeAddons_plan); + writer.writeStringValue("tos", addons_app_info.tos); + writer.writeAdditionalData(addons_app_info.additionalData); +} +/** + * Serializes information the current object + * @param Addons_app_metadata The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAddons_app_metadata(writer, addons_app_metadata = {}, isSerializingDerivedType = false) { + if (!addons_app_metadata || isSerializingDerivedType) { + return; + } + writer.writeStringValue("description", addons_app_metadata.description); + writer.writeStringValue("display_name", addons_app_metadata.displayName); + writer.writeNumberValue("id", addons_app_metadata.id); + writer.writeStringValue("name", addons_app_metadata.name); + writer.writeCollectionOfPrimitiveValues("options", addons_app_metadata.options); + writer.writeEnumValue("type", addons_app_metadata.type); + writer.writeAdditionalData(addons_app_metadata.additionalData); +} +/** + * Serializes information the current object + * @param Addons_dimension_volume_with_price The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAddons_dimension_volume_with_price(writer, addons_dimension_volume_with_price = {}, isSerializingDerivedType = false) { + if (!addons_dimension_volume_with_price || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("id", addons_dimension_volume_with_price.id); + writer.writeNumberValue("low_volume", addons_dimension_volume_with_price.lowVolume); + writer.writeNumberValue("max_volume", addons_dimension_volume_with_price.maxVolume); + writer.writeStringValue("price_per_unit", addons_dimension_volume_with_price.pricePerUnit); + writer.writeAdditionalData(addons_dimension_volume_with_price.additionalData); +} +/** + * Serializes information the current object + * @param Addons_dimension_with_price The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAddons_dimension_with_price(writer, addons_dimension_with_price = {}, isSerializingDerivedType = false) { + if (!addons_dimension_with_price || isSerializingDerivedType) { + return; + } + writer.writeStringValue("display_name", addons_dimension_with_price.displayName); + writer.writeStringValue("feature_name", addons_dimension_with_price.featureName); + writer.writeNumberValue("id", addons_dimension_with_price.id); + writer.writeStringValue("sku", addons_dimension_with_price.sku); + writer.writeStringValue("slug", addons_dimension_with_price.slug); + writer.writeCollectionOfObjectValues("volumes", addons_dimension_with_price.volumes, serializeAddons_dimension_volume_with_price); + writer.writeAdditionalData(addons_dimension_with_price.additionalData); +} +/** + * Serializes information the current object + * @param Addons_feature The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAddons_feature(writer, addons_feature = {}, isSerializingDerivedType = false) { + if (!addons_feature || isSerializingDerivedType) { + return; + } + writer.writeDateValue("created_at", addons_feature.createdAt); + writer.writeNumberValue("id", addons_feature.id); + writer.writeStringValue("name", addons_feature.name); + writer.writeEnumValue("type", addons_feature.type); + writer.writeEnumValue("unit", addons_feature.unit); + writer.writeDateValue("updated_at", addons_feature.updatedAt); + if (typeof addons_feature.value === "boolean") { + writer.writeBooleanValue("value", addons_feature.value); + } + else if (typeof addons_feature.value === "string") { + writer.writeStringValue("value", addons_feature.value); + } + writer.writeAdditionalData(addons_feature.additionalData); +} +/** + * Serializes information the current object + * @param Addons_feature_value The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param key The name of the property to write in the serialization. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAddons_feature_value(writer, key, addons_feature_value, isSerializingDerivedType = false) { + if (addons_feature_value === undefined || addons_feature_value === null) + return; + if (typeof addons_feature_value === "boolean") { + writer.writeBooleanValue(undefined, addons_feature_value); + } + else if (typeof addons_feature_value === "string") { + writer.writeStringValue(undefined, addons_feature_value); + } +} +/** + * Serializes information the current object + * @param Addons_plan The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAddons_plan(writer, addons_plan = {}, isSerializingDerivedType = false) { + if (!addons_plan || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("active", addons_plan.active); + writer.writeNumberValue("app_id", addons_plan.appId); + writer.writeBooleanValue("available", addons_plan.available); + writer.writeBooleanValue("by_default", addons_plan.byDefault); + writer.writeDateValue("created_at", addons_plan.createdAt); + writer.writeStringValue("description", addons_plan.description); + writer.writeCollectionOfObjectValues("dimensions", addons_plan.dimensions, serializeAddons_dimension_with_price); + writer.writeStringValue("display_name", addons_plan.displayName); + writer.writeCollectionOfObjectValues("features", addons_plan.features, serializeAddons_feature); + writer.writeNumberValue("id", addons_plan.id); + writer.writeNumberValue("price_per_month", addons_plan.pricePerMonth); + writer.writeStringValue("slug", addons_plan.slug); + writer.writeEnumValue("state", addons_plan.state); + writer.writeDateValue("updated_at", addons_plan.updatedAt); + writer.writeStringValue("uuid", addons_plan.uuid); + writer.writeAdditionalData(addons_plan.additionalData); +} +/** + * Serializes information the current object + * @param Addons_resource The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAddons_resource(writer, addons_resource = {}, isSerializingDerivedType = false) { + if (!addons_resource || isSerializingDerivedType) { + return; + } + writer.writeStringValue("app_name", addons_resource.appName); + writer.writeStringValue("app_slug", addons_resource.appSlug); + writer.writeBooleanValue("has_config", addons_resource.hasConfig); + writer.writeStringValue("message", addons_resource.message); + writer.writeCollectionOfObjectValues("metadata", addons_resource.metadata, serializeAddons_resource_metadata); + writer.writeStringValue("name", addons_resource.name); + writer.writeStringValue("plan_name", addons_resource.planName); + writer.writeNumberValue("plan_price_per_month", addons_resource.planPricePerMonth); + writer.writeStringValue("plan_slug", addons_resource.planSlug); + writer.writeStringValue("sso_url", addons_resource.ssoUrl); + writer.writeEnumValue("state", addons_resource.state); + writer.writeStringValue("uuid", addons_resource.uuid); + writer.writeAdditionalData(addons_resource.additionalData); +} +/** + * Serializes information the current object + * @param Addons_resource_metadata The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAddons_resource_metadata(writer, addons_resource_metadata = {}, isSerializingDerivedType = false) { + if (!addons_resource_metadata || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", addons_resource_metadata.name); + if (typeof addons_resource_metadata.value === "boolean") { + writer.writeBooleanValue("value", addons_resource_metadata.value); + } + else if (typeof addons_resource_metadata.value === "string") { + writer.writeStringValue("value", addons_resource_metadata.value); + } + writer.writeAdditionalData(addons_resource_metadata.additionalData); +} +/** + * Serializes information the current object + * @param Addons_resource_metadata_value The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param key The name of the property to write in the serialization. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAddons_resource_metadata_value(writer, key, addons_resource_metadata_value, isSerializingDerivedType = false) { + if (addons_resource_metadata_value === undefined || addons_resource_metadata_value === null) + return; + if (typeof addons_resource_metadata_value === "boolean") { + writer.writeBooleanValue(undefined, addons_resource_metadata_value); + } + else if (typeof addons_resource_metadata_value === "string") { + writer.writeStringValue(undefined, addons_resource_metadata_value); + } +} +/** + * Serializes information the current object + * @param Addons_resource_new The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAddons_resource_new(writer, addons_resource_new = {}, isSerializingDerivedType = false) { + if (!addons_resource_new || isSerializingDerivedType) { + return; + } + writer.writeStringValue("app_slug", addons_resource_new.appSlug); + writer.writeStringValue("fleet_uuid", addons_resource_new.fleetUuid); + writer.writeNumberValue("linked_droplet_id", addons_resource_new.linkedDropletId); + writer.writeCollectionOfObjectValues("metadata", addons_resource_new.metadata, serializeAddons_resource_metadata); + writer.writeStringValue("name", addons_resource_new.name); + writer.writeStringValue("plan_slug", addons_resource_new.planSlug); + writer.writeAdditionalData(addons_resource_new.additionalData); +} +/** + * Serializes information the current object + * @param Alert The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAlert(writer, alert = {}, isSerializingDerivedType = false) { + if (!alert || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("comparison", alert.comparison); + writer.writeStringValue("name", alert.name); + writer.writeObjectValue("notifications", alert.notifications, serializeNotification); + writer.writeEnumValue("period", alert.period); + writer.writeNumberValue("threshold", alert.threshold); + writer.writeEnumValue("type", alert.type); + writer.writeAdditionalData(alert.additionalData); +} +/** + * Serializes information the current object + * @param Alert_policy The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAlert_policy(writer, alert_policy = {}, isSerializingDerivedType = false) { + if (!alert_policy || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("alerts", alert_policy.alerts, serializeAlerts); + writer.writeEnumValue("compare", alert_policy.compare); + writer.writeStringValue("description", alert_policy.description); + writer.writeBooleanValue("enabled", alert_policy.enabled); + writer.writeCollectionOfPrimitiveValues("entities", alert_policy.entities); + writer.writeCollectionOfPrimitiveValues("tags", alert_policy.tags); + writer.writeEnumValue("type", alert_policy.type); + writer.writeStringValue("uuid", alert_policy.uuid); + writer.writeNumberValue("value", alert_policy.value); + writer.writeEnumValue("window", alert_policy.window); + writer.writeAdditionalData(alert_policy.additionalData); +} +/** + * Serializes information the current object + * @param Alert_policy_request The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAlert_policy_request(writer, alert_policy_request = {}, isSerializingDerivedType = false) { + if (!alert_policy_request || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("alerts", alert_policy_request.alerts, serializeAlerts); + writer.writeEnumValue("compare", alert_policy_request.compare); + writer.writeStringValue("description", alert_policy_request.description); + writer.writeBooleanValue("enabled", alert_policy_request.enabled); + writer.writeCollectionOfPrimitiveValues("entities", alert_policy_request.entities); + writer.writeCollectionOfPrimitiveValues("tags", alert_policy_request.tags); + writer.writeEnumValue("type", alert_policy_request.type); + writer.writeNumberValue("value", alert_policy_request.value); + writer.writeEnumValue("window", alert_policy_request.window); + writer.writeAdditionalData(alert_policy_request.additionalData); +} +/** + * Serializes information the current object + * @param Alert_updatable The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAlert_updatable(writer, alert_updatable = {}, isSerializingDerivedType = false) { + if (!alert_updatable || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("comparison", alert_updatable.comparison); + writer.writeStringValue("name", alert_updatable.name); + writer.writeObjectValue("notifications", alert_updatable.notifications, serializeNotification); + writer.writeEnumValue("period", alert_updatable.period); + writer.writeNumberValue("threshold", alert_updatable.threshold); + writer.writeEnumValue("type", alert_updatable.type); + writer.writeAdditionalData(alert_updatable.additionalData); +} +/** + * Serializes information the current object + * @param Alerts The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAlerts(writer, alerts = {}, isSerializingDerivedType = false) { + if (!alerts || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("email", alerts.email); + writer.writeCollectionOfObjectValues("slack", alerts.slack, serializeSlack_details); + writer.writeAdditionalData(alerts.additionalData); +} +/** + * Serializes information the current object + * @param Amd_gpu_device_metrics_exporter_plugin The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAmd_gpu_device_metrics_exporter_plugin(writer, amd_gpu_device_metrics_exporter_plugin = {}, isSerializingDerivedType = false) { + if (!amd_gpu_device_metrics_exporter_plugin || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("enabled", amd_gpu_device_metrics_exporter_plugin.enabled); + writer.writeAdditionalData(amd_gpu_device_metrics_exporter_plugin.additionalData); +} +/** + * Serializes information the current object + * @param Amd_gpu_device_plugin The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAmd_gpu_device_plugin(writer, amd_gpu_device_plugin = {}, isSerializingDerivedType = false) { + if (!amd_gpu_device_plugin || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("enabled", amd_gpu_device_plugin.enabled); + writer.writeAdditionalData(amd_gpu_device_plugin.additionalData); +} +/** + * Serializes information the current object + * @param ApiAgent The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAgent(writer, apiAgent = {}, isSerializingDerivedType = false) { + if (!apiAgent || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("anthropic_api_key", apiAgent.anthropicApiKey, serializeApiAnthropicAPIKeyInfo); + writer.writeCollectionOfObjectValues("api_key_infos", apiAgent.apiKeyInfos, serializeApiAgentAPIKeyInfo); + writer.writeCollectionOfObjectValues("api_keys", apiAgent.apiKeys, serializeApiAgentAPIKey); + writer.writeObjectValue("chatbot", apiAgent.chatbot, serializeApiChatbot); + writer.writeCollectionOfObjectValues("chatbot_identifiers", apiAgent.chatbotIdentifiers, serializeApiAgentChatbotIdentifier); + writer.writeCollectionOfObjectValues("child_agents", apiAgent.childAgents, serializeApiAgent); + writer.writeBooleanValue("conversation_logs_enabled", apiAgent.conversationLogsEnabled); + writer.writeDateValue("created_at", apiAgent.createdAt); + writer.writeObjectValue("deployment", apiAgent.deployment, serializeApiDeployment); + writer.writeStringValue("description", apiAgent.description); + writer.writeCollectionOfObjectValues("functions", apiAgent.functions, serializeApiAgentFunction); + writer.writeCollectionOfObjectValues("guardrails", apiAgent.guardrails, serializeApiAgentGuardrail); + writer.writeStringValue("if_case", apiAgent.ifCase); + writer.writeStringValue("instruction", apiAgent.instruction); + writer.writeNumberValue("k", apiAgent.k); + writer.writeCollectionOfObjectValues("knowledge_bases", apiAgent.knowledgeBases, serializeApiKnowledgeBase); + writer.writeObjectValue("logging_config", apiAgent.loggingConfig, serializeApiAgentLoggingConfig); + writer.writeNumberValue("max_tokens", apiAgent.maxTokens); + writer.writeObjectValue("model", apiAgent.model, serializeApiModel); + writer.writeObjectValue("model_provider_key", apiAgent.modelProviderKey, serializeApiModelProviderKeyInfo); + writer.writeStringValue("name", apiAgent.name); + writer.writeObjectValue("openai_api_key", apiAgent.openaiApiKey, serializeApiOpenAIAPIKeyInfo); + writer.writeCollectionOfObjectValues("parent_agents", apiAgent.parentAgents, serializeApiAgent); + writer.writeStringValue("project_id", apiAgent.projectId); + writer.writeBooleanValue("provide_citations", apiAgent.provideCitations); + writer.writeStringValue("region", apiAgent.region); + writer.writeEnumValue("retrieval_method", apiAgent.retrievalMethod ?? ApiRetrievalMethodObject.RETRIEVAL_METHOD_UNKNOWN); + writer.writeDateValue("route_created_at", apiAgent.routeCreatedAt); + writer.writeStringValue("route_created_by", apiAgent.routeCreatedBy); + writer.writeStringValue("route_name", apiAgent.routeName); + writer.writeStringValue("route_uuid", apiAgent.routeUuid); + writer.writeCollectionOfPrimitiveValues("tags", apiAgent.tags); + writer.writeNumberValue("temperature", apiAgent.temperature); + writer.writeObjectValue("template", apiAgent.template, serializeApiAgentTemplate); + writer.writeNumberValue("top_p", apiAgent.topP); + writer.writeDateValue("updated_at", apiAgent.updatedAt); + writer.writeStringValue("url", apiAgent.url); + writer.writeStringValue("user_id", apiAgent.userId); + writer.writeStringValue("uuid", apiAgent.uuid); + writer.writeStringValue("version_hash", apiAgent.versionHash); + writer.writeCollectionOfPrimitiveValues("vpc_egress_ips", apiAgent.vpcEgressIps); + writer.writeStringValue("vpc_uuid", apiAgent.vpcUuid); + writer.writeObjectValue("workspace", apiAgent.workspace, serializeApiWorkspace); + writer.writeAdditionalData(apiAgent.additionalData); +} +/** + * Serializes information the current object + * @param ApiAgentAPIKey The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAgentAPIKey(writer, apiAgentAPIKey = {}, isSerializingDerivedType = false) { + if (!apiAgentAPIKey || isSerializingDerivedType) { + return; + } + writer.writeStringValue("api_key", apiAgentAPIKey.apiKey); + writer.writeAdditionalData(apiAgentAPIKey.additionalData); +} +/** + * Serializes information the current object + * @param ApiAgentAPIKeyInfo The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAgentAPIKeyInfo(writer, apiAgentAPIKeyInfo = {}, isSerializingDerivedType = false) { + if (!apiAgentAPIKeyInfo || isSerializingDerivedType) { + return; + } + writer.writeDateValue("created_at", apiAgentAPIKeyInfo.createdAt); + writer.writeStringValue("created_by", apiAgentAPIKeyInfo.createdBy); + writer.writeDateValue("deleted_at", apiAgentAPIKeyInfo.deletedAt); + writer.writeStringValue("name", apiAgentAPIKeyInfo.name); + writer.writeStringValue("secret_key", apiAgentAPIKeyInfo.secretKey); + writer.writeStringValue("uuid", apiAgentAPIKeyInfo.uuid); + writer.writeAdditionalData(apiAgentAPIKeyInfo.additionalData); +} +/** + * Serializes information the current object + * @param ApiAgentChatbotIdentifier The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAgentChatbotIdentifier(writer, apiAgentChatbotIdentifier = {}, isSerializingDerivedType = false) { + if (!apiAgentChatbotIdentifier || isSerializingDerivedType) { + return; + } + writer.writeStringValue("agent_chatbot_identifier", apiAgentChatbotIdentifier.agentChatbotIdentifier); + writer.writeAdditionalData(apiAgentChatbotIdentifier.additionalData); +} +/** + * Serializes information the current object + * @param ApiAgentChildRelationshipVerion The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAgentChildRelationshipVerion(writer, apiAgentChildRelationshipVerion = {}, isSerializingDerivedType = false) { + if (!apiAgentChildRelationshipVerion || isSerializingDerivedType) { + return; + } + writer.writeStringValue("agent_name", apiAgentChildRelationshipVerion.agentName); + writer.writeStringValue("child_agent_uuid", apiAgentChildRelationshipVerion.childAgentUuid); + writer.writeStringValue("if_case", apiAgentChildRelationshipVerion.ifCase); + writer.writeBooleanValue("is_deleted", apiAgentChildRelationshipVerion.isDeleted); + writer.writeStringValue("route_name", apiAgentChildRelationshipVerion.routeName); + writer.writeAdditionalData(apiAgentChildRelationshipVerion.additionalData); +} +/** + * Serializes information the current object + * @param ApiAgentFunction The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAgentFunction(writer, apiAgentFunction = {}, isSerializingDerivedType = false) { + if (!apiAgentFunction || isSerializingDerivedType) { + return; + } + writer.writeStringValue("api_key", apiAgentFunction.apiKey); + writer.writeDateValue("created_at", apiAgentFunction.createdAt); + writer.writeStringValue("created_by", apiAgentFunction.createdBy); + writer.writeStringValue("description", apiAgentFunction.description); + writer.writeStringValue("faas_name", apiAgentFunction.faasName); + writer.writeStringValue("faas_namespace", apiAgentFunction.faasNamespace); + writer.writeObjectValue("input_schema", apiAgentFunction.inputSchema, serializeApiAgentFunction_input_schema); + writer.writeStringValue("name", apiAgentFunction.name); + writer.writeObjectValue("output_schema", apiAgentFunction.outputSchema, serializeApiAgentFunction_output_schema); + writer.writeDateValue("updated_at", apiAgentFunction.updatedAt); + writer.writeStringValue("url", apiAgentFunction.url); + writer.writeStringValue("uuid", apiAgentFunction.uuid); + writer.writeAdditionalData(apiAgentFunction.additionalData); +} +/** + * Serializes information the current object + * @param ApiAgentFunction_input_schema The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAgentFunction_input_schema(writer, apiAgentFunction_input_schema = {}, isSerializingDerivedType = false) { + if (!apiAgentFunction_input_schema || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(apiAgentFunction_input_schema.additionalData); +} +/** + * Serializes information the current object + * @param ApiAgentFunction_output_schema The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAgentFunction_output_schema(writer, apiAgentFunction_output_schema = {}, isSerializingDerivedType = false) { + if (!apiAgentFunction_output_schema || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(apiAgentFunction_output_schema.additionalData); +} +/** + * Serializes information the current object + * @param ApiAgentFunctionVersion The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAgentFunctionVersion(writer, apiAgentFunctionVersion = {}, isSerializingDerivedType = false) { + if (!apiAgentFunctionVersion || isSerializingDerivedType) { + return; + } + writer.writeStringValue("description", apiAgentFunctionVersion.description); + writer.writeStringValue("faas_name", apiAgentFunctionVersion.faasName); + writer.writeStringValue("faas_namespace", apiAgentFunctionVersion.faasNamespace); + writer.writeBooleanValue("is_deleted", apiAgentFunctionVersion.isDeleted); + writer.writeStringValue("name", apiAgentFunctionVersion.name); + writer.writeAdditionalData(apiAgentFunctionVersion.additionalData); +} +/** + * Serializes information the current object + * @param ApiAgentGuardrail The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAgentGuardrail(writer, apiAgentGuardrail = {}, isSerializingDerivedType = false) { + if (!apiAgentGuardrail || isSerializingDerivedType) { + return; + } + writer.writeStringValue("agent_uuid", apiAgentGuardrail.agentUuid); + writer.writeDateValue("created_at", apiAgentGuardrail.createdAt); + writer.writeStringValue("default_response", apiAgentGuardrail.defaultResponse); + writer.writeStringValue("description", apiAgentGuardrail.description); + writer.writeStringValue("guardrail_uuid", apiAgentGuardrail.guardrailUuid); + writer.writeBooleanValue("is_attached", apiAgentGuardrail.isAttached); + writer.writeBooleanValue("is_default", apiAgentGuardrail.isDefault); + writer.writeObjectValue("metadata", apiAgentGuardrail.metadata, serializeApiAgentGuardrail_metadata); + writer.writeStringValue("name", apiAgentGuardrail.name); + writer.writeNumberValue("priority", apiAgentGuardrail.priority); + writer.writeEnumValue("type", apiAgentGuardrail.type ?? ApiGuardrailTypeObject.GUARDRAIL_TYPE_UNKNOWN); + writer.writeDateValue("updated_at", apiAgentGuardrail.updatedAt); + writer.writeStringValue("uuid", apiAgentGuardrail.uuid); + writer.writeAdditionalData(apiAgentGuardrail.additionalData); +} +/** + * Serializes information the current object + * @param ApiAgentGuardrail_metadata The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAgentGuardrail_metadata(writer, apiAgentGuardrail_metadata = {}, isSerializingDerivedType = false) { + if (!apiAgentGuardrail_metadata || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(apiAgentGuardrail_metadata.additionalData); +} +/** + * Serializes information the current object + * @param ApiAgentGuardrailInput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAgentGuardrailInput(writer, apiAgentGuardrailInput = {}, isSerializingDerivedType = false) { + if (!apiAgentGuardrailInput || isSerializingDerivedType) { + return; + } + writer.writeStringValue("guardrail_uuid", apiAgentGuardrailInput.guardrailUuid); + writer.writeNumberValue("priority", apiAgentGuardrailInput.priority); + writer.writeAdditionalData(apiAgentGuardrailInput.additionalData); +} +/** + * Serializes information the current object + * @param ApiAgentGuardrailVersion The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAgentGuardrailVersion(writer, apiAgentGuardrailVersion = {}, isSerializingDerivedType = false) { + if (!apiAgentGuardrailVersion || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("is_deleted", apiAgentGuardrailVersion.isDeleted); + writer.writeStringValue("name", apiAgentGuardrailVersion.name); + writer.writeNumberValue("priority", apiAgentGuardrailVersion.priority); + writer.writeStringValue("uuid", apiAgentGuardrailVersion.uuid); + writer.writeAdditionalData(apiAgentGuardrailVersion.additionalData); +} +/** + * Serializes information the current object + * @param ApiAgentKnowledgeBaseVersion The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAgentKnowledgeBaseVersion(writer, apiAgentKnowledgeBaseVersion = {}, isSerializingDerivedType = false) { + if (!apiAgentKnowledgeBaseVersion || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("is_deleted", apiAgentKnowledgeBaseVersion.isDeleted); + writer.writeStringValue("name", apiAgentKnowledgeBaseVersion.name); + writer.writeStringValue("uuid", apiAgentKnowledgeBaseVersion.uuid); + writer.writeAdditionalData(apiAgentKnowledgeBaseVersion.additionalData); +} +/** + * Serializes information the current object + * @param ApiAgentLoggingConfig The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAgentLoggingConfig(writer, apiAgentLoggingConfig = {}, isSerializingDerivedType = false) { + if (!apiAgentLoggingConfig || isSerializingDerivedType) { + return; + } + writer.writeStringValue("galileo_project_id", apiAgentLoggingConfig.galileoProjectId); + writer.writeStringValue("galileo_project_name", apiAgentLoggingConfig.galileoProjectName); + writer.writeBooleanValue("insights_enabled", apiAgentLoggingConfig.insightsEnabled); + writer.writeDateValue("insights_enabled_at", apiAgentLoggingConfig.insightsEnabledAt); + writer.writeStringValue("log_stream_id", apiAgentLoggingConfig.logStreamId); + writer.writeStringValue("log_stream_name", apiAgentLoggingConfig.logStreamName); + writer.writeAdditionalData(apiAgentLoggingConfig.additionalData); +} +/** + * Serializes information the current object + * @param ApiAgentPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAgentPublic(writer, apiAgentPublic = {}, isSerializingDerivedType = false) { + if (!apiAgentPublic || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("chatbot", apiAgentPublic.chatbot, serializeApiChatbot); + writer.writeCollectionOfObjectValues("chatbot_identifiers", apiAgentPublic.chatbotIdentifiers, serializeApiAgentChatbotIdentifier); + writer.writeDateValue("created_at", apiAgentPublic.createdAt); + writer.writeObjectValue("deployment", apiAgentPublic.deployment, serializeApiDeployment); + writer.writeStringValue("description", apiAgentPublic.description); + writer.writeStringValue("if_case", apiAgentPublic.ifCase); + writer.writeStringValue("instruction", apiAgentPublic.instruction); + writer.writeNumberValue("k", apiAgentPublic.k); + writer.writeNumberValue("max_tokens", apiAgentPublic.maxTokens); + writer.writeObjectValue("model", apiAgentPublic.model, serializeApiModel); + writer.writeStringValue("name", apiAgentPublic.name); + writer.writeStringValue("project_id", apiAgentPublic.projectId); + writer.writeBooleanValue("provide_citations", apiAgentPublic.provideCitations); + writer.writeStringValue("region", apiAgentPublic.region); + writer.writeEnumValue("retrieval_method", apiAgentPublic.retrievalMethod ?? ApiRetrievalMethodObject.RETRIEVAL_METHOD_UNKNOWN); + writer.writeDateValue("route_created_at", apiAgentPublic.routeCreatedAt); + writer.writeStringValue("route_created_by", apiAgentPublic.routeCreatedBy); + writer.writeStringValue("route_name", apiAgentPublic.routeName); + writer.writeStringValue("route_uuid", apiAgentPublic.routeUuid); + writer.writeCollectionOfPrimitiveValues("tags", apiAgentPublic.tags); + writer.writeNumberValue("temperature", apiAgentPublic.temperature); + writer.writeObjectValue("template", apiAgentPublic.template, serializeApiAgentTemplate); + writer.writeNumberValue("top_p", apiAgentPublic.topP); + writer.writeDateValue("updated_at", apiAgentPublic.updatedAt); + writer.writeStringValue("url", apiAgentPublic.url); + writer.writeStringValue("user_id", apiAgentPublic.userId); + writer.writeStringValue("uuid", apiAgentPublic.uuid); + writer.writeStringValue("version_hash", apiAgentPublic.versionHash); + writer.writeAdditionalData(apiAgentPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiAgentTemplate The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAgentTemplate(writer, apiAgentTemplate = {}, isSerializingDerivedType = false) { + if (!apiAgentTemplate || isSerializingDerivedType) { + return; + } + writer.writeDateValue("created_at", apiAgentTemplate.createdAt); + writer.writeStringValue("description", apiAgentTemplate.description); + writer.writeCollectionOfObjectValues("guardrails", apiAgentTemplate.guardrails, serializeApiAgentTemplateGuardrail); + writer.writeStringValue("instruction", apiAgentTemplate.instruction); + writer.writeNumberValue("k", apiAgentTemplate.k); + writer.writeCollectionOfObjectValues("knowledge_bases", apiAgentTemplate.knowledgeBases, serializeApiKnowledgeBase); + writer.writeStringValue("long_description", apiAgentTemplate.longDescription); + writer.writeNumberValue("max_tokens", apiAgentTemplate.maxTokens); + writer.writeObjectValue("model", apiAgentTemplate.model, serializeApiModel); + writer.writeStringValue("name", apiAgentTemplate.name); + writer.writeStringValue("short_description", apiAgentTemplate.shortDescription); + writer.writeStringValue("summary", apiAgentTemplate.summary); + writer.writeCollectionOfPrimitiveValues("tags", apiAgentTemplate.tags); + writer.writeNumberValue("temperature", apiAgentTemplate.temperature); + writer.writeEnumValue("template_type", apiAgentTemplate.templateType ?? ApiAgentTemplateTypeObject.AGENT_TEMPLATE_TYPE_STANDARD); + writer.writeNumberValue("top_p", apiAgentTemplate.topP); + writer.writeDateValue("updated_at", apiAgentTemplate.updatedAt); + writer.writeStringValue("uuid", apiAgentTemplate.uuid); + writer.writeAdditionalData(apiAgentTemplate.additionalData); +} +/** + * Serializes information the current object + * @param ApiAgentTemplateGuardrail The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAgentTemplateGuardrail(writer, apiAgentTemplateGuardrail = {}, isSerializingDerivedType = false) { + if (!apiAgentTemplateGuardrail || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("priority", apiAgentTemplateGuardrail.priority); + writer.writeStringValue("uuid", apiAgentTemplateGuardrail.uuid); + writer.writeAdditionalData(apiAgentTemplateGuardrail.additionalData); +} +/** + * Serializes information the current object + * @param ApiAgentVersion The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAgentVersion(writer, apiAgentVersion = {}, isSerializingDerivedType = false) { + if (!apiAgentVersion || isSerializingDerivedType) { + return; + } + writer.writeStringValue("agent_uuid", apiAgentVersion.agentUuid); + writer.writeCollectionOfObjectValues("attached_child_agents", apiAgentVersion.attachedChildAgents, serializeApiAgentChildRelationshipVerion); + writer.writeCollectionOfObjectValues("attached_functions", apiAgentVersion.attachedFunctions, serializeApiAgentFunctionVersion); + writer.writeCollectionOfObjectValues("attached_guardrails", apiAgentVersion.attachedGuardrails, serializeApiAgentGuardrailVersion); + writer.writeCollectionOfObjectValues("attached_knowledgebases", apiAgentVersion.attachedKnowledgebases, serializeApiAgentKnowledgeBaseVersion); + writer.writeBooleanValue("can_rollback", apiAgentVersion.canRollback); + writer.writeDateValue("created_at", apiAgentVersion.createdAt); + writer.writeStringValue("created_by_email", apiAgentVersion.createdByEmail); + writer.writeBooleanValue("currently_applied", apiAgentVersion.currentlyApplied); + writer.writeStringValue("description", apiAgentVersion.description); + writer.writeStringValue("id", apiAgentVersion.id); + writer.writeStringValue("instruction", apiAgentVersion.instruction); + writer.writeNumberValue("k", apiAgentVersion.k); + writer.writeNumberValue("max_tokens", apiAgentVersion.maxTokens); + writer.writeStringValue("model_name", apiAgentVersion.modelName); + writer.writeStringValue("name", apiAgentVersion.name); + writer.writeBooleanValue("provide_citations", apiAgentVersion.provideCitations); + writer.writeEnumValue("retrieval_method", apiAgentVersion.retrievalMethod ?? ApiRetrievalMethodObject.RETRIEVAL_METHOD_UNKNOWN); + writer.writeCollectionOfPrimitiveValues("tags", apiAgentVersion.tags); + writer.writeNumberValue("temperature", apiAgentVersion.temperature); + writer.writeNumberValue("top_p", apiAgentVersion.topP); + writer.writeStringValue("trigger_action", apiAgentVersion.triggerAction); + writer.writeStringValue("version_hash", apiAgentVersion.versionHash); + writer.writeAdditionalData(apiAgentVersion.additionalData); +} +/** + * Serializes information the current object + * @param ApiAgreement The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAgreement(writer, apiAgreement = {}, isSerializingDerivedType = false) { + if (!apiAgreement || isSerializingDerivedType) { + return; + } + writer.writeStringValue("description", apiAgreement.description); + writer.writeStringValue("name", apiAgreement.name); + writer.writeStringValue("url", apiAgreement.url); + writer.writeStringValue("uuid", apiAgreement.uuid); + writer.writeAdditionalData(apiAgreement.additionalData); +} +/** + * Serializes information the current object + * @param ApiAnthropicAPIKeyInfo The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAnthropicAPIKeyInfo(writer, apiAnthropicAPIKeyInfo = {}, isSerializingDerivedType = false) { + if (!apiAnthropicAPIKeyInfo || isSerializingDerivedType) { + return; + } + writer.writeDateValue("created_at", apiAnthropicAPIKeyInfo.createdAt); + writer.writeStringValue("created_by", apiAnthropicAPIKeyInfo.createdBy); + writer.writeDateValue("deleted_at", apiAnthropicAPIKeyInfo.deletedAt); + writer.writeStringValue("name", apiAnthropicAPIKeyInfo.name); + writer.writeDateValue("updated_at", apiAnthropicAPIKeyInfo.updatedAt); + writer.writeStringValue("uuid", apiAnthropicAPIKeyInfo.uuid); + writer.writeAdditionalData(apiAnthropicAPIKeyInfo.additionalData); +} +/** + * Serializes information the current object + * @param ApiAuditHeader The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAuditHeader(writer, apiAuditHeader = {}, isSerializingDerivedType = false) { + if (!apiAuditHeader || isSerializingDerivedType) { + return; + } + writer.writeStringValue("actor_id", apiAuditHeader.actorId); + writer.writeStringValue("actor_ip", apiAuditHeader.actorIp); + writer.writeStringValue("actor_uuid", apiAuditHeader.actorUuid); + writer.writeStringValue("context_urn", apiAuditHeader.contextUrn); + writer.writeStringValue("origin_application", apiAuditHeader.originApplication); + writer.writeStringValue("user_id", apiAuditHeader.userId); + writer.writeStringValue("user_uuid", apiAuditHeader.userUuid); + writer.writeAdditionalData(apiAuditHeader.additionalData); +} +/** + * Serializes information the current object + * @param ApiAWSDataSource The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAWSDataSource(writer, apiAWSDataSource = {}, isSerializingDerivedType = false) { + if (!apiAWSDataSource || isSerializingDerivedType) { + return; + } + writer.writeStringValue("bucket_name", apiAWSDataSource.bucketName); + writer.writeStringValue("item_path", apiAWSDataSource.itemPath); + writer.writeStringValue("key_id", apiAWSDataSource.keyId); + writer.writeStringValue("region", apiAWSDataSource.region); + writer.writeStringValue("secret_key", apiAWSDataSource.secretKey); + writer.writeAdditionalData(apiAWSDataSource.additionalData); +} +/** + * Serializes information the current object + * @param ApiAWSDataSourceDisplay The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiAWSDataSourceDisplay(writer, apiAWSDataSourceDisplay = {}, isSerializingDerivedType = false) { + if (!apiAWSDataSourceDisplay || isSerializingDerivedType) { + return; + } + writer.writeStringValue("bucket_name", apiAWSDataSourceDisplay.bucketName); + writer.writeStringValue("item_path", apiAWSDataSourceDisplay.itemPath); + writer.writeStringValue("region", apiAWSDataSourceDisplay.region); + writer.writeAdditionalData(apiAWSDataSourceDisplay.additionalData); +} +/** + * Serializes information the current object + * @param ApiCancelKnowledgeBaseIndexingJobInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCancelKnowledgeBaseIndexingJobInputPublic(writer, apiCancelKnowledgeBaseIndexingJobInputPublic = {}, isSerializingDerivedType = false) { + if (!apiCancelKnowledgeBaseIndexingJobInputPublic || isSerializingDerivedType) { + return; + } + writer.writeStringValue("uuid", apiCancelKnowledgeBaseIndexingJobInputPublic.uuid); + writer.writeAdditionalData(apiCancelKnowledgeBaseIndexingJobInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiCancelKnowledgeBaseIndexingJobOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCancelKnowledgeBaseIndexingJobOutput(writer, apiCancelKnowledgeBaseIndexingJobOutput = {}, isSerializingDerivedType = false) { + if (!apiCancelKnowledgeBaseIndexingJobOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("job", apiCancelKnowledgeBaseIndexingJobOutput.job, serializeApiIndexingJob); + writer.writeAdditionalData(apiCancelKnowledgeBaseIndexingJobOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiChatbot The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiChatbot(writer, apiChatbot = {}, isSerializingDerivedType = false) { + if (!apiChatbot || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("allowed_domains", apiChatbot.allowedDomains); + writer.writeStringValue("button_background_color", apiChatbot.buttonBackgroundColor); + writer.writeStringValue("logo", apiChatbot.logo); + writer.writeStringValue("name", apiChatbot.name); + writer.writeStringValue("primary_color", apiChatbot.primaryColor); + writer.writeStringValue("secondary_color", apiChatbot.secondaryColor); + writer.writeStringValue("starting_message", apiChatbot.startingMessage); + writer.writeAdditionalData(apiChatbot.additionalData); +} +/** + * Serializes information the current object + * @param ApiChunkingOptions The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiChunkingOptions(writer, apiChunkingOptions = {}, isSerializingDerivedType = false) { + if (!apiChunkingOptions || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("child_chunk_size", apiChunkingOptions.childChunkSize); + writer.writeNumberValue("max_chunk_size", apiChunkingOptions.maxChunkSize); + writer.writeNumberValue("parent_chunk_size", apiChunkingOptions.parentChunkSize); + writer.writeNumberValue("semantic_threshold", apiChunkingOptions.semanticThreshold); + writer.writeAdditionalData(apiChunkingOptions.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateAgentAPIKeyInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateAgentAPIKeyInputPublic(writer, apiCreateAgentAPIKeyInputPublic = {}, isSerializingDerivedType = false) { + if (!apiCreateAgentAPIKeyInputPublic || isSerializingDerivedType) { + return; + } + writer.writeStringValue("agent_uuid", apiCreateAgentAPIKeyInputPublic.agentUuid); + writer.writeStringValue("name", apiCreateAgentAPIKeyInputPublic.name); + writer.writeAdditionalData(apiCreateAgentAPIKeyInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateAgentAPIKeyOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateAgentAPIKeyOutput(writer, apiCreateAgentAPIKeyOutput = {}, isSerializingDerivedType = false) { + if (!apiCreateAgentAPIKeyOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("api_key_info", apiCreateAgentAPIKeyOutput.apiKeyInfo, serializeApiAgentAPIKeyInfo); + writer.writeAdditionalData(apiCreateAgentAPIKeyOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateAgentInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateAgentInputPublic(writer, apiCreateAgentInputPublic = {}, isSerializingDerivedType = false) { + if (!apiCreateAgentInputPublic || isSerializingDerivedType) { + return; + } + writer.writeStringValue("anthropic_key_uuid", apiCreateAgentInputPublic.anthropicKeyUuid); + writer.writeStringValue("description", apiCreateAgentInputPublic.description); + writer.writeStringValue("instruction", apiCreateAgentInputPublic.instruction); + writer.writeCollectionOfPrimitiveValues("knowledge_base_uuid", apiCreateAgentInputPublic.knowledgeBaseUuid); + writer.writeStringValue("model_provider_key_uuid", apiCreateAgentInputPublic.modelProviderKeyUuid); + writer.writeStringValue("model_uuid", apiCreateAgentInputPublic.modelUuid); + writer.writeStringValue("name", apiCreateAgentInputPublic.name); + writer.writeStringValue("open_ai_key_uuid", apiCreateAgentInputPublic.openAiKeyUuid); + writer.writeStringValue("project_id", apiCreateAgentInputPublic.projectId); + writer.writeStringValue("region", apiCreateAgentInputPublic.region); + writer.writeCollectionOfPrimitiveValues("tags", apiCreateAgentInputPublic.tags); + writer.writeStringValue("workspace_uuid", apiCreateAgentInputPublic.workspaceUuid); + writer.writeAdditionalData(apiCreateAgentInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateAgentOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateAgentOutput(writer, apiCreateAgentOutput = {}, isSerializingDerivedType = false) { + if (!apiCreateAgentOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("agent", apiCreateAgentOutput.agent, serializeApiAgent); + writer.writeAdditionalData(apiCreateAgentOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateAnthropicAPIKeyInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateAnthropicAPIKeyInputPublic(writer, apiCreateAnthropicAPIKeyInputPublic = {}, isSerializingDerivedType = false) { + if (!apiCreateAnthropicAPIKeyInputPublic || isSerializingDerivedType) { + return; + } + writer.writeStringValue("api_key", apiCreateAnthropicAPIKeyInputPublic.apiKey); + writer.writeStringValue("name", apiCreateAnthropicAPIKeyInputPublic.name); + writer.writeAdditionalData(apiCreateAnthropicAPIKeyInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateAnthropicAPIKeyOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateAnthropicAPIKeyOutput(writer, apiCreateAnthropicAPIKeyOutput = {}, isSerializingDerivedType = false) { + if (!apiCreateAnthropicAPIKeyOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("api_key_info", apiCreateAnthropicAPIKeyOutput.apiKeyInfo, serializeApiAnthropicAPIKeyInfo); + writer.writeAdditionalData(apiCreateAnthropicAPIKeyOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateDataSourceFileUploadPresignedUrlsInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateDataSourceFileUploadPresignedUrlsInputPublic(writer, apiCreateDataSourceFileUploadPresignedUrlsInputPublic = {}, isSerializingDerivedType = false) { + if (!apiCreateDataSourceFileUploadPresignedUrlsInputPublic || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("files", apiCreateDataSourceFileUploadPresignedUrlsInputPublic.files, serializeApiPresignedUrlFile); + writer.writeAdditionalData(apiCreateDataSourceFileUploadPresignedUrlsInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateDataSourceFileUploadPresignedUrlsOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateDataSourceFileUploadPresignedUrlsOutput(writer, apiCreateDataSourceFileUploadPresignedUrlsOutput = {}, isSerializingDerivedType = false) { + if (!apiCreateDataSourceFileUploadPresignedUrlsOutput || isSerializingDerivedType) { + return; + } + writer.writeStringValue("request_id", apiCreateDataSourceFileUploadPresignedUrlsOutput.requestId); + writer.writeCollectionOfObjectValues("uploads", apiCreateDataSourceFileUploadPresignedUrlsOutput.uploads, serializeApiFilePresignedUrlResponse); + writer.writeAdditionalData(apiCreateDataSourceFileUploadPresignedUrlsOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateEvaluationDatasetInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateEvaluationDatasetInputPublic(writer, apiCreateEvaluationDatasetInputPublic = {}, isSerializingDerivedType = false) { + if (!apiCreateEvaluationDatasetInputPublic || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("dataset_type", apiCreateEvaluationDatasetInputPublic.datasetType ?? ApiEvaluationDatasetTypeObject.EVALUATION_DATASET_TYPE_UNKNOWN); + writer.writeObjectValue("file_upload_dataset", apiCreateEvaluationDatasetInputPublic.fileUploadDataset, serializeApiFileUploadDataSource); + writer.writeStringValue("name", apiCreateEvaluationDatasetInputPublic.name); + writer.writeAdditionalData(apiCreateEvaluationDatasetInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateEvaluationDatasetOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateEvaluationDatasetOutput(writer, apiCreateEvaluationDatasetOutput = {}, isSerializingDerivedType = false) { + if (!apiCreateEvaluationDatasetOutput || isSerializingDerivedType) { + return; + } + writer.writeStringValue("evaluation_dataset_uuid", apiCreateEvaluationDatasetOutput.evaluationDatasetUuid); + writer.writeAdditionalData(apiCreateEvaluationDatasetOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateEvaluationTestCaseInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateEvaluationTestCaseInputPublic(writer, apiCreateEvaluationTestCaseInputPublic = {}, isSerializingDerivedType = false) { + if (!apiCreateEvaluationTestCaseInputPublic || isSerializingDerivedType) { + return; + } + writer.writeStringValue("agent_workspace_name", apiCreateEvaluationTestCaseInputPublic.agentWorkspaceName); + writer.writeStringValue("dataset_uuid", apiCreateEvaluationTestCaseInputPublic.datasetUuid); + writer.writeStringValue("description", apiCreateEvaluationTestCaseInputPublic.description); + writer.writeCollectionOfPrimitiveValues("metrics", apiCreateEvaluationTestCaseInputPublic.metrics); + writer.writeStringValue("name", apiCreateEvaluationTestCaseInputPublic.name); + writer.writeObjectValue("star_metric", apiCreateEvaluationTestCaseInputPublic.starMetric, serializeApiStarMetric); + writer.writeStringValue("workspace_uuid", apiCreateEvaluationTestCaseInputPublic.workspaceUuid); + writer.writeAdditionalData(apiCreateEvaluationTestCaseInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateEvaluationTestCaseOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateEvaluationTestCaseOutput(writer, apiCreateEvaluationTestCaseOutput = {}, isSerializingDerivedType = false) { + if (!apiCreateEvaluationTestCaseOutput || isSerializingDerivedType) { + return; + } + writer.writeStringValue("test_case_uuid", apiCreateEvaluationTestCaseOutput.testCaseUuid); + writer.writeAdditionalData(apiCreateEvaluationTestCaseOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateKnowledgeBaseDataSourceInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateKnowledgeBaseDataSourceInputPublic(writer, apiCreateKnowledgeBaseDataSourceInputPublic = {}, isSerializingDerivedType = false) { + if (!apiCreateKnowledgeBaseDataSourceInputPublic || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("aws_data_source", apiCreateKnowledgeBaseDataSourceInputPublic.awsDataSource, serializeApiAWSDataSource); + writer.writeEnumValue("chunking_algorithm", apiCreateKnowledgeBaseDataSourceInputPublic.chunkingAlgorithm ?? ApiChunkingAlgorithmObject.CHUNKING_ALGORITHM_SECTION_BASED); + writer.writeObjectValue("chunking_options", apiCreateKnowledgeBaseDataSourceInputPublic.chunkingOptions, serializeApiChunkingOptions); + writer.writeStringValue("knowledge_base_uuid", apiCreateKnowledgeBaseDataSourceInputPublic.knowledgeBaseUuid); + writer.writeObjectValue("spaces_data_source", apiCreateKnowledgeBaseDataSourceInputPublic.spacesDataSource, serializeApiSpacesDataSource); + writer.writeObjectValue("web_crawler_data_source", apiCreateKnowledgeBaseDataSourceInputPublic.webCrawlerDataSource, serializeApiWebCrawlerDataSource); + writer.writeAdditionalData(apiCreateKnowledgeBaseDataSourceInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateKnowledgeBaseDataSourceOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateKnowledgeBaseDataSourceOutput(writer, apiCreateKnowledgeBaseDataSourceOutput = {}, isSerializingDerivedType = false) { + if (!apiCreateKnowledgeBaseDataSourceOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("knowledge_base_data_source", apiCreateKnowledgeBaseDataSourceOutput.knowledgeBaseDataSource, serializeApiKnowledgeBaseDataSource); + writer.writeAdditionalData(apiCreateKnowledgeBaseDataSourceOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateKnowledgeBaseInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateKnowledgeBaseInputPublic(writer, apiCreateKnowledgeBaseInputPublic = {}, isSerializingDerivedType = false) { + if (!apiCreateKnowledgeBaseInputPublic || isSerializingDerivedType) { + return; + } + writer.writeStringValue("database_id", apiCreateKnowledgeBaseInputPublic.databaseId); + writer.writeCollectionOfObjectValues("datasources", apiCreateKnowledgeBaseInputPublic.datasources, serializeApiKBDataSource); + writer.writeStringValue("embedding_model_uuid", apiCreateKnowledgeBaseInputPublic.embeddingModelUuid); + writer.writeStringValue("name", apiCreateKnowledgeBaseInputPublic.name); + writer.writeStringValue("project_id", apiCreateKnowledgeBaseInputPublic.projectId); + writer.writeStringValue("region", apiCreateKnowledgeBaseInputPublic.region); + writer.writeCollectionOfPrimitiveValues("tags", apiCreateKnowledgeBaseInputPublic.tags); + writer.writeStringValue("vpc_uuid", apiCreateKnowledgeBaseInputPublic.vpcUuid); + writer.writeAdditionalData(apiCreateKnowledgeBaseInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateKnowledgeBaseOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateKnowledgeBaseOutput(writer, apiCreateKnowledgeBaseOutput = {}, isSerializingDerivedType = false) { + if (!apiCreateKnowledgeBaseOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("knowledge_base", apiCreateKnowledgeBaseOutput.knowledgeBase, serializeApiKnowledgeBase); + writer.writeAdditionalData(apiCreateKnowledgeBaseOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateModelAPIKeyInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateModelAPIKeyInputPublic(writer, apiCreateModelAPIKeyInputPublic = {}, isSerializingDerivedType = false) { + if (!apiCreateModelAPIKeyInputPublic || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", apiCreateModelAPIKeyInputPublic.name); + writer.writeAdditionalData(apiCreateModelAPIKeyInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateModelAPIKeyOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateModelAPIKeyOutput(writer, apiCreateModelAPIKeyOutput = {}, isSerializingDerivedType = false) { + if (!apiCreateModelAPIKeyOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("api_key_info", apiCreateModelAPIKeyOutput.apiKeyInfo, serializeApiModelAPIKeyInfo); + writer.writeAdditionalData(apiCreateModelAPIKeyOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateOpenAIAPIKeyInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateOpenAIAPIKeyInputPublic(writer, apiCreateOpenAIAPIKeyInputPublic = {}, isSerializingDerivedType = false) { + if (!apiCreateOpenAIAPIKeyInputPublic || isSerializingDerivedType) { + return; + } + writer.writeStringValue("api_key", apiCreateOpenAIAPIKeyInputPublic.apiKey); + writer.writeStringValue("name", apiCreateOpenAIAPIKeyInputPublic.name); + writer.writeAdditionalData(apiCreateOpenAIAPIKeyInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateOpenAIAPIKeyOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateOpenAIAPIKeyOutput(writer, apiCreateOpenAIAPIKeyOutput = {}, isSerializingDerivedType = false) { + if (!apiCreateOpenAIAPIKeyOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("api_key_info", apiCreateOpenAIAPIKeyOutput.apiKeyInfo, serializeApiOpenAIAPIKeyInfo); + writer.writeAdditionalData(apiCreateOpenAIAPIKeyOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateScheduledIndexingInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateScheduledIndexingInputPublic(writer, apiCreateScheduledIndexingInputPublic = {}, isSerializingDerivedType = false) { + if (!apiCreateScheduledIndexingInputPublic || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("days", apiCreateScheduledIndexingInputPublic.days); + writer.writeStringValue("knowledge_base_uuid", apiCreateScheduledIndexingInputPublic.knowledgeBaseUuid); + writer.writeStringValue("time", apiCreateScheduledIndexingInputPublic.time); + writer.writeAdditionalData(apiCreateScheduledIndexingInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateScheduledIndexingOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateScheduledIndexingOutput(writer, apiCreateScheduledIndexingOutput = {}, isSerializingDerivedType = false) { + if (!apiCreateScheduledIndexingOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("indexing_info", apiCreateScheduledIndexingOutput.indexingInfo, serializeApiScheduledIndexingInfo); + writer.writeAdditionalData(apiCreateScheduledIndexingOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateWorkspaceInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateWorkspaceInputPublic(writer, apiCreateWorkspaceInputPublic = {}, isSerializingDerivedType = false) { + if (!apiCreateWorkspaceInputPublic || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("agent_uuids", apiCreateWorkspaceInputPublic.agentUuids); + writer.writeStringValue("description", apiCreateWorkspaceInputPublic.description); + writer.writeStringValue("name", apiCreateWorkspaceInputPublic.name); + writer.writeAdditionalData(apiCreateWorkspaceInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiCreateWorkspaceOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiCreateWorkspaceOutput(writer, apiCreateWorkspaceOutput = {}, isSerializingDerivedType = false) { + if (!apiCreateWorkspaceOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("workspace", apiCreateWorkspaceOutput.workspace, serializeApiWorkspace); + writer.writeAdditionalData(apiCreateWorkspaceOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiDeleteAgentAPIKeyOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiDeleteAgentAPIKeyOutput(writer, apiDeleteAgentAPIKeyOutput = {}, isSerializingDerivedType = false) { + if (!apiDeleteAgentAPIKeyOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("api_key_info", apiDeleteAgentAPIKeyOutput.apiKeyInfo, serializeApiAgentAPIKeyInfo); + writer.writeAdditionalData(apiDeleteAgentAPIKeyOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiDeleteAgentOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiDeleteAgentOutput(writer, apiDeleteAgentOutput = {}, isSerializingDerivedType = false) { + if (!apiDeleteAgentOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("agent", apiDeleteAgentOutput.agent, serializeApiAgent); + writer.writeAdditionalData(apiDeleteAgentOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiDeleteAnthropicAPIKeyOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiDeleteAnthropicAPIKeyOutput(writer, apiDeleteAnthropicAPIKeyOutput = {}, isSerializingDerivedType = false) { + if (!apiDeleteAnthropicAPIKeyOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("api_key_info", apiDeleteAnthropicAPIKeyOutput.apiKeyInfo, serializeApiAnthropicAPIKeyInfo); + writer.writeAdditionalData(apiDeleteAnthropicAPIKeyOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiDeleteKnowledgeBaseDataSourceOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiDeleteKnowledgeBaseDataSourceOutput(writer, apiDeleteKnowledgeBaseDataSourceOutput = {}, isSerializingDerivedType = false) { + if (!apiDeleteKnowledgeBaseDataSourceOutput || isSerializingDerivedType) { + return; + } + writer.writeStringValue("data_source_uuid", apiDeleteKnowledgeBaseDataSourceOutput.dataSourceUuid); + writer.writeStringValue("knowledge_base_uuid", apiDeleteKnowledgeBaseDataSourceOutput.knowledgeBaseUuid); + writer.writeAdditionalData(apiDeleteKnowledgeBaseDataSourceOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiDeleteKnowledgeBaseOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiDeleteKnowledgeBaseOutput(writer, apiDeleteKnowledgeBaseOutput = {}, isSerializingDerivedType = false) { + if (!apiDeleteKnowledgeBaseOutput || isSerializingDerivedType) { + return; + } + writer.writeStringValue("uuid", apiDeleteKnowledgeBaseOutput.uuid); + writer.writeAdditionalData(apiDeleteKnowledgeBaseOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiDeleteModelAPIKeyOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiDeleteModelAPIKeyOutput(writer, apiDeleteModelAPIKeyOutput = {}, isSerializingDerivedType = false) { + if (!apiDeleteModelAPIKeyOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("api_key_info", apiDeleteModelAPIKeyOutput.apiKeyInfo, serializeApiModelAPIKeyInfo); + writer.writeAdditionalData(apiDeleteModelAPIKeyOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiDeleteOpenAIAPIKeyOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiDeleteOpenAIAPIKeyOutput(writer, apiDeleteOpenAIAPIKeyOutput = {}, isSerializingDerivedType = false) { + if (!apiDeleteOpenAIAPIKeyOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("api_key_info", apiDeleteOpenAIAPIKeyOutput.apiKeyInfo, serializeApiOpenAIAPIKeyInfo); + writer.writeAdditionalData(apiDeleteOpenAIAPIKeyOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiDeleteScheduledIndexingOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiDeleteScheduledIndexingOutput(writer, apiDeleteScheduledIndexingOutput = {}, isSerializingDerivedType = false) { + if (!apiDeleteScheduledIndexingOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("indexing_info", apiDeleteScheduledIndexingOutput.indexingInfo, serializeApiScheduledIndexingInfo); + writer.writeAdditionalData(apiDeleteScheduledIndexingOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiDeleteWorkspaceOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiDeleteWorkspaceOutput(writer, apiDeleteWorkspaceOutput = {}, isSerializingDerivedType = false) { + if (!apiDeleteWorkspaceOutput || isSerializingDerivedType) { + return; + } + writer.writeStringValue("workspace_uuid", apiDeleteWorkspaceOutput.workspaceUuid); + writer.writeAdditionalData(apiDeleteWorkspaceOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiDeployment The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiDeployment(writer, apiDeployment = {}, isSerializingDerivedType = false) { + if (!apiDeployment || isSerializingDerivedType) { + return; + } + writer.writeDateValue("created_at", apiDeployment.createdAt); + writer.writeStringValue("name", apiDeployment.name); + writer.writeEnumValue("status", apiDeployment.status ?? ApiDeploymentStatusObject.STATUS_UNKNOWN); + writer.writeDateValue("updated_at", apiDeployment.updatedAt); + writer.writeStringValue("url", apiDeployment.url); + writer.writeStringValue("uuid", apiDeployment.uuid); + writer.writeEnumValue("visibility", apiDeployment.visibility ?? ApiDeploymentVisibilityObject.VISIBILITY_UNKNOWN); + writer.writeAdditionalData(apiDeployment.additionalData); +} +/** + * Serializes information the current object + * @param ApiDropboxDataSource The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiDropboxDataSource(writer, apiDropboxDataSource = {}, isSerializingDerivedType = false) { + if (!apiDropboxDataSource || isSerializingDerivedType) { + return; + } + writer.writeStringValue("folder", apiDropboxDataSource.folder); + writer.writeStringValue("refresh_token", apiDropboxDataSource.refreshToken); + writer.writeAdditionalData(apiDropboxDataSource.additionalData); +} +/** + * Serializes information the current object + * @param ApiDropboxDataSourceDisplay The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiDropboxDataSourceDisplay(writer, apiDropboxDataSourceDisplay = {}, isSerializingDerivedType = false) { + if (!apiDropboxDataSourceDisplay || isSerializingDerivedType) { + return; + } + writer.writeStringValue("folder", apiDropboxDataSourceDisplay.folder); + writer.writeAdditionalData(apiDropboxDataSourceDisplay.additionalData); +} +/** + * Serializes information the current object + * @param ApiDropboxOauth2GetTokensInput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiDropboxOauth2GetTokensInput(writer, apiDropboxOauth2GetTokensInput = {}, isSerializingDerivedType = false) { + if (!apiDropboxOauth2GetTokensInput || isSerializingDerivedType) { + return; + } + writer.writeStringValue("code", apiDropboxOauth2GetTokensInput.code); + writer.writeStringValue("redirect_url", apiDropboxOauth2GetTokensInput.redirectUrl); + writer.writeAdditionalData(apiDropboxOauth2GetTokensInput.additionalData); +} +/** + * Serializes information the current object + * @param ApiDropboxOauth2GetTokensOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiDropboxOauth2GetTokensOutput(writer, apiDropboxOauth2GetTokensOutput = {}, isSerializingDerivedType = false) { + if (!apiDropboxOauth2GetTokensOutput || isSerializingDerivedType) { + return; + } + writer.writeStringValue("refresh_token", apiDropboxOauth2GetTokensOutput.refreshToken); + writer.writeStringValue("token", apiDropboxOauth2GetTokensOutput.token); + writer.writeAdditionalData(apiDropboxOauth2GetTokensOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiEvaluationDataset The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiEvaluationDataset(writer, apiEvaluationDataset = {}, isSerializingDerivedType = false) { + if (!apiEvaluationDataset || isSerializingDerivedType) { + return; + } + writer.writeDateValue("created_at", apiEvaluationDataset.createdAt); + writer.writeStringValue("dataset_name", apiEvaluationDataset.datasetName); + writer.writeStringValue("dataset_uuid", apiEvaluationDataset.datasetUuid); + writer.writeStringValue("file_size", apiEvaluationDataset.fileSize); + writer.writeBooleanValue("has_ground_truth", apiEvaluationDataset.hasGroundTruth); + writer.writeNumberValue("row_count", apiEvaluationDataset.rowCount); + writer.writeAdditionalData(apiEvaluationDataset.additionalData); +} +/** + * Serializes information the current object + * @param ApiEvaluationMetric The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiEvaluationMetric(writer, apiEvaluationMetric = {}, isSerializingDerivedType = false) { + if (!apiEvaluationMetric || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("category", apiEvaluationMetric.category ?? ApiEvaluationMetricCategoryObject.METRIC_CATEGORY_UNSPECIFIED); + writer.writeStringValue("description", apiEvaluationMetric.description); + writer.writeBooleanValue("inverted", apiEvaluationMetric.inverted); + writer.writeBooleanValue("is_metric_goal", apiEvaluationMetric.isMetricGoal); + writer.writeStringValue("metric_name", apiEvaluationMetric.metricName); + writer.writeNumberValue("metric_rank", apiEvaluationMetric.metricRank); + writer.writeEnumValue("metric_type", apiEvaluationMetric.metricType ?? ApiEvaluationMetricTypeObject.METRIC_TYPE_UNSPECIFIED); + writer.writeStringValue("metric_uuid", apiEvaluationMetric.metricUuid); + writer.writeEnumValue("metric_value_type", apiEvaluationMetric.metricValueType ?? ApiEvaluationMetricValueTypeObject.METRIC_VALUE_TYPE_UNSPECIFIED); + writer.writeNumberValue("range_max", apiEvaluationMetric.rangeMax); + writer.writeNumberValue("range_min", apiEvaluationMetric.rangeMin); + writer.writeAdditionalData(apiEvaluationMetric.additionalData); +} +/** + * Serializes information the current object + * @param ApiEvaluationMetricResult The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiEvaluationMetricResult(writer, apiEvaluationMetricResult = {}, isSerializingDerivedType = false) { + if (!apiEvaluationMetricResult || isSerializingDerivedType) { + return; + } + writer.writeStringValue("error_description", apiEvaluationMetricResult.errorDescription); + writer.writeStringValue("metric_name", apiEvaluationMetricResult.metricName); + writer.writeEnumValue("metric_value_type", apiEvaluationMetricResult.metricValueType ?? ApiEvaluationMetricValueTypeObject.METRIC_VALUE_TYPE_UNSPECIFIED); + writer.writeNumberValue("number_value", apiEvaluationMetricResult.numberValue); + writer.writeStringValue("reasoning", apiEvaluationMetricResult.reasoning); + writer.writeStringValue("string_value", apiEvaluationMetricResult.stringValue); + writer.writeAdditionalData(apiEvaluationMetricResult.additionalData); +} +/** + * Serializes information the current object + * @param ApiEvaluationRun The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiEvaluationRun(writer, apiEvaluationRun = {}, isSerializingDerivedType = false) { + if (!apiEvaluationRun || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("agent_deleted", apiEvaluationRun.agentDeleted); + writer.writeStringValue("agent_deployment_name", apiEvaluationRun.agentDeploymentName); + writer.writeStringValue("agent_name", apiEvaluationRun.agentName); + writer.writeStringValue("agent_uuid", apiEvaluationRun.agentUuid); + writer.writeStringValue("agent_version_hash", apiEvaluationRun.agentVersionHash); + writer.writeStringValue("agent_workspace_uuid", apiEvaluationRun.agentWorkspaceUuid); + writer.writeStringValue("created_by_user_email", apiEvaluationRun.createdByUserEmail); + writer.writeStringValue("created_by_user_id", apiEvaluationRun.createdByUserId); + writer.writeStringValue("error_description", apiEvaluationRun.errorDescription); + writer.writeStringValue("evaluation_run_uuid", apiEvaluationRun.evaluationRunUuid); + writer.writeStringValue("evaluation_test_case_workspace_uuid", apiEvaluationRun.evaluationTestCaseWorkspaceUuid); + writer.writeDateValue("finished_at", apiEvaluationRun.finishedAt); + writer.writeBooleanValue("pass_status", apiEvaluationRun.passStatus); + writer.writeDateValue("queued_at", apiEvaluationRun.queuedAt); + writer.writeCollectionOfObjectValues("run_level_metric_results", apiEvaluationRun.runLevelMetricResults, serializeApiEvaluationMetricResult); + writer.writeStringValue("run_name", apiEvaluationRun.runName); + writer.writeObjectValue("star_metric_result", apiEvaluationRun.starMetricResult, serializeApiEvaluationMetricResult); + writer.writeDateValue("started_at", apiEvaluationRun.startedAt); + writer.writeEnumValue("status", apiEvaluationRun.status ?? ApiEvaluationRunStatusObject.EVALUATION_RUN_STATUS_UNSPECIFIED); + writer.writeStringValue("test_case_description", apiEvaluationRun.testCaseDescription); + writer.writeStringValue("test_case_name", apiEvaluationRun.testCaseName); + writer.writeStringValue("test_case_uuid", apiEvaluationRun.testCaseUuid); + writer.writeNumberValue("test_case_version", apiEvaluationRun.testCaseVersion); + writer.writeAdditionalData(apiEvaluationRun.additionalData); +} +/** + * Serializes information the current object + * @param ApiEvaluationTestCase The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiEvaluationTestCase(writer, apiEvaluationTestCase = {}, isSerializingDerivedType = false) { + if (!apiEvaluationTestCase || isSerializingDerivedType) { + return; + } + writer.writeDateValue("archived_at", apiEvaluationTestCase.archivedAt); + writer.writeDateValue("created_at", apiEvaluationTestCase.createdAt); + writer.writeStringValue("created_by_user_email", apiEvaluationTestCase.createdByUserEmail); + writer.writeStringValue("created_by_user_id", apiEvaluationTestCase.createdByUserId); + writer.writeObjectValue("dataset", apiEvaluationTestCase.dataset, serializeApiEvaluationDataset); + writer.writeStringValue("dataset_name", apiEvaluationTestCase.datasetName); + writer.writeStringValue("dataset_uuid", apiEvaluationTestCase.datasetUuid); + writer.writeStringValue("description", apiEvaluationTestCase.description); + writer.writeNumberValue("latest_version_number_of_runs", apiEvaluationTestCase.latestVersionNumberOfRuns); + writer.writeCollectionOfObjectValues("metrics", apiEvaluationTestCase.metrics, serializeApiEvaluationMetric); + writer.writeStringValue("name", apiEvaluationTestCase.name); + writer.writeObjectValue("star_metric", apiEvaluationTestCase.starMetric, serializeApiStarMetric); + writer.writeStringValue("test_case_uuid", apiEvaluationTestCase.testCaseUuid); + writer.writeNumberValue("total_runs", apiEvaluationTestCase.totalRuns); + writer.writeDateValue("updated_at", apiEvaluationTestCase.updatedAt); + writer.writeStringValue("updated_by_user_email", apiEvaluationTestCase.updatedByUserEmail); + writer.writeStringValue("updated_by_user_id", apiEvaluationTestCase.updatedByUserId); + writer.writeNumberValue("version", apiEvaluationTestCase.version); + writer.writeAdditionalData(apiEvaluationTestCase.additionalData); +} +/** + * Serializes information the current object + * @param ApiEvaluationTestCaseMetricList The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiEvaluationTestCaseMetricList(writer, apiEvaluationTestCaseMetricList = {}, isSerializingDerivedType = false) { + if (!apiEvaluationTestCaseMetricList || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("metric_uuids", apiEvaluationTestCaseMetricList.metricUuids); + writer.writeAdditionalData(apiEvaluationTestCaseMetricList.additionalData); +} +/** + * Serializes information the current object + * @param ApiEvaluationTraceSpan The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiEvaluationTraceSpan(writer, apiEvaluationTraceSpan = {}, isSerializingDerivedType = false) { + if (!apiEvaluationTraceSpan || isSerializingDerivedType) { + return; + } + writer.writeDateValue("created_at", apiEvaluationTraceSpan.createdAt); + writer.writeObjectValue("input", apiEvaluationTraceSpan.input, serializeApiEvaluationTraceSpan_input); + writer.writeStringValue("name", apiEvaluationTraceSpan.name); + writer.writeObjectValue("output", apiEvaluationTraceSpan.output, serializeApiEvaluationTraceSpan_output); + writer.writeCollectionOfObjectValues("retriever_chunks", apiEvaluationTraceSpan.retrieverChunks, serializeApiPromptChunk); + writer.writeCollectionOfObjectValues("span_level_metric_results", apiEvaluationTraceSpan.spanLevelMetricResults, serializeApiEvaluationMetricResult); + writer.writeEnumValue("type", apiEvaluationTraceSpan.type ?? ApiTraceSpanTypeObject.TRACE_SPAN_TYPE_UNKNOWN); + writer.writeAdditionalData(apiEvaluationTraceSpan.additionalData); +} +/** + * Serializes information the current object + * @param ApiEvaluationTraceSpan_input The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiEvaluationTraceSpan_input(writer, apiEvaluationTraceSpan_input = {}, isSerializingDerivedType = false) { + if (!apiEvaluationTraceSpan_input || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(apiEvaluationTraceSpan_input.additionalData); +} +/** + * Serializes information the current object + * @param ApiEvaluationTraceSpan_output The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiEvaluationTraceSpan_output(writer, apiEvaluationTraceSpan_output = {}, isSerializingDerivedType = false) { + if (!apiEvaluationTraceSpan_output || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(apiEvaluationTraceSpan_output.additionalData); +} +/** + * Serializes information the current object + * @param ApiFilePresignedUrlResponse The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiFilePresignedUrlResponse(writer, apiFilePresignedUrlResponse = {}, isSerializingDerivedType = false) { + if (!apiFilePresignedUrlResponse || isSerializingDerivedType) { + return; + } + writer.writeDateValue("expires_at", apiFilePresignedUrlResponse.expiresAt); + writer.writeStringValue("object_key", apiFilePresignedUrlResponse.objectKey); + writer.writeStringValue("original_file_name", apiFilePresignedUrlResponse.originalFileName); + writer.writeStringValue("presigned_url", apiFilePresignedUrlResponse.presignedUrl); + writer.writeAdditionalData(apiFilePresignedUrlResponse.additionalData); +} +/** + * Serializes information the current object + * @param ApiFileUploadDataSource The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiFileUploadDataSource(writer, apiFileUploadDataSource = {}, isSerializingDerivedType = false) { + if (!apiFileUploadDataSource || isSerializingDerivedType) { + return; + } + writer.writeStringValue("original_file_name", apiFileUploadDataSource.originalFileName); + writer.writeStringValue("size_in_bytes", apiFileUploadDataSource.sizeInBytes); + writer.writeStringValue("stored_object_key", apiFileUploadDataSource.storedObjectKey); + writer.writeAdditionalData(apiFileUploadDataSource.additionalData); +} +/** + * Serializes information the current object + * @param ApiGenerateOauth2URLOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiGenerateOauth2URLOutput(writer, apiGenerateOauth2URLOutput = {}, isSerializingDerivedType = false) { + if (!apiGenerateOauth2URLOutput || isSerializingDerivedType) { + return; + } + writer.writeStringValue("url", apiGenerateOauth2URLOutput.url); + writer.writeAdditionalData(apiGenerateOauth2URLOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiGetAgentOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiGetAgentOutput(writer, apiGetAgentOutput = {}, isSerializingDerivedType = false) { + if (!apiGetAgentOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("agent", apiGetAgentOutput.agent, serializeApiAgent); + writer.writeAdditionalData(apiGetAgentOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiGetAgentUsageOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiGetAgentUsageOutput(writer, apiGetAgentUsageOutput = {}, isSerializingDerivedType = false) { + if (!apiGetAgentUsageOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("log_insights_usage", apiGetAgentUsageOutput.logInsightsUsage, serializeApiResourceUsage); + writer.writeObjectValue("usage", apiGetAgentUsageOutput.usage, serializeApiResourceUsage); + writer.writeAdditionalData(apiGetAgentUsageOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiGetAnthropicAPIKeyOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiGetAnthropicAPIKeyOutput(writer, apiGetAnthropicAPIKeyOutput = {}, isSerializingDerivedType = false) { + if (!apiGetAnthropicAPIKeyOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("api_key_info", apiGetAnthropicAPIKeyOutput.apiKeyInfo, serializeApiAnthropicAPIKeyInfo); + writer.writeAdditionalData(apiGetAnthropicAPIKeyOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiGetChildrenOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiGetChildrenOutput(writer, apiGetChildrenOutput = {}, isSerializingDerivedType = false) { + if (!apiGetChildrenOutput || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("children", apiGetChildrenOutput.children, serializeApiAgent); + writer.writeAdditionalData(apiGetChildrenOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiGetEvaluationRunOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiGetEvaluationRunOutput(writer, apiGetEvaluationRunOutput = {}, isSerializingDerivedType = false) { + if (!apiGetEvaluationRunOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("evaluation_run", apiGetEvaluationRunOutput.evaluationRun, serializeApiEvaluationRun); + writer.writeAdditionalData(apiGetEvaluationRunOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiGetEvaluationRunPromptResultsOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiGetEvaluationRunPromptResultsOutput(writer, apiGetEvaluationRunPromptResultsOutput = {}, isSerializingDerivedType = false) { + if (!apiGetEvaluationRunPromptResultsOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("prompt", apiGetEvaluationRunPromptResultsOutput.prompt, serializeApiPrompt); + writer.writeAdditionalData(apiGetEvaluationRunPromptResultsOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiGetEvaluationRunResultsOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiGetEvaluationRunResultsOutput(writer, apiGetEvaluationRunResultsOutput = {}, isSerializingDerivedType = false) { + if (!apiGetEvaluationRunResultsOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("evaluation_run", apiGetEvaluationRunResultsOutput.evaluationRun, serializeApiEvaluationRun); + writer.writeObjectValue("links", apiGetEvaluationRunResultsOutput.links, serializeApiLinks); + writer.writeObjectValue("meta", apiGetEvaluationRunResultsOutput.meta, serializeApiMeta); + writer.writeCollectionOfObjectValues("prompts", apiGetEvaluationRunResultsOutput.prompts, serializeApiPrompt); + writer.writeAdditionalData(apiGetEvaluationRunResultsOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiGetEvaluationTestCaseOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiGetEvaluationTestCaseOutput(writer, apiGetEvaluationTestCaseOutput = {}, isSerializingDerivedType = false) { + if (!apiGetEvaluationTestCaseOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("evaluation_test_case", apiGetEvaluationTestCaseOutput.evaluationTestCase, serializeApiEvaluationTestCase); + writer.writeAdditionalData(apiGetEvaluationTestCaseOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiGetIndexingJobDetailsSignedURLOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiGetIndexingJobDetailsSignedURLOutput(writer, apiGetIndexingJobDetailsSignedURLOutput = {}, isSerializingDerivedType = false) { + if (!apiGetIndexingJobDetailsSignedURLOutput || isSerializingDerivedType) { + return; + } + writer.writeStringValue("signed_url", apiGetIndexingJobDetailsSignedURLOutput.signedUrl); + writer.writeAdditionalData(apiGetIndexingJobDetailsSignedURLOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiGetKnowledgeBaseIndexingJobOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiGetKnowledgeBaseIndexingJobOutput(writer, apiGetKnowledgeBaseIndexingJobOutput = {}, isSerializingDerivedType = false) { + if (!apiGetKnowledgeBaseIndexingJobOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("job", apiGetKnowledgeBaseIndexingJobOutput.job, serializeApiIndexingJob); + writer.writeAdditionalData(apiGetKnowledgeBaseIndexingJobOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiGetKnowledgeBaseOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiGetKnowledgeBaseOutput(writer, apiGetKnowledgeBaseOutput = {}, isSerializingDerivedType = false) { + if (!apiGetKnowledgeBaseOutput || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("database_status", apiGetKnowledgeBaseOutput.databaseStatus ?? DbaasClusterStatusObject.CREATING); + writer.writeObjectValue("knowledge_base", apiGetKnowledgeBaseOutput.knowledgeBase, serializeApiKnowledgeBase); + writer.writeAdditionalData(apiGetKnowledgeBaseOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiGetOpenAIAPIKeyOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiGetOpenAIAPIKeyOutput(writer, apiGetOpenAIAPIKeyOutput = {}, isSerializingDerivedType = false) { + if (!apiGetOpenAIAPIKeyOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("api_key_info", apiGetOpenAIAPIKeyOutput.apiKeyInfo, serializeApiOpenAIAPIKeyInfo); + writer.writeAdditionalData(apiGetOpenAIAPIKeyOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiGetScheduledIndexingOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiGetScheduledIndexingOutput(writer, apiGetScheduledIndexingOutput = {}, isSerializingDerivedType = false) { + if (!apiGetScheduledIndexingOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("indexing_info", apiGetScheduledIndexingOutput.indexingInfo, serializeApiScheduledIndexingInfo); + writer.writeAdditionalData(apiGetScheduledIndexingOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiGetWorkspaceOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiGetWorkspaceOutput(writer, apiGetWorkspaceOutput = {}, isSerializingDerivedType = false) { + if (!apiGetWorkspaceOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("workspace", apiGetWorkspaceOutput.workspace, serializeApiWorkspace); + writer.writeAdditionalData(apiGetWorkspaceOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiGoogleDriveDataSource The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiGoogleDriveDataSource(writer, apiGoogleDriveDataSource = {}, isSerializingDerivedType = false) { + if (!apiGoogleDriveDataSource || isSerializingDerivedType) { + return; + } + writer.writeStringValue("folder_id", apiGoogleDriveDataSource.folderId); + writer.writeStringValue("refresh_token", apiGoogleDriveDataSource.refreshToken); + writer.writeAdditionalData(apiGoogleDriveDataSource.additionalData); +} +/** + * Serializes information the current object + * @param ApiGoogleDriveDataSourceDisplay The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiGoogleDriveDataSourceDisplay(writer, apiGoogleDriveDataSourceDisplay = {}, isSerializingDerivedType = false) { + if (!apiGoogleDriveDataSourceDisplay || isSerializingDerivedType) { + return; + } + writer.writeStringValue("folder_id", apiGoogleDriveDataSourceDisplay.folderId); + writer.writeStringValue("folder_name", apiGoogleDriveDataSourceDisplay.folderName); + writer.writeAdditionalData(apiGoogleDriveDataSourceDisplay.additionalData); +} +/** + * Serializes information the current object + * @param ApiIndexedDataSource The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiIndexedDataSource(writer, apiIndexedDataSource = {}, isSerializingDerivedType = false) { + if (!apiIndexedDataSource || isSerializingDerivedType) { + return; + } + writer.writeDateValue("completed_at", apiIndexedDataSource.completedAt); + writer.writeStringValue("data_source_uuid", apiIndexedDataSource.dataSourceUuid); + writer.writeStringValue("error_details", apiIndexedDataSource.errorDetails); + writer.writeStringValue("error_msg", apiIndexedDataSource.errorMsg); + writer.writeStringValue("failed_item_count", apiIndexedDataSource.failedItemCount); + writer.writeStringValue("indexed_file_count", apiIndexedDataSource.indexedFileCount); + writer.writeStringValue("indexed_item_count", apiIndexedDataSource.indexedItemCount); + writer.writeStringValue("removed_item_count", apiIndexedDataSource.removedItemCount); + writer.writeStringValue("skipped_item_count", apiIndexedDataSource.skippedItemCount); + writer.writeDateValue("started_at", apiIndexedDataSource.startedAt); + writer.writeEnumValue("status", apiIndexedDataSource.status ?? ApiIndexedDataSourceStatusObject.DATA_SOURCE_STATUS_UNKNOWN); + writer.writeStringValue("total_bytes", apiIndexedDataSource.totalBytes); + writer.writeStringValue("total_bytes_indexed", apiIndexedDataSource.totalBytesIndexed); + writer.writeStringValue("total_file_count", apiIndexedDataSource.totalFileCount); + writer.writeAdditionalData(apiIndexedDataSource.additionalData); +} +/** + * Serializes information the current object + * @param ApiIndexingJob The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiIndexingJob(writer, apiIndexingJob = {}, isSerializingDerivedType = false) { + if (!apiIndexingJob || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("completed_datasources", apiIndexingJob.completedDatasources); + writer.writeDateValue("created_at", apiIndexingJob.createdAt); + writer.writeCollectionOfObjectValues("data_source_jobs", apiIndexingJob.dataSourceJobs, serializeApiIndexedDataSource); + writer.writeCollectionOfPrimitiveValues("data_source_uuids", apiIndexingJob.dataSourceUuids); + writer.writeDateValue("finished_at", apiIndexingJob.finishedAt); + writer.writeBooleanValue("is_report_available", apiIndexingJob.isReportAvailable); + writer.writeStringValue("knowledge_base_uuid", apiIndexingJob.knowledgeBaseUuid); + writer.writeEnumValue("phase", apiIndexingJob.phase ?? ApiBatchJobPhaseObject.BATCH_JOB_PHASE_UNKNOWN); + writer.writeDateValue("started_at", apiIndexingJob.startedAt); + writer.writeEnumValue("status", apiIndexingJob.status ?? ApiIndexJobStatusObject.INDEX_JOB_STATUS_UNKNOWN); + writer.writeNumberValue("tokens", apiIndexingJob.tokens); + writer.writeNumberValue("total_datasources", apiIndexingJob.totalDatasources); + writer.writeStringValue("total_tokens", apiIndexingJob.totalTokens); + writer.writeDateValue("updated_at", apiIndexingJob.updatedAt); + writer.writeStringValue("uuid", apiIndexingJob.uuid); + writer.writeAdditionalData(apiIndexingJob.additionalData); +} +/** + * Serializes information the current object + * @param ApiKBDataSource The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiKBDataSource(writer, apiKBDataSource = {}, isSerializingDerivedType = false) { + if (!apiKBDataSource || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("aws_data_source", apiKBDataSource.awsDataSource, serializeApiAWSDataSource); + writer.writeStringValue("bucket_name", apiKBDataSource.bucketName); + writer.writeStringValue("bucket_region", apiKBDataSource.bucketRegion); + writer.writeEnumValue("chunking_algorithm", apiKBDataSource.chunkingAlgorithm ?? ApiChunkingAlgorithmObject.CHUNKING_ALGORITHM_SECTION_BASED); + writer.writeObjectValue("chunking_options", apiKBDataSource.chunkingOptions, serializeApiChunkingOptions); + writer.writeObjectValue("dropbox_data_source", apiKBDataSource.dropboxDataSource, serializeApiDropboxDataSource); + writer.writeObjectValue("file_upload_data_source", apiKBDataSource.fileUploadDataSource, serializeApiFileUploadDataSource); + writer.writeObjectValue("google_drive_data_source", apiKBDataSource.googleDriveDataSource, serializeApiGoogleDriveDataSource); + writer.writeStringValue("item_path", apiKBDataSource.itemPath); + writer.writeObjectValue("spaces_data_source", apiKBDataSource.spacesDataSource, serializeApiSpacesDataSource); + writer.writeObjectValue("web_crawler_data_source", apiKBDataSource.webCrawlerDataSource, serializeApiWebCrawlerDataSource); + writer.writeAdditionalData(apiKBDataSource.additionalData); +} +/** + * Serializes information the current object + * @param ApiKnowledgeBase The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiKnowledgeBase(writer, apiKnowledgeBase = {}, isSerializingDerivedType = false) { + if (!apiKnowledgeBase || isSerializingDerivedType) { + return; + } + writer.writeDateValue("added_to_agent_at", apiKnowledgeBase.addedToAgentAt); + writer.writeDateValue("created_at", apiKnowledgeBase.createdAt); + writer.writeStringValue("database_id", apiKnowledgeBase.databaseId); + writer.writeStringValue("embedding_model_uuid", apiKnowledgeBase.embeddingModelUuid); + writer.writeBooleanValue("is_public", apiKnowledgeBase.isPublic); + writer.writeObjectValue("last_indexing_job", apiKnowledgeBase.lastIndexingJob, serializeApiIndexingJob); + writer.writeStringValue("name", apiKnowledgeBase.name); + writer.writeStringValue("project_id", apiKnowledgeBase.projectId); + writer.writeStringValue("region", apiKnowledgeBase.region); + writer.writeCollectionOfPrimitiveValues("tags", apiKnowledgeBase.tags); + writer.writeDateValue("updated_at", apiKnowledgeBase.updatedAt); + writer.writeStringValue("user_id", apiKnowledgeBase.userId); + writer.writeStringValue("uuid", apiKnowledgeBase.uuid); + writer.writeAdditionalData(apiKnowledgeBase.additionalData); +} +/** + * Serializes information the current object + * @param ApiKnowledgeBaseDataSource The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiKnowledgeBaseDataSource(writer, apiKnowledgeBaseDataSource = {}, isSerializingDerivedType = false) { + if (!apiKnowledgeBaseDataSource || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("aws_data_source", apiKnowledgeBaseDataSource.awsDataSource, serializeApiAWSDataSourceDisplay); + writer.writeStringValue("bucket_name", apiKnowledgeBaseDataSource.bucketName); + writer.writeEnumValue("chunking_algorithm", apiKnowledgeBaseDataSource.chunkingAlgorithm ?? ApiChunkingAlgorithmObject.CHUNKING_ALGORITHM_SECTION_BASED); + writer.writeObjectValue("chunking_options", apiKnowledgeBaseDataSource.chunkingOptions, serializeApiChunkingOptions); + writer.writeDateValue("created_at", apiKnowledgeBaseDataSource.createdAt); + writer.writeObjectValue("dropbox_data_source", apiKnowledgeBaseDataSource.dropboxDataSource, serializeApiDropboxDataSourceDisplay); + writer.writeObjectValue("file_upload_data_source", apiKnowledgeBaseDataSource.fileUploadDataSource, serializeApiFileUploadDataSource); + writer.writeObjectValue("google_drive_data_source", apiKnowledgeBaseDataSource.googleDriveDataSource, serializeApiGoogleDriveDataSourceDisplay); + writer.writeStringValue("item_path", apiKnowledgeBaseDataSource.itemPath); + writer.writeObjectValue("last_datasource_indexing_job", apiKnowledgeBaseDataSource.lastDatasourceIndexingJob, serializeApiIndexedDataSource); + writer.writeStringValue("region", apiKnowledgeBaseDataSource.region); + writer.writeObjectValue("spaces_data_source", apiKnowledgeBaseDataSource.spacesDataSource, serializeApiSpacesDataSource); + writer.writeDateValue("updated_at", apiKnowledgeBaseDataSource.updatedAt); + writer.writeStringValue("uuid", apiKnowledgeBaseDataSource.uuid); + writer.writeObjectValue("web_crawler_data_source", apiKnowledgeBaseDataSource.webCrawlerDataSource, serializeApiWebCrawlerDataSource); + writer.writeAdditionalData(apiKnowledgeBaseDataSource.additionalData); +} +/** + * Serializes information the current object + * @param ApiLinkAgentFunctionInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiLinkAgentFunctionInputPublic(writer, apiLinkAgentFunctionInputPublic = {}, isSerializingDerivedType = false) { + if (!apiLinkAgentFunctionInputPublic || isSerializingDerivedType) { + return; + } + writer.writeStringValue("agent_uuid", apiLinkAgentFunctionInputPublic.agentUuid); + writer.writeStringValue("description", apiLinkAgentFunctionInputPublic.description); + writer.writeStringValue("faas_name", apiLinkAgentFunctionInputPublic.faasName); + writer.writeStringValue("faas_namespace", apiLinkAgentFunctionInputPublic.faasNamespace); + writer.writeStringValue("function_name", apiLinkAgentFunctionInputPublic.functionName); + writer.writeObjectValue("input_schema", apiLinkAgentFunctionInputPublic.inputSchema, serializeApiLinkAgentFunctionInputPublic_input_schema); + writer.writeObjectValue("output_schema", apiLinkAgentFunctionInputPublic.outputSchema, serializeApiLinkAgentFunctionInputPublic_output_schema); + writer.writeAdditionalData(apiLinkAgentFunctionInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiLinkAgentFunctionInputPublic_input_schema The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiLinkAgentFunctionInputPublic_input_schema(writer, apiLinkAgentFunctionInputPublic_input_schema = {}, isSerializingDerivedType = false) { + if (!apiLinkAgentFunctionInputPublic_input_schema || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(apiLinkAgentFunctionInputPublic_input_schema.additionalData); +} +/** + * Serializes information the current object + * @param ApiLinkAgentFunctionInputPublic_output_schema The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiLinkAgentFunctionInputPublic_output_schema(writer, apiLinkAgentFunctionInputPublic_output_schema = {}, isSerializingDerivedType = false) { + if (!apiLinkAgentFunctionInputPublic_output_schema || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(apiLinkAgentFunctionInputPublic_output_schema.additionalData); +} +/** + * Serializes information the current object + * @param ApiLinkAgentFunctionOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiLinkAgentFunctionOutput(writer, apiLinkAgentFunctionOutput = {}, isSerializingDerivedType = false) { + if (!apiLinkAgentFunctionOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("agent", apiLinkAgentFunctionOutput.agent, serializeApiAgent); + writer.writeAdditionalData(apiLinkAgentFunctionOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiLinkAgentGuardrailOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiLinkAgentGuardrailOutput(writer, apiLinkAgentGuardrailOutput = {}, isSerializingDerivedType = false) { + if (!apiLinkAgentGuardrailOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("agent", apiLinkAgentGuardrailOutput.agent, serializeApiAgent); + writer.writeAdditionalData(apiLinkAgentGuardrailOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiLinkAgentGuardrailsInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiLinkAgentGuardrailsInputPublic(writer, apiLinkAgentGuardrailsInputPublic = {}, isSerializingDerivedType = false) { + if (!apiLinkAgentGuardrailsInputPublic || isSerializingDerivedType) { + return; + } + writer.writeStringValue("agent_uuid", apiLinkAgentGuardrailsInputPublic.agentUuid); + writer.writeCollectionOfObjectValues("guardrails", apiLinkAgentGuardrailsInputPublic.guardrails, serializeApiAgentGuardrailInput); + writer.writeAdditionalData(apiLinkAgentGuardrailsInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiLinkAgentInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiLinkAgentInputPublic(writer, apiLinkAgentInputPublic = {}, isSerializingDerivedType = false) { + if (!apiLinkAgentInputPublic || isSerializingDerivedType) { + return; + } + writer.writeStringValue("child_agent_uuid", apiLinkAgentInputPublic.childAgentUuid); + writer.writeStringValue("if_case", apiLinkAgentInputPublic.ifCase); + writer.writeStringValue("parent_agent_uuid", apiLinkAgentInputPublic.parentAgentUuid); + writer.writeStringValue("route_name", apiLinkAgentInputPublic.routeName); + writer.writeAdditionalData(apiLinkAgentInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiLinkAgentOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiLinkAgentOutput(writer, apiLinkAgentOutput = {}, isSerializingDerivedType = false) { + if (!apiLinkAgentOutput || isSerializingDerivedType) { + return; + } + writer.writeStringValue("child_agent_uuid", apiLinkAgentOutput.childAgentUuid); + writer.writeStringValue("parent_agent_uuid", apiLinkAgentOutput.parentAgentUuid); + writer.writeAdditionalData(apiLinkAgentOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiLinkKnowledgeBaseOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiLinkKnowledgeBaseOutput(writer, apiLinkKnowledgeBaseOutput = {}, isSerializingDerivedType = false) { + if (!apiLinkKnowledgeBaseOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("agent", apiLinkKnowledgeBaseOutput.agent, serializeApiAgent); + writer.writeAdditionalData(apiLinkKnowledgeBaseOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiLinks The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiLinks(writer, apiLinks = {}, isSerializingDerivedType = false) { + if (!apiLinks || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("pages", apiLinks.pages, serializeApiPages); + writer.writeAdditionalData(apiLinks.additionalData); +} +/** + * Serializes information the current object + * @param ApiListAgentAPIKeysOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiListAgentAPIKeysOutput(writer, apiListAgentAPIKeysOutput = {}, isSerializingDerivedType = false) { + if (!apiListAgentAPIKeysOutput || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("api_key_infos", apiListAgentAPIKeysOutput.apiKeyInfos, serializeApiAgentAPIKeyInfo); + writer.writeObjectValue("links", apiListAgentAPIKeysOutput.links, serializeApiLinks); + writer.writeObjectValue("meta", apiListAgentAPIKeysOutput.meta, serializeApiMeta); + writer.writeAdditionalData(apiListAgentAPIKeysOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiListAgentsByAnthropicKeyOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiListAgentsByAnthropicKeyOutput(writer, apiListAgentsByAnthropicKeyOutput = {}, isSerializingDerivedType = false) { + if (!apiListAgentsByAnthropicKeyOutput || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("agents", apiListAgentsByAnthropicKeyOutput.agents, serializeApiAgent); + writer.writeObjectValue("links", apiListAgentsByAnthropicKeyOutput.links, serializeApiLinks); + writer.writeObjectValue("meta", apiListAgentsByAnthropicKeyOutput.meta, serializeApiMeta); + writer.writeAdditionalData(apiListAgentsByAnthropicKeyOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiListAgentsByOpenAIKeyOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiListAgentsByOpenAIKeyOutput(writer, apiListAgentsByOpenAIKeyOutput = {}, isSerializingDerivedType = false) { + if (!apiListAgentsByOpenAIKeyOutput || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("agents", apiListAgentsByOpenAIKeyOutput.agents, serializeApiAgent); + writer.writeObjectValue("links", apiListAgentsByOpenAIKeyOutput.links, serializeApiLinks); + writer.writeObjectValue("meta", apiListAgentsByOpenAIKeyOutput.meta, serializeApiMeta); + writer.writeAdditionalData(apiListAgentsByOpenAIKeyOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiListAgentsByWorkspaceOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiListAgentsByWorkspaceOutput(writer, apiListAgentsByWorkspaceOutput = {}, isSerializingDerivedType = false) { + if (!apiListAgentsByWorkspaceOutput || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("agents", apiListAgentsByWorkspaceOutput.agents, serializeApiAgent); + writer.writeObjectValue("links", apiListAgentsByWorkspaceOutput.links, serializeApiLinks); + writer.writeObjectValue("meta", apiListAgentsByWorkspaceOutput.meta, serializeApiMeta); + writer.writeAdditionalData(apiListAgentsByWorkspaceOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiListAgentsOutputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiListAgentsOutputPublic(writer, apiListAgentsOutputPublic = {}, isSerializingDerivedType = false) { + if (!apiListAgentsOutputPublic || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("agents", apiListAgentsOutputPublic.agents, serializeApiAgentPublic); + writer.writeObjectValue("links", apiListAgentsOutputPublic.links, serializeApiLinks); + writer.writeObjectValue("meta", apiListAgentsOutputPublic.meta, serializeApiMeta); + writer.writeAdditionalData(apiListAgentsOutputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiListAgentVersionsOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiListAgentVersionsOutput(writer, apiListAgentVersionsOutput = {}, isSerializingDerivedType = false) { + if (!apiListAgentVersionsOutput || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("agent_versions", apiListAgentVersionsOutput.agentVersions, serializeApiAgentVersion); + writer.writeObjectValue("links", apiListAgentVersionsOutput.links, serializeApiLinks); + writer.writeObjectValue("meta", apiListAgentVersionsOutput.meta, serializeApiMeta); + writer.writeAdditionalData(apiListAgentVersionsOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiListAnthropicAPIKeysOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiListAnthropicAPIKeysOutput(writer, apiListAnthropicAPIKeysOutput = {}, isSerializingDerivedType = false) { + if (!apiListAnthropicAPIKeysOutput || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("api_key_infos", apiListAnthropicAPIKeysOutput.apiKeyInfos, serializeApiAnthropicAPIKeyInfo); + writer.writeObjectValue("links", apiListAnthropicAPIKeysOutput.links, serializeApiLinks); + writer.writeObjectValue("meta", apiListAnthropicAPIKeysOutput.meta, serializeApiMeta); + writer.writeAdditionalData(apiListAnthropicAPIKeysOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiListEvaluationMetricsOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiListEvaluationMetricsOutput(writer, apiListEvaluationMetricsOutput = {}, isSerializingDerivedType = false) { + if (!apiListEvaluationMetricsOutput || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("metrics", apiListEvaluationMetricsOutput.metrics, serializeApiEvaluationMetric); + writer.writeAdditionalData(apiListEvaluationMetricsOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiListEvaluationRunsByTestCaseOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiListEvaluationRunsByTestCaseOutput(writer, apiListEvaluationRunsByTestCaseOutput = {}, isSerializingDerivedType = false) { + if (!apiListEvaluationRunsByTestCaseOutput || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("evaluation_runs", apiListEvaluationRunsByTestCaseOutput.evaluationRuns, serializeApiEvaluationRun); + writer.writeAdditionalData(apiListEvaluationRunsByTestCaseOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiListEvaluationTestCasesByWorkspaceOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiListEvaluationTestCasesByWorkspaceOutput(writer, apiListEvaluationTestCasesByWorkspaceOutput = {}, isSerializingDerivedType = false) { + if (!apiListEvaluationTestCasesByWorkspaceOutput || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("evaluation_test_cases", apiListEvaluationTestCasesByWorkspaceOutput.evaluationTestCases, serializeApiEvaluationTestCase); + writer.writeAdditionalData(apiListEvaluationTestCasesByWorkspaceOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiListEvaluationTestCasesOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiListEvaluationTestCasesOutput(writer, apiListEvaluationTestCasesOutput = {}, isSerializingDerivedType = false) { + if (!apiListEvaluationTestCasesOutput || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("evaluation_test_cases", apiListEvaluationTestCasesOutput.evaluationTestCases, serializeApiEvaluationTestCase); + writer.writeAdditionalData(apiListEvaluationTestCasesOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiListIndexingJobDataSourcesOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiListIndexingJobDataSourcesOutput(writer, apiListIndexingJobDataSourcesOutput = {}, isSerializingDerivedType = false) { + if (!apiListIndexingJobDataSourcesOutput || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("indexed_data_sources", apiListIndexingJobDataSourcesOutput.indexedDataSources, serializeApiIndexedDataSource); + writer.writeAdditionalData(apiListIndexingJobDataSourcesOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiListKnowledgeBaseDataSourcesOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiListKnowledgeBaseDataSourcesOutput(writer, apiListKnowledgeBaseDataSourcesOutput = {}, isSerializingDerivedType = false) { + if (!apiListKnowledgeBaseDataSourcesOutput || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("knowledge_base_data_sources", apiListKnowledgeBaseDataSourcesOutput.knowledgeBaseDataSources, serializeApiKnowledgeBaseDataSource); + writer.writeObjectValue("links", apiListKnowledgeBaseDataSourcesOutput.links, serializeApiLinks); + writer.writeObjectValue("meta", apiListKnowledgeBaseDataSourcesOutput.meta, serializeApiMeta); + writer.writeAdditionalData(apiListKnowledgeBaseDataSourcesOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiListKnowledgeBaseIndexingJobsOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiListKnowledgeBaseIndexingJobsOutput(writer, apiListKnowledgeBaseIndexingJobsOutput = {}, isSerializingDerivedType = false) { + if (!apiListKnowledgeBaseIndexingJobsOutput || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("jobs", apiListKnowledgeBaseIndexingJobsOutput.jobs, serializeApiIndexingJob); + writer.writeObjectValue("links", apiListKnowledgeBaseIndexingJobsOutput.links, serializeApiLinks); + writer.writeObjectValue("meta", apiListKnowledgeBaseIndexingJobsOutput.meta, serializeApiMeta); + writer.writeAdditionalData(apiListKnowledgeBaseIndexingJobsOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiListKnowledgeBasesOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiListKnowledgeBasesOutput(writer, apiListKnowledgeBasesOutput = {}, isSerializingDerivedType = false) { + if (!apiListKnowledgeBasesOutput || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("knowledge_bases", apiListKnowledgeBasesOutput.knowledgeBases, serializeApiKnowledgeBase); + writer.writeObjectValue("links", apiListKnowledgeBasesOutput.links, serializeApiLinks); + writer.writeObjectValue("meta", apiListKnowledgeBasesOutput.meta, serializeApiMeta); + writer.writeAdditionalData(apiListKnowledgeBasesOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiListModelAPIKeysOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiListModelAPIKeysOutput(writer, apiListModelAPIKeysOutput = {}, isSerializingDerivedType = false) { + if (!apiListModelAPIKeysOutput || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("api_key_infos", apiListModelAPIKeysOutput.apiKeyInfos, serializeApiModelAPIKeyInfo); + writer.writeObjectValue("links", apiListModelAPIKeysOutput.links, serializeApiLinks); + writer.writeObjectValue("meta", apiListModelAPIKeysOutput.meta, serializeApiMeta); + writer.writeAdditionalData(apiListModelAPIKeysOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiListModelsOutputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiListModelsOutputPublic(writer, apiListModelsOutputPublic = {}, isSerializingDerivedType = false) { + if (!apiListModelsOutputPublic || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("links", apiListModelsOutputPublic.links, serializeApiLinks); + writer.writeObjectValue("meta", apiListModelsOutputPublic.meta, serializeApiMeta); + writer.writeCollectionOfObjectValues("models", apiListModelsOutputPublic.models, serializeApiModelPublic); + writer.writeAdditionalData(apiListModelsOutputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiListOpenAIAPIKeysOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiListOpenAIAPIKeysOutput(writer, apiListOpenAIAPIKeysOutput = {}, isSerializingDerivedType = false) { + if (!apiListOpenAIAPIKeysOutput || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("api_key_infos", apiListOpenAIAPIKeysOutput.apiKeyInfos, serializeApiOpenAIAPIKeyInfo); + writer.writeObjectValue("links", apiListOpenAIAPIKeysOutput.links, serializeApiLinks); + writer.writeObjectValue("meta", apiListOpenAIAPIKeysOutput.meta, serializeApiMeta); + writer.writeAdditionalData(apiListOpenAIAPIKeysOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiListRegionsOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiListRegionsOutput(writer, apiListRegionsOutput = {}, isSerializingDerivedType = false) { + if (!apiListRegionsOutput || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("regions", apiListRegionsOutput.regions, serializeGenaiapiRegion); + writer.writeAdditionalData(apiListRegionsOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiListWorkspacesOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiListWorkspacesOutput(writer, apiListWorkspacesOutput = {}, isSerializingDerivedType = false) { + if (!apiListWorkspacesOutput || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("workspaces", apiListWorkspacesOutput.workspaces, serializeApiWorkspace); + writer.writeAdditionalData(apiListWorkspacesOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiMeta The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiMeta(writer, apiMeta = {}, isSerializingDerivedType = false) { + if (!apiMeta || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("page", apiMeta.page); + writer.writeNumberValue("pages", apiMeta.pages); + writer.writeNumberValue("total", apiMeta.total); + writer.writeAdditionalData(apiMeta.additionalData); +} +/** + * Serializes information the current object + * @param ApiModel The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiModel(writer, apiModel = {}, isSerializingDerivedType = false) { + if (!apiModel || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("agreement", apiModel.agreement, serializeApiAgreement); + writer.writeDateValue("created_at", apiModel.createdAt); + writer.writeStringValue("inference_name", apiModel.inferenceName); + writer.writeStringValue("inference_version", apiModel.inferenceVersion); + writer.writeBooleanValue("is_foundational", apiModel.isFoundational); + writer.writeNumberValue("kb_default_chunk_size", apiModel.kbDefaultChunkSize); + writer.writeNumberValue("kb_max_chunk_size", apiModel.kbMaxChunkSize); + writer.writeNumberValue("kb_min_chunk_size", apiModel.kbMinChunkSize); + writer.writeObjectValue("metadata", apiModel.metadata, serializeApiModel_metadata); + writer.writeStringValue("name", apiModel.name); + writer.writeStringValue("parent_uuid", apiModel.parentUuid); + writer.writeEnumValue("provider", apiModel.provider ?? ApiModelProviderObject.MODEL_PROVIDER_DIGITALOCEAN); + writer.writeDateValue("updated_at", apiModel.updatedAt); + writer.writeBooleanValue("upload_complete", apiModel.uploadComplete); + writer.writeStringValue("url", apiModel.url); + if (apiModel.usecases) + writer.writeCollectionOfEnumValues("usecases", apiModel.usecases); + writer.writeStringValue("uuid", apiModel.uuid); + writer.writeObjectValue("version", apiModel.version, serializeApiModelVersion); + writer.writeAdditionalData(apiModel.additionalData); +} +/** + * Serializes information the current object + * @param ApiModel_metadata The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiModel_metadata(writer, apiModel_metadata = {}, isSerializingDerivedType = false) { + if (!apiModel_metadata || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(apiModel_metadata.additionalData); +} +/** + * Serializes information the current object + * @param ApiModelAPIKeyInfo The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiModelAPIKeyInfo(writer, apiModelAPIKeyInfo = {}, isSerializingDerivedType = false) { + if (!apiModelAPIKeyInfo || isSerializingDerivedType) { + return; + } + writer.writeDateValue("created_at", apiModelAPIKeyInfo.createdAt); + writer.writeStringValue("created_by", apiModelAPIKeyInfo.createdBy); + writer.writeDateValue("deleted_at", apiModelAPIKeyInfo.deletedAt); + writer.writeStringValue("name", apiModelAPIKeyInfo.name); + writer.writeStringValue("secret_key", apiModelAPIKeyInfo.secretKey); + writer.writeStringValue("uuid", apiModelAPIKeyInfo.uuid); + writer.writeAdditionalData(apiModelAPIKeyInfo.additionalData); +} +/** + * Serializes information the current object + * @param ApiModelProviderKeyInfo The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiModelProviderKeyInfo(writer, apiModelProviderKeyInfo = {}, isSerializingDerivedType = false) { + if (!apiModelProviderKeyInfo || isSerializingDerivedType) { + return; + } + writer.writeStringValue("api_key_uuid", apiModelProviderKeyInfo.apiKeyUuid); + writer.writeDateValue("created_at", apiModelProviderKeyInfo.createdAt); + writer.writeStringValue("created_by", apiModelProviderKeyInfo.createdBy); + writer.writeDateValue("deleted_at", apiModelProviderKeyInfo.deletedAt); + writer.writeCollectionOfObjectValues("models", apiModelProviderKeyInfo.models, serializeApiModel); + writer.writeStringValue("name", apiModelProviderKeyInfo.name); + writer.writeEnumValue("provider", apiModelProviderKeyInfo.provider ?? ApiModelProviderObject.MODEL_PROVIDER_DIGITALOCEAN); + writer.writeDateValue("updated_at", apiModelProviderKeyInfo.updatedAt); + writer.writeAdditionalData(apiModelProviderKeyInfo.additionalData); +} +/** + * Serializes information the current object + * @param ApiModelPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiModelPublic(writer, apiModelPublic = {}, isSerializingDerivedType = false) { + if (!apiModelPublic || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("agreement", apiModelPublic.agreement, serializeApiAgreement); + writer.writeDateValue("created_at", apiModelPublic.createdAt); + writer.writeStringValue("id", apiModelPublic.id); + writer.writeBooleanValue("is_foundational", apiModelPublic.isFoundational); + writer.writeNumberValue("kb_default_chunk_size", apiModelPublic.kbDefaultChunkSize); + writer.writeNumberValue("kb_max_chunk_size", apiModelPublic.kbMaxChunkSize); + writer.writeNumberValue("kb_min_chunk_size", apiModelPublic.kbMinChunkSize); + writer.writeStringValue("name", apiModelPublic.name); + writer.writeStringValue("parent_uuid", apiModelPublic.parentUuid); + writer.writeDateValue("updated_at", apiModelPublic.updatedAt); + writer.writeBooleanValue("upload_complete", apiModelPublic.uploadComplete); + writer.writeStringValue("url", apiModelPublic.url); + writer.writeStringValue("uuid", apiModelPublic.uuid); + writer.writeObjectValue("version", apiModelPublic.version, serializeApiModelVersion); + writer.writeAdditionalData(apiModelPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiModelVersion The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiModelVersion(writer, apiModelVersion = {}, isSerializingDerivedType = false) { + if (!apiModelVersion || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("major", apiModelVersion.major); + writer.writeNumberValue("minor", apiModelVersion.minor); + writer.writeNumberValue("patch", apiModelVersion.patch); + writer.writeAdditionalData(apiModelVersion.additionalData); +} +/** + * Serializes information the current object + * @param ApiMoveAgentsToWorkspaceInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiMoveAgentsToWorkspaceInputPublic(writer, apiMoveAgentsToWorkspaceInputPublic = {}, isSerializingDerivedType = false) { + if (!apiMoveAgentsToWorkspaceInputPublic || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("agent_uuids", apiMoveAgentsToWorkspaceInputPublic.agentUuids); + writer.writeStringValue("workspace_uuid", apiMoveAgentsToWorkspaceInputPublic.workspaceUuid); + writer.writeAdditionalData(apiMoveAgentsToWorkspaceInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiMoveAgentsToWorkspaceOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiMoveAgentsToWorkspaceOutput(writer, apiMoveAgentsToWorkspaceOutput = {}, isSerializingDerivedType = false) { + if (!apiMoveAgentsToWorkspaceOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("workspace", apiMoveAgentsToWorkspaceOutput.workspace, serializeApiWorkspace); + writer.writeAdditionalData(apiMoveAgentsToWorkspaceOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiOpenAIAPIKeyInfo The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiOpenAIAPIKeyInfo(writer, apiOpenAIAPIKeyInfo = {}, isSerializingDerivedType = false) { + if (!apiOpenAIAPIKeyInfo || isSerializingDerivedType) { + return; + } + writer.writeDateValue("created_at", apiOpenAIAPIKeyInfo.createdAt); + writer.writeStringValue("created_by", apiOpenAIAPIKeyInfo.createdBy); + writer.writeDateValue("deleted_at", apiOpenAIAPIKeyInfo.deletedAt); + writer.writeCollectionOfObjectValues("models", apiOpenAIAPIKeyInfo.models, serializeApiModel); + writer.writeStringValue("name", apiOpenAIAPIKeyInfo.name); + writer.writeDateValue("updated_at", apiOpenAIAPIKeyInfo.updatedAt); + writer.writeStringValue("uuid", apiOpenAIAPIKeyInfo.uuid); + writer.writeAdditionalData(apiOpenAIAPIKeyInfo.additionalData); +} +/** + * Serializes information the current object + * @param ApiPages The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiPages(writer, apiPages = {}, isSerializingDerivedType = false) { + if (!apiPages || isSerializingDerivedType) { + return; + } + writer.writeStringValue("first", apiPages.first); + writer.writeStringValue("last", apiPages.last); + writer.writeStringValue("next", apiPages.next); + writer.writeStringValue("previous", apiPages.previous); + writer.writeAdditionalData(apiPages.additionalData); +} +/** + * Serializes information the current object + * @param ApiPresignedUrlFile The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiPresignedUrlFile(writer, apiPresignedUrlFile = {}, isSerializingDerivedType = false) { + if (!apiPresignedUrlFile || isSerializingDerivedType) { + return; + } + writer.writeStringValue("file_name", apiPresignedUrlFile.fileName); + writer.writeStringValue("file_size", apiPresignedUrlFile.fileSize); + writer.writeAdditionalData(apiPresignedUrlFile.additionalData); +} +/** + * Serializes information the current object + * @param ApiPrompt The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiPrompt(writer, apiPrompt = {}, isSerializingDerivedType = false) { + if (!apiPrompt || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("evaluation_trace_spans", apiPrompt.evaluationTraceSpans, serializeApiEvaluationTraceSpan); + writer.writeStringValue("ground_truth", apiPrompt.groundTruth); + writer.writeStringValue("input", apiPrompt.input); + writer.writeStringValue("input_tokens", apiPrompt.inputTokens); + writer.writeStringValue("output", apiPrompt.output); + writer.writeStringValue("output_tokens", apiPrompt.outputTokens); + writer.writeCollectionOfObjectValues("prompt_chunks", apiPrompt.promptChunks, serializeApiPromptChunk); + writer.writeNumberValue("prompt_id", apiPrompt.promptId); + writer.writeCollectionOfObjectValues("prompt_level_metric_results", apiPrompt.promptLevelMetricResults, serializeApiEvaluationMetricResult); + writer.writeStringValue("trace_id", apiPrompt.traceId); + writer.writeAdditionalData(apiPrompt.additionalData); +} +/** + * Serializes information the current object + * @param ApiPromptChunk The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiPromptChunk(writer, apiPromptChunk = {}, isSerializingDerivedType = false) { + if (!apiPromptChunk || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("chunk_usage_pct", apiPromptChunk.chunkUsagePct); + writer.writeBooleanValue("chunk_used", apiPromptChunk.chunkUsed); + writer.writeStringValue("index_uuid", apiPromptChunk.indexUuid); + writer.writeStringValue("source_name", apiPromptChunk.sourceName); + writer.writeStringValue("text", apiPromptChunk.text); + writer.writeAdditionalData(apiPromptChunk.additionalData); +} +/** + * Serializes information the current object + * @param ApiRegenerateAgentAPIKeyOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiRegenerateAgentAPIKeyOutput(writer, apiRegenerateAgentAPIKeyOutput = {}, isSerializingDerivedType = false) { + if (!apiRegenerateAgentAPIKeyOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("api_key_info", apiRegenerateAgentAPIKeyOutput.apiKeyInfo, serializeApiAgentAPIKeyInfo); + writer.writeAdditionalData(apiRegenerateAgentAPIKeyOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiRegenerateModelAPIKeyOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiRegenerateModelAPIKeyOutput(writer, apiRegenerateModelAPIKeyOutput = {}, isSerializingDerivedType = false) { + if (!apiRegenerateModelAPIKeyOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("api_key_info", apiRegenerateModelAPIKeyOutput.apiKeyInfo, serializeApiModelAPIKeyInfo); + writer.writeAdditionalData(apiRegenerateModelAPIKeyOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiResourceUsage The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiResourceUsage(writer, apiResourceUsage = {}, isSerializingDerivedType = false) { + if (!apiResourceUsage || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("measurements", apiResourceUsage.measurements, serializeApiUsageMeasurement); + writer.writeStringValue("resource_uuid", apiResourceUsage.resourceUuid); + writer.writeDateValue("start", apiResourceUsage.start); + writer.writeDateValue("stop", apiResourceUsage.stop); + writer.writeAdditionalData(apiResourceUsage.additionalData); +} +/** + * Serializes information the current object + * @param ApiRollbackToAgentVersionInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiRollbackToAgentVersionInputPublic(writer, apiRollbackToAgentVersionInputPublic = {}, isSerializingDerivedType = false) { + if (!apiRollbackToAgentVersionInputPublic || isSerializingDerivedType) { + return; + } + writer.writeStringValue("uuid", apiRollbackToAgentVersionInputPublic.uuid); + writer.writeStringValue("version_hash", apiRollbackToAgentVersionInputPublic.versionHash); + writer.writeAdditionalData(apiRollbackToAgentVersionInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiRollbackToAgentVersionOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiRollbackToAgentVersionOutput(writer, apiRollbackToAgentVersionOutput = {}, isSerializingDerivedType = false) { + if (!apiRollbackToAgentVersionOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("audit_header", apiRollbackToAgentVersionOutput.auditHeader, serializeApiAuditHeader); + writer.writeStringValue("version_hash", apiRollbackToAgentVersionOutput.versionHash); + writer.writeAdditionalData(apiRollbackToAgentVersionOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiRunEvaluationTestCaseInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiRunEvaluationTestCaseInputPublic(writer, apiRunEvaluationTestCaseInputPublic = {}, isSerializingDerivedType = false) { + if (!apiRunEvaluationTestCaseInputPublic || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("agent_deployment_names", apiRunEvaluationTestCaseInputPublic.agentDeploymentNames); + writer.writeCollectionOfPrimitiveValues("agent_uuids", apiRunEvaluationTestCaseInputPublic.agentUuids); + writer.writeStringValue("run_name", apiRunEvaluationTestCaseInputPublic.runName); + writer.writeStringValue("test_case_uuid", apiRunEvaluationTestCaseInputPublic.testCaseUuid); + writer.writeAdditionalData(apiRunEvaluationTestCaseInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiRunEvaluationTestCaseOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiRunEvaluationTestCaseOutput(writer, apiRunEvaluationTestCaseOutput = {}, isSerializingDerivedType = false) { + if (!apiRunEvaluationTestCaseOutput || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("evaluation_run_uuids", apiRunEvaluationTestCaseOutput.evaluationRunUuids); + writer.writeAdditionalData(apiRunEvaluationTestCaseOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiScheduledIndexingInfo The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiScheduledIndexingInfo(writer, apiScheduledIndexingInfo = {}, isSerializingDerivedType = false) { + if (!apiScheduledIndexingInfo || isSerializingDerivedType) { + return; + } + writer.writeDateValue("created_at", apiScheduledIndexingInfo.createdAt); + writer.writeCollectionOfPrimitiveValues("days", apiScheduledIndexingInfo.days); + writer.writeDateValue("deleted_at", apiScheduledIndexingInfo.deletedAt); + writer.writeBooleanValue("is_active", apiScheduledIndexingInfo.isActive); + writer.writeStringValue("knowledge_base_uuid", apiScheduledIndexingInfo.knowledgeBaseUuid); + writer.writeDateValue("last_ran_at", apiScheduledIndexingInfo.lastRanAt); + writer.writeDateValue("next_run_at", apiScheduledIndexingInfo.nextRunAt); + writer.writeStringValue("time", apiScheduledIndexingInfo.time); + writer.writeDateValue("updated_at", apiScheduledIndexingInfo.updatedAt); + writer.writeStringValue("uuid", apiScheduledIndexingInfo.uuid); + writer.writeAdditionalData(apiScheduledIndexingInfo.additionalData); +} +/** + * Serializes information the current object + * @param ApiSpacesDataSource The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiSpacesDataSource(writer, apiSpacesDataSource = {}, isSerializingDerivedType = false) { + if (!apiSpacesDataSource || isSerializingDerivedType) { + return; + } + writer.writeStringValue("bucket_name", apiSpacesDataSource.bucketName); + writer.writeStringValue("item_path", apiSpacesDataSource.itemPath); + writer.writeStringValue("region", apiSpacesDataSource.region); + writer.writeAdditionalData(apiSpacesDataSource.additionalData); +} +/** + * Serializes information the current object + * @param ApiStarMetric The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiStarMetric(writer, apiStarMetric = {}, isSerializingDerivedType = false) { + if (!apiStarMetric || isSerializingDerivedType) { + return; + } + writer.writeStringValue("metric_uuid", apiStarMetric.metricUuid); + writer.writeStringValue("name", apiStarMetric.name); + writer.writeNumberValue("success_threshold", apiStarMetric.successThreshold); + writer.writeNumberValue("success_threshold_pct", apiStarMetric.successThresholdPct); + writer.writeAdditionalData(apiStarMetric.additionalData); +} +/** + * Serializes information the current object + * @param ApiStartKnowledgeBaseIndexingJobInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiStartKnowledgeBaseIndexingJobInputPublic(writer, apiStartKnowledgeBaseIndexingJobInputPublic = {}, isSerializingDerivedType = false) { + if (!apiStartKnowledgeBaseIndexingJobInputPublic || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("data_source_uuids", apiStartKnowledgeBaseIndexingJobInputPublic.dataSourceUuids); + writer.writeStringValue("knowledge_base_uuid", apiStartKnowledgeBaseIndexingJobInputPublic.knowledgeBaseUuid); + writer.writeAdditionalData(apiStartKnowledgeBaseIndexingJobInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiStartKnowledgeBaseIndexingJobOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiStartKnowledgeBaseIndexingJobOutput(writer, apiStartKnowledgeBaseIndexingJobOutput = {}, isSerializingDerivedType = false) { + if (!apiStartKnowledgeBaseIndexingJobOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("job", apiStartKnowledgeBaseIndexingJobOutput.job, serializeApiIndexingJob); + writer.writeAdditionalData(apiStartKnowledgeBaseIndexingJobOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiUnlinkAgentFunctionOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUnlinkAgentFunctionOutput(writer, apiUnlinkAgentFunctionOutput = {}, isSerializingDerivedType = false) { + if (!apiUnlinkAgentFunctionOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("agent", apiUnlinkAgentFunctionOutput.agent, serializeApiAgent); + writer.writeAdditionalData(apiUnlinkAgentFunctionOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiUnlinkAgentGuardrailOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUnlinkAgentGuardrailOutput(writer, apiUnlinkAgentGuardrailOutput = {}, isSerializingDerivedType = false) { + if (!apiUnlinkAgentGuardrailOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("agent", apiUnlinkAgentGuardrailOutput.agent, serializeApiAgent); + writer.writeAdditionalData(apiUnlinkAgentGuardrailOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiUnlinkAgentOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUnlinkAgentOutput(writer, apiUnlinkAgentOutput = {}, isSerializingDerivedType = false) { + if (!apiUnlinkAgentOutput || isSerializingDerivedType) { + return; + } + writer.writeStringValue("child_agent_uuid", apiUnlinkAgentOutput.childAgentUuid); + writer.writeStringValue("parent_agent_uuid", apiUnlinkAgentOutput.parentAgentUuid); + writer.writeAdditionalData(apiUnlinkAgentOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiUnlinkKnowledgeBaseOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUnlinkKnowledgeBaseOutput(writer, apiUnlinkKnowledgeBaseOutput = {}, isSerializingDerivedType = false) { + if (!apiUnlinkKnowledgeBaseOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("agent", apiUnlinkKnowledgeBaseOutput.agent, serializeApiAgent); + writer.writeAdditionalData(apiUnlinkKnowledgeBaseOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateAgentAPIKeyInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateAgentAPIKeyInputPublic(writer, apiUpdateAgentAPIKeyInputPublic = {}, isSerializingDerivedType = false) { + if (!apiUpdateAgentAPIKeyInputPublic || isSerializingDerivedType) { + return; + } + writer.writeStringValue("agent_uuid", apiUpdateAgentAPIKeyInputPublic.agentUuid); + writer.writeStringValue("api_key_uuid", apiUpdateAgentAPIKeyInputPublic.apiKeyUuid); + writer.writeStringValue("name", apiUpdateAgentAPIKeyInputPublic.name); + writer.writeAdditionalData(apiUpdateAgentAPIKeyInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateAgentAPIKeyOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateAgentAPIKeyOutput(writer, apiUpdateAgentAPIKeyOutput = {}, isSerializingDerivedType = false) { + if (!apiUpdateAgentAPIKeyOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("api_key_info", apiUpdateAgentAPIKeyOutput.apiKeyInfo, serializeApiAgentAPIKeyInfo); + writer.writeAdditionalData(apiUpdateAgentAPIKeyOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateAgentDeploymentVisbilityOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateAgentDeploymentVisbilityOutput(writer, apiUpdateAgentDeploymentVisbilityOutput = {}, isSerializingDerivedType = false) { + if (!apiUpdateAgentDeploymentVisbilityOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("agent", apiUpdateAgentDeploymentVisbilityOutput.agent, serializeApiAgent); + writer.writeAdditionalData(apiUpdateAgentDeploymentVisbilityOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateAgentDeploymentVisibilityInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateAgentDeploymentVisibilityInputPublic(writer, apiUpdateAgentDeploymentVisibilityInputPublic = {}, isSerializingDerivedType = false) { + if (!apiUpdateAgentDeploymentVisibilityInputPublic || isSerializingDerivedType) { + return; + } + writer.writeStringValue("uuid", apiUpdateAgentDeploymentVisibilityInputPublic.uuid); + writer.writeEnumValue("visibility", apiUpdateAgentDeploymentVisibilityInputPublic.visibility ?? ApiDeploymentVisibilityObject.VISIBILITY_UNKNOWN); + writer.writeAdditionalData(apiUpdateAgentDeploymentVisibilityInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateAgentFunctionInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateAgentFunctionInputPublic(writer, apiUpdateAgentFunctionInputPublic = {}, isSerializingDerivedType = false) { + if (!apiUpdateAgentFunctionInputPublic || isSerializingDerivedType) { + return; + } + writer.writeStringValue("agent_uuid", apiUpdateAgentFunctionInputPublic.agentUuid); + writer.writeStringValue("description", apiUpdateAgentFunctionInputPublic.description); + writer.writeStringValue("faas_name", apiUpdateAgentFunctionInputPublic.faasName); + writer.writeStringValue("faas_namespace", apiUpdateAgentFunctionInputPublic.faasNamespace); + writer.writeStringValue("function_name", apiUpdateAgentFunctionInputPublic.functionName); + writer.writeStringValue("function_uuid", apiUpdateAgentFunctionInputPublic.functionUuid); + writer.writeObjectValue("input_schema", apiUpdateAgentFunctionInputPublic.inputSchema, serializeApiUpdateAgentFunctionInputPublic_input_schema); + writer.writeObjectValue("output_schema", apiUpdateAgentFunctionInputPublic.outputSchema, serializeApiUpdateAgentFunctionInputPublic_output_schema); + writer.writeAdditionalData(apiUpdateAgentFunctionInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateAgentFunctionInputPublic_input_schema The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateAgentFunctionInputPublic_input_schema(writer, apiUpdateAgentFunctionInputPublic_input_schema = {}, isSerializingDerivedType = false) { + if (!apiUpdateAgentFunctionInputPublic_input_schema || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(apiUpdateAgentFunctionInputPublic_input_schema.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateAgentFunctionInputPublic_output_schema The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateAgentFunctionInputPublic_output_schema(writer, apiUpdateAgentFunctionInputPublic_output_schema = {}, isSerializingDerivedType = false) { + if (!apiUpdateAgentFunctionInputPublic_output_schema || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(apiUpdateAgentFunctionInputPublic_output_schema.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateAgentFunctionOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateAgentFunctionOutput(writer, apiUpdateAgentFunctionOutput = {}, isSerializingDerivedType = false) { + if (!apiUpdateAgentFunctionOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("agent", apiUpdateAgentFunctionOutput.agent, serializeApiAgent); + writer.writeAdditionalData(apiUpdateAgentFunctionOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateAgentInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateAgentInputPublic(writer, apiUpdateAgentInputPublic = {}, isSerializingDerivedType = false) { + if (!apiUpdateAgentInputPublic || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("agent_log_insights_enabled", apiUpdateAgentInputPublic.agentLogInsightsEnabled); + writer.writeCollectionOfPrimitiveValues("allowed_domains", apiUpdateAgentInputPublic.allowedDomains); + writer.writeStringValue("anthropic_key_uuid", apiUpdateAgentInputPublic.anthropicKeyUuid); + writer.writeBooleanValue("conversation_logs_enabled", apiUpdateAgentInputPublic.conversationLogsEnabled); + writer.writeStringValue("description", apiUpdateAgentInputPublic.description); + writer.writeStringValue("instruction", apiUpdateAgentInputPublic.instruction); + writer.writeNumberValue("k", apiUpdateAgentInputPublic.k); + writer.writeNumberValue("max_tokens", apiUpdateAgentInputPublic.maxTokens); + writer.writeStringValue("model_provider_key_uuid", apiUpdateAgentInputPublic.modelProviderKeyUuid); + writer.writeStringValue("model_uuid", apiUpdateAgentInputPublic.modelUuid); + writer.writeStringValue("name", apiUpdateAgentInputPublic.name); + writer.writeStringValue("open_ai_key_uuid", apiUpdateAgentInputPublic.openAiKeyUuid); + writer.writeStringValue("project_id", apiUpdateAgentInputPublic.projectId); + writer.writeBooleanValue("provide_citations", apiUpdateAgentInputPublic.provideCitations); + writer.writeEnumValue("retrieval_method", apiUpdateAgentInputPublic.retrievalMethod ?? ApiRetrievalMethodObject.RETRIEVAL_METHOD_UNKNOWN); + writer.writeCollectionOfPrimitiveValues("tags", apiUpdateAgentInputPublic.tags); + writer.writeNumberValue("temperature", apiUpdateAgentInputPublic.temperature); + writer.writeNumberValue("top_p", apiUpdateAgentInputPublic.topP); + writer.writeStringValue("uuid", apiUpdateAgentInputPublic.uuid); + writer.writeAdditionalData(apiUpdateAgentInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateAgentOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateAgentOutput(writer, apiUpdateAgentOutput = {}, isSerializingDerivedType = false) { + if (!apiUpdateAgentOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("agent", apiUpdateAgentOutput.agent, serializeApiAgent); + writer.writeAdditionalData(apiUpdateAgentOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateAnthropicAPIKeyInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateAnthropicAPIKeyInputPublic(writer, apiUpdateAnthropicAPIKeyInputPublic = {}, isSerializingDerivedType = false) { + if (!apiUpdateAnthropicAPIKeyInputPublic || isSerializingDerivedType) { + return; + } + writer.writeStringValue("api_key", apiUpdateAnthropicAPIKeyInputPublic.apiKey); + writer.writeStringValue("api_key_uuid", apiUpdateAnthropicAPIKeyInputPublic.apiKeyUuid); + writer.writeStringValue("name", apiUpdateAnthropicAPIKeyInputPublic.name); + writer.writeAdditionalData(apiUpdateAnthropicAPIKeyInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateAnthropicAPIKeyOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateAnthropicAPIKeyOutput(writer, apiUpdateAnthropicAPIKeyOutput = {}, isSerializingDerivedType = false) { + if (!apiUpdateAnthropicAPIKeyOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("api_key_info", apiUpdateAnthropicAPIKeyOutput.apiKeyInfo, serializeApiAnthropicAPIKeyInfo); + writer.writeAdditionalData(apiUpdateAnthropicAPIKeyOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateEvaluationTestCaseInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateEvaluationTestCaseInputPublic(writer, apiUpdateEvaluationTestCaseInputPublic = {}, isSerializingDerivedType = false) { + if (!apiUpdateEvaluationTestCaseInputPublic || isSerializingDerivedType) { + return; + } + writer.writeStringValue("dataset_uuid", apiUpdateEvaluationTestCaseInputPublic.datasetUuid); + writer.writeStringValue("description", apiUpdateEvaluationTestCaseInputPublic.description); + writer.writeObjectValue("metrics", apiUpdateEvaluationTestCaseInputPublic.metrics, serializeApiEvaluationTestCaseMetricList); + writer.writeStringValue("name", apiUpdateEvaluationTestCaseInputPublic.name); + writer.writeObjectValue("star_metric", apiUpdateEvaluationTestCaseInputPublic.starMetric, serializeApiStarMetric); + writer.writeStringValue("test_case_uuid", apiUpdateEvaluationTestCaseInputPublic.testCaseUuid); + writer.writeAdditionalData(apiUpdateEvaluationTestCaseInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateEvaluationTestCaseOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateEvaluationTestCaseOutput(writer, apiUpdateEvaluationTestCaseOutput = {}, isSerializingDerivedType = false) { + if (!apiUpdateEvaluationTestCaseOutput || isSerializingDerivedType) { + return; + } + writer.writeStringValue("test_case_uuid", apiUpdateEvaluationTestCaseOutput.testCaseUuid); + writer.writeNumberValue("version", apiUpdateEvaluationTestCaseOutput.version); + writer.writeAdditionalData(apiUpdateEvaluationTestCaseOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateKnowledgeBaseDataSourceInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateKnowledgeBaseDataSourceInputPublic(writer, apiUpdateKnowledgeBaseDataSourceInputPublic = {}, isSerializingDerivedType = false) { + if (!apiUpdateKnowledgeBaseDataSourceInputPublic || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("chunking_algorithm", apiUpdateKnowledgeBaseDataSourceInputPublic.chunkingAlgorithm ?? ApiChunkingAlgorithmObject.CHUNKING_ALGORITHM_SECTION_BASED); + writer.writeObjectValue("chunking_options", apiUpdateKnowledgeBaseDataSourceInputPublic.chunkingOptions, serializeApiChunkingOptions); + writer.writeStringValue("data_source_uuid", apiUpdateKnowledgeBaseDataSourceInputPublic.dataSourceUuid); + writer.writeStringValue("knowledge_base_uuid", apiUpdateKnowledgeBaseDataSourceInputPublic.knowledgeBaseUuid); + writer.writeAdditionalData(apiUpdateKnowledgeBaseDataSourceInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateKnowledgeBaseDataSourceOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateKnowledgeBaseDataSourceOutput(writer, apiUpdateKnowledgeBaseDataSourceOutput = {}, isSerializingDerivedType = false) { + if (!apiUpdateKnowledgeBaseDataSourceOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("knowledge_base_data_source", apiUpdateKnowledgeBaseDataSourceOutput.knowledgeBaseDataSource, serializeApiKnowledgeBaseDataSource); + writer.writeAdditionalData(apiUpdateKnowledgeBaseDataSourceOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateKnowledgeBaseInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateKnowledgeBaseInputPublic(writer, apiUpdateKnowledgeBaseInputPublic = {}, isSerializingDerivedType = false) { + if (!apiUpdateKnowledgeBaseInputPublic || isSerializingDerivedType) { + return; + } + writer.writeStringValue("database_id", apiUpdateKnowledgeBaseInputPublic.databaseId); + writer.writeStringValue("embedding_model_uuid", apiUpdateKnowledgeBaseInputPublic.embeddingModelUuid); + writer.writeStringValue("name", apiUpdateKnowledgeBaseInputPublic.name); + writer.writeStringValue("project_id", apiUpdateKnowledgeBaseInputPublic.projectId); + writer.writeCollectionOfPrimitiveValues("tags", apiUpdateKnowledgeBaseInputPublic.tags); + writer.writeStringValue("uuid", apiUpdateKnowledgeBaseInputPublic.uuid); + writer.writeAdditionalData(apiUpdateKnowledgeBaseInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateKnowledgeBaseOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateKnowledgeBaseOutput(writer, apiUpdateKnowledgeBaseOutput = {}, isSerializingDerivedType = false) { + if (!apiUpdateKnowledgeBaseOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("knowledge_base", apiUpdateKnowledgeBaseOutput.knowledgeBase, serializeApiKnowledgeBase); + writer.writeAdditionalData(apiUpdateKnowledgeBaseOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateLinkedAgentInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateLinkedAgentInputPublic(writer, apiUpdateLinkedAgentInputPublic = {}, isSerializingDerivedType = false) { + if (!apiUpdateLinkedAgentInputPublic || isSerializingDerivedType) { + return; + } + writer.writeStringValue("child_agent_uuid", apiUpdateLinkedAgentInputPublic.childAgentUuid); + writer.writeStringValue("if_case", apiUpdateLinkedAgentInputPublic.ifCase); + writer.writeStringValue("parent_agent_uuid", apiUpdateLinkedAgentInputPublic.parentAgentUuid); + writer.writeStringValue("route_name", apiUpdateLinkedAgentInputPublic.routeName); + writer.writeStringValue("uuid", apiUpdateLinkedAgentInputPublic.uuid); + writer.writeAdditionalData(apiUpdateLinkedAgentInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateLinkedAgentOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateLinkedAgentOutput(writer, apiUpdateLinkedAgentOutput = {}, isSerializingDerivedType = false) { + if (!apiUpdateLinkedAgentOutput || isSerializingDerivedType) { + return; + } + writer.writeStringValue("child_agent_uuid", apiUpdateLinkedAgentOutput.childAgentUuid); + writer.writeStringValue("parent_agent_uuid", apiUpdateLinkedAgentOutput.parentAgentUuid); + writer.writeBooleanValue("rollback", apiUpdateLinkedAgentOutput.rollback); + writer.writeStringValue("uuid", apiUpdateLinkedAgentOutput.uuid); + writer.writeAdditionalData(apiUpdateLinkedAgentOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateModelAPIKeyInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateModelAPIKeyInputPublic(writer, apiUpdateModelAPIKeyInputPublic = {}, isSerializingDerivedType = false) { + if (!apiUpdateModelAPIKeyInputPublic || isSerializingDerivedType) { + return; + } + writer.writeStringValue("api_key_uuid", apiUpdateModelAPIKeyInputPublic.apiKeyUuid); + writer.writeStringValue("name", apiUpdateModelAPIKeyInputPublic.name); + writer.writeAdditionalData(apiUpdateModelAPIKeyInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateModelAPIKeyOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateModelAPIKeyOutput(writer, apiUpdateModelAPIKeyOutput = {}, isSerializingDerivedType = false) { + if (!apiUpdateModelAPIKeyOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("api_key_info", apiUpdateModelAPIKeyOutput.apiKeyInfo, serializeApiModelAPIKeyInfo); + writer.writeAdditionalData(apiUpdateModelAPIKeyOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateOpenAIAPIKeyInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateOpenAIAPIKeyInputPublic(writer, apiUpdateOpenAIAPIKeyInputPublic = {}, isSerializingDerivedType = false) { + if (!apiUpdateOpenAIAPIKeyInputPublic || isSerializingDerivedType) { + return; + } + writer.writeStringValue("api_key", apiUpdateOpenAIAPIKeyInputPublic.apiKey); + writer.writeStringValue("api_key_uuid", apiUpdateOpenAIAPIKeyInputPublic.apiKeyUuid); + writer.writeStringValue("name", apiUpdateOpenAIAPIKeyInputPublic.name); + writer.writeAdditionalData(apiUpdateOpenAIAPIKeyInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateOpenAIAPIKeyOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateOpenAIAPIKeyOutput(writer, apiUpdateOpenAIAPIKeyOutput = {}, isSerializingDerivedType = false) { + if (!apiUpdateOpenAIAPIKeyOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("api_key_info", apiUpdateOpenAIAPIKeyOutput.apiKeyInfo, serializeApiOpenAIAPIKeyInfo); + writer.writeAdditionalData(apiUpdateOpenAIAPIKeyOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateWorkspaceInputPublic The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateWorkspaceInputPublic(writer, apiUpdateWorkspaceInputPublic = {}, isSerializingDerivedType = false) { + if (!apiUpdateWorkspaceInputPublic || isSerializingDerivedType) { + return; + } + writer.writeStringValue("description", apiUpdateWorkspaceInputPublic.description); + writer.writeStringValue("name", apiUpdateWorkspaceInputPublic.name); + writer.writeStringValue("workspace_uuid", apiUpdateWorkspaceInputPublic.workspaceUuid); + writer.writeAdditionalData(apiUpdateWorkspaceInputPublic.additionalData); +} +/** + * Serializes information the current object + * @param ApiUpdateWorkspaceOutput The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUpdateWorkspaceOutput(writer, apiUpdateWorkspaceOutput = {}, isSerializingDerivedType = false) { + if (!apiUpdateWorkspaceOutput || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("workspace", apiUpdateWorkspaceOutput.workspace, serializeApiWorkspace); + writer.writeAdditionalData(apiUpdateWorkspaceOutput.additionalData); +} +/** + * Serializes information the current object + * @param ApiUsageMeasurement The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiUsageMeasurement(writer, apiUsageMeasurement = {}, isSerializingDerivedType = false) { + if (!apiUsageMeasurement || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("tokens", apiUsageMeasurement.tokens); + writer.writeStringValue("usage_type", apiUsageMeasurement.usageType); + writer.writeAdditionalData(apiUsageMeasurement.additionalData); +} +/** + * Serializes information the current object + * @param ApiWebCrawlerDataSource The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiWebCrawlerDataSource(writer, apiWebCrawlerDataSource = {}, isSerializingDerivedType = false) { + if (!apiWebCrawlerDataSource || isSerializingDerivedType) { + return; + } + writer.writeStringValue("base_url", apiWebCrawlerDataSource.baseUrl); + writer.writeEnumValue("crawling_option", apiWebCrawlerDataSource.crawlingOption ?? ApiCrawlingOptionObject.UNKNOWN); + writer.writeBooleanValue("embed_media", apiWebCrawlerDataSource.embedMedia); + writer.writeCollectionOfPrimitiveValues("exclude_tags", apiWebCrawlerDataSource.excludeTags); + writer.writeAdditionalData(apiWebCrawlerDataSource.additionalData); +} +/** + * Serializes information the current object + * @param ApiWorkspace The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApiWorkspace(writer, apiWorkspace = {}, isSerializingDerivedType = false) { + if (!apiWorkspace || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("agents", apiWorkspace.agents, serializeApiAgent); + writer.writeDateValue("created_at", apiWorkspace.createdAt); + writer.writeStringValue("created_by", apiWorkspace.createdBy); + writer.writeStringValue("created_by_email", apiWorkspace.createdByEmail); + writer.writeDateValue("deleted_at", apiWorkspace.deletedAt); + writer.writeStringValue("description", apiWorkspace.description); + writer.writeCollectionOfObjectValues("evaluation_test_cases", apiWorkspace.evaluationTestCases, serializeApiEvaluationTestCase); + writer.writeStringValue("name", apiWorkspace.name); + writer.writeDateValue("updated_at", apiWorkspace.updatedAt); + writer.writeStringValue("uuid", apiWorkspace.uuid); + writer.writeAdditionalData(apiWorkspace.additionalData); +} +/** + * Serializes information the current object + * @param App The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp(writer, app = {}, isSerializingDerivedType = false) { + if (!app || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("active_deployment", app.activeDeployment, serializeApps_deployment); + writer.writeObjectValue("in_progress_deployment", app.inProgressDeployment, serializeApps_deployment); + writer.writeObjectValue("pending_deployment", app.pendingDeployment, serializeApps_deployment); + writer.writeObjectValue("pinned_deployment", app.pinnedDeployment, serializeApps_deployment); + writer.writeObjectValue("region", app.region, serializeApps_region); + writer.writeObjectValue("spec", app.spec, serializeApp_spec); + writer.writeAdditionalData(app.additionalData); +} +/** + * Serializes information the current object + * @param App_alert The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_alert(writer, app_alert = {}, isSerializingDerivedType = false) { + if (!app_alert || isSerializingDerivedType) { + return; + } + writer.writeStringValue("component_name", app_alert.componentName); + writer.writeCollectionOfPrimitiveValues("emails", app_alert.emails); + writer.writeEnumValue("phase", app_alert.phase ?? App_alert_phaseObject.UNKNOWN); + writer.writeObjectValue("progress", app_alert.progress, serializeApp_alert_progress); + writer.writeCollectionOfObjectValues("slack_webhooks", app_alert.slackWebhooks, serializeApp_alert_slack_webhook); + writer.writeObjectValue("spec", app_alert.spec, serializeApp_alert_spec); + writer.writeAdditionalData(app_alert.additionalData); +} +/** + * Serializes information the current object + * @param App_alert_progress The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_alert_progress(writer, app_alert_progress = {}, isSerializingDerivedType = false) { + if (!app_alert_progress || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("steps", app_alert_progress.steps, serializeApp_alert_progress_step); + writer.writeAdditionalData(app_alert_progress.additionalData); +} +/** + * Serializes information the current object + * @param App_alert_progress_step The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_alert_progress_step(writer, app_alert_progress_step = {}, isSerializingDerivedType = false) { + if (!app_alert_progress_step || isSerializingDerivedType) { + return; + } + writer.writeDateValue("ended_at", app_alert_progress_step.endedAt); + writer.writeStringValue("name", app_alert_progress_step.name); + writer.writeObjectValue("reason", app_alert_progress_step.reason, serializeApp_alert_progress_step_reason); + writer.writeDateValue("started_at", app_alert_progress_step.startedAt); + writer.writeEnumValue("status", app_alert_progress_step.status ?? App_alert_progress_step_statusObject.UNKNOWN); + writer.writeAdditionalData(app_alert_progress_step.additionalData); +} +/** + * Serializes information the current object + * @param App_alert_progress_step_reason The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_alert_progress_step_reason(writer, app_alert_progress_step_reason = {}, isSerializingDerivedType = false) { + if (!app_alert_progress_step_reason || isSerializingDerivedType) { + return; + } + writer.writeStringValue("code", app_alert_progress_step_reason.code); + writer.writeStringValue("message", app_alert_progress_step_reason.message); + writer.writeAdditionalData(app_alert_progress_step_reason.additionalData); +} +/** + * Serializes information the current object + * @param App_alert_slack_webhook The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_alert_slack_webhook(writer, app_alert_slack_webhook = {}, isSerializingDerivedType = false) { + if (!app_alert_slack_webhook || isSerializingDerivedType) { + return; + } + writer.writeStringValue("channel", app_alert_slack_webhook.channel); + writer.writeStringValue("url", app_alert_slack_webhook.url); + writer.writeAdditionalData(app_alert_slack_webhook.additionalData); +} +/** + * Serializes information the current object + * @param App_alert_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_alert_spec(writer, app_alert_spec = {}, isSerializingDerivedType = false) { + if (!app_alert_spec || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("disabled", app_alert_spec.disabled); + writer.writeEnumValue("operator", app_alert_spec.operator ?? App_alert_spec_operatorObject.UNSPECIFIED_OPERATOR); + writer.writeEnumValue("rule", app_alert_spec.rule ?? App_alert_spec_ruleObject.UNSPECIFIED_RULE); + writer.writeNumberValue("value", app_alert_spec.value); + writer.writeEnumValue("window", app_alert_spec.window ?? App_alert_spec_windowObject.UNSPECIFIED_WINDOW); + writer.writeAdditionalData(app_alert_spec.additionalData); +} +/** + * Serializes information the current object + * @param App_component_base The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_component_base(writer, app_component_base = {}, isSerializingDerivedType = false) { + if (!app_component_base || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("bitbucket", app_component_base.bitbucket, serializeApps_bitbucket_source_spec); + writer.writeStringValue("build_command", app_component_base.buildCommand); + writer.writeStringValue("dockerfile_path", app_component_base.dockerfilePath); + writer.writeStringValue("environment_slug", app_component_base.environmentSlug); + writer.writeCollectionOfObjectValues("envs", app_component_base.envs, serializeApp_variable_definition); + writer.writeObjectValue("git", app_component_base.git, serializeApps_git_source_spec); + writer.writeObjectValue("github", app_component_base.github, serializeApps_github_source_spec); + writer.writeObjectValue("gitlab", app_component_base.gitlab, serializeApps_gitlab_source_spec); + writer.writeObjectValue("image", app_component_base.image, serializeApps_image_source_spec); + writer.writeCollectionOfObjectValues("log_destinations", app_component_base.logDestinations, serializeApp_log_destination_definition); + writer.writeStringValue("name", app_component_base.name); + writer.writeStringValue("run_command", app_component_base.runCommand); + writer.writeStringValue("source_dir", app_component_base.sourceDir); + writer.writeAdditionalData(app_component_base.additionalData); +} +/** + * Serializes information the current object + * @param App_component_health The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_component_health(writer, app_component_health = {}, isSerializingDerivedType = false) { + if (!app_component_health || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("cpu_usage_percent", app_component_health.cpuUsagePercent); + writer.writeNumberValue("memory_usage_percent", app_component_health.memoryUsagePercent); + writer.writeStringValue("name", app_component_health.name); + writer.writeNumberValue("replicas_desired", app_component_health.replicasDesired); + writer.writeNumberValue("replicas_ready", app_component_health.replicasReady); + writer.writeEnumValue("state", app_component_health.state ?? App_component_health_stateObject.UNKNOWN); + writer.writeAdditionalData(app_component_health.additionalData); +} +/** + * Serializes information the current object + * @param App_database_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_database_spec(writer, app_database_spec = {}, isSerializingDerivedType = false) { + if (!app_database_spec || isSerializingDerivedType) { + return; + } + writer.writeStringValue("cluster_name", app_database_spec.clusterName); + writer.writeStringValue("db_name", app_database_spec.dbName); + writer.writeStringValue("db_user", app_database_spec.dbUser); + writer.writeEnumValue("engine", app_database_spec.engine ?? App_database_spec_engineObject.UNSET); + writer.writeStringValue("name", app_database_spec.name); + writer.writeBooleanValue("production", app_database_spec.production); + writer.writeStringValue("version", app_database_spec.version); + writer.writeAdditionalData(app_database_spec.additionalData); +} +/** + * Serializes information the current object + * @param App_domain_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_domain_spec(writer, app_domain_spec = {}, isSerializingDerivedType = false) { + if (!app_domain_spec || isSerializingDerivedType) { + return; + } + writer.writeStringValue("domain", app_domain_spec.domain); + writer.writeEnumValue("minimum_tls_version", app_domain_spec.minimumTlsVersion); + writer.writeEnumValue("type", app_domain_spec.type ?? App_domain_spec_typeObject.UNSPECIFIED); + writer.writeBooleanValue("wildcard", app_domain_spec.wildcard); + writer.writeStringValue("zone", app_domain_spec.zone); + writer.writeAdditionalData(app_domain_spec.additionalData); +} +/** + * Serializes information the current object + * @param App_domain_validation The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_domain_validation(writer, app_domain_validation = {}, isSerializingDerivedType = false) { + if (!app_domain_validation || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(app_domain_validation.additionalData); +} +/** + * Serializes information the current object + * @param App_egress_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_egress_spec(writer, app_egress_spec = {}, isSerializingDerivedType = false) { + if (!app_egress_spec || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("type", app_egress_spec.type ?? App_egress_type_specObject.AUTOASSIGN); + writer.writeAdditionalData(app_egress_spec.additionalData); +} +/** + * Serializes information the current object + * @param App_functions_component_health The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_functions_component_health(writer, app_functions_component_health = {}, isSerializingDerivedType = false) { + if (!app_functions_component_health || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("functions_component_health_metrics", app_functions_component_health.functionsComponentHealthMetrics, serializeApp_functions_component_health_functions_component_health_metrics); + writer.writeStringValue("name", app_functions_component_health.name); + writer.writeAdditionalData(app_functions_component_health.additionalData); +} +/** + * Serializes information the current object + * @param App_functions_component_health_functions_component_health_metrics The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_functions_component_health_functions_component_health_metrics(writer, app_functions_component_health_functions_component_health_metrics = {}, isSerializingDerivedType = false) { + if (!app_functions_component_health_functions_component_health_metrics || isSerializingDerivedType) { + return; + } + writer.writeStringValue("metric_label", app_functions_component_health_functions_component_health_metrics.metricLabel); + writer.writeNumberValue("metric_value", app_functions_component_health_functions_component_health_metrics.metricValue); + writer.writeStringValue("time_window", app_functions_component_health_functions_component_health_metrics.timeWindow); + writer.writeAdditionalData(app_functions_component_health_functions_component_health_metrics.additionalData); +} +/** + * Serializes information the current object + * @param App_functions_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_functions_spec(writer, app_functions_spec = {}, isSerializingDerivedType = false) { + if (!app_functions_spec || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("alerts", app_functions_spec.alerts, serializeApp_alert_spec); + writer.writeObjectValue("bitbucket", app_functions_spec.bitbucket, serializeApps_bitbucket_source_spec); + writer.writeObjectValue("cors", app_functions_spec.cors, serializeApps_cors_policy); + writer.writeCollectionOfObjectValues("envs", app_functions_spec.envs, serializeApp_variable_definition); + writer.writeObjectValue("git", app_functions_spec.git, serializeApps_git_source_spec); + writer.writeObjectValue("github", app_functions_spec.github, serializeApps_github_source_spec); + writer.writeObjectValue("gitlab", app_functions_spec.gitlab, serializeApps_gitlab_source_spec); + writer.writeCollectionOfObjectValues("log_destinations", app_functions_spec.logDestinations, serializeApp_log_destination_definition); + writer.writeStringValue("name", app_functions_spec.name); + writer.writeCollectionOfObjectValues("routes", app_functions_spec.routes, serializeApp_route_spec); + writer.writeStringValue("source_dir", app_functions_spec.sourceDir); + writer.writeAdditionalData(app_functions_spec.additionalData); +} +/** + * Serializes information the current object + * @param App_health The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_health(writer, app_health = {}, isSerializingDerivedType = false) { + if (!app_health || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("components", app_health.components, serializeApp_component_health); + writer.writeCollectionOfObjectValues("functions_components", app_health.functionsComponents, serializeApp_functions_component_health); + writer.writeAdditionalData(app_health.additionalData); +} +/** + * Serializes information the current object + * @param App_health_check_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_health_check_spec(writer, app_health_check_spec = {}, isSerializingDerivedType = false) { + if (!app_health_check_spec || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("failure_threshold", app_health_check_spec.failureThreshold); + writer.writeStringValue("http_path", app_health_check_spec.httpPath); + writer.writeNumberValue("initial_delay_seconds", app_health_check_spec.initialDelaySeconds); + writer.writeNumberValue("period_seconds", app_health_check_spec.periodSeconds); + writer.writeNumberValue("port", app_health_check_spec.port); + writer.writeNumberValue("success_threshold", app_health_check_spec.successThreshold); + writer.writeNumberValue("timeout_seconds", app_health_check_spec.timeoutSeconds); + writer.writeAdditionalData(app_health_check_spec.additionalData); +} +/** + * Serializes information the current object + * @param App_health_response The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_health_response(writer, app_health_response = {}, isSerializingDerivedType = false) { + if (!app_health_response || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("app_health", app_health_response.appHealth, serializeApp_health); + writer.writeAdditionalData(app_health_response.additionalData); +} +/** + * Serializes information the current object + * @param App_ingress_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_ingress_spec(writer, app_ingress_spec = {}, isSerializingDerivedType = false) { + if (!app_ingress_spec || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("rules", app_ingress_spec.rules, serializeApp_ingress_spec_rule); + writer.writeAdditionalData(app_ingress_spec.additionalData); +} +/** + * Serializes information the current object + * @param App_ingress_spec_rule The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_ingress_spec_rule(writer, app_ingress_spec_rule = {}, isSerializingDerivedType = false) { + if (!app_ingress_spec_rule || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("component", app_ingress_spec_rule.component, serializeApp_ingress_spec_rule_routing_component); + writer.writeObjectValue("cors", app_ingress_spec_rule.cors, serializeApps_cors_policy); + writer.writeObjectValue("match", app_ingress_spec_rule.match, serializeApp_ingress_spec_rule_match); + writer.writeObjectValue("redirect", app_ingress_spec_rule.redirect, serializeApp_ingress_spec_rule_routing_redirect); + writer.writeAdditionalData(app_ingress_spec_rule.additionalData); +} +/** + * Serializes information the current object + * @param App_ingress_spec_rule_match The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_ingress_spec_rule_match(writer, app_ingress_spec_rule_match = {}, isSerializingDerivedType = false) { + if (!app_ingress_spec_rule_match || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("authority", app_ingress_spec_rule_match.authority, serializeApp_ingress_spec_rule_string_match_exact); + writer.writeObjectValue("path", app_ingress_spec_rule_match.path, serializeApp_ingress_spec_rule_string_match_prefix); + writer.writeAdditionalData(app_ingress_spec_rule_match.additionalData); +} +/** + * Serializes information the current object + * @param App_ingress_spec_rule_routing_component The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_ingress_spec_rule_routing_component(writer, app_ingress_spec_rule_routing_component = {}, isSerializingDerivedType = false) { + if (!app_ingress_spec_rule_routing_component || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", app_ingress_spec_rule_routing_component.name); + writer.writeStringValue("preserve_path_prefix", app_ingress_spec_rule_routing_component.preservePathPrefix); + writer.writeStringValue("rewrite", app_ingress_spec_rule_routing_component.rewrite); + writer.writeAdditionalData(app_ingress_spec_rule_routing_component.additionalData); +} +/** + * Serializes information the current object + * @param App_ingress_spec_rule_routing_redirect The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_ingress_spec_rule_routing_redirect(writer, app_ingress_spec_rule_routing_redirect = {}, isSerializingDerivedType = false) { + if (!app_ingress_spec_rule_routing_redirect || isSerializingDerivedType) { + return; + } + writer.writeStringValue("authority", app_ingress_spec_rule_routing_redirect.authority); + writer.writeNumberValue("port", app_ingress_spec_rule_routing_redirect.port); + writer.writeNumberValue("redirect_code", app_ingress_spec_rule_routing_redirect.redirectCode); + writer.writeStringValue("scheme", app_ingress_spec_rule_routing_redirect.scheme); + writer.writeStringValue("uri", app_ingress_spec_rule_routing_redirect.uri); + writer.writeAdditionalData(app_ingress_spec_rule_routing_redirect.additionalData); +} +/** + * Serializes information the current object + * @param App_ingress_spec_rule_string_match_exact The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_ingress_spec_rule_string_match_exact(writer, app_ingress_spec_rule_string_match_exact = {}, isSerializingDerivedType = false) { + if (!app_ingress_spec_rule_string_match_exact || isSerializingDerivedType) { + return; + } + writer.writeStringValue("exact", app_ingress_spec_rule_string_match_exact.exact); + writer.writeAdditionalData(app_ingress_spec_rule_string_match_exact.additionalData); +} +/** + * Serializes information the current object + * @param App_ingress_spec_rule_string_match_prefix The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_ingress_spec_rule_string_match_prefix(writer, app_ingress_spec_rule_string_match_prefix = {}, isSerializingDerivedType = false) { + if (!app_ingress_spec_rule_string_match_prefix || isSerializingDerivedType) { + return; + } + writer.writeStringValue("prefix", app_ingress_spec_rule_string_match_prefix.prefix); + writer.writeAdditionalData(app_ingress_spec_rule_string_match_prefix.additionalData); +} +/** + * Serializes information the current object + * @param App_instance The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_instance(writer, app_instance = {}, isSerializingDerivedType = false) { + if (!app_instance || isSerializingDerivedType) { + return; + } + writer.writeStringValue("component_name", app_instance.componentName); + writer.writeEnumValue("component_type", app_instance.componentType); + writer.writeStringValue("instance_alias", app_instance.instanceAlias); + writer.writeStringValue("instance_name", app_instance.instanceName); + writer.writeAdditionalData(app_instance.additionalData); +} +/** + * Serializes information the current object + * @param App_instances The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_instances(writer, app_instances = {}, isSerializingDerivedType = false) { + if (!app_instances || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("instances", app_instances.instances, serializeApp_instance); + writer.writeAdditionalData(app_instances.additionalData); +} +/** + * Serializes information the current object + * @param App_job_invocation The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_job_invocation(writer, app_job_invocation = {}, isSerializingDerivedType = false) { + if (!app_job_invocation || isSerializingDerivedType) { + return; + } + writer.writeDateValue("completed_at", app_job_invocation.completedAt); + writer.writeDateValue("created_at", app_job_invocation.createdAt); + writer.writeStringValue("deployment_id", app_job_invocation.deploymentId); + writer.writeStringValue("id", app_job_invocation.id); + writer.writeStringValue("job_name", app_job_invocation.jobName); + writer.writeEnumValue("phase", app_job_invocation.phase); + writer.writeDateValue("started_at", app_job_invocation.startedAt); + writer.writeObjectValue("trigger", app_job_invocation.trigger, serializeApp_job_invocation_trigger); + writer.writeAdditionalData(app_job_invocation.additionalData); +} +/** + * Serializes information the current object + * @param App_job_invocation_trigger The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_job_invocation_trigger(writer, app_job_invocation_trigger = {}, isSerializingDerivedType = false) { + if (!app_job_invocation_trigger || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("manual", app_job_invocation_trigger.manual, serializeApp_job_invocation_trigger_manual); + writer.writeObjectValue("scheduled", app_job_invocation_trigger.scheduled, serializeApp_job_invocation_trigger_scheduled); + writer.writeEnumValue("type", app_job_invocation_trigger.type ?? App_job_invocation_trigger_typeObject.UNKNOWN); + writer.writeAdditionalData(app_job_invocation_trigger.additionalData); +} +/** + * Serializes information the current object + * @param App_job_invocation_trigger_manual The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_job_invocation_trigger_manual(writer, app_job_invocation_trigger_manual = {}, isSerializingDerivedType = false) { + if (!app_job_invocation_trigger_manual || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("user", app_job_invocation_trigger_manual.user, serializeApp_job_invocation_trigger_manual_user); + writer.writeAdditionalData(app_job_invocation_trigger_manual.additionalData); +} +/** + * Serializes information the current object + * @param App_job_invocation_trigger_manual_user The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_job_invocation_trigger_manual_user(writer, app_job_invocation_trigger_manual_user = {}, isSerializingDerivedType = false) { + if (!app_job_invocation_trigger_manual_user || isSerializingDerivedType) { + return; + } + writer.writeStringValue("email", app_job_invocation_trigger_manual_user.email); + writer.writeStringValue("full_name", app_job_invocation_trigger_manual_user.fullName); + writer.writeStringValue("uuid", app_job_invocation_trigger_manual_user.uuid); + writer.writeAdditionalData(app_job_invocation_trigger_manual_user.additionalData); +} +/** + * Serializes information the current object + * @param App_job_invocation_trigger_scheduled The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_job_invocation_trigger_scheduled(writer, app_job_invocation_trigger_scheduled = {}, isSerializingDerivedType = false) { + if (!app_job_invocation_trigger_scheduled || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("schedule", app_job_invocation_trigger_scheduled.schedule, serializeApp_job_invocation_trigger_scheduled_schedule); + writer.writeAdditionalData(app_job_invocation_trigger_scheduled.additionalData); +} +/** + * Serializes information the current object + * @param App_job_invocation_trigger_scheduled_schedule The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_job_invocation_trigger_scheduled_schedule(writer, app_job_invocation_trigger_scheduled_schedule = {}, isSerializingDerivedType = false) { + if (!app_job_invocation_trigger_scheduled_schedule || isSerializingDerivedType) { + return; + } + writer.writeStringValue("cron", app_job_invocation_trigger_scheduled_schedule.cron); + writer.writeStringValue("time_zone", app_job_invocation_trigger_scheduled_schedule.timeZone); + writer.writeAdditionalData(app_job_invocation_trigger_scheduled_schedule.additionalData); +} +/** + * Serializes information the current object + * @param App_job_invocations The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_job_invocations(writer, app_job_invocations = {}, isSerializingDerivedType = false) { + if (!app_job_invocations || isSerializingDerivedType) { + return; + } + serializePagination(writer, app_job_invocations, isSerializingDerivedType); + writer.writeCollectionOfObjectValues("job_invocations", app_job_invocations.jobInvocations, serializeApp_job_invocation); +} +/** + * Serializes information the current object + * @param App_job_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_job_spec(writer, app_job_spec = {}, isSerializingDerivedType = false) { + if (!app_job_spec || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("autoscaling", app_job_spec.autoscaling, serializeApp_job_spec_autoscaling); + writer.writeObjectValue("bitbucket", app_job_spec.bitbucket, serializeApps_bitbucket_source_spec); + writer.writeStringValue("build_command", app_job_spec.buildCommand); + writer.writeStringValue("dockerfile_path", app_job_spec.dockerfilePath); + writer.writeStringValue("environment_slug", app_job_spec.environmentSlug); + writer.writeCollectionOfObjectValues("envs", app_job_spec.envs, serializeApp_variable_definition); + writer.writeObjectValue("git", app_job_spec.git, serializeApps_git_source_spec); + writer.writeObjectValue("github", app_job_spec.github, serializeApps_github_source_spec); + writer.writeObjectValue("gitlab", app_job_spec.gitlab, serializeApps_gitlab_source_spec); + writer.writeObjectValue("image", app_job_spec.image, serializeApps_image_source_spec); + writer.writeNumberValue("instance_count", app_job_spec.instanceCount); + if (typeof app_job_spec.instanceSizeSlug === "string") { + writer.writeStringValue("instance_size_slug", app_job_spec.instanceSizeSlug); + } + writer.writeEnumValue("kind", app_job_spec.kind ?? App_job_spec_kindObject.UNSPECIFIED); + writer.writeCollectionOfObjectValues("log_destinations", app_job_spec.logDestinations, serializeApp_log_destination_definition); + writer.writeStringValue("name", app_job_spec.name); + writer.writeStringValue("run_command", app_job_spec.runCommand); + writer.writeStringValue("source_dir", app_job_spec.sourceDir); + writer.writeObjectValue("termination", app_job_spec.termination, serializeApp_job_spec_termination); + writer.writeAdditionalData(app_job_spec.additionalData); +} +/** + * Serializes information the current object + * @param App_job_spec_autoscaling The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_job_spec_autoscaling(writer, app_job_spec_autoscaling = {}, isSerializingDerivedType = false) { + if (!app_job_spec_autoscaling || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("max_instance_count", app_job_spec_autoscaling.maxInstanceCount); + writer.writeObjectValue("metrics", app_job_spec_autoscaling.metrics, serializeApp_job_spec_autoscaling_metrics); + writer.writeNumberValue("min_instance_count", app_job_spec_autoscaling.minInstanceCount); + writer.writeAdditionalData(app_job_spec_autoscaling.additionalData); +} +/** + * Serializes information the current object + * @param App_job_spec_autoscaling_metrics The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_job_spec_autoscaling_metrics(writer, app_job_spec_autoscaling_metrics = {}, isSerializingDerivedType = false) { + if (!app_job_spec_autoscaling_metrics || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("cpu", app_job_spec_autoscaling_metrics.cpu, serializeApp_job_spec_autoscaling_metrics_cpu); + writer.writeAdditionalData(app_job_spec_autoscaling_metrics.additionalData); +} +/** + * Serializes information the current object + * @param App_job_spec_autoscaling_metrics_cpu The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_job_spec_autoscaling_metrics_cpu(writer, app_job_spec_autoscaling_metrics_cpu = {}, isSerializingDerivedType = false) { + if (!app_job_spec_autoscaling_metrics_cpu || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("percent", app_job_spec_autoscaling_metrics_cpu.percent); + writer.writeAdditionalData(app_job_spec_autoscaling_metrics_cpu.additionalData); +} +/** + * Serializes information the current object + * @param App_job_spec_instance_size_slug The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param key The name of the property to write in the serialization. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_job_spec_instance_size_slug(writer, key, app_job_spec_instance_size_slug, isSerializingDerivedType = false) { + if (app_job_spec_instance_size_slug === undefined || app_job_spec_instance_size_slug === null) + return; + if (typeof app_job_spec_instance_size_slug === "string") { + writer.writeStringValue(undefined, app_job_spec_instance_size_slug); + } +} +/** + * Serializes information the current object + * @param App_job_spec_termination The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_job_spec_termination(writer, app_job_spec_termination = {}, isSerializingDerivedType = false) { + if (!app_job_spec_termination || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("grace_period_seconds", app_job_spec_termination.gracePeriodSeconds); + writer.writeAdditionalData(app_job_spec_termination.additionalData); +} +/** + * Serializes information the current object + * @param App_log_destination_datadog_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_log_destination_datadog_spec(writer, app_log_destination_datadog_spec = {}, isSerializingDerivedType = false) { + if (!app_log_destination_datadog_spec || isSerializingDerivedType) { + return; + } + writer.writeStringValue("api_key", app_log_destination_datadog_spec.apiKey); + writer.writeStringValue("endpoint", app_log_destination_datadog_spec.endpoint); + writer.writeAdditionalData(app_log_destination_datadog_spec.additionalData); +} +/** + * Serializes information the current object + * @param App_log_destination_definition The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_log_destination_definition(writer, app_log_destination_definition = {}, isSerializingDerivedType = false) { + if (!app_log_destination_definition || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("datadog", app_log_destination_definition.datadog, serializeApp_log_destination_datadog_spec); + writer.writeObjectValue("logtail", app_log_destination_definition.logtail, serializeApp_log_destination_logtail_spec); + writer.writeStringValue("name", app_log_destination_definition.name); + writer.writeObjectValue("open_search", app_log_destination_definition.openSearch, serializeApp_log_destination_open_search_spec); + writer.writeObjectValue("papertrail", app_log_destination_definition.papertrail, serializeApp_log_destination_papertrail_spec); + writer.writeAdditionalData(app_log_destination_definition.additionalData); +} +/** + * Serializes information the current object + * @param App_log_destination_logtail_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_log_destination_logtail_spec(writer, app_log_destination_logtail_spec = {}, isSerializingDerivedType = false) { + if (!app_log_destination_logtail_spec || isSerializingDerivedType) { + return; + } + writer.writeStringValue("token", app_log_destination_logtail_spec.token); + writer.writeAdditionalData(app_log_destination_logtail_spec.additionalData); +} +/** + * Serializes information the current object + * @param App_log_destination_open_search_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_log_destination_open_search_spec(writer, app_log_destination_open_search_spec = {}, isSerializingDerivedType = false) { + if (!app_log_destination_open_search_spec || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("basic_auth", app_log_destination_open_search_spec.basicAuth, serializeApp_log_destination_open_search_spec_basic_auth); + writer.writeStringValue("cluster_name", app_log_destination_open_search_spec.clusterName); + writer.writeStringValue("endpoint", app_log_destination_open_search_spec.endpoint); + writer.writeStringValue("index_name", app_log_destination_open_search_spec.indexName ?? "logs"); + writer.writeAdditionalData(app_log_destination_open_search_spec.additionalData); +} +/** + * Serializes information the current object + * @param App_log_destination_open_search_spec_basic_auth The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_log_destination_open_search_spec_basic_auth(writer, app_log_destination_open_search_spec_basic_auth = {}, isSerializingDerivedType = false) { + if (!app_log_destination_open_search_spec_basic_auth || isSerializingDerivedType) { + return; + } + writer.writeStringValue("password", app_log_destination_open_search_spec_basic_auth.password); + writer.writeStringValue("user", app_log_destination_open_search_spec_basic_auth.user); + writer.writeAdditionalData(app_log_destination_open_search_spec_basic_auth.additionalData); +} +/** + * Serializes information the current object + * @param App_log_destination_papertrail_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_log_destination_papertrail_spec(writer, app_log_destination_papertrail_spec = {}, isSerializingDerivedType = false) { + if (!app_log_destination_papertrail_spec || isSerializingDerivedType) { + return; + } + writer.writeStringValue("endpoint", app_log_destination_papertrail_spec.endpoint); + writer.writeAdditionalData(app_log_destination_papertrail_spec.additionalData); +} +/** + * Serializes information the current object + * @param App_maintenance_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_maintenance_spec(writer, app_maintenance_spec = {}, isSerializingDerivedType = false) { + if (!app_maintenance_spec || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("archive", app_maintenance_spec.archive); + writer.writeBooleanValue("enabled", app_maintenance_spec.enabled); + writer.writeStringValue("offline_page_url", app_maintenance_spec.offlinePageUrl); + writer.writeAdditionalData(app_maintenance_spec.additionalData); +} +/** + * Serializes information the current object + * @param App_metrics_bandwidth_usage The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_metrics_bandwidth_usage(writer, app_metrics_bandwidth_usage = {}, isSerializingDerivedType = false) { + if (!app_metrics_bandwidth_usage || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("app_bandwidth_usage", app_metrics_bandwidth_usage.appBandwidthUsage, serializeApp_metrics_bandwidth_usage_details); + writer.writeDateValue("date", app_metrics_bandwidth_usage.date); + writer.writeAdditionalData(app_metrics_bandwidth_usage.additionalData); +} +/** + * Serializes information the current object + * @param App_metrics_bandwidth_usage_details The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_metrics_bandwidth_usage_details(writer, app_metrics_bandwidth_usage_details = {}, isSerializingDerivedType = false) { + if (!app_metrics_bandwidth_usage_details || isSerializingDerivedType) { + return; + } + writer.writeStringValue("app_id", app_metrics_bandwidth_usage_details.appId); + writer.writeStringValue("bandwidth_bytes", app_metrics_bandwidth_usage_details.bandwidthBytes); + writer.writeAdditionalData(app_metrics_bandwidth_usage_details.additionalData); +} +/** + * Serializes information the current object + * @param App_metrics_bandwidth_usage_request The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_metrics_bandwidth_usage_request(writer, app_metrics_bandwidth_usage_request = {}, isSerializingDerivedType = false) { + if (!app_metrics_bandwidth_usage_request || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("app_ids", app_metrics_bandwidth_usage_request.appIds); + writer.writeDateValue("date", app_metrics_bandwidth_usage_request.date); + writer.writeAdditionalData(app_metrics_bandwidth_usage_request.additionalData); +} +/** + * Serializes information the current object + * @param App_propose The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_propose(writer, app_propose = {}, isSerializingDerivedType = false) { + if (!app_propose || isSerializingDerivedType) { + return; + } + writer.writeStringValue("app_id", app_propose.appId); + writer.writeObjectValue("spec", app_propose.spec, serializeApp_spec); + writer.writeAdditionalData(app_propose.additionalData); +} +/** + * Serializes information the current object + * @param App_propose_response The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_propose_response(writer, app_propose_response = {}, isSerializingDerivedType = false) { + if (!app_propose_response || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("app_cost", app_propose_response.appCost); + writer.writeBooleanValue("app_is_static", app_propose_response.appIsStatic); + writer.writeBooleanValue("app_name_available", app_propose_response.appNameAvailable); + writer.writeStringValue("app_name_suggestion", app_propose_response.appNameSuggestion); + writer.writeNumberValue("app_tier_downgrade_cost", app_propose_response.appTierDowngradeCost); + writer.writeStringValue("existing_static_apps", app_propose_response.existingStaticApps); + writer.writeObjectValue("spec", app_propose_response.spec, serializeApp_spec); + writer.writeAdditionalData(app_propose_response.additionalData); +} +/** + * Serializes information the current object + * @param App_response The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_response(writer, app_response = {}, isSerializingDerivedType = false) { + if (!app_response || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("app", app_response.app, serializeApp); + writer.writeAdditionalData(app_response.additionalData); +} +/** + * Serializes information the current object + * @param App_rollback_validation_condition The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_rollback_validation_condition(writer, app_rollback_validation_condition = {}, isSerializingDerivedType = false) { + if (!app_rollback_validation_condition || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("code", app_rollback_validation_condition.code); + writer.writeCollectionOfPrimitiveValues("components", app_rollback_validation_condition.components); + writer.writeStringValue("message", app_rollback_validation_condition.message); + writer.writeAdditionalData(app_rollback_validation_condition.additionalData); +} +/** + * Serializes information the current object + * @param App_route_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_route_spec(writer, app_route_spec = {}, isSerializingDerivedType = false) { + if (!app_route_spec || isSerializingDerivedType) { + return; + } + writer.writeStringValue("path", app_route_spec.path); + writer.writeBooleanValue("preserve_path_prefix", app_route_spec.preservePathPrefix); + writer.writeAdditionalData(app_route_spec.additionalData); +} +/** + * Serializes information the current object + * @param App_service_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_service_spec(writer, app_service_spec = {}, isSerializingDerivedType = false) { + if (!app_service_spec || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("autoscaling", app_service_spec.autoscaling, serializeApp_service_spec_autoscaling); + writer.writeObjectValue("bitbucket", app_service_spec.bitbucket, serializeApps_bitbucket_source_spec); + writer.writeStringValue("build_command", app_service_spec.buildCommand); + writer.writeObjectValue("cors", app_service_spec.cors, serializeApps_cors_policy); + writer.writeStringValue("dockerfile_path", app_service_spec.dockerfilePath); + writer.writeStringValue("environment_slug", app_service_spec.environmentSlug); + writer.writeCollectionOfObjectValues("envs", app_service_spec.envs, serializeApp_variable_definition); + writer.writeObjectValue("git", app_service_spec.git, serializeApps_git_source_spec); + writer.writeObjectValue("github", app_service_spec.github, serializeApps_github_source_spec); + writer.writeObjectValue("gitlab", app_service_spec.gitlab, serializeApps_gitlab_source_spec); + writer.writeObjectValue("health_check", app_service_spec.healthCheck, serializeApp_service_spec_health_check); + writer.writeNumberValue("http_port", app_service_spec.httpPort); + writer.writeObjectValue("image", app_service_spec.image, serializeApps_image_source_spec); + writer.writeNumberValue("instance_count", app_service_spec.instanceCount); + if (typeof app_service_spec.instanceSizeSlug === "string") { + writer.writeStringValue("instance_size_slug", app_service_spec.instanceSizeSlug); + } + writer.writeCollectionOfPrimitiveValues("internal_ports", app_service_spec.internalPorts); + writer.writeObjectValue("liveness_health_check", app_service_spec.livenessHealthCheck, serializeApp_health_check_spec); + writer.writeCollectionOfObjectValues("log_destinations", app_service_spec.logDestinations, serializeApp_log_destination_definition); + writer.writeStringValue("name", app_service_spec.name); + writer.writeEnumValue("protocol", app_service_spec.protocol); + writer.writeCollectionOfObjectValues("routes", app_service_spec.routes, serializeApp_route_spec); + writer.writeStringValue("run_command", app_service_spec.runCommand); + writer.writeStringValue("source_dir", app_service_spec.sourceDir); + writer.writeObjectValue("termination", app_service_spec.termination, serializeApp_service_spec_termination); + writer.writeAdditionalData(app_service_spec.additionalData); +} +/** + * Serializes information the current object + * @param App_service_spec_autoscaling The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_service_spec_autoscaling(writer, app_service_spec_autoscaling = {}, isSerializingDerivedType = false) { + if (!app_service_spec_autoscaling || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("max_instance_count", app_service_spec_autoscaling.maxInstanceCount); + writer.writeObjectValue("metrics", app_service_spec_autoscaling.metrics, serializeApp_service_spec_autoscaling_metrics); + writer.writeNumberValue("min_instance_count", app_service_spec_autoscaling.minInstanceCount); + writer.writeAdditionalData(app_service_spec_autoscaling.additionalData); +} +/** + * Serializes information the current object + * @param App_service_spec_autoscaling_metrics The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_service_spec_autoscaling_metrics(writer, app_service_spec_autoscaling_metrics = {}, isSerializingDerivedType = false) { + if (!app_service_spec_autoscaling_metrics || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("cpu", app_service_spec_autoscaling_metrics.cpu, serializeApp_service_spec_autoscaling_metrics_cpu); + writer.writeAdditionalData(app_service_spec_autoscaling_metrics.additionalData); +} +/** + * Serializes information the current object + * @param App_service_spec_autoscaling_metrics_cpu The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_service_spec_autoscaling_metrics_cpu(writer, app_service_spec_autoscaling_metrics_cpu = {}, isSerializingDerivedType = false) { + if (!app_service_spec_autoscaling_metrics_cpu || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("percent", app_service_spec_autoscaling_metrics_cpu.percent); + writer.writeAdditionalData(app_service_spec_autoscaling_metrics_cpu.additionalData); +} +/** + * Serializes information the current object + * @param App_service_spec_health_check The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_service_spec_health_check(writer, app_service_spec_health_check = {}, isSerializingDerivedType = false) { + if (!app_service_spec_health_check || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("failure_threshold", app_service_spec_health_check.failureThreshold); + writer.writeStringValue("http_path", app_service_spec_health_check.httpPath); + writer.writeNumberValue("initial_delay_seconds", app_service_spec_health_check.initialDelaySeconds); + writer.writeNumberValue("period_seconds", app_service_spec_health_check.periodSeconds); + writer.writeNumberValue("port", app_service_spec_health_check.port); + writer.writeNumberValue("success_threshold", app_service_spec_health_check.successThreshold); + writer.writeNumberValue("timeout_seconds", app_service_spec_health_check.timeoutSeconds); + writer.writeAdditionalData(app_service_spec_health_check.additionalData); +} +/** + * Serializes information the current object + * @param App_service_spec_instance_size_slug The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param key The name of the property to write in the serialization. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_service_spec_instance_size_slug(writer, key, app_service_spec_instance_size_slug, isSerializingDerivedType = false) { + if (app_service_spec_instance_size_slug === undefined || app_service_spec_instance_size_slug === null) + return; + if (typeof app_service_spec_instance_size_slug === "string") { + writer.writeStringValue(undefined, app_service_spec_instance_size_slug); + } +} +/** + * Serializes information the current object + * @param App_service_spec_termination The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_service_spec_termination(writer, app_service_spec_termination = {}, isSerializingDerivedType = false) { + if (!app_service_spec_termination || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("drain_seconds", app_service_spec_termination.drainSeconds); + writer.writeNumberValue("grace_period_seconds", app_service_spec_termination.gracePeriodSeconds); + writer.writeAdditionalData(app_service_spec_termination.additionalData); +} +/** + * Serializes information the current object + * @param App_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_spec(writer, app_spec = {}, isSerializingDerivedType = false) { + if (!app_spec || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("databases", app_spec.databases, serializeApp_database_spec); + writer.writeBooleanValue("disable_edge_cache", app_spec.disableEdgeCache); + writer.writeBooleanValue("disable_email_obfuscation", app_spec.disableEmailObfuscation); + writer.writeCollectionOfObjectValues("domains", app_spec.domains, serializeApp_domain_spec); + writer.writeObjectValue("egress", app_spec.egress, serializeApp_egress_spec); + writer.writeBooleanValue("enhanced_threat_control_enabled", app_spec.enhancedThreatControlEnabled); + writer.writeCollectionOfObjectValues("functions", app_spec.functions, serializeApp_functions_spec); + writer.writeObjectValue("ingress", app_spec.ingress, serializeApp_ingress_spec); + writer.writeCollectionOfObjectValues("jobs", app_spec.jobs, serializeApp_job_spec); + writer.writeObjectValue("maintenance", app_spec.maintenance, serializeApp_maintenance_spec); + writer.writeStringValue("name", app_spec.name); + writer.writeEnumValue("region", app_spec.region); + writer.writeCollectionOfObjectValues("services", app_spec.services, serializeApp_service_spec); + writer.writeCollectionOfObjectValues("static_sites", app_spec.staticSites, serializeApp_static_site_spec); + writer.writeCollectionOfObjectValues("workers", app_spec.workers, serializeApp_worker_spec); + writer.writeAdditionalData(app_spec.additionalData); +} +/** + * Serializes information the current object + * @param App_static_site_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_static_site_spec(writer, app_static_site_spec = {}, isSerializingDerivedType = false) { + if (!app_static_site_spec || isSerializingDerivedType) { + return; + } + serializeApp_component_base(writer, app_static_site_spec, isSerializingDerivedType); + writer.writeStringValue("catchall_document", app_static_site_spec.catchallDocument); + writer.writeObjectValue("cors", app_static_site_spec.cors, serializeApps_cors_policy); + writer.writeStringValue("error_document", app_static_site_spec.errorDocument ?? "404.html"); + writer.writeStringValue("index_document", app_static_site_spec.indexDocument ?? "index.html"); + writer.writeStringValue("output_dir", app_static_site_spec.outputDir); + writer.writeCollectionOfObjectValues("routes", app_static_site_spec.routes, serializeApp_route_spec); +} +/** + * Serializes information the current object + * @param App_variable_definition The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_variable_definition(writer, app_variable_definition = {}, isSerializingDerivedType = false) { + if (!app_variable_definition || isSerializingDerivedType) { + return; + } + writer.writeStringValue("key", app_variable_definition.key); + writer.writeEnumValue("scope", app_variable_definition.scope ?? App_variable_definition_scopeObject.RUN_AND_BUILD_TIME); + writer.writeEnumValue("type", app_variable_definition.type ?? App_variable_definition_typeObject.GENERAL); + writer.writeStringValue("value", app_variable_definition.value); + writer.writeAdditionalData(app_variable_definition.additionalData); +} +/** + * Serializes information the current object + * @param App_worker_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_worker_spec(writer, app_worker_spec = {}, isSerializingDerivedType = false) { + if (!app_worker_spec || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("autoscaling", app_worker_spec.autoscaling, serializeApp_worker_spec_autoscaling); + writer.writeObjectValue("bitbucket", app_worker_spec.bitbucket, serializeApps_bitbucket_source_spec); + writer.writeStringValue("build_command", app_worker_spec.buildCommand); + writer.writeStringValue("dockerfile_path", app_worker_spec.dockerfilePath); + writer.writeStringValue("environment_slug", app_worker_spec.environmentSlug); + writer.writeCollectionOfObjectValues("envs", app_worker_spec.envs, serializeApp_variable_definition); + writer.writeObjectValue("git", app_worker_spec.git, serializeApps_git_source_spec); + writer.writeObjectValue("github", app_worker_spec.github, serializeApps_github_source_spec); + writer.writeObjectValue("gitlab", app_worker_spec.gitlab, serializeApps_gitlab_source_spec); + writer.writeObjectValue("image", app_worker_spec.image, serializeApps_image_source_spec); + writer.writeNumberValue("instance_count", app_worker_spec.instanceCount); + if (typeof app_worker_spec.instanceSizeSlug === "string") { + writer.writeStringValue("instance_size_slug", app_worker_spec.instanceSizeSlug); + } + writer.writeObjectValue("liveness_health_check", app_worker_spec.livenessHealthCheck, serializeApp_health_check_spec); + writer.writeCollectionOfObjectValues("log_destinations", app_worker_spec.logDestinations, serializeApp_log_destination_definition); + writer.writeStringValue("name", app_worker_spec.name); + writer.writeStringValue("run_command", app_worker_spec.runCommand); + writer.writeStringValue("source_dir", app_worker_spec.sourceDir); + writer.writeObjectValue("termination", app_worker_spec.termination, serializeApp_worker_spec_termination); + writer.writeAdditionalData(app_worker_spec.additionalData); +} +/** + * Serializes information the current object + * @param App_worker_spec_autoscaling The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_worker_spec_autoscaling(writer, app_worker_spec_autoscaling = {}, isSerializingDerivedType = false) { + if (!app_worker_spec_autoscaling || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("max_instance_count", app_worker_spec_autoscaling.maxInstanceCount); + writer.writeObjectValue("metrics", app_worker_spec_autoscaling.metrics, serializeApp_worker_spec_autoscaling_metrics); + writer.writeNumberValue("min_instance_count", app_worker_spec_autoscaling.minInstanceCount); + writer.writeAdditionalData(app_worker_spec_autoscaling.additionalData); +} +/** + * Serializes information the current object + * @param App_worker_spec_autoscaling_metrics The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_worker_spec_autoscaling_metrics(writer, app_worker_spec_autoscaling_metrics = {}, isSerializingDerivedType = false) { + if (!app_worker_spec_autoscaling_metrics || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("cpu", app_worker_spec_autoscaling_metrics.cpu, serializeApp_worker_spec_autoscaling_metrics_cpu); + writer.writeAdditionalData(app_worker_spec_autoscaling_metrics.additionalData); +} +/** + * Serializes information the current object + * @param App_worker_spec_autoscaling_metrics_cpu The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_worker_spec_autoscaling_metrics_cpu(writer, app_worker_spec_autoscaling_metrics_cpu = {}, isSerializingDerivedType = false) { + if (!app_worker_spec_autoscaling_metrics_cpu || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("percent", app_worker_spec_autoscaling_metrics_cpu.percent); + writer.writeAdditionalData(app_worker_spec_autoscaling_metrics_cpu.additionalData); +} +/** + * Serializes information the current object + * @param App_worker_spec_instance_size_slug The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param key The name of the property to write in the serialization. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_worker_spec_instance_size_slug(writer, key, app_worker_spec_instance_size_slug, isSerializingDerivedType = false) { + if (app_worker_spec_instance_size_slug === undefined || app_worker_spec_instance_size_slug === null) + return; + if (typeof app_worker_spec_instance_size_slug === "string") { + writer.writeStringValue(undefined, app_worker_spec_instance_size_slug); + } +} +/** + * Serializes information the current object + * @param App_worker_spec_termination The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApp_worker_spec_termination(writer, app_worker_spec_termination = {}, isSerializingDerivedType = false) { + if (!app_worker_spec_termination || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("grace_period_seconds", app_worker_spec_termination.gracePeriodSeconds); + writer.writeAdditionalData(app_worker_spec_termination.additionalData); +} +/** + * Serializes information the current object + * @param Apps_alert_response The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_alert_response(writer, apps_alert_response = {}, isSerializingDerivedType = false) { + if (!apps_alert_response || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("alert", apps_alert_response.alert, serializeApp_alert); + writer.writeAdditionalData(apps_alert_response.additionalData); +} +/** + * Serializes information the current object + * @param Apps_assign_app_alert_destinations_request The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_assign_app_alert_destinations_request(writer, apps_assign_app_alert_destinations_request = {}, isSerializingDerivedType = false) { + if (!apps_assign_app_alert_destinations_request || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("emails", apps_assign_app_alert_destinations_request.emails); + writer.writeCollectionOfObjectValues("slack_webhooks", apps_assign_app_alert_destinations_request.slackWebhooks, serializeApp_alert_slack_webhook); + writer.writeAdditionalData(apps_assign_app_alert_destinations_request.additionalData); +} +/** + * Serializes information the current object + * @param Apps_bitbucket_source_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_bitbucket_source_spec(writer, apps_bitbucket_source_spec = {}, isSerializingDerivedType = false) { + if (!apps_bitbucket_source_spec || isSerializingDerivedType) { + return; + } + writer.writeStringValue("branch", apps_bitbucket_source_spec.branch); + writer.writeBooleanValue("deploy_on_push", apps_bitbucket_source_spec.deployOnPush); + writer.writeStringValue("repo", apps_bitbucket_source_spec.repo); + writer.writeAdditionalData(apps_bitbucket_source_spec.additionalData); +} +/** + * Serializes information the current object + * @param Apps_cors_policy The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_cors_policy(writer, apps_cors_policy = {}, isSerializingDerivedType = false) { + if (!apps_cors_policy || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("allow_credentials", apps_cors_policy.allowCredentials); + writer.writeCollectionOfPrimitiveValues("allow_headers", apps_cors_policy.allowHeaders); + writer.writeCollectionOfPrimitiveValues("allow_methods", apps_cors_policy.allowMethods); + writer.writeCollectionOfObjectValues("allow_origins", apps_cors_policy.allowOrigins, serializeApps_string_match); + writer.writeCollectionOfPrimitiveValues("expose_headers", apps_cors_policy.exposeHeaders); + writer.writeStringValue("max_age", apps_cors_policy.maxAge); + writer.writeAdditionalData(apps_cors_policy.additionalData); +} +/** + * Serializes information the current object + * @param Apps_create_app_request The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_create_app_request(writer, apps_create_app_request = {}, isSerializingDerivedType = false) { + if (!apps_create_app_request || isSerializingDerivedType) { + return; + } + writer.writeStringValue("project_id", apps_create_app_request.projectId); + writer.writeObjectValue("spec", apps_create_app_request.spec, serializeApp_spec); + writer.writeAdditionalData(apps_create_app_request.additionalData); +} +/** + * Serializes information the current object + * @param Apps_create_deployment_request The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_create_deployment_request(writer, apps_create_deployment_request = {}, isSerializingDerivedType = false) { + if (!apps_create_deployment_request || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("force_build", apps_create_deployment_request.forceBuild); + writer.writeAdditionalData(apps_create_deployment_request.additionalData); +} +/** + * Serializes information the current object + * @param Apps_dedicated_egress_ip The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_dedicated_egress_ip(writer, apps_dedicated_egress_ip = {}, isSerializingDerivedType = false) { + if (!apps_dedicated_egress_ip || isSerializingDerivedType) { + return; + } + writer.writeStringValue("id", apps_dedicated_egress_ip.id); + writer.writeStringValue("ip", apps_dedicated_egress_ip.ip); + writer.writeAdditionalData(apps_dedicated_egress_ip.additionalData); +} +/** + * Serializes information the current object + * @param Apps_delete_app_response The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_delete_app_response(writer, apps_delete_app_response = {}, isSerializingDerivedType = false) { + if (!apps_delete_app_response || isSerializingDerivedType) { + return; + } + writer.writeStringValue("id", apps_delete_app_response.id); + writer.writeAdditionalData(apps_delete_app_response.additionalData); +} +/** + * Serializes information the current object + * @param Apps_deployment The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_deployment(writer, apps_deployment = {}, isSerializingDerivedType = false) { + if (!apps_deployment || isSerializingDerivedType) { + return; + } + writer.writeStringValue("cause", apps_deployment.cause); + writer.writeStringValue("cloned_from", apps_deployment.clonedFrom); + writer.writeDateValue("created_at", apps_deployment.createdAt); + writer.writeCollectionOfObjectValues("functions", apps_deployment.functions, serializeApps_deployment_functions); + writer.writeStringValue("id", apps_deployment.id); + writer.writeCollectionOfObjectValues("jobs", apps_deployment.jobs, serializeApps_deployment_job); + writer.writeEnumValue("phase", apps_deployment.phase ?? Apps_deployment_phaseObject.UNKNOWN); + writer.writeDateValue("phase_last_updated_at", apps_deployment.phaseLastUpdatedAt); + writer.writeObjectValue("progress", apps_deployment.progress, serializeApps_deployment_progress); + writer.writeCollectionOfObjectValues("services", apps_deployment.services, serializeApps_deployment_service); + writer.writeObjectValue("spec", apps_deployment.spec, serializeApp_spec); + writer.writeCollectionOfObjectValues("static_sites", apps_deployment.staticSites, serializeApps_deployment_static_site); + writer.writeDateValue("updated_at", apps_deployment.updatedAt); + writer.writeCollectionOfObjectValues("workers", apps_deployment.workers, serializeApps_deployment_worker); + writer.writeAdditionalData(apps_deployment.additionalData); +} +/** + * Serializes information the current object + * @param Apps_deployment_functions The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_deployment_functions(writer, apps_deployment_functions = {}, isSerializingDerivedType = false) { + if (!apps_deployment_functions || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", apps_deployment_functions.name); + writer.writeStringValue("namespace", apps_deployment_functions.namespace); + writer.writeStringValue("source_commit_hash", apps_deployment_functions.sourceCommitHash); + writer.writeAdditionalData(apps_deployment_functions.additionalData); +} +/** + * Serializes information the current object + * @param Apps_deployment_job The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_deployment_job(writer, apps_deployment_job = {}, isSerializingDerivedType = false) { + if (!apps_deployment_job || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", apps_deployment_job.name); + writer.writeStringValue("source_commit_hash", apps_deployment_job.sourceCommitHash); + writer.writeAdditionalData(apps_deployment_job.additionalData); +} +/** + * Serializes information the current object + * @param Apps_deployment_progress The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_deployment_progress(writer, apps_deployment_progress = {}, isSerializingDerivedType = false) { + if (!apps_deployment_progress || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("error_steps", apps_deployment_progress.errorSteps); + writer.writeNumberValue("pending_steps", apps_deployment_progress.pendingSteps); + writer.writeNumberValue("running_steps", apps_deployment_progress.runningSteps); + writer.writeCollectionOfObjectValues("steps", apps_deployment_progress.steps, serializeApps_deployment_progress_step); + writer.writeNumberValue("success_steps", apps_deployment_progress.successSteps); + writer.writeCollectionOfObjectValues("summary_steps", apps_deployment_progress.summarySteps, serializeApps_deployment_progress_step); + writer.writeNumberValue("total_steps", apps_deployment_progress.totalSteps); + writer.writeAdditionalData(apps_deployment_progress.additionalData); +} +/** + * Serializes information the current object + * @param Apps_deployment_progress_step The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_deployment_progress_step(writer, apps_deployment_progress_step = {}, isSerializingDerivedType = false) { + if (!apps_deployment_progress_step || isSerializingDerivedType) { + return; + } + writer.writeStringValue("component_name", apps_deployment_progress_step.componentName); + writer.writeDateValue("ended_at", apps_deployment_progress_step.endedAt); + writer.writeStringValue("message_base", apps_deployment_progress_step.messageBase); + writer.writeStringValue("name", apps_deployment_progress_step.name); + writer.writeObjectValue("reason", apps_deployment_progress_step.reason, serializeApps_deployment_progress_step_reason); + writer.writeDateValue("started_at", apps_deployment_progress_step.startedAt); + writer.writeEnumValue("status", apps_deployment_progress_step.status ?? Apps_deployment_progress_step_statusObject.UNKNOWN); + writer.writeCollectionOfObjectValues("steps", apps_deployment_progress_step.steps, serializeApps_deployment_progress_step_steps); + writer.writeAdditionalData(apps_deployment_progress_step.additionalData); +} +/** + * Serializes information the current object + * @param Apps_deployment_progress_step_reason The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_deployment_progress_step_reason(writer, apps_deployment_progress_step_reason = {}, isSerializingDerivedType = false) { + if (!apps_deployment_progress_step_reason || isSerializingDerivedType) { + return; + } + writer.writeStringValue("code", apps_deployment_progress_step_reason.code); + writer.writeStringValue("message", apps_deployment_progress_step_reason.message); + writer.writeAdditionalData(apps_deployment_progress_step_reason.additionalData); +} +/** + * Serializes information the current object + * @param Apps_deployment_progress_step_steps The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_deployment_progress_step_steps(writer, apps_deployment_progress_step_steps = {}, isSerializingDerivedType = false) { + if (!apps_deployment_progress_step_steps || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(apps_deployment_progress_step_steps.additionalData); +} +/** + * Serializes information the current object + * @param Apps_deployment_response The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_deployment_response(writer, apps_deployment_response = {}, isSerializingDerivedType = false) { + if (!apps_deployment_response || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("deployment", apps_deployment_response.deployment, serializeApps_deployment); + writer.writeAdditionalData(apps_deployment_response.additionalData); +} +/** + * Serializes information the current object + * @param Apps_deployment_service The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_deployment_service(writer, apps_deployment_service = {}, isSerializingDerivedType = false) { + if (!apps_deployment_service || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", apps_deployment_service.name); + writer.writeStringValue("source_commit_hash", apps_deployment_service.sourceCommitHash); + writer.writeAdditionalData(apps_deployment_service.additionalData); +} +/** + * Serializes information the current object + * @param Apps_deployment_static_site The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_deployment_static_site(writer, apps_deployment_static_site = {}, isSerializingDerivedType = false) { + if (!apps_deployment_static_site || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", apps_deployment_static_site.name); + writer.writeStringValue("source_commit_hash", apps_deployment_static_site.sourceCommitHash); + writer.writeAdditionalData(apps_deployment_static_site.additionalData); +} +/** + * Serializes information the current object + * @param Apps_deployment_worker The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_deployment_worker(writer, apps_deployment_worker = {}, isSerializingDerivedType = false) { + if (!apps_deployment_worker || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", apps_deployment_worker.name); + writer.writeStringValue("source_commit_hash", apps_deployment_worker.sourceCommitHash); + writer.writeAdditionalData(apps_deployment_worker.additionalData); +} +/** + * Serializes information the current object + * @param Apps_deployments_response The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_deployments_response(writer, apps_deployments_response = {}, isSerializingDerivedType = false) { + if (!apps_deployments_response || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("deployments", apps_deployments_response.deployments, serializeApps_deployment); + writer.writeObjectValue("links", apps_deployments_response.links, serializePage_links); + writer.writeObjectValue("meta", apps_deployments_response.meta, serializeMeta_properties); + writer.writeAdditionalData(apps_deployments_response.additionalData); +} +/** + * Serializes information the current object + * @param Apps_domain The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_domain(writer, apps_domain = {}, isSerializingDerivedType = false) { + if (!apps_domain || isSerializingDerivedType) { + return; + } + writer.writeStringValue("id", apps_domain.id); + writer.writeEnumValue("phase", apps_domain.phase ?? Apps_domain_phaseObject.UNKNOWN); + writer.writeObjectValue("progress", apps_domain.progress, serializeApps_domain_progress); + writer.writeObjectValue("spec", apps_domain.spec, serializeApp_domain_spec); + writer.writeCollectionOfObjectValues("validations", apps_domain.validations, serializeApp_domain_validation); + writer.writeAdditionalData(apps_domain.additionalData); +} +/** + * Serializes information the current object + * @param Apps_domain_progress The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_domain_progress(writer, apps_domain_progress = {}, isSerializingDerivedType = false) { + if (!apps_domain_progress || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("steps", apps_domain_progress.steps, serializeApps_domain_progress_steps); + writer.writeAdditionalData(apps_domain_progress.additionalData); +} +/** + * Serializes information the current object + * @param Apps_domain_progress_steps The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_domain_progress_steps(writer, apps_domain_progress_steps = {}, isSerializingDerivedType = false) { + if (!apps_domain_progress_steps || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(apps_domain_progress_steps.additionalData); +} +/** + * Serializes information the current object + * @param Apps_get_exec_response The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_get_exec_response(writer, apps_get_exec_response = {}, isSerializingDerivedType = false) { + if (!apps_get_exec_response || isSerializingDerivedType) { + return; + } + writer.writeStringValue("url", apps_get_exec_response.url); + writer.writeAdditionalData(apps_get_exec_response.additionalData); +} +/** + * Serializes information the current object + * @param Apps_get_instance_size_response The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_get_instance_size_response(writer, apps_get_instance_size_response = {}, isSerializingDerivedType = false) { + if (!apps_get_instance_size_response || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("instance_size", apps_get_instance_size_response.instanceSize, serializeApps_instance_size); + writer.writeAdditionalData(apps_get_instance_size_response.additionalData); +} +/** + * Serializes information the current object + * @param Apps_get_logs_response The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_get_logs_response(writer, apps_get_logs_response = {}, isSerializingDerivedType = false) { + if (!apps_get_logs_response || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("historic_urls", apps_get_logs_response.historicUrls); + writer.writeStringValue("live_url", apps_get_logs_response.liveUrl); + writer.writeAdditionalData(apps_get_logs_response.additionalData); +} +/** + * Serializes information the current object + * @param Apps_git_source_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_git_source_spec(writer, apps_git_source_spec = {}, isSerializingDerivedType = false) { + if (!apps_git_source_spec || isSerializingDerivedType) { + return; + } + writer.writeStringValue("branch", apps_git_source_spec.branch); + writer.writeStringValue("repo_clone_url", apps_git_source_spec.repoCloneUrl); + writer.writeAdditionalData(apps_git_source_spec.additionalData); +} +/** + * Serializes information the current object + * @param Apps_github_source_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_github_source_spec(writer, apps_github_source_spec = {}, isSerializingDerivedType = false) { + if (!apps_github_source_spec || isSerializingDerivedType) { + return; + } + writer.writeStringValue("branch", apps_github_source_spec.branch); + writer.writeBooleanValue("deploy_on_push", apps_github_source_spec.deployOnPush); + writer.writeStringValue("repo", apps_github_source_spec.repo); + writer.writeAdditionalData(apps_github_source_spec.additionalData); +} +/** + * Serializes information the current object + * @param Apps_gitlab_source_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_gitlab_source_spec(writer, apps_gitlab_source_spec = {}, isSerializingDerivedType = false) { + if (!apps_gitlab_source_spec || isSerializingDerivedType) { + return; + } + writer.writeStringValue("branch", apps_gitlab_source_spec.branch); + writer.writeBooleanValue("deploy_on_push", apps_gitlab_source_spec.deployOnPush); + writer.writeStringValue("repo", apps_gitlab_source_spec.repo); + writer.writeAdditionalData(apps_gitlab_source_spec.additionalData); +} +/** + * Serializes information the current object + * @param Apps_image_source_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_image_source_spec(writer, apps_image_source_spec = {}, isSerializingDerivedType = false) { + if (!apps_image_source_spec || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("deploy_on_push", apps_image_source_spec.deployOnPush, serializeApps_image_source_spec_deploy_on_push); + writer.writeStringValue("digest", apps_image_source_spec.digest); + writer.writeStringValue("registry", apps_image_source_spec.registry); + writer.writeStringValue("registry_credentials", apps_image_source_spec.registryCredentials); + writer.writeEnumValue("registry_type", apps_image_source_spec.registryType); + writer.writeStringValue("repository", apps_image_source_spec.repository); + writer.writeStringValue("tag", apps_image_source_spec.tag ?? "latest"); + writer.writeAdditionalData(apps_image_source_spec.additionalData); +} +/** + * Serializes information the current object + * @param Apps_image_source_spec_deploy_on_push The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_image_source_spec_deploy_on_push(writer, apps_image_source_spec_deploy_on_push = {}, isSerializingDerivedType = false) { + if (!apps_image_source_spec_deploy_on_push || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("enabled", apps_image_source_spec_deploy_on_push.enabled); + writer.writeAdditionalData(apps_image_source_spec_deploy_on_push.additionalData); +} +/** + * Serializes information the current object + * @param Apps_instance_size The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_instance_size(writer, apps_instance_size = {}, isSerializingDerivedType = false) { + if (!apps_instance_size || isSerializingDerivedType) { + return; + } + writer.writeStringValue("bandwidth_allowance_gib", apps_instance_size.bandwidthAllowanceGib); + writer.writeStringValue("cpus", apps_instance_size.cpus); + writer.writeEnumValue("cpu_type", apps_instance_size.cpuType ?? Instance_size_cpu_typeObject.UNSPECIFIED); + writer.writeBooleanValue("deprecation_intent", apps_instance_size.deprecationIntent); + writer.writeStringValue("memory_bytes", apps_instance_size.memoryBytes); + writer.writeStringValue("name", apps_instance_size.name); + writer.writeBooleanValue("scalable", apps_instance_size.scalable); + writer.writeBooleanValue("single_instance_only", apps_instance_size.singleInstanceOnly); + writer.writeStringValue("slug", apps_instance_size.slug); + writer.writeStringValue("tier_downgrade_to", apps_instance_size.tierDowngradeTo); + writer.writeStringValue("tier_slug", apps_instance_size.tierSlug); + writer.writeStringValue("tier_upgrade_to", apps_instance_size.tierUpgradeTo); + writer.writeStringValue("usd_per_month", apps_instance_size.usdPerMonth); + writer.writeStringValue("usd_per_second", apps_instance_size.usdPerSecond); + writer.writeAdditionalData(apps_instance_size.additionalData); +} +/** + * Serializes information the current object + * @param Apps_list_alerts_response The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_list_alerts_response(writer, apps_list_alerts_response = {}, isSerializingDerivedType = false) { + if (!apps_list_alerts_response || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("alerts", apps_list_alerts_response.alerts, serializeApp_alert); + writer.writeAdditionalData(apps_list_alerts_response.additionalData); +} +/** + * Serializes information the current object + * @param Apps_list_instance_sizes_response The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_list_instance_sizes_response(writer, apps_list_instance_sizes_response = {}, isSerializingDerivedType = false) { + if (!apps_list_instance_sizes_response || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("discount_percent", apps_list_instance_sizes_response.discountPercent); + writer.writeCollectionOfObjectValues("instance_sizes", apps_list_instance_sizes_response.instanceSizes, serializeApps_instance_size); + writer.writeAdditionalData(apps_list_instance_sizes_response.additionalData); +} +/** + * Serializes information the current object + * @param Apps_list_regions_response The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_list_regions_response(writer, apps_list_regions_response = {}, isSerializingDerivedType = false) { + if (!apps_list_regions_response || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("regions", apps_list_regions_response.regions, serializeApps_region); + writer.writeAdditionalData(apps_list_regions_response.additionalData); +} +/** + * Serializes information the current object + * @param Apps_region The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_region(writer, apps_region = {}, isSerializingDerivedType = false) { + if (!apps_region || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(apps_region.additionalData); +} +/** + * Serializes information the current object + * @param Apps_response The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_response(writer, apps_response = {}, isSerializingDerivedType = false) { + if (!apps_response || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("apps", apps_response.apps, serializeApp); + writer.writeObjectValue("links", apps_response.links, serializePage_links); + writer.writeObjectValue("meta", apps_response.meta, serializeMeta_properties); + writer.writeAdditionalData(apps_response.additionalData); +} +/** + * Serializes information the current object + * @param Apps_restart_request The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_restart_request(writer, apps_restart_request = {}, isSerializingDerivedType = false) { + if (!apps_restart_request || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("components", apps_restart_request.components); + writer.writeAdditionalData(apps_restart_request.additionalData); +} +/** + * Serializes information the current object + * @param Apps_rollback_app_request The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_rollback_app_request(writer, apps_rollback_app_request = {}, isSerializingDerivedType = false) { + if (!apps_rollback_app_request || isSerializingDerivedType) { + return; + } + writer.writeStringValue("deployment_id", apps_rollback_app_request.deploymentId); + writer.writeBooleanValue("skip_pin", apps_rollback_app_request.skipPin); + writer.writeAdditionalData(apps_rollback_app_request.additionalData); +} +/** + * Serializes information the current object + * @param Apps_string_match The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_string_match(writer, apps_string_match = {}, isSerializingDerivedType = false) { + if (!apps_string_match || isSerializingDerivedType) { + return; + } + writer.writeStringValue("exact", apps_string_match.exact); + writer.writeStringValue("prefix", apps_string_match.prefix); + writer.writeStringValue("regex", apps_string_match.regex); + writer.writeAdditionalData(apps_string_match.additionalData); +} +/** + * Serializes information the current object + * @param Apps_update_app_request The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_update_app_request(writer, apps_update_app_request = {}, isSerializingDerivedType = false) { + if (!apps_update_app_request || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("spec", apps_update_app_request.spec, serializeApp_spec); + writer.writeBooleanValue("update_all_source_versions", apps_update_app_request.updateAllSourceVersions); + writer.writeAdditionalData(apps_update_app_request.additionalData); +} +/** + * Serializes information the current object + * @param Apps_vpc The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_vpc(writer, apps_vpc = {}, isSerializingDerivedType = false) { + if (!apps_vpc || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("egress_ips", apps_vpc.egressIps, serializeApps_vpc_egress_ip); + writer.writeStringValue("id", apps_vpc.id); + writer.writeAdditionalData(apps_vpc.additionalData); +} +/** + * Serializes information the current object + * @param Apps_vpc_egress_ip The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeApps_vpc_egress_ip(writer, apps_vpc_egress_ip = {}, isSerializingDerivedType = false) { + if (!apps_vpc_egress_ip || isSerializingDerivedType) { + return; + } + writer.writeStringValue("ip", apps_vpc_egress_ip.ip); + writer.writeAdditionalData(apps_vpc_egress_ip.additionalData); +} +/** + * Serializes information the current object + * @param Associated_kubernetes_resource The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAssociated_kubernetes_resource(writer, associated_kubernetes_resource = {}, isSerializingDerivedType = false) { + if (!associated_kubernetes_resource || isSerializingDerivedType) { + return; + } + writer.writeStringValue("id", associated_kubernetes_resource.id); + writer.writeStringValue("name", associated_kubernetes_resource.name); + writer.writeAdditionalData(associated_kubernetes_resource.additionalData); +} +/** + * Serializes information the current object + * @param Associated_kubernetes_resources The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAssociated_kubernetes_resources(writer, associated_kubernetes_resources = {}, isSerializingDerivedType = false) { + if (!associated_kubernetes_resources || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("load_balancers", associated_kubernetes_resources.loadBalancers, serializeAssociated_kubernetes_resource); + writer.writeCollectionOfObjectValues("volumes", associated_kubernetes_resources.volumes, serializeAssociated_kubernetes_resource); + writer.writeCollectionOfObjectValues("volume_snapshots", associated_kubernetes_resources.volumeSnapshots, serializeAssociated_kubernetes_resource); + writer.writeAdditionalData(associated_kubernetes_resources.additionalData); +} +/** + * Serializes information the current object + * @param Associated_resource The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAssociated_resource(writer, associated_resource = {}, isSerializingDerivedType = false) { + if (!associated_resource || isSerializingDerivedType) { + return; + } + writer.writeStringValue("cost", associated_resource.cost); + writer.writeStringValue("id", associated_resource.id); + writer.writeStringValue("name", associated_resource.name); + writer.writeAdditionalData(associated_resource.additionalData); +} +/** + * Serializes information the current object + * @param Associated_resource_status The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAssociated_resource_status(writer, associated_resource_status = {}, isSerializingDerivedType = false) { + if (!associated_resource_status || isSerializingDerivedType) { + return; + } + writer.writeDateValue("completed_at", associated_resource_status.completedAt); + writer.writeObjectValue("droplet", associated_resource_status.droplet, serializeDestroyed_associated_resource); + writer.writeNumberValue("failures", associated_resource_status.failures); + writer.writeObjectValue("resources", associated_resource_status.resources, serializeAssociated_resource_status_resources); + writer.writeAdditionalData(associated_resource_status.additionalData); +} +/** + * Serializes information the current object + * @param Associated_resource_status_resources The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAssociated_resource_status_resources(writer, associated_resource_status_resources = {}, isSerializingDerivedType = false) { + if (!associated_resource_status_resources || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("floating_ips", associated_resource_status_resources.floatingIps, serializeDestroyed_associated_resource); + writer.writeCollectionOfObjectValues("reserved_ips", associated_resource_status_resources.reservedIps, serializeDestroyed_associated_resource); + writer.writeCollectionOfObjectValues("snapshots", associated_resource_status_resources.snapshots, serializeDestroyed_associated_resource); + writer.writeCollectionOfObjectValues("volumes", associated_resource_status_resources.volumes, serializeDestroyed_associated_resource); + writer.writeCollectionOfObjectValues("volume_snapshots", associated_resource_status_resources.volumeSnapshots, serializeDestroyed_associated_resource); + writer.writeAdditionalData(associated_resource_status_resources.additionalData); +} +/** + * Serializes information the current object + * @param Autoscale_pool The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAutoscale_pool(writer, autoscale_pool = {}, isSerializingDerivedType = false) { + if (!autoscale_pool || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("active_resources_count", autoscale_pool.activeResourcesCount); + writer.writeObjectValue("config", autoscale_pool.config, serializeAutoscale_pool_config); + writer.writeDateValue("created_at", autoscale_pool.createdAt); + writer.writeObjectValue("current_utilization", autoscale_pool.currentUtilization, serializeCurrent_utilization); + writer.writeObjectValue("droplet_template", autoscale_pool.dropletTemplate, serializeAutoscale_pool_droplet_template); + writer.writeStringValue("id", autoscale_pool.id); + writer.writeStringValue("name", autoscale_pool.name); + writer.writeEnumValue("status", autoscale_pool.status); + writer.writeDateValue("updated_at", autoscale_pool.updatedAt); + writer.writeAdditionalData(autoscale_pool.additionalData); +} +/** + * Serializes information the current object + * @param Autoscale_pool_config The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAutoscale_pool_config(writer, autoscale_pool_config = {}, isSerializingDerivedType = false) { + serializeAutoscale_pool_dynamic_config(writer, autoscale_pool_config); + serializeAutoscale_pool_static_config(writer, autoscale_pool_config); +} +/** + * Serializes information the current object + * @param Autoscale_pool_create The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAutoscale_pool_create(writer, autoscale_pool_create = {}, isSerializingDerivedType = false) { + if (!autoscale_pool_create || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("config", autoscale_pool_create.config, serializeAutoscale_pool_create_config); + writer.writeObjectValue("droplet_template", autoscale_pool_create.dropletTemplate, serializeAutoscale_pool_droplet_template); + writer.writeStringValue("name", autoscale_pool_create.name); + writer.writeAdditionalData(autoscale_pool_create.additionalData); +} +/** + * Serializes information the current object + * @param Autoscale_pool_create_config The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAutoscale_pool_create_config(writer, autoscale_pool_create_config = {}, isSerializingDerivedType = false) { + serializeAutoscale_pool_dynamic_config(writer, autoscale_pool_create_config); + serializeAutoscale_pool_static_config(writer, autoscale_pool_create_config); +} +/** + * Serializes information the current object + * @param Autoscale_pool_droplet_template The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAutoscale_pool_droplet_template(writer, autoscale_pool_droplet_template = {}, isSerializingDerivedType = false) { + if (!autoscale_pool_droplet_template || isSerializingDerivedType) { + return; + } + writer.writeStringValue("image", autoscale_pool_droplet_template.image); + writer.writeBooleanValue("ipv6", autoscale_pool_droplet_template.ipv6); + writer.writeStringValue("name", autoscale_pool_droplet_template.name); + writer.writeStringValue("project_id", autoscale_pool_droplet_template.projectId); + writer.writeEnumValue("region", autoscale_pool_droplet_template.region); + writer.writeStringValue("size", autoscale_pool_droplet_template.size); + writer.writeCollectionOfPrimitiveValues("ssh_keys", autoscale_pool_droplet_template.sshKeys); + writer.writeCollectionOfPrimitiveValues("tags", autoscale_pool_droplet_template.tags); + writer.writeStringValue("user_data", autoscale_pool_droplet_template.userData); + writer.writeStringValue("vpc_uuid", autoscale_pool_droplet_template.vpcUuid); + writer.writeBooleanValue("with_droplet_agent", autoscale_pool_droplet_template.withDropletAgent); + writer.writeAdditionalData(autoscale_pool_droplet_template.additionalData); +} +/** + * Serializes information the current object + * @param Autoscale_pool_dynamic_config The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAutoscale_pool_dynamic_config(writer, autoscale_pool_dynamic_config = {}, isSerializingDerivedType = false) { + if (!autoscale_pool_dynamic_config || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("cooldown_minutes", autoscale_pool_dynamic_config.cooldownMinutes); + writer.writeNumberValue("max_instances", autoscale_pool_dynamic_config.maxInstances); + writer.writeNumberValue("min_instances", autoscale_pool_dynamic_config.minInstances); + writer.writeNumberValue("target_cpu_utilization", autoscale_pool_dynamic_config.targetCpuUtilization); + writer.writeNumberValue("target_memory_utilization", autoscale_pool_dynamic_config.targetMemoryUtilization); + writer.writeAdditionalData(autoscale_pool_dynamic_config.additionalData); +} +/** + * Serializes information the current object + * @param Autoscale_pool_static_config The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAutoscale_pool_static_config(writer, autoscale_pool_static_config = {}, isSerializingDerivedType = false) { + if (!autoscale_pool_static_config || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("target_number_instances", autoscale_pool_static_config.targetNumberInstances); + writer.writeAdditionalData(autoscale_pool_static_config.additionalData); +} +/** + * Serializes information the current object + * @param Backup The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeBackup(writer, backup = {}, isSerializingDerivedType = false) { + if (!backup || isSerializingDerivedType) { + return; + } + writer.writeDateValue("created_at", backup.createdAt); + writer.writeBooleanValue("incremental", backup.incremental); + writer.writeNumberValue("size_gigabytes", backup.sizeGigabytes); + writer.writeAdditionalData(backup.additionalData); +} +/** + * Serializes information the current object + * @param Backward_links The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeBackward_links(writer, backward_links = {}, isSerializingDerivedType = false) { + if (!backward_links || isSerializingDerivedType) { + return; + } + writer.writeStringValue("first", backward_links.first); + writer.writeStringValue("prev", backward_links.prev); + writer.writeAdditionalData(backward_links.additionalData); +} +/** + * Serializes information the current object + * @param Balance The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeBalance(writer, balance = {}, isSerializingDerivedType = false) { + if (!balance || isSerializingDerivedType) { + return; + } + writer.writeStringValue("account_balance", balance.accountBalance); + writer.writeDateValue("generated_at", balance.generatedAt); + writer.writeStringValue("month_to_date_balance", balance.monthToDateBalance); + writer.writeStringValue("month_to_date_usage", balance.monthToDateUsage); + writer.writeAdditionalData(balance.additionalData); +} +/** + * Serializes information the current object + * @param Billing_address The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeBilling_address(writer, billing_address = {}, isSerializingDerivedType = false) { + if (!billing_address || isSerializingDerivedType) { + return; + } + writer.writeStringValue("address_line1", billing_address.addressLine1); + writer.writeStringValue("address_line2", billing_address.addressLine2); + writer.writeStringValue("city", billing_address.city); + writer.writeStringValue("country_iso2_code", billing_address.countryIso2Code); + writer.writeStringValue("created_at", billing_address.createdAt); + writer.writeStringValue("postal_code", billing_address.postalCode); + writer.writeStringValue("region", billing_address.region); + writer.writeStringValue("updated_at", billing_address.updatedAt); + writer.writeAdditionalData(billing_address.additionalData); +} +/** + * Serializes information the current object + * @param Billing_data_point The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeBilling_data_point(writer, billing_data_point = {}, isSerializingDerivedType = false) { + if (!billing_data_point || isSerializingDerivedType) { + return; + } + writer.writeStringValue("description", billing_data_point.description); + writer.writeStringValue("group_description", billing_data_point.groupDescription); + writer.writeStringValue("region", billing_data_point.region); + writer.writeStringValue("sku", billing_data_point.sku); + writer.writeDateOnlyValue("start_date", billing_data_point.startDate); + writer.writeStringValue("total_amount", billing_data_point.totalAmount); + writer.writeStringValue("usage_team_urn", billing_data_point.usageTeamUrn); + writer.writeAdditionalData(billing_data_point.additionalData); +} +/** + * Serializes information the current object + * @param Billing_history The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeBilling_history(writer, billing_history = {}, isSerializingDerivedType = false) { + if (!billing_history || isSerializingDerivedType) { + return; + } + writer.writeStringValue("amount", billing_history.amount); + writer.writeDateValue("date", billing_history.date); + writer.writeStringValue("description", billing_history.description); + writer.writeStringValue("invoice_id", billing_history.invoiceId); + writer.writeStringValue("invoice_uuid", billing_history.invoiceUuid); + writer.writeEnumValue("type", billing_history.type); + writer.writeAdditionalData(billing_history.additionalData); +} +/** + * Serializes information the current object + * @param Byoip_prefix The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeByoip_prefix(writer, byoip_prefix = {}, isSerializingDerivedType = false) { + if (!byoip_prefix || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("advertised", byoip_prefix.advertised); + writer.writeStringValue("failure_reason", byoip_prefix.failureReason); + writer.writeBooleanValue("locked", byoip_prefix.locked); + writer.writeStringValue("name", byoip_prefix.name); + writer.writeStringValue("prefix", byoip_prefix.prefix); + writer.writeStringValue("project_id", byoip_prefix.projectId); + writer.writeStringValue("region", byoip_prefix.region); + writer.writeStringValue("status", byoip_prefix.status); + writer.writeStringValue("uuid", byoip_prefix.uuid); + writer.writeCollectionOfObjectValues("validations", byoip_prefix.validations, serializeByoip_prefix_validations); + writer.writeAdditionalData(byoip_prefix.additionalData); +} +/** + * Serializes information the current object + * @param Byoip_prefix_create The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeByoip_prefix_create(writer, byoip_prefix_create = {}, isSerializingDerivedType = false) { + if (!byoip_prefix_create || isSerializingDerivedType) { + return; + } + writer.writeStringValue("prefix", byoip_prefix_create.prefix); + writer.writeStringValue("region", byoip_prefix_create.region); + writer.writeStringValue("signature", byoip_prefix_create.signature); + writer.writeAdditionalData(byoip_prefix_create.additionalData); +} +/** + * Serializes information the current object + * @param Byoip_prefix_resource The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeByoip_prefix_resource(writer, byoip_prefix_resource = {}, isSerializingDerivedType = false) { + if (!byoip_prefix_resource || isSerializingDerivedType) { + return; + } + writer.writeDateValue("assigned_at", byoip_prefix_resource.assignedAt); + writer.writeStringValue("byoip", byoip_prefix_resource.byoip); + writer.writeNumberValue("id", byoip_prefix_resource.id); + writer.writeStringValue("region", byoip_prefix_resource.region); + writer.writeStringValue("resource", byoip_prefix_resource.resource); + writer.writeAdditionalData(byoip_prefix_resource.additionalData); +} +/** + * Serializes information the current object + * @param Byoip_prefix_update The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeByoip_prefix_update(writer, byoip_prefix_update = {}, isSerializingDerivedType = false) { + if (!byoip_prefix_update || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("advertise", byoip_prefix_update.advertise); + writer.writeAdditionalData(byoip_prefix_update.additionalData); +} +/** + * Serializes information the current object + * @param Byoip_prefix_validations The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeByoip_prefix_validations(writer, byoip_prefix_validations = {}, isSerializingDerivedType = false) { + if (!byoip_prefix_validations || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", byoip_prefix_validations.name); + writer.writeStringValue("note", byoip_prefix_validations.note); + writer.writeStringValue("status", byoip_prefix_validations.status); + writer.writeAdditionalData(byoip_prefix_validations.additionalData); +} +/** + * Serializes information the current object + * @param Ca The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCa(writer, ca = {}, isSerializingDerivedType = false) { + if (!ca || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(ca.additionalData); +} +/** + * Serializes information the current object + * @param Cdn_endpoint The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCdn_endpoint(writer, cdn_endpoint = {}, isSerializingDerivedType = false) { + if (!cdn_endpoint || isSerializingDerivedType) { + return; + } + writer.writeGuidValue("certificate_id", cdn_endpoint.certificateId); + writer.writeStringValue("custom_domain", cdn_endpoint.customDomain); + writer.writeStringValue("origin", cdn_endpoint.origin); + writer.writeNumberValue("ttl", cdn_endpoint.ttl); + writer.writeAdditionalData(cdn_endpoint.additionalData); +} +/** + * Serializes information the current object + * @param Certificate The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCertificate(writer, certificate = {}, isSerializingDerivedType = false) { + if (!certificate || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("dns_names", certificate.dnsNames); + writer.writeStringValue("name", certificate.name); + writer.writeEnumValue("type", certificate.type); + writer.writeAdditionalData(certificate.additionalData); +} +/** + * Serializes information the current object + * @param Certificate_create_base The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCertificate_create_base(writer, certificate_create_base = {}, isSerializingDerivedType = false) { + if (!certificate_create_base || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", certificate_create_base.name); + writer.writeEnumValue("type", certificate_create_base.type); + writer.writeAdditionalData(certificate_create_base.additionalData); +} +/** + * Serializes information the current object + * @param Certificate_request_custom The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCertificate_request_custom(writer, certificate_request_custom = {}, isSerializingDerivedType = false) { + if (!certificate_request_custom || isSerializingDerivedType) { + return; + } + serializeCertificate_create_base(writer, certificate_request_custom, isSerializingDerivedType); + writer.writeStringValue("certificate_chain", certificate_request_custom.certificateChain); + writer.writeStringValue("leaf_certificate", certificate_request_custom.leafCertificate); + writer.writeStringValue("private_key", certificate_request_custom.privateKey); +} +/** + * Serializes information the current object + * @param Certificate_request_lets_encrypt The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCertificate_request_lets_encrypt(writer, certificate_request_lets_encrypt = {}, isSerializingDerivedType = false) { + if (!certificate_request_lets_encrypt || isSerializingDerivedType) { + return; + } + serializeCertificate_create_base(writer, certificate_request_lets_encrypt, isSerializingDerivedType); + writer.writeCollectionOfPrimitiveValues("dns_names", certificate_request_lets_encrypt.dnsNames); +} +/** + * Serializes information the current object + * @param Check The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCheck(writer, check = {}, isSerializingDerivedType = false) { + if (!check || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("enabled", check.enabled); + writer.writeStringValue("name", check.name); + if (check.regions) + writer.writeCollectionOfEnumValues("regions", check.regions); + writer.writeStringValue("target", check.target); + writer.writeEnumValue("type", check.type); + writer.writeAdditionalData(check.additionalData); +} +/** + * Serializes information the current object + * @param Check_updatable The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCheck_updatable(writer, check_updatable = {}, isSerializingDerivedType = false) { + if (!check_updatable || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("enabled", check_updatable.enabled); + writer.writeStringValue("name", check_updatable.name); + if (check_updatable.regions) + writer.writeCollectionOfEnumValues("regions", check_updatable.regions); + writer.writeStringValue("target", check_updatable.target); + writer.writeEnumValue("type", check_updatable.type); + writer.writeAdditionalData(check_updatable.additionalData); +} +/** + * Serializes information the current object + * @param Cluster The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCluster(writer, cluster = {}, isSerializingDerivedType = false) { + if (!cluster || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("amd_gpu_device_metrics_exporter_plugin", cluster.amdGpuDeviceMetricsExporterPlugin, serializeAmd_gpu_device_metrics_exporter_plugin); + writer.writeObjectValue("amd_gpu_device_plugin", cluster.amdGpuDevicePlugin, serializeAmd_gpu_device_plugin); + writer.writeBooleanValue("auto_upgrade", cluster.autoUpgrade); + writer.writeObjectValue("cluster_autoscaler_configuration", cluster.clusterAutoscalerConfiguration, serializeCluster_autoscaler_configuration); + writer.writeStringValue("cluster_subnet", cluster.clusterSubnet); + writer.writeObjectValue("control_plane_firewall", cluster.controlPlaneFirewall, serializeControl_plane_firewall); + writer.writeBooleanValue("ha", cluster.ha); + writer.writeObjectValue("maintenance_policy", cluster.maintenancePolicy, serializeMaintenance_policy); + writer.writeStringValue("name", cluster.name); + writer.writeCollectionOfObjectValues("node_pools", cluster.nodePools, serializeKubernetes_node_pool); + writer.writeObjectValue("nvidia_gpu_device_plugin", cluster.nvidiaGpuDevicePlugin, serializeNvidia_gpu_device_plugin); + writer.writeObjectValue("rdma_shared_dev_plugin", cluster.rdmaSharedDevPlugin, serializeRdma_shared_dev_plugin); + writer.writeStringValue("region", cluster.region); + writer.writeObjectValue("routing_agent", cluster.routingAgent, serializeRouting_agent); + writer.writeStringValue("service_subnet", cluster.serviceSubnet); + writer.writeBooleanValue("surge_upgrade", cluster.surgeUpgrade); + writer.writeCollectionOfPrimitiveValues("tags", cluster.tags); + writer.writeStringValue("version", cluster.version); + writer.writeGuidValue("vpc_uuid", cluster.vpcUuid); + writer.writeAdditionalData(cluster.additionalData); +} +/** + * Serializes information the current object + * @param Cluster_autoscaler_configuration The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCluster_autoscaler_configuration(writer, cluster_autoscaler_configuration = {}, isSerializingDerivedType = false) { + if (!cluster_autoscaler_configuration || isSerializingDerivedType) { + return; + } + if (cluster_autoscaler_configuration.expanders) + writer.writeCollectionOfEnumValues("expanders", cluster_autoscaler_configuration.expanders); + writer.writeStringValue("scale_down_unneeded_time", cluster_autoscaler_configuration.scaleDownUnneededTime); + writer.writeNumberValue("scale_down_utilization_threshold", cluster_autoscaler_configuration.scaleDownUtilizationThreshold); + writer.writeAdditionalData(cluster_autoscaler_configuration.additionalData); +} +/** + * Serializes information the current object + * @param Cluster_read The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCluster_read(writer, cluster_read = {}, isSerializingDerivedType = false) { + if (!cluster_read || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("amd_gpu_device_metrics_exporter_plugin", cluster_read.amdGpuDeviceMetricsExporterPlugin, serializeAmd_gpu_device_metrics_exporter_plugin); + writer.writeObjectValue("amd_gpu_device_plugin", cluster_read.amdGpuDevicePlugin, serializeAmd_gpu_device_plugin); + writer.writeBooleanValue("auto_upgrade", cluster_read.autoUpgrade); + writer.writeObjectValue("cluster_autoscaler_configuration", cluster_read.clusterAutoscalerConfiguration, serializeCluster_autoscaler_configuration); + writer.writeStringValue("cluster_subnet", cluster_read.clusterSubnet); + writer.writeObjectValue("control_plane_firewall", cluster_read.controlPlaneFirewall, serializeControl_plane_firewall); + writer.writeBooleanValue("ha", cluster_read.ha); + writer.writeObjectValue("maintenance_policy", cluster_read.maintenancePolicy, serializeMaintenance_policy); + writer.writeStringValue("name", cluster_read.name); + writer.writeCollectionOfObjectValues("node_pools", cluster_read.nodePools, serializeKubernetes_node_pool); + writer.writeObjectValue("nvidia_gpu_device_plugin", cluster_read.nvidiaGpuDevicePlugin, serializeNvidia_gpu_device_plugin); + writer.writeObjectValue("rdma_shared_dev_plugin", cluster_read.rdmaSharedDevPlugin, serializeRdma_shared_dev_plugin); + writer.writeStringValue("region", cluster_read.region); + writer.writeCollectionOfPrimitiveValues("registries", cluster_read.registries); + writer.writeObjectValue("routing_agent", cluster_read.routingAgent, serializeRouting_agent); + writer.writeStringValue("service_subnet", cluster_read.serviceSubnet); + writer.writeBooleanValue("surge_upgrade", cluster_read.surgeUpgrade); + writer.writeCollectionOfPrimitiveValues("tags", cluster_read.tags); + writer.writeStringValue("version", cluster_read.version); + writer.writeGuidValue("vpc_uuid", cluster_read.vpcUuid); + writer.writeAdditionalData(cluster_read.additionalData); +} +/** + * Serializes information the current object + * @param Cluster_read_status The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCluster_read_status(writer, cluster_read_status = {}, isSerializingDerivedType = false) { + if (!cluster_read_status || isSerializingDerivedType) { + return; + } + writer.writeStringValue("message", cluster_read_status.message); + writer.writeEnumValue("state", cluster_read_status.state); + writer.writeAdditionalData(cluster_read_status.additionalData); +} +/** + * Serializes information the current object + * @param Cluster_registries The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCluster_registries(writer, cluster_registries = {}, isSerializingDerivedType = false) { + if (!cluster_registries || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("cluster_uuids", cluster_registries.clusterUuids); + writer.writeCollectionOfPrimitiveValues("registries", cluster_registries.registries); + writer.writeAdditionalData(cluster_registries.additionalData); +} +/** + * Serializes information the current object + * @param Cluster_registry The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCluster_registry(writer, cluster_registry = {}, isSerializingDerivedType = false) { + if (!cluster_registry || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("cluster_uuids", cluster_registry.clusterUuids); + writer.writeAdditionalData(cluster_registry.additionalData); +} +/** + * Serializes information the current object + * @param Cluster_status The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCluster_status(writer, cluster_status = {}, isSerializingDerivedType = false) { + if (!cluster_status || isSerializingDerivedType) { + return; + } + writer.writeStringValue("message", cluster_status.message); + writer.writeEnumValue("state", cluster_status.state); + writer.writeAdditionalData(cluster_status.additionalData); +} +/** + * Serializes information the current object + * @param Cluster_update The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCluster_update(writer, cluster_update = {}, isSerializingDerivedType = false) { + if (!cluster_update || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("amd_gpu_device_metrics_exporter_plugin", cluster_update.amdGpuDeviceMetricsExporterPlugin, serializeAmd_gpu_device_metrics_exporter_plugin); + writer.writeObjectValue("amd_gpu_device_plugin", cluster_update.amdGpuDevicePlugin, serializeAmd_gpu_device_plugin); + writer.writeBooleanValue("auto_upgrade", cluster_update.autoUpgrade); + writer.writeObjectValue("cluster_autoscaler_configuration", cluster_update.clusterAutoscalerConfiguration, serializeCluster_autoscaler_configuration); + writer.writeObjectValue("control_plane_firewall", cluster_update.controlPlaneFirewall, serializeControl_plane_firewall); + writer.writeBooleanValue("ha", cluster_update.ha); + writer.writeObjectValue("maintenance_policy", cluster_update.maintenancePolicy, serializeMaintenance_policy); + writer.writeStringValue("name", cluster_update.name); + writer.writeObjectValue("nvidia_gpu_device_plugin", cluster_update.nvidiaGpuDevicePlugin, serializeNvidia_gpu_device_plugin); + writer.writeObjectValue("rdma_shared_dev_plugin", cluster_update.rdmaSharedDevPlugin, serializeRdma_shared_dev_plugin); + writer.writeObjectValue("routing_agent", cluster_update.routingAgent, serializeRouting_agent); + writer.writeBooleanValue("surge_upgrade", cluster_update.surgeUpgrade); + writer.writeCollectionOfPrimitiveValues("tags", cluster_update.tags); + writer.writeAdditionalData(cluster_update.additionalData); +} +/** + * Serializes information the current object + * @param Clusterlint_request The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeClusterlint_request(writer, clusterlint_request = {}, isSerializingDerivedType = false) { + if (!clusterlint_request || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("exclude_checks", clusterlint_request.excludeChecks); + writer.writeCollectionOfPrimitiveValues("exclude_groups", clusterlint_request.excludeGroups); + writer.writeCollectionOfPrimitiveValues("include_checks", clusterlint_request.includeChecks); + writer.writeCollectionOfPrimitiveValues("include_groups", clusterlint_request.includeGroups); + writer.writeAdditionalData(clusterlint_request.additionalData); +} +/** + * Serializes information the current object + * @param Clusterlint_results The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeClusterlint_results(writer, clusterlint_results = {}, isSerializingDerivedType = false) { + if (!clusterlint_results || isSerializingDerivedType) { + return; + } + writer.writeDateValue("completed_at", clusterlint_results.completedAt); + writer.writeCollectionOfObjectValues("diagnostics", clusterlint_results.diagnostics, serializeClusterlint_results_diagnostics); + writer.writeDateValue("requested_at", clusterlint_results.requestedAt); + writer.writeStringValue("run_id", clusterlint_results.runId); + writer.writeAdditionalData(clusterlint_results.additionalData); +} +/** + * Serializes information the current object + * @param Clusterlint_results_diagnostics The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeClusterlint_results_diagnostics(writer, clusterlint_results_diagnostics = {}, isSerializingDerivedType = false) { + if (!clusterlint_results_diagnostics || isSerializingDerivedType) { + return; + } + writer.writeStringValue("check_name", clusterlint_results_diagnostics.checkName); + writer.writeStringValue("message", clusterlint_results_diagnostics.message); + writer.writeObjectValue("object", clusterlint_results_diagnostics.object, serializeClusterlint_results_diagnostics_object); + writer.writeStringValue("severity", clusterlint_results_diagnostics.severity); + writer.writeAdditionalData(clusterlint_results_diagnostics.additionalData); +} +/** + * Serializes information the current object + * @param Clusterlint_results_diagnostics_object The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeClusterlint_results_diagnostics_object(writer, clusterlint_results_diagnostics_object = {}, isSerializingDerivedType = false) { + if (!clusterlint_results_diagnostics_object || isSerializingDerivedType) { + return; + } + writer.writeStringValue("kind", clusterlint_results_diagnostics_object.kind); + writer.writeStringValue("name", clusterlint_results_diagnostics_object.name); + writer.writeStringValue("namespace", clusterlint_results_diagnostics_object.namespace); + writer.writeAdditionalData(clusterlint_results_diagnostics_object.additionalData); +} +/** + * Serializes information the current object + * @param Connection_pool The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeConnection_pool(writer, connection_pool = {}, isSerializingDerivedType = false) { + if (!connection_pool || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("connection", connection_pool.connection, serializeDatabase_connection); + writer.writeStringValue("db", connection_pool.db); + writer.writeStringValue("mode", connection_pool.mode); + writer.writeStringValue("name", connection_pool.name); + writer.writeObjectValue("private_connection", connection_pool.privateConnection, serializeDatabase_connection); + writer.writeNumberValue("size", connection_pool.size); + writer.writeObjectValue("standby_connection", connection_pool.standbyConnection, serializeDatabase_connection); + writer.writeObjectValue("standby_private_connection", connection_pool.standbyPrivateConnection, serializeDatabase_connection); + writer.writeStringValue("user", connection_pool.user); + writer.writeAdditionalData(connection_pool.additionalData); +} +/** + * Serializes information the current object + * @param Connection_pool_update The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeConnection_pool_update(writer, connection_pool_update = {}, isSerializingDerivedType = false) { + if (!connection_pool_update || isSerializingDerivedType) { + return; + } + writer.writeStringValue("db", connection_pool_update.db); + writer.writeStringValue("mode", connection_pool_update.mode); + writer.writeNumberValue("size", connection_pool_update.size); + writer.writeStringValue("user", connection_pool_update.user); + writer.writeAdditionalData(connection_pool_update.additionalData); +} +/** + * Serializes information the current object + * @param Connection_pools The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeConnection_pools(writer, connection_pools = {}, isSerializingDerivedType = false) { + if (!connection_pools || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(connection_pools.additionalData); +} +/** + * Serializes information the current object + * @param Control_plane_firewall The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeControl_plane_firewall(writer, control_plane_firewall = {}, isSerializingDerivedType = false) { + if (!control_plane_firewall || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("allowed_addresses", control_plane_firewall.allowedAddresses); + writer.writeBooleanValue("enabled", control_plane_firewall.enabled); + writer.writeAdditionalData(control_plane_firewall.additionalData); +} +/** + * Serializes information the current object + * @param Create_namespace The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCreate_namespace(writer, create_namespace = {}, isSerializingDerivedType = false) { + if (!create_namespace || isSerializingDerivedType) { + return; + } + writer.writeStringValue("label", create_namespace.label); + writer.writeStringValue("region", create_namespace.region); + writer.writeAdditionalData(create_namespace.additionalData); +} +/** + * Serializes information the current object + * @param Create_trigger The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCreate_trigger(writer, create_trigger = {}, isSerializingDerivedType = false) { + if (!create_trigger || isSerializingDerivedType) { + return; + } + writer.writeStringValue("function", create_trigger.functionEscaped); + writer.writeBooleanValue("is_enabled", create_trigger.isEnabled); + writer.writeStringValue("name", create_trigger.name); + writer.writeObjectValue("scheduled_details", create_trigger.scheduledDetails, serializeScheduled_details); + writer.writeStringValue("type", create_trigger.type); + writer.writeAdditionalData(create_trigger.additionalData); +} +/** + * Serializes information the current object + * @param Credentials The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCredentials(writer, credentials = {}, isSerializingDerivedType = false) { + if (!credentials || isSerializingDerivedType) { + return; + } + writer.writeByteArrayValue("certificate_authority_data", credentials.certificateAuthorityData); + writer.writeByteArrayValue("client_certificate_data", credentials.clientCertificateData); + writer.writeByteArrayValue("client_key_data", credentials.clientKeyData); + writer.writeDateValue("expires_at", credentials.expiresAt); + writer.writeStringValue("server", credentials.server); + writer.writeStringValue("token", credentials.token); + writer.writeAdditionalData(credentials.additionalData); +} +/** + * Serializes information the current object + * @param Current_utilization The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCurrent_utilization(writer, current_utilization = {}, isSerializingDerivedType = false) { + if (!current_utilization || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("cpu", current_utilization.cpu); + writer.writeNumberValue("memory", current_utilization.memory); + writer.writeAdditionalData(current_utilization.additionalData); +} +/** + * Serializes information the current object + * @param Database The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDatabase(writer, database = {}, isSerializingDerivedType = false) { + if (!database || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", database.name); + writer.writeAdditionalData(database.additionalData); +} +/** + * Serializes information the current object + * @param Database_autoscale_params The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDatabase_autoscale_params(writer, database_autoscale_params = {}, isSerializingDerivedType = false) { + if (!database_autoscale_params || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("storage", database_autoscale_params.storage, serializeDatabase_storage_autoscale_params); + writer.writeAdditionalData(database_autoscale_params.additionalData); +} +/** + * Serializes information the current object + * @param Database_backup The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDatabase_backup(writer, database_backup = {}, isSerializingDerivedType = false) { + if (!database_backup || isSerializingDerivedType) { + return; + } + writer.writeDateValue("backup_created_at", database_backup.backupCreatedAt); + writer.writeStringValue("database_name", database_backup.databaseName); + writer.writeAdditionalData(database_backup.additionalData); +} +/** + * Serializes information the current object + * @param Database_cluster The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDatabase_cluster(writer, database_cluster = {}, isSerializingDerivedType = false) { + if (!database_cluster || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("autoscale", database_cluster.autoscale, serializeDatabase_autoscale_params); + writer.writeObjectValue("connection", database_cluster.connection, serializeDatabase_connection); + writer.writeObjectValue("do_settings", database_cluster.doSettings, serializeDo_settings); + writer.writeEnumValue("engine", database_cluster.engine); + writer.writeObjectValue("maintenance_window", database_cluster.maintenanceWindow, serializeDatabase_maintenance_window); + writer.writeStringValue("name", database_cluster.name); + writer.writeNumberValue("num_nodes", database_cluster.numNodes); + writer.writeObjectValue("private_connection", database_cluster.privateConnection, serializeDatabase_connection); + writer.writeStringValue("private_network_uuid", database_cluster.privateNetworkUuid); + writer.writeGuidValue("project_id", database_cluster.projectId); + writer.writeStringValue("region", database_cluster.region); + writer.writeCollectionOfObjectValues("rules", database_cluster.rules, serializeFirewall_rule); + writer.writeObjectValue("schema_registry_connection", database_cluster.schemaRegistryConnection, serializeSchema_registry_connection); + writer.writeStringValue("size", database_cluster.size); + writer.writeObjectValue("standby_connection", database_cluster.standbyConnection, serializeDatabase_connection); + writer.writeObjectValue("standby_private_connection", database_cluster.standbyPrivateConnection, serializeDatabase_connection); + writer.writeNumberValue("storage_size_mib", database_cluster.storageSizeMib); + writer.writeCollectionOfPrimitiveValues("tags", database_cluster.tags); + writer.writeObjectValue("ui_connection", database_cluster.uiConnection, serializeOpensearch_connection); + writer.writeStringValue("version", database_cluster.version); + writer.writeAdditionalData(database_cluster.additionalData); +} +/** + * Serializes information the current object + * @param Database_cluster_read The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDatabase_cluster_read(writer, database_cluster_read = {}, isSerializingDerivedType = false) { + if (!database_cluster_read || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("connection", database_cluster_read.connection, serializeDatabase_connection); + writer.writeObjectValue("do_settings", database_cluster_read.doSettings, serializeDo_settings); + writer.writeEnumValue("engine", database_cluster_read.engine); + writer.writeObjectValue("maintenance_window", database_cluster_read.maintenanceWindow, serializeDatabase_maintenance_window); + writer.writeStringValue("name", database_cluster_read.name); + writer.writeNumberValue("num_nodes", database_cluster_read.numNodes); + writer.writeObjectValue("private_connection", database_cluster_read.privateConnection, serializeDatabase_connection); + writer.writeStringValue("private_network_uuid", database_cluster_read.privateNetworkUuid); + writer.writeGuidValue("project_id", database_cluster_read.projectId); + writer.writeStringValue("region", database_cluster_read.region); + writer.writeCollectionOfObjectValues("rules", database_cluster_read.rules, serializeFirewall_rule); + writer.writeObjectValue("schema_registry_connection", database_cluster_read.schemaRegistryConnection, serializeSchema_registry_connection); + writer.writeStringValue("size", database_cluster_read.size); + writer.writeObjectValue("standby_connection", database_cluster_read.standbyConnection, serializeDatabase_connection); + writer.writeObjectValue("standby_private_connection", database_cluster_read.standbyPrivateConnection, serializeDatabase_connection); + writer.writeNumberValue("storage_size_mib", database_cluster_read.storageSizeMib); + writer.writeCollectionOfPrimitiveValues("tags", database_cluster_read.tags); + writer.writeObjectValue("ui_connection", database_cluster_read.uiConnection, serializeOpensearch_connection); + writer.writeStringValue("version", database_cluster_read.version); + writer.writeAdditionalData(database_cluster_read.additionalData); +} +/** + * Serializes information the current object + * @param Database_cluster_resize The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDatabase_cluster_resize(writer, database_cluster_resize = {}, isSerializingDerivedType = false) { + if (!database_cluster_resize || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("num_nodes", database_cluster_resize.numNodes); + writer.writeStringValue("size", database_cluster_resize.size); + writer.writeNumberValue("storage_size_mib", database_cluster_resize.storageSizeMib); + writer.writeAdditionalData(database_cluster_resize.additionalData); +} +/** + * Serializes information the current object + * @param Database_config The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDatabase_config(writer, database_config = {}, isSerializingDerivedType = false) { + if (!database_config || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("config", database_config.config, serializeDatabase_config_config); + writer.writeAdditionalData(database_config.additionalData); +} +/** + * Serializes information the current object + * @param Database_config_config The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDatabase_config_config(writer, database_config_config = {}, isSerializingDerivedType = false) { + serializeKafka_advanced_config(writer, database_config_config); + serializeMongo_advanced_config(writer, database_config_config); + serializeMysql_advanced_config(writer, database_config_config); + serializeOpensearch_advanced_config(writer, database_config_config); + serializePostgres_advanced_config(writer, database_config_config); + serializeRedis_advanced_config(writer, database_config_config); + serializeValkey_advanced_config(writer, database_config_config); +} +/** + * Serializes information the current object + * @param Database_connection The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDatabase_connection(writer, database_connection = {}, isSerializingDerivedType = false) { + if (!database_connection || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(database_connection.additionalData); +} +/** + * Serializes information the current object + * @param Database_kafka_schema_create The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDatabase_kafka_schema_create(writer, database_kafka_schema_create = {}, isSerializingDerivedType = false) { + if (!database_kafka_schema_create || isSerializingDerivedType) { + return; + } + writer.writeStringValue("schema", database_kafka_schema_create.schema); + writer.writeEnumValue("schema_type", database_kafka_schema_create.schemaType); + writer.writeStringValue("subject_name", database_kafka_schema_create.subjectName); + writer.writeAdditionalData(database_kafka_schema_create.additionalData); +} +/** + * Serializes information the current object + * @param Database_layout_option The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDatabase_layout_option(writer, database_layout_option = {}, isSerializingDerivedType = false) { + if (!database_layout_option || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("num_nodes", database_layout_option.numNodes); + writer.writeAdditionalData(database_layout_option.additionalData); +} +/** + * Serializes information the current object + * @param Database_maintenance_window The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDatabase_maintenance_window(writer, database_maintenance_window = {}, isSerializingDerivedType = false) { + if (!database_maintenance_window || isSerializingDerivedType) { + return; + } + writer.writeStringValue("day", database_maintenance_window.day); + writer.writeStringValue("hour", database_maintenance_window.hour); + writer.writeAdditionalData(database_maintenance_window.additionalData); +} +/** + * Serializes information the current object + * @param Database_metrics_credentials The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDatabase_metrics_credentials(writer, database_metrics_credentials = {}, isSerializingDerivedType = false) { + if (!database_metrics_credentials || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("credentials", database_metrics_credentials.credentials, serializeDatabases_basic_auth_credentials); + writer.writeAdditionalData(database_metrics_credentials.additionalData); +} +/** + * Serializes information the current object + * @param Database_replica The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDatabase_replica(writer, database_replica = {}, isSerializingDerivedType = false) { + if (!database_replica || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("connection", database_replica.connection, serializeDatabase_connection); + writer.writeObjectValue("do_settings", database_replica.doSettings, serializeDo_settings); + writer.writeStringValue("name", database_replica.name); + writer.writeObjectValue("private_connection", database_replica.privateConnection, serializeDatabase_connection); + writer.writeStringValue("private_network_uuid", database_replica.privateNetworkUuid); + writer.writeStringValue("region", database_replica.region); + writer.writeStringValue("size", database_replica.size); + writer.writeNumberValue("storage_size_mib", database_replica.storageSizeMib); + writer.writeCollectionOfPrimitiveValues("tags", database_replica.tags); + writer.writeAdditionalData(database_replica.additionalData); +} +/** + * Serializes information the current object + * @param Database_replica_read The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDatabase_replica_read(writer, database_replica_read = {}, isSerializingDerivedType = false) { + if (!database_replica_read || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("connection", database_replica_read.connection, serializeDatabase_connection); + writer.writeObjectValue("do_settings", database_replica_read.doSettings, serializeDo_settings); + writer.writeStringValue("name", database_replica_read.name); + writer.writeObjectValue("private_connection", database_replica_read.privateConnection, serializeDatabase_connection); + writer.writeStringValue("private_network_uuid", database_replica_read.privateNetworkUuid); + writer.writeStringValue("region", database_replica_read.region); + writer.writeStringValue("size", database_replica_read.size); + writer.writeNumberValue("storage_size_mib", database_replica_read.storageSizeMib); + writer.writeCollectionOfPrimitiveValues("tags", database_replica_read.tags); + writer.writeAdditionalData(database_replica_read.additionalData); +} +/** + * Serializes information the current object + * @param Database_service_endpoint The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDatabase_service_endpoint(writer, database_service_endpoint = {}, isSerializingDerivedType = false) { + if (!database_service_endpoint || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(database_service_endpoint.additionalData); +} +/** + * Serializes information the current object + * @param Database_storage_autoscale_params The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDatabase_storage_autoscale_params(writer, database_storage_autoscale_params = {}, isSerializingDerivedType = false) { + if (!database_storage_autoscale_params || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("enabled", database_storage_autoscale_params.enabled); + writer.writeNumberValue("increment_gib", database_storage_autoscale_params.incrementGib); + writer.writeNumberValue("threshold_percent", database_storage_autoscale_params.thresholdPercent); + writer.writeAdditionalData(database_storage_autoscale_params.additionalData); +} +/** + * Serializes information the current object + * @param Database_user The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDatabase_user(writer, database_user = {}, isSerializingDerivedType = false) { + if (!database_user || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("mysql_settings", database_user.mysqlSettings, serializeMysql_settings); + writer.writeStringValue("name", database_user.name); + writer.writeObjectValue("settings", database_user.settings, serializeUser_settings); + writer.writeAdditionalData(database_user.additionalData); +} +/** + * Serializes information the current object + * @param Database_version_availability The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDatabase_version_availability(writer, database_version_availability = {}, isSerializingDerivedType = false) { + if (!database_version_availability || isSerializingDerivedType) { + return; + } + writer.writeStringValue("end_of_availability", database_version_availability.endOfAvailability); + writer.writeStringValue("end_of_life", database_version_availability.endOfLife); + writer.writeStringValue("version", database_version_availability.version); + writer.writeAdditionalData(database_version_availability.additionalData); +} +/** + * Serializes information the current object + * @param Databases_basic_auth_credentials The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDatabases_basic_auth_credentials(writer, databases_basic_auth_credentials = {}, isSerializingDerivedType = false) { + if (!databases_basic_auth_credentials || isSerializingDerivedType) { + return; + } + writer.writeStringValue("basic_auth_password", databases_basic_auth_credentials.basicAuthPassword); + writer.writeStringValue("basic_auth_username", databases_basic_auth_credentials.basicAuthUsername); + writer.writeAdditionalData(databases_basic_auth_credentials.additionalData); +} +/** + * Serializes information the current object + * @param Datadog_logsink The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDatadog_logsink(writer, datadog_logsink = {}, isSerializingDerivedType = false) { + if (!datadog_logsink || isSerializingDerivedType) { + return; + } + writer.writeStringValue("datadog_api_key", datadog_logsink.datadogApiKey); + writer.writeStringValue("site", datadog_logsink.site); + writer.writeAdditionalData(datadog_logsink.additionalData); +} +/** + * Serializes information the current object + * @param Destination The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDestination(writer, destination = {}, isSerializingDerivedType = false) { + if (!destination || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("config", destination.config, serializeOpensearch_config); + writer.writeStringValue("id", destination.id); + writer.writeStringValue("name", destination.name); + writer.writeEnumValue("type", destination.type); + writer.writeAdditionalData(destination.additionalData); +} +/** + * Serializes information the current object + * @param Destination_omit_credentials The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDestination_omit_credentials(writer, destination_omit_credentials = {}, isSerializingDerivedType = false) { + if (!destination_omit_credentials || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("config", destination_omit_credentials.config, serializeOpensearch_config_omit_credentials); + writer.writeStringValue("id", destination_omit_credentials.id); + writer.writeStringValue("name", destination_omit_credentials.name); + writer.writeEnumValue("type", destination_omit_credentials.type); + writer.writeAdditionalData(destination_omit_credentials.additionalData); +} +/** + * Serializes information the current object + * @param Destination_request The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDestination_request(writer, destination_request = {}, isSerializingDerivedType = false) { + if (!destination_request || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("config", destination_request.config, serializeOpensearch_config_request); + writer.writeStringValue("name", destination_request.name); + writer.writeEnumValue("type", destination_request.type); + writer.writeAdditionalData(destination_request.additionalData); +} +/** + * Serializes information the current object + * @param Destroy_associated_kubernetes_resources The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDestroy_associated_kubernetes_resources(writer, destroy_associated_kubernetes_resources = {}, isSerializingDerivedType = false) { + if (!destroy_associated_kubernetes_resources || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("load_balancers", destroy_associated_kubernetes_resources.loadBalancers); + writer.writeCollectionOfPrimitiveValues("volumes", destroy_associated_kubernetes_resources.volumes); + writer.writeCollectionOfPrimitiveValues("volume_snapshots", destroy_associated_kubernetes_resources.volumeSnapshots); + writer.writeAdditionalData(destroy_associated_kubernetes_resources.additionalData); +} +/** + * Serializes information the current object + * @param Destroyed_associated_resource The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDestroyed_associated_resource(writer, destroyed_associated_resource = {}, isSerializingDerivedType = false) { + if (!destroyed_associated_resource || isSerializingDerivedType) { + return; + } + writer.writeDateValue("destroyed_at", destroyed_associated_resource.destroyedAt); + writer.writeStringValue("error_message", destroyed_associated_resource.errorMessage); + writer.writeStringValue("id", destroyed_associated_resource.id); + writer.writeStringValue("name", destroyed_associated_resource.name); + writer.writeAdditionalData(destroyed_associated_resource.additionalData); +} +/** + * Serializes information the current object + * @param Disk_info The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDisk_info(writer, disk_info = {}, isSerializingDerivedType = false) { + if (!disk_info || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("size", disk_info.size, serializeDisk_info_size); + writer.writeEnumValue("type", disk_info.type); + writer.writeAdditionalData(disk_info.additionalData); +} +/** + * Serializes information the current object + * @param Disk_info_size The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDisk_info_size(writer, disk_info_size = {}, isSerializingDerivedType = false) { + if (!disk_info_size || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("amount", disk_info_size.amount); + writer.writeStringValue("unit", disk_info_size.unit); + writer.writeAdditionalData(disk_info_size.additionalData); +} +/** + * Serializes information the current object + * @param Do_settings The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDo_settings(writer, do_settings = {}, isSerializingDerivedType = false) { + if (!do_settings || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("service_cnames", do_settings.serviceCnames); + writer.writeAdditionalData(do_settings.additionalData); +} +/** + * Serializes information the current object + * @param Docker_credentials The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDocker_credentials(writer, docker_credentials = {}, isSerializingDerivedType = false) { + if (!docker_credentials || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("auths", docker_credentials.auths, serializeDocker_credentials_auths); + writer.writeAdditionalData(docker_credentials.additionalData); +} +/** + * Serializes information the current object + * @param Docker_credentials_auths The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDocker_credentials_auths(writer, docker_credentials_auths = {}, isSerializingDerivedType = false) { + if (!docker_credentials_auths || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("registry.digitalocean.com", docker_credentials_auths.registryDigitaloceanCom, serializeDocker_credentials_auths_registryDigitaloceanCom); + writer.writeAdditionalData(docker_credentials_auths.additionalData); +} +/** + * Serializes information the current object + * @param Docker_credentials_auths_registryDigitaloceanCom The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDocker_credentials_auths_registryDigitaloceanCom(writer, docker_credentials_auths_registryDigitaloceanCom = {}, isSerializingDerivedType = false) { + if (!docker_credentials_auths_registryDigitaloceanCom || isSerializingDerivedType) { + return; + } + writer.writeStringValue("auth", docker_credentials_auths_registryDigitaloceanCom.auth); + writer.writeAdditionalData(docker_credentials_auths_registryDigitaloceanCom.additionalData); +} +/** + * Serializes information the current object + * @param Domain The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDomain(writer, domain = {}, isSerializingDerivedType = false) { + if (!domain || isSerializingDerivedType) { + return; + } + writer.writeStringValue("ip_address", domain.ipAddress); + writer.writeStringValue("name", domain.name); + writer.writeAdditionalData(domain.additionalData); +} +/** + * Serializes information the current object + * @param Domain_record The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDomain_record(writer, domain_record = {}, isSerializingDerivedType = false) { + if (!domain_record || isSerializingDerivedType) { + return; + } + writer.writeStringValue("data", domain_record.data); + writer.writeNumberValue("flags", domain_record.flags); + writer.writeStringValue("name", domain_record.name); + writer.writeNumberValue("port", domain_record.port); + writer.writeNumberValue("priority", domain_record.priority); + writer.writeStringValue("tag", domain_record.tag); + writer.writeNumberValue("ttl", domain_record.ttl); + writer.writeStringValue("type", domain_record.type); + writer.writeNumberValue("weight", domain_record.weight); + writer.writeAdditionalData(domain_record.additionalData); +} +/** + * Serializes information the current object + * @param Domain_record_a The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDomain_record_a(writer, domain_record_a = {}, isSerializingDerivedType = false) { + if (!domain_record_a || isSerializingDerivedType) { + return; + } + serializeDomain_record(writer, domain_record_a, isSerializingDerivedType); +} +/** + * Serializes information the current object + * @param Domain_record_aaaa The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDomain_record_aaaa(writer, domain_record_aaaa = {}, isSerializingDerivedType = false) { + if (!domain_record_aaaa || isSerializingDerivedType) { + return; + } + serializeDomain_record(writer, domain_record_aaaa, isSerializingDerivedType); +} +/** + * Serializes information the current object + * @param Domain_record_caa The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDomain_record_caa(writer, domain_record_caa = {}, isSerializingDerivedType = false) { + if (!domain_record_caa || isSerializingDerivedType) { + return; + } + serializeDomain_record(writer, domain_record_caa, isSerializingDerivedType); +} +/** + * Serializes information the current object + * @param Domain_record_cname The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDomain_record_cname(writer, domain_record_cname = {}, isSerializingDerivedType = false) { + if (!domain_record_cname || isSerializingDerivedType) { + return; + } + serializeDomain_record(writer, domain_record_cname, isSerializingDerivedType); +} +/** + * Serializes information the current object + * @param Domain_record_mx The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDomain_record_mx(writer, domain_record_mx = {}, isSerializingDerivedType = false) { + if (!domain_record_mx || isSerializingDerivedType) { + return; + } + serializeDomain_record(writer, domain_record_mx, isSerializingDerivedType); +} +/** + * Serializes information the current object + * @param Domain_record_ns The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDomain_record_ns(writer, domain_record_ns = {}, isSerializingDerivedType = false) { + if (!domain_record_ns || isSerializingDerivedType) { + return; + } + serializeDomain_record(writer, domain_record_ns, isSerializingDerivedType); +} +/** + * Serializes information the current object + * @param Domain_record_soa The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDomain_record_soa(writer, domain_record_soa = {}, isSerializingDerivedType = false) { + if (!domain_record_soa || isSerializingDerivedType) { + return; + } + serializeDomain_record(writer, domain_record_soa, isSerializingDerivedType); +} +/** + * Serializes information the current object + * @param Domain_record_srv The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDomain_record_srv(writer, domain_record_srv = {}, isSerializingDerivedType = false) { + if (!domain_record_srv || isSerializingDerivedType) { + return; + } + serializeDomain_record(writer, domain_record_srv, isSerializingDerivedType); +} +/** + * Serializes information the current object + * @param Domain_record_txt The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDomain_record_txt(writer, domain_record_txt = {}, isSerializingDerivedType = false) { + if (!domain_record_txt || isSerializingDerivedType) { + return; + } + serializeDomain_record(writer, domain_record_txt, isSerializingDerivedType); +} +/** + * Serializes information the current object + * @param Domains The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDomains(writer, domains = {}, isSerializingDerivedType = false) { + if (!domains || isSerializingDerivedType) { + return; + } + writer.writeStringValue("certificate_id", domains.certificateId); + writer.writeBooleanValue("is_managed", domains.isManaged); + writer.writeStringValue("name", domains.name); + writer.writeAdditionalData(domains.additionalData); +} +/** + * Serializes information the current object + * @param Droplet The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDroplet(writer, droplet = {}, isSerializingDerivedType = false) { + if (!droplet || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("backup_ids", droplet.backupIds); + writer.writeDateValue("created_at", droplet.createdAt); + writer.writeNumberValue("disk", droplet.disk); + writer.writeCollectionOfObjectValues("disk_info", droplet.diskInfo, serializeDisk_info); + writer.writeCollectionOfPrimitiveValues("features", droplet.features); + writer.writeObjectValue("gpu_info", droplet.gpuInfo, serializeGpu_info); + writer.writeNumberValue("id", droplet.id); + writer.writeObjectValue("image", droplet.image, serializeImage); + writer.writeObjectValue("kernel", droplet.kernel, serializeKernel); + writer.writeBooleanValue("locked", droplet.locked); + writer.writeNumberValue("memory", droplet.memory); + writer.writeStringValue("name", droplet.name); + writer.writeObjectValue("networks", droplet.networks, serializeDroplet_networks); + writer.writeObjectValue("next_backup_window", droplet.nextBackupWindow, serializeDroplet_next_backup_window); + writer.writeObjectValue("region", droplet.region, serializeRegion); + writer.writeObjectValue("size", droplet.size, serializeSize); + writer.writeStringValue("size_slug", droplet.sizeSlug); + writer.writeCollectionOfPrimitiveValues("snapshot_ids", droplet.snapshotIds); + writer.writeEnumValue("status", droplet.status); + writer.writeCollectionOfPrimitiveValues("tags", droplet.tags); + writer.writeNumberValue("vcpus", droplet.vcpus); + writer.writeCollectionOfPrimitiveValues("volume_ids", droplet.volumeIds); + writer.writeStringValue("vpc_uuid", droplet.vpcUuid); + writer.writeAdditionalData(droplet.additionalData); +} +/** + * Serializes information the current object + * @param Droplet_action The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDroplet_action(writer, droplet_action = {}, isSerializingDerivedType = false) { + if (!droplet_action || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("type", droplet_action.type); + writer.writeAdditionalData(droplet_action.additionalData); +} +/** + * Serializes information the current object + * @param Droplet_action_change_backup_policy The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDroplet_action_change_backup_policy(writer, droplet_action_change_backup_policy = {}, isSerializingDerivedType = false) { + if (!droplet_action_change_backup_policy || isSerializingDerivedType) { + return; + } + serializeDroplet_action(writer, droplet_action_change_backup_policy, isSerializingDerivedType); + writer.writeObjectValue("backup_policy", droplet_action_change_backup_policy.backupPolicy, serializeDroplet_backup_policy); +} +/** + * Serializes information the current object + * @param Droplet_action_change_kernel The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDroplet_action_change_kernel(writer, droplet_action_change_kernel = {}, isSerializingDerivedType = false) { + if (!droplet_action_change_kernel || isSerializingDerivedType) { + return; + } + serializeDroplet_action(writer, droplet_action_change_kernel, isSerializingDerivedType); + writer.writeNumberValue("kernel", droplet_action_change_kernel.kernel); +} +/** + * Serializes information the current object + * @param Droplet_action_enable_backups The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDroplet_action_enable_backups(writer, droplet_action_enable_backups = {}, isSerializingDerivedType = false) { + if (!droplet_action_enable_backups || isSerializingDerivedType) { + return; + } + serializeDroplet_action(writer, droplet_action_enable_backups, isSerializingDerivedType); + writer.writeObjectValue("backup_policy", droplet_action_enable_backups.backupPolicy, serializeDroplet_backup_policy); +} +/** + * Serializes information the current object + * @param Droplet_action_rebuild The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDroplet_action_rebuild(writer, droplet_action_rebuild = {}, isSerializingDerivedType = false) { + if (!droplet_action_rebuild || isSerializingDerivedType) { + return; + } + serializeDroplet_action(writer, droplet_action_rebuild, isSerializingDerivedType); + if (typeof droplet_action_rebuild.image === "number") { + writer.writeNumberValue("image", droplet_action_rebuild.image); + } + else if (typeof droplet_action_rebuild.image === "string") { + writer.writeStringValue("image", droplet_action_rebuild.image); + } +} +/** + * Serializes information the current object + * @param Droplet_action_rebuild_image The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param key The name of the property to write in the serialization. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDroplet_action_rebuild_image(writer, key, droplet_action_rebuild_image, isSerializingDerivedType = false) { + if (droplet_action_rebuild_image === undefined || droplet_action_rebuild_image === null) + return; + if (typeof droplet_action_rebuild_image === "number") { + writer.writeNumberValue(undefined, droplet_action_rebuild_image); + } + else if (typeof droplet_action_rebuild_image === "string") { + writer.writeStringValue(undefined, droplet_action_rebuild_image); + } +} +/** + * Serializes information the current object + * @param Droplet_action_rename The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDroplet_action_rename(writer, droplet_action_rename = {}, isSerializingDerivedType = false) { + if (!droplet_action_rename || isSerializingDerivedType) { + return; + } + serializeDroplet_action(writer, droplet_action_rename, isSerializingDerivedType); + writer.writeStringValue("name", droplet_action_rename.name); +} +/** + * Serializes information the current object + * @param Droplet_action_resize The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDroplet_action_resize(writer, droplet_action_resize = {}, isSerializingDerivedType = false) { + if (!droplet_action_resize || isSerializingDerivedType) { + return; + } + serializeDroplet_action(writer, droplet_action_resize, isSerializingDerivedType); + writer.writeBooleanValue("disk", droplet_action_resize.disk); + writer.writeStringValue("size", droplet_action_resize.size); +} +/** + * Serializes information the current object + * @param Droplet_action_restore The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDroplet_action_restore(writer, droplet_action_restore = {}, isSerializingDerivedType = false) { + if (!droplet_action_restore || isSerializingDerivedType) { + return; + } + serializeDroplet_action(writer, droplet_action_restore, isSerializingDerivedType); + writer.writeNumberValue("image", droplet_action_restore.image); +} +/** + * Serializes information the current object + * @param Droplet_action_snapshot The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDroplet_action_snapshot(writer, droplet_action_snapshot = {}, isSerializingDerivedType = false) { + if (!droplet_action_snapshot || isSerializingDerivedType) { + return; + } + serializeDroplet_action(writer, droplet_action_snapshot, isSerializingDerivedType); + writer.writeStringValue("name", droplet_action_snapshot.name); +} +/** + * Serializes information the current object + * @param Droplet_backup_policy The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDroplet_backup_policy(writer, droplet_backup_policy = {}, isSerializingDerivedType = false) { + if (!droplet_backup_policy || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("hour", droplet_backup_policy.hour); + writer.writeEnumValue("plan", droplet_backup_policy.plan); + writer.writeEnumValue("weekday", droplet_backup_policy.weekday); + writer.writeAdditionalData(droplet_backup_policy.additionalData); +} +/** + * Serializes information the current object + * @param Droplet_backup_policy_record The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDroplet_backup_policy_record(writer, droplet_backup_policy_record = {}, isSerializingDerivedType = false) { + if (!droplet_backup_policy_record || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("backup_enabled", droplet_backup_policy_record.backupEnabled); + writer.writeObjectValue("backup_policy", droplet_backup_policy_record.backupPolicy, serializeDroplet_backup_policy); + writer.writeNumberValue("droplet_id", droplet_backup_policy_record.dropletId); + writer.writeObjectValue("next_backup_window", droplet_backup_policy_record.nextBackupWindow, serializeDroplet_next_backup_window); + writer.writeAdditionalData(droplet_backup_policy_record.additionalData); +} +/** + * Serializes information the current object + * @param Droplet_create The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDroplet_create(writer, droplet_create = {}, isSerializingDerivedType = false) { + if (!droplet_create || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("backup_policy", droplet_create.backupPolicy, serializeDroplet_backup_policy); + writer.writeBooleanValue("backups", droplet_create.backups); + if (typeof droplet_create.image === "number") { + writer.writeNumberValue("image", droplet_create.image); + } + else if (typeof droplet_create.image === "string") { + writer.writeStringValue("image", droplet_create.image); + } + writer.writeBooleanValue("ipv6", droplet_create.ipv6); + writer.writeBooleanValue("monitoring", droplet_create.monitoring); + writer.writeBooleanValue("private_networking", droplet_create.privateNetworking); + writer.writeStringValue("region", droplet_create.region); + writer.writeStringValue("size", droplet_create.size); + writer.writeCollectionOfPrimitiveValues("ssh_keys", droplet_create.sshKeys); + writer.writeCollectionOfPrimitiveValues("tags", droplet_create.tags); + writer.writeStringValue("user_data", droplet_create.userData); + writer.writeCollectionOfPrimitiveValues("volumes", droplet_create.volumes); + writer.writeStringValue("vpc_uuid", droplet_create.vpcUuid); + writer.writeBooleanValue("with_droplet_agent", droplet_create.withDropletAgent); + writer.writeAdditionalData(droplet_create.additionalData); +} +/** + * Serializes information the current object + * @param Droplet_create_image The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param key The name of the property to write in the serialization. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDroplet_create_image(writer, key, droplet_create_image, isSerializingDerivedType = false) { + if (droplet_create_image === undefined || droplet_create_image === null) + return; + if (typeof droplet_create_image === "number") { + writer.writeNumberValue(undefined, droplet_create_image); + } + else if (typeof droplet_create_image === "string") { + writer.writeStringValue(undefined, droplet_create_image); + } +} +/** + * Serializes information the current object + * @param Droplet_multi_create The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDroplet_multi_create(writer, droplet_multi_create = {}, isSerializingDerivedType = false) { + if (!droplet_multi_create || isSerializingDerivedType) { + return; + } + serializeDroplet_create(writer, droplet_multi_create, isSerializingDerivedType); + writer.writeCollectionOfPrimitiveValues("names", droplet_multi_create.names); +} +/** + * Serializes information the current object + * @param Droplet_networks The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDroplet_networks(writer, droplet_networks = {}, isSerializingDerivedType = false) { + if (!droplet_networks || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("v4", droplet_networks.v4, serializeNetwork_v4); + writer.writeCollectionOfObjectValues("v6", droplet_networks.v6, serializeNetwork_v6); + writer.writeAdditionalData(droplet_networks.additionalData); +} +/** + * Serializes information the current object + * @param Droplet_next_backup_window The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDroplet_next_backup_window(writer, droplet_next_backup_window = {}, isSerializingDerivedType = false) { + if (!droplet_next_backup_window || isSerializingDerivedType) { + return; + } + writer.writeDateValue("end", droplet_next_backup_window.end); + writer.writeDateValue("start", droplet_next_backup_window.start); + writer.writeAdditionalData(droplet_next_backup_window.additionalData); +} +/** + * Serializes information the current object + * @param Droplet_single_create The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDroplet_single_create(writer, droplet_single_create = {}, isSerializingDerivedType = false) { + if (!droplet_single_create || isSerializingDerivedType) { + return; + } + serializeDroplet_create(writer, droplet_single_create, isSerializingDerivedType); + writer.writeStringValue("name", droplet_single_create.name); +} +/** + * Serializes information the current object + * @param Droplet_snapshot The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDroplet_snapshot(writer, droplet_snapshot = {}, isSerializingDerivedType = false) { + if (!droplet_snapshot || isSerializingDerivedType) { + return; + } + serializeSnapshots_base(writer, droplet_snapshot, isSerializingDerivedType); + writer.writeNumberValue("id", droplet_snapshot.id); + writer.writeEnumValue("type", droplet_snapshot.type); +} +/** + * Serializes information the current object + * @param Elasticsearch_logsink The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeElasticsearch_logsink(writer, elasticsearch_logsink = {}, isSerializingDerivedType = false) { + if (!elasticsearch_logsink || isSerializingDerivedType) { + return; + } + writer.writeStringValue("ca", elasticsearch_logsink.ca); + writer.writeNumberValue("index_days_max", elasticsearch_logsink.indexDaysMax); + writer.writeStringValue("index_prefix", elasticsearch_logsink.indexPrefix); + writer.writeNumberValue("timeout", elasticsearch_logsink.timeout); + writer.writeStringValue("url", elasticsearch_logsink.url); + writer.writeAdditionalData(elasticsearch_logsink.additionalData); +} +/** + * Serializes information the current object + * @param Error_with_root_causes The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeError_with_root_causes(writer, error_with_root_causes = {}, isSerializingDerivedType = false) { + if (!error_with_root_causes || isSerializingDerivedType) { + return; + } + writer.writeStringValue("error", error_with_root_causes.errorEscaped); + writer.writeCollectionOfPrimitiveValues("messages", error_with_root_causes.messages); + writer.writeCollectionOfPrimitiveValues("root_causes", error_with_root_causes.rootCauses); + writer.writeAdditionalData(error_with_root_causes.additionalData); +} +/** + * Serializes information the current object + * @param ErrorEscaped The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeErrorEscaped(writer, errorEscaped = {}, isSerializingDerivedType = false) { + if (!errorEscaped || isSerializingDerivedType) { + return; + } + writer.writeStringValue("id", errorEscaped.id); + writer.writeStringValue("message", errorEscaped.messageEscaped); + writer.writeStringValue("request_id", errorEscaped.requestId); + writer.writeAdditionalData(errorEscaped.additionalData); +} +/** + * Serializes information the current object + * @param Events_logs The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeEvents_logs(writer, events_logs = {}, isSerializingDerivedType = false) { + if (!events_logs || isSerializingDerivedType) { + return; + } + writer.writeStringValue("cluster_name", events_logs.clusterName); + writer.writeStringValue("create_time", events_logs.createTime); + writer.writeEnumValue("event_type", events_logs.eventType); + writer.writeStringValue("id", events_logs.id); + writer.writeAdditionalData(events_logs.additionalData); +} +/** + * Serializes information the current object + * @param Firewall The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeFirewall(writer, firewall = {}, isSerializingDerivedType = false) { + if (!firewall || isSerializingDerivedType) { + return; + } + serializeFirewall_rules(writer, firewall, isSerializingDerivedType); + writer.writeCollectionOfPrimitiveValues("droplet_ids", firewall.dropletIds); + writer.writeStringValue("name", firewall.name); + writer.writeCollectionOfPrimitiveValues("tags", firewall.tags); +} +/** + * Serializes information the current object + * @param Firewall_pending_changes The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeFirewall_pending_changes(writer, firewall_pending_changes = {}, isSerializingDerivedType = false) { + if (!firewall_pending_changes || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("droplet_id", firewall_pending_changes.dropletId); + writer.writeBooleanValue("removing", firewall_pending_changes.removing); + writer.writeStringValue("status", firewall_pending_changes.status); + writer.writeAdditionalData(firewall_pending_changes.additionalData); +} +/** + * Serializes information the current object + * @param Firewall_rule The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeFirewall_rule(writer, firewall_rule = {}, isSerializingDerivedType = false) { + if (!firewall_rule || isSerializingDerivedType) { + return; + } + writer.writeStringValue("description", firewall_rule.description); + writer.writeEnumValue("type", firewall_rule.type); + writer.writeStringValue("uuid", firewall_rule.uuid); + writer.writeStringValue("value", firewall_rule.value); + writer.writeAdditionalData(firewall_rule.additionalData); +} +/** + * Serializes information the current object + * @param Firewall_rule_base The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeFirewall_rule_base(writer, firewall_rule_base = {}, isSerializingDerivedType = false) { + if (!firewall_rule_base || isSerializingDerivedType) { + return; + } + writer.writeStringValue("ports", firewall_rule_base.ports); + writer.writeEnumValue("protocol", firewall_rule_base.protocol); + writer.writeAdditionalData(firewall_rule_base.additionalData); +} +/** + * Serializes information the current object + * @param Firewall_rule_target The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeFirewall_rule_target(writer, firewall_rule_target = {}, isSerializingDerivedType = false) { + if (!firewall_rule_target || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("addresses", firewall_rule_target.addresses); + writer.writeCollectionOfPrimitiveValues("droplet_ids", firewall_rule_target.dropletIds); + writer.writeCollectionOfPrimitiveValues("kubernetes_ids", firewall_rule_target.kubernetesIds); + writer.writeCollectionOfPrimitiveValues("load_balancer_uids", firewall_rule_target.loadBalancerUids); + writer.writeCollectionOfPrimitiveValues("tags", firewall_rule_target.tags); + writer.writeAdditionalData(firewall_rule_target.additionalData); +} +/** + * Serializes information the current object + * @param Firewall_rules The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeFirewall_rules(writer, firewall_rules = {}, isSerializingDerivedType = false) { + if (!firewall_rules || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("inbound_rules", firewall_rules.inboundRules, serializeFirewall_rules_inbound_rules); + writer.writeCollectionOfObjectValues("outbound_rules", firewall_rules.outboundRules, serializeFirewall_rules_outbound_rules); + writer.writeAdditionalData(firewall_rules.additionalData); +} +/** + * Serializes information the current object + * @param Firewall_rules_inbound_rules The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeFirewall_rules_inbound_rules(writer, firewall_rules_inbound_rules = {}, isSerializingDerivedType = false) { + if (!firewall_rules_inbound_rules || isSerializingDerivedType) { + return; + } + serializeFirewall_rule_base(writer, firewall_rules_inbound_rules, isSerializingDerivedType); + writer.writeObjectValue("sources", firewall_rules_inbound_rules.sources, serializeFirewall_rule_target); +} +/** + * Serializes information the current object + * @param Firewall_rules_outbound_rules The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeFirewall_rules_outbound_rules(writer, firewall_rules_outbound_rules = {}, isSerializingDerivedType = false) { + if (!firewall_rules_outbound_rules || isSerializingDerivedType) { + return; + } + serializeFirewall_rule_base(writer, firewall_rules_outbound_rules, isSerializingDerivedType); + writer.writeObjectValue("destinations", firewall_rules_outbound_rules.destinations, serializeFirewall_rule_target); +} +/** + * Serializes information the current object + * @param Floating_ip The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeFloating_ip(writer, floating_ip = {}, isSerializingDerivedType = false) { + if (!floating_ip || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("droplet", floating_ip.droplet, serializeDroplet); + writer.writeStringValue("ip", floating_ip.ip); + writer.writeBooleanValue("locked", floating_ip.locked); + writer.writeGuidValue("project_id", floating_ip.projectId); + writer.writeObjectValue("region", floating_ip.region, serializeRegion); + writer.writeAdditionalData(floating_ip.additionalData); +} +/** + * Serializes information the current object + * @param Floating_ip_action_assign The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeFloating_ip_action_assign(writer, floating_ip_action_assign = {}, isSerializingDerivedType = false) { + if (!floating_ip_action_assign || isSerializingDerivedType) { + return; + } + serializeFloatingIPsAction(writer, floating_ip_action_assign, isSerializingDerivedType); + writer.writeNumberValue("droplet_id", floating_ip_action_assign.dropletId); +} +/** + * Serializes information the current object + * @param Floating_ip_action_unassign The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeFloating_ip_action_unassign(writer, floating_ip_action_unassign = {}, isSerializingDerivedType = false) { + if (!floating_ip_action_unassign || isSerializingDerivedType) { + return; + } + serializeFloatingIPsAction(writer, floating_ip_action_unassign, isSerializingDerivedType); +} +/** + * Serializes information the current object + * @param Floating_ip_createMember1 The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeFloating_ip_createMember1(writer, floating_ip_createMember1 = {}, isSerializingDerivedType = false) { + if (!floating_ip_createMember1 || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("droplet_id", floating_ip_createMember1.dropletId); + writer.writeAdditionalData(floating_ip_createMember1.additionalData); +} +/** + * Serializes information the current object + * @param Floating_ip_createMember2 The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeFloating_ip_createMember2(writer, floating_ip_createMember2 = {}, isSerializingDerivedType = false) { + if (!floating_ip_createMember2 || isSerializingDerivedType) { + return; + } + writer.writeGuidValue("project_id", floating_ip_createMember2.projectId); + writer.writeStringValue("region", floating_ip_createMember2.region); + writer.writeAdditionalData(floating_ip_createMember2.additionalData); +} +/** + * Serializes information the current object + * @param FloatingIPsAction The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeFloatingIPsAction(writer, floatingIPsAction = {}, isSerializingDerivedType = false) { + if (!floatingIPsAction || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("type", floatingIPsAction.type); + writer.writeAdditionalData(floatingIPsAction.additionalData); + switch (floatingIPsAction.type) { + case "assign": + serializeFloating_ip_action_assign(writer, floatingIPsAction, true); + break; + case "unassign": + serializeFloating_ip_action_unassign(writer, floatingIPsAction, true); + break; + } +} +/** + * Serializes information the current object + * @param Forward_links The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeForward_links(writer, forward_links = {}, isSerializingDerivedType = false) { + if (!forward_links || isSerializingDerivedType) { + return; + } + writer.writeStringValue("last", forward_links.last); + writer.writeStringValue("next", forward_links.next); + writer.writeAdditionalData(forward_links.additionalData); +} +/** + * Serializes information the current object + * @param Forwarding_rule The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeForwarding_rule(writer, forwarding_rule = {}, isSerializingDerivedType = false) { + if (!forwarding_rule || isSerializingDerivedType) { + return; + } + writer.writeStringValue("certificate_id", forwarding_rule.certificateId); + writer.writeNumberValue("entry_port", forwarding_rule.entryPort); + writer.writeEnumValue("entry_protocol", forwarding_rule.entryProtocol); + writer.writeNumberValue("target_port", forwarding_rule.targetPort); + writer.writeEnumValue("target_protocol", forwarding_rule.targetProtocol); + writer.writeBooleanValue("tls_passthrough", forwarding_rule.tlsPassthrough); + writer.writeAdditionalData(forwarding_rule.additionalData); +} +/** + * Serializes information the current object + * @param Garbage_collection The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeGarbage_collection(writer, garbage_collection = {}, isSerializingDerivedType = false) { + if (!garbage_collection || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("blobs_deleted", garbage_collection.blobsDeleted); + writer.writeDateValue("created_at", garbage_collection.createdAt); + writer.writeNumberValue("freed_bytes", garbage_collection.freedBytes); + writer.writeStringValue("registry_name", garbage_collection.registryName); + writer.writeEnumValue("status", garbage_collection.status); + writer.writeDateValue("updated_at", garbage_collection.updatedAt); + writer.writeStringValue("uuid", garbage_collection.uuid); + writer.writeAdditionalData(garbage_collection.additionalData); +} +/** + * Serializes information the current object + * @param GenaiapiRegion The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeGenaiapiRegion(writer, genaiapiRegion = {}, isSerializingDerivedType = false) { + if (!genaiapiRegion || isSerializingDerivedType) { + return; + } + writer.writeStringValue("inference_url", genaiapiRegion.inferenceUrl); + writer.writeStringValue("region", genaiapiRegion.region); + writer.writeBooleanValue("serves_batch", genaiapiRegion.servesBatch); + writer.writeBooleanValue("serves_inference", genaiapiRegion.servesInference); + writer.writeStringValue("stream_inference_url", genaiapiRegion.streamInferenceUrl); + writer.writeAdditionalData(genaiapiRegion.additionalData); +} +/** + * Serializes information the current object + * @param Glb_settings The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeGlb_settings(writer, glb_settings = {}, isSerializingDerivedType = false) { + if (!glb_settings || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("cdn", glb_settings.cdn, serializeGlb_settings_cdn); + writer.writeNumberValue("failover_threshold", glb_settings.failoverThreshold); + writer.writeObjectValue("region_priorities", glb_settings.regionPriorities, serializeGlb_settings_region_priorities); + writer.writeNumberValue("target_port", glb_settings.targetPort); + writer.writeEnumValue("target_protocol", glb_settings.targetProtocol); + writer.writeAdditionalData(glb_settings.additionalData); +} +/** + * Serializes information the current object + * @param Glb_settings_cdn The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeGlb_settings_cdn(writer, glb_settings_cdn = {}, isSerializingDerivedType = false) { + if (!glb_settings_cdn || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("is_enabled", glb_settings_cdn.isEnabled); + writer.writeAdditionalData(glb_settings_cdn.additionalData); +} +/** + * Serializes information the current object + * @param Glb_settings_region_priorities The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeGlb_settings_region_priorities(writer, glb_settings_region_priorities = {}, isSerializingDerivedType = false) { + if (!glb_settings_region_priorities || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(glb_settings_region_priorities.additionalData); +} +/** + * Serializes information the current object + * @param Gpu_info The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeGpu_info(writer, gpu_info = {}, isSerializingDerivedType = false) { + if (!gpu_info || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("count", gpu_info.count); + writer.writeStringValue("model", gpu_info.model); + writer.writeObjectValue("vram", gpu_info.vram, serializeGpu_info_vram); + writer.writeAdditionalData(gpu_info.additionalData); +} +/** + * Serializes information the current object + * @param Gpu_info_vram The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeGpu_info_vram(writer, gpu_info_vram = {}, isSerializingDerivedType = false) { + if (!gpu_info_vram || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("amount", gpu_info_vram.amount); + writer.writeStringValue("unit", gpu_info_vram.unit); + writer.writeAdditionalData(gpu_info_vram.additionalData); +} +/** + * Serializes information the current object + * @param Grant The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeGrant(writer, grant = {}, isSerializingDerivedType = false) { + if (!grant || isSerializingDerivedType) { + return; + } + writer.writeStringValue("bucket", grant.bucket); + writer.writeStringValue("permission", grant.permission); + writer.writeAdditionalData(grant.additionalData); +} +/** + * Serializes information the current object + * @param Health_check The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeHealth_check(writer, health_check = {}, isSerializingDerivedType = false) { + if (!health_check || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("check_interval_seconds", health_check.checkIntervalSeconds); + writer.writeNumberValue("healthy_threshold", health_check.healthyThreshold); + writer.writeStringValue("path", health_check.path ?? "/"); + writer.writeNumberValue("port", health_check.port); + writer.writeEnumValue("protocol", health_check.protocol ?? Health_check_protocolObject.Http); + writer.writeNumberValue("response_timeout_seconds", health_check.responseTimeoutSeconds); + writer.writeNumberValue("unhealthy_threshold", health_check.unhealthyThreshold); + writer.writeAdditionalData(health_check.additionalData); +} +/** + * Serializes information the current object + * @param History The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeHistory(writer, history = {}, isSerializingDerivedType = false) { + if (!history || isSerializingDerivedType) { + return; + } + writer.writeDateValue("created_at", history.createdAt); + writer.writeNumberValue("current_instance_count", history.currentInstanceCount); + writer.writeNumberValue("desired_instance_count", history.desiredInstanceCount); + writer.writeStringValue("history_event_id", history.historyEventId); + writer.writeEnumValue("reason", history.reason); + writer.writeEnumValue("status", history.status); + writer.writeDateValue("updated_at", history.updatedAt); + writer.writeAdditionalData(history.additionalData); +} +/** + * Serializes information the current object + * @param Image The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeImage(writer, image = {}, isSerializingDerivedType = false) { + if (!image || isSerializingDerivedType) { + return; + } + writer.writeDateValue("created_at", image.createdAt); + writer.writeStringValue("description", image.description); + writer.writeEnumValue("distribution", image.distribution); + writer.writeStringValue("error_message", image.errorMessage); + writer.writeNumberValue("min_disk_size", image.minDiskSize); + writer.writeStringValue("name", image.name); + writer.writeBooleanValue("public", image.public); + if (image.regions) + writer.writeCollectionOfEnumValues("regions", image.regions); + writer.writeNumberValue("size_gigabytes", image.sizeGigabytes); + writer.writeStringValue("slug", image.slug); + writer.writeEnumValue("status", image.status); + writer.writeCollectionOfPrimitiveValues("tags", image.tags); + writer.writeEnumValue("type", image.type); + writer.writeAdditionalData(image.additionalData); +} +/** + * Serializes information the current object + * @param Image_action_base The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeImage_action_base(writer, image_action_base = {}, isSerializingDerivedType = false) { + if (!image_action_base || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("type", image_action_base.type); + writer.writeAdditionalData(image_action_base.additionalData); +} +/** + * Serializes information the current object + * @param Image_action_transfer The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeImage_action_transfer(writer, image_action_transfer = {}, isSerializingDerivedType = false) { + if (!image_action_transfer || isSerializingDerivedType) { + return; + } + serializeImage_action_base(writer, image_action_transfer, isSerializingDerivedType); + writer.writeEnumValue("region", image_action_transfer.region); +} +/** + * Serializes information the current object + * @param Image_new_custom The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeImage_new_custom(writer, image_new_custom = {}, isSerializingDerivedType = false) { + if (!image_new_custom || isSerializingDerivedType) { + return; + } + serializeImage_update(writer, image_new_custom, isSerializingDerivedType); + writer.writeEnumValue("region", image_new_custom.region); + writer.writeCollectionOfPrimitiveValues("tags", image_new_custom.tags); + writer.writeStringValue("url", image_new_custom.url); +} +/** + * Serializes information the current object + * @param Image_update The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeImage_update(writer, image_update = {}, isSerializingDerivedType = false) { + if (!image_update || isSerializingDerivedType) { + return; + } + writer.writeStringValue("description", image_update.description); + writer.writeEnumValue("distribution", image_update.distribution); + writer.writeStringValue("name", image_update.name); + writer.writeAdditionalData(image_update.additionalData); +} +/** + * Serializes information the current object + * @param Invoice_item The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeInvoice_item(writer, invoice_item = {}, isSerializingDerivedType = false) { + if (!invoice_item || isSerializingDerivedType) { + return; + } + writer.writeStringValue("amount", invoice_item.amount); + writer.writeStringValue("description", invoice_item.description); + writer.writeStringValue("duration", invoice_item.duration); + writer.writeStringValue("duration_unit", invoice_item.durationUnit); + writer.writeStringValue("end_time", invoice_item.endTime); + writer.writeStringValue("group_description", invoice_item.groupDescription); + writer.writeStringValue("product", invoice_item.product); + writer.writeStringValue("project_name", invoice_item.projectName); + writer.writeStringValue("resource_id", invoice_item.resourceId); + writer.writeStringValue("resource_uuid", invoice_item.resourceUuid); + writer.writeStringValue("start_time", invoice_item.startTime); + writer.writeAdditionalData(invoice_item.additionalData); +} +/** + * Serializes information the current object + * @param Invoice_preview The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeInvoice_preview(writer, invoice_preview = {}, isSerializingDerivedType = false) { + if (!invoice_preview || isSerializingDerivedType) { + return; + } + writer.writeStringValue("amount", invoice_preview.amount); + writer.writeStringValue("invoice_id", invoice_preview.invoiceId); + writer.writeStringValue("invoice_period", invoice_preview.invoicePeriod); + writer.writeStringValue("invoice_uuid", invoice_preview.invoiceUuid); + writer.writeStringValue("updated_at", invoice_preview.updatedAt); + writer.writeAdditionalData(invoice_preview.additionalData); +} +/** + * Serializes information the current object + * @param Invoice_summary The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeInvoice_summary(writer, invoice_summary = {}, isSerializingDerivedType = false) { + if (!invoice_summary || isSerializingDerivedType) { + return; + } + writer.writeStringValue("amount", invoice_summary.amount); + writer.writeStringValue("billing_period", invoice_summary.billingPeriod); + writer.writeObjectValue("credits_and_adjustments", invoice_summary.creditsAndAdjustments, serializeSimple_charge); + writer.writeStringValue("invoice_id", invoice_summary.invoiceId); + writer.writeStringValue("invoice_uuid", invoice_summary.invoiceUuid); + writer.writeObjectValue("overages", invoice_summary.overages, serializeSimple_charge); + writer.writeObjectValue("product_charges", invoice_summary.productCharges, serializeProduct_usage_charges); + writer.writeObjectValue("taxes", invoice_summary.taxes, serializeSimple_charge); + writer.writeObjectValue("user_billing_address", invoice_summary.userBillingAddress, serializeBilling_address); + writer.writeStringValue("user_company", invoice_summary.userCompany); + writer.writeStringValue("user_email", invoice_summary.userEmail); + writer.writeStringValue("user_name", invoice_summary.userName); + writer.writeAdditionalData(invoice_summary.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Kafka_advanced_config The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKafka_advanced_config(writer, kafka_advanced_config = {}, isSerializingDerivedType = false) { + if (!kafka_advanced_config || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("auto_create_topics_enable", kafka_advanced_config.autoCreateTopicsEnable); + writer.writeEnumValue("compression_type", kafka_advanced_config.compressionType); + writer.writeNumberValue("connections_max_idle_ms", kafka_advanced_config.connectionsMaxIdleMs); + writer.writeNumberValue("default_replication_factor", kafka_advanced_config.defaultReplicationFactor); + writer.writeNumberValue("group_initial_rebalance_delay_ms", kafka_advanced_config.groupInitialRebalanceDelayMs); + writer.writeNumberValue("group_max_session_timeout_ms", kafka_advanced_config.groupMaxSessionTimeoutMs); + writer.writeNumberValue("group_min_session_timeout_ms", kafka_advanced_config.groupMinSessionTimeoutMs); + writer.writeNumberValue("log_cleaner_delete_retention_ms", kafka_advanced_config.logCleanerDeleteRetentionMs); + writer.writeNumberValue("log_cleaner_max_compaction_lag_ms", kafka_advanced_config.logCleanerMaxCompactionLagMs); + writer.writeNumberValue("log_cleaner_min_cleanable_ratio", kafka_advanced_config.logCleanerMinCleanableRatio); + writer.writeNumberValue("log_cleaner_min_compaction_lag_ms", kafka_advanced_config.logCleanerMinCompactionLagMs); + writer.writeEnumValue("log_cleanup_policy", kafka_advanced_config.logCleanupPolicy); + writer.writeNumberValue("log_flush_interval_messages", kafka_advanced_config.logFlushIntervalMessages); + writer.writeNumberValue("log_flush_interval_ms", kafka_advanced_config.logFlushIntervalMs); + writer.writeNumberValue("log_index_interval_bytes", kafka_advanced_config.logIndexIntervalBytes); + writer.writeNumberValue("log_index_size_max_bytes", kafka_advanced_config.logIndexSizeMaxBytes); + writer.writeBooleanValue("log_message_downconversion_enable", kafka_advanced_config.logMessageDownconversionEnable); + writer.writeNumberValue("log_message_timestamp_difference_max_ms", kafka_advanced_config.logMessageTimestampDifferenceMaxMs); + writer.writeEnumValue("log_message_timestamp_type", kafka_advanced_config.logMessageTimestampType); + writer.writeBooleanValue("log_preallocate", kafka_advanced_config.logPreallocate); + writer.writeNumberValue("log_retention_bytes", kafka_advanced_config.logRetentionBytes); + writer.writeNumberValue("log_retention_hours", kafka_advanced_config.logRetentionHours); + writer.writeNumberValue("log_retention_ms", kafka_advanced_config.logRetentionMs); + writer.writeNumberValue("log_roll_jitter_ms", kafka_advanced_config.logRollJitterMs); + writer.writeNumberValue("log_roll_ms", kafka_advanced_config.logRollMs); + writer.writeNumberValue("log_segment_bytes", kafka_advanced_config.logSegmentBytes); + writer.writeNumberValue("log_segment_delete_delay_ms", kafka_advanced_config.logSegmentDeleteDelayMs); + writer.writeNumberValue("max_connections_per_ip", kafka_advanced_config.maxConnectionsPerIp); + writer.writeNumberValue("max_incremental_fetch_session_cache_slots", kafka_advanced_config.maxIncrementalFetchSessionCacheSlots); + writer.writeNumberValue("message_max_bytes", kafka_advanced_config.messageMaxBytes); + writer.writeNumberValue("min_insync_replicas", kafka_advanced_config.minInsyncReplicas); + writer.writeNumberValue("num_partitions", kafka_advanced_config.numPartitions); + writer.writeNumberValue("offsets_retention_minutes", kafka_advanced_config.offsetsRetentionMinutes); + writer.writeNumberValue("producer_purgatory_purge_interval_requests", kafka_advanced_config.producerPurgatoryPurgeIntervalRequests); + writer.writeNumberValue("replica_fetch_max_bytes", kafka_advanced_config.replicaFetchMaxBytes); + writer.writeNumberValue("replica_fetch_response_max_bytes", kafka_advanced_config.replicaFetchResponseMaxBytes); + writer.writeBooleanValue("schema_registry", kafka_advanced_config.schemaRegistry); + writer.writeNumberValue("socket_request_max_bytes", kafka_advanced_config.socketRequestMaxBytes); + writer.writeNumberValue("transaction_remove_expired_transaction_cleanup_interval_ms", kafka_advanced_config.transactionRemoveExpiredTransactionCleanupIntervalMs); + writer.writeNumberValue("transaction_state_log_segment_bytes", kafka_advanced_config.transactionStateLogSegmentBytes); + writer.writeAdditionalData(kafka_advanced_config.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Kafka_schema_verbose The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKafka_schema_verbose(writer, kafka_schema_verbose = {}, isSerializingDerivedType = false) { + if (!kafka_schema_verbose || isSerializingDerivedType) { + return; + } + writer.writeStringValue("schema", kafka_schema_verbose.schema); + writer.writeNumberValue("schema_id", kafka_schema_verbose.schemaId); + writer.writeEnumValue("schema_type", kafka_schema_verbose.schemaType); + writer.writeStringValue("subject_name", kafka_schema_verbose.subjectName); + writer.writeAdditionalData(kafka_schema_verbose.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Kafka_schema_version_verbose The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKafka_schema_version_verbose(writer, kafka_schema_version_verbose = {}, isSerializingDerivedType = false) { + if (!kafka_schema_version_verbose || isSerializingDerivedType) { + return; + } + writer.writeStringValue("schema", kafka_schema_version_verbose.schema); + writer.writeNumberValue("schema_id", kafka_schema_version_verbose.schemaId); + writer.writeEnumValue("schema_type", kafka_schema_version_verbose.schemaType); + writer.writeStringValue("subject_name", kafka_schema_version_verbose.subjectName); + writer.writeStringValue("version", kafka_schema_version_verbose.version); + writer.writeAdditionalData(kafka_schema_version_verbose.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Kafka_topic The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKafka_topic(writer, kafka_topic = {}, isSerializingDerivedType = false) { + if (!kafka_topic || isSerializingDerivedType) { + return; + } + serializeKafka_topic_base(writer, kafka_topic, isSerializingDerivedType); + writer.writeEnumValue("state", kafka_topic.state); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Kafka_topic_base The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKafka_topic_base(writer, kafka_topic_base = {}, isSerializingDerivedType = false) { + if (!kafka_topic_base || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", kafka_topic_base.name); + writer.writeNumberValue("partition_count", kafka_topic_base.partitionCount); + writer.writeNumberValue("replication_factor", kafka_topic_base.replicationFactor); + writer.writeAdditionalData(kafka_topic_base.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Kafka_topic_config The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKafka_topic_config(writer, kafka_topic_config = {}, isSerializingDerivedType = false) { + if (!kafka_topic_config || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("cleanup_policy", kafka_topic_config.cleanupPolicy ?? Kafka_topic_config_cleanup_policyObject.Delete); + writer.writeEnumValue("compression_type", kafka_topic_config.compressionType ?? Kafka_topic_config_compression_typeObject.Producer); + writer.writeNumberValue("delete_retention_ms", kafka_topic_config.deleteRetentionMs); + writer.writeNumberValue("file_delete_delay_ms", kafka_topic_config.fileDeleteDelayMs); + writer.writeNumberValue("flush_messages", kafka_topic_config.flushMessages); + writer.writeNumberValue("flush_ms", kafka_topic_config.flushMs); + writer.writeNumberValue("index_interval_bytes", kafka_topic_config.indexIntervalBytes); + writer.writeNumberValue("max_compaction_lag_ms", kafka_topic_config.maxCompactionLagMs); + writer.writeNumberValue("max_message_bytes", kafka_topic_config.maxMessageBytes); + writer.writeBooleanValue("message_down_conversion_enable", kafka_topic_config.messageDownConversionEnable); + writer.writeEnumValue("message_format_version", kafka_topic_config.messageFormatVersion ?? Kafka_topic_config_message_format_versionObject.ThreeZeroIV1); + writer.writeEnumValue("message_timestamp_type", kafka_topic_config.messageTimestampType ?? Kafka_topic_config_message_timestamp_typeObject.Create_time); + writer.writeNumberValue("min_cleanable_dirty_ratio", kafka_topic_config.minCleanableDirtyRatio); + writer.writeNumberValue("min_compaction_lag_ms", kafka_topic_config.minCompactionLagMs); + writer.writeNumberValue("min_insync_replicas", kafka_topic_config.minInsyncReplicas); + writer.writeBooleanValue("preallocate", kafka_topic_config.preallocate); + writer.writeNumberValue("retention_bytes", kafka_topic_config.retentionBytes); + writer.writeNumberValue("retention_ms", kafka_topic_config.retentionMs); + writer.writeNumberValue("segment_bytes", kafka_topic_config.segmentBytes); + writer.writeNumberValue("segment_jitter_ms", kafka_topic_config.segmentJitterMs); + writer.writeNumberValue("segment_ms", kafka_topic_config.segmentMs); + writer.writeAdditionalData(kafka_topic_config.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Kafka_topic_create The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKafka_topic_create(writer, kafka_topic_create = {}, isSerializingDerivedType = false) { + if (!kafka_topic_create || isSerializingDerivedType) { + return; + } + serializeKafka_topic_base(writer, kafka_topic_create, isSerializingDerivedType); + writer.writeObjectValue("config", kafka_topic_create.config, serializeKafka_topic_config); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Kafka_topic_partition The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKafka_topic_partition(writer, kafka_topic_partition = {}, isSerializingDerivedType = false) { + if (!kafka_topic_partition || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("consumer_groups", kafka_topic_partition.consumerGroups, serializeKafka_topic_partition_consumer_groups); + writer.writeNumberValue("earliest_offset", kafka_topic_partition.earliestOffset); + writer.writeNumberValue("id", kafka_topic_partition.id); + writer.writeNumberValue("in_sync_replicas", kafka_topic_partition.inSyncReplicas); + writer.writeNumberValue("size", kafka_topic_partition.size); + writer.writeAdditionalData(kafka_topic_partition.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Kafka_topic_partition_consumer_groups The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKafka_topic_partition_consumer_groups(writer, kafka_topic_partition_consumer_groups = {}, isSerializingDerivedType = false) { + if (!kafka_topic_partition_consumer_groups || isSerializingDerivedType) { + return; + } + writer.writeStringValue("group_name", kafka_topic_partition_consumer_groups.groupName); + writer.writeNumberValue("offset", kafka_topic_partition_consumer_groups.offset); + writer.writeAdditionalData(kafka_topic_partition_consumer_groups.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Kafka_topic_update The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKafka_topic_update(writer, kafka_topic_update = {}, isSerializingDerivedType = false) { + if (!kafka_topic_update || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("config", kafka_topic_update.config, serializeKafka_topic_config); + writer.writeNumberValue("partition_count", kafka_topic_update.partitionCount); + writer.writeNumberValue("replication_factor", kafka_topic_update.replicationFactor); + writer.writeAdditionalData(kafka_topic_update.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Kafka_topic_verbose The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKafka_topic_verbose(writer, kafka_topic_verbose = {}, isSerializingDerivedType = false) { + if (!kafka_topic_verbose || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("config", kafka_topic_verbose.config, serializeKafka_topic_config); + writer.writeStringValue("name", kafka_topic_verbose.name); + writer.writeCollectionOfObjectValues("partitions", kafka_topic_verbose.partitions, serializeKafka_topic_partition); + writer.writeNumberValue("replication_factor", kafka_topic_verbose.replicationFactor); + writer.writeEnumValue("state", kafka_topic_verbose.state); + writer.writeAdditionalData(kafka_topic_verbose.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Kernel The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKernel(writer, kernel = {}, isSerializingDerivedType = false) { + if (!kernel || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("id", kernel.id); + writer.writeStringValue("name", kernel.name); + writer.writeStringValue("version", kernel.version); + writer.writeAdditionalData(kernel.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Key The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKey(writer, key = {}, isSerializingDerivedType = false) { + if (!key || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("grants", key.grants, serializeGrant); + writer.writeStringValue("name", key.name); + writer.writeAdditionalData(key.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Key_create_response The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKey_create_response(writer, key_create_response = {}, isSerializingDerivedType = false) { + if (!key_create_response || isSerializingDerivedType) { + return; + } + serializeKey(writer, key_create_response, isSerializingDerivedType); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Kubernetes_node_pool The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKubernetes_node_pool(writer, kubernetes_node_pool = {}, isSerializingDerivedType = false) { + if (!kubernetes_node_pool || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("auto_scale", kubernetes_node_pool.autoScale); + writer.writeNumberValue("count", kubernetes_node_pool.count); + writer.writeObjectValue("labels", kubernetes_node_pool.labels, serializeKubernetes_node_pool_labels); + writer.writeNumberValue("max_nodes", kubernetes_node_pool.maxNodes); + writer.writeNumberValue("min_nodes", kubernetes_node_pool.minNodes); + writer.writeStringValue("name", kubernetes_node_pool.name); + writer.writeStringValue("size", kubernetes_node_pool.size); + writer.writeCollectionOfPrimitiveValues("tags", kubernetes_node_pool.tags); + writer.writeCollectionOfObjectValues("taints", kubernetes_node_pool.taints, serializeKubernetes_node_pool_taint); + writer.writeAdditionalData(kubernetes_node_pool.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Kubernetes_node_pool_labels The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKubernetes_node_pool_labels(writer, kubernetes_node_pool_labels = {}, isSerializingDerivedType = false) { + if (!kubernetes_node_pool_labels || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(kubernetes_node_pool_labels.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Kubernetes_node_pool_taint The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKubernetes_node_pool_taint(writer, kubernetes_node_pool_taint = {}, isSerializingDerivedType = false) { + if (!kubernetes_node_pool_taint || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("effect", kubernetes_node_pool_taint.effect); + writer.writeStringValue("key", kubernetes_node_pool_taint.key); + writer.writeStringValue("value", kubernetes_node_pool_taint.value); + writer.writeAdditionalData(kubernetes_node_pool_taint.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Kubernetes_node_pool_update The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKubernetes_node_pool_update(writer, kubernetes_node_pool_update = {}, isSerializingDerivedType = false) { + if (!kubernetes_node_pool_update || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("auto_scale", kubernetes_node_pool_update.autoScale); + writer.writeNumberValue("count", kubernetes_node_pool_update.count); + writer.writeObjectValue("labels", kubernetes_node_pool_update.labels, serializeKubernetes_node_pool_update_labels); + writer.writeNumberValue("max_nodes", kubernetes_node_pool_update.maxNodes); + writer.writeNumberValue("min_nodes", kubernetes_node_pool_update.minNodes); + writer.writeStringValue("name", kubernetes_node_pool_update.name); + writer.writeCollectionOfPrimitiveValues("tags", kubernetes_node_pool_update.tags); + writer.writeCollectionOfObjectValues("taints", kubernetes_node_pool_update.taints, serializeKubernetes_node_pool_taint); + writer.writeAdditionalData(kubernetes_node_pool_update.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Kubernetes_node_pool_update_labels The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKubernetes_node_pool_update_labels(writer, kubernetes_node_pool_update_labels = {}, isSerializingDerivedType = false) { + if (!kubernetes_node_pool_update_labels || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(kubernetes_node_pool_update_labels.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Kubernetes_options The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKubernetes_options(writer, kubernetes_options = {}, isSerializingDerivedType = false) { + if (!kubernetes_options || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("options", kubernetes_options.options, serializeKubernetes_options_options); + writer.writeAdditionalData(kubernetes_options.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Kubernetes_options_options The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKubernetes_options_options(writer, kubernetes_options_options = {}, isSerializingDerivedType = false) { + if (!kubernetes_options_options || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("regions", kubernetes_options_options.regions, serializeKubernetes_region); + writer.writeCollectionOfObjectValues("sizes", kubernetes_options_options.sizes, serializeKubernetes_size); + writer.writeCollectionOfObjectValues("versions", kubernetes_options_options.versions, serializeKubernetes_version); + writer.writeAdditionalData(kubernetes_options_options.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Kubernetes_region The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKubernetes_region(writer, kubernetes_region = {}, isSerializingDerivedType = false) { + if (!kubernetes_region || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", kubernetes_region.name); + writer.writeStringValue("slug", kubernetes_region.slug); + writer.writeAdditionalData(kubernetes_region.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Kubernetes_size The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKubernetes_size(writer, kubernetes_size = {}, isSerializingDerivedType = false) { + if (!kubernetes_size || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", kubernetes_size.name); + writer.writeStringValue("slug", kubernetes_size.slug); + writer.writeAdditionalData(kubernetes_size.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Kubernetes_version The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeKubernetes_version(writer, kubernetes_version = {}, isSerializingDerivedType = false) { + if (!kubernetes_version || isSerializingDerivedType) { + return; + } + writer.writeStringValue("kubernetes_version", kubernetes_version.kubernetesVersion); + writer.writeStringValue("slug", kubernetes_version.slug); + writer.writeCollectionOfPrimitiveValues("supported_features", kubernetes_version.supportedFeatures); + writer.writeAdditionalData(kubernetes_version.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Lb_firewall The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeLb_firewall(writer, lb_firewall = {}, isSerializingDerivedType = false) { + if (!lb_firewall || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("allow", lb_firewall.allow); + writer.writeCollectionOfPrimitiveValues("deny", lb_firewall.deny); + writer.writeAdditionalData(lb_firewall.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Load_balancer The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeLoad_balancer(writer, load_balancer = {}, isSerializingDerivedType = false) { + if (!load_balancer || isSerializingDerivedType) { + return; + } + serializeLoad_balancer_base(writer, load_balancer, isSerializingDerivedType); + writer.writeCollectionOfPrimitiveValues("droplet_ids", load_balancer.dropletIds); + writer.writeObjectValue("region", load_balancer.region, serializeLoad_balancer_region); + writer.writeStringValue("tag", load_balancer.tag); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Load_balancer_base The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeLoad_balancer_base(writer, load_balancer_base = {}, isSerializingDerivedType = false) { + if (!load_balancer_base || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("algorithm", load_balancer_base.algorithm ?? Load_balancer_base_algorithmObject.Round_robin); + writer.writeBooleanValue("disable_lets_encrypt_dns_records", load_balancer_base.disableLetsEncryptDnsRecords); + writer.writeCollectionOfObjectValues("domains", load_balancer_base.domains, serializeDomains); + writer.writeBooleanValue("enable_backend_keepalive", load_balancer_base.enableBackendKeepalive); + writer.writeBooleanValue("enable_proxy_protocol", load_balancer_base.enableProxyProtocol); + writer.writeObjectValue("firewall", load_balancer_base.firewall, serializeLb_firewall); + writer.writeCollectionOfObjectValues("forwarding_rules", load_balancer_base.forwardingRules, serializeForwarding_rule); + writer.writeObjectValue("glb_settings", load_balancer_base.glbSettings, serializeGlb_settings); + writer.writeObjectValue("health_check", load_balancer_base.healthCheck, serializeHealth_check); + writer.writeNumberValue("http_idle_timeout_seconds", load_balancer_base.httpIdleTimeoutSeconds); + writer.writeStringValue("name", load_balancer_base.name); + writer.writeEnumValue("network", load_balancer_base.network ?? Load_balancer_base_networkObject.EXTERNAL); + writer.writeEnumValue("network_stack", load_balancer_base.networkStack ?? Load_balancer_base_network_stackObject.IPV4); + writer.writeStringValue("project_id", load_balancer_base.projectId); + writer.writeBooleanValue("redirect_http_to_https", load_balancer_base.redirectHttpToHttps); + writer.writeEnumValue("size", load_balancer_base.size ?? Load_balancer_base_sizeObject.LbSmall); + writer.writeNumberValue("size_unit", load_balancer_base.sizeUnit); + writer.writeObjectValue("sticky_sessions", load_balancer_base.stickySessions, serializeSticky_sessions); + writer.writeCollectionOfPrimitiveValues("target_load_balancer_ids", load_balancer_base.targetLoadBalancerIds); + writer.writeEnumValue("tls_cipher_policy", load_balancer_base.tlsCipherPolicy ?? Load_balancer_base_tls_cipher_policyObject.DEFAULTEscaped); + writer.writeEnumValue("type", load_balancer_base.type ?? Load_balancer_base_typeObject.REGIONAL); + writer.writeGuidValue("vpc_uuid", load_balancer_base.vpcUuid); + writer.writeAdditionalData(load_balancer_base.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Load_balancer_region The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeLoad_balancer_region(writer, load_balancer_region = {}, isSerializingDerivedType = false) { + if (!load_balancer_region || isSerializingDerivedType) { + return; + } + serializeRegion(writer, load_balancer_region, isSerializingDerivedType); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Logsink_base The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeLogsink_base(writer, logsink_base = {}, isSerializingDerivedType = false) { + if (!logsink_base || isSerializingDerivedType) { + return; + } + writer.writeStringValue("sink_name", logsink_base.sinkName); + writer.writeEnumValue("sink_type", logsink_base.sinkType); + writer.writeAdditionalData(logsink_base.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Logsink_base_verbose The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeLogsink_base_verbose(writer, logsink_base_verbose = {}, isSerializingDerivedType = false) { + if (!logsink_base_verbose || isSerializingDerivedType) { + return; + } + writer.writeStringValue("sink_id", logsink_base_verbose.sinkId); + writer.writeStringValue("sink_name", logsink_base_verbose.sinkName); + writer.writeEnumValue("sink_type", logsink_base_verbose.sinkType); + writer.writeAdditionalData(logsink_base_verbose.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Logsink_create The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeLogsink_create(writer, logsink_create = {}, isSerializingDerivedType = false) { + if (!logsink_create || isSerializingDerivedType) { + return; + } + serializeLogsink_base(writer, logsink_create, isSerializingDerivedType); + writer.writeObjectValue("config", logsink_create.config, serializeLogsink_create_config); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Logsink_create_config The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeLogsink_create_config(writer, logsink_create_config = {}, isSerializingDerivedType = false) { + serializeDatadog_logsink(writer, logsink_create_config); + serializeElasticsearch_logsink(writer, logsink_create_config); + serializeOpensearch_logsink(writer, logsink_create_config); + serializeRsyslog_logsink(writer, logsink_create_config); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Logsink_schema The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeLogsink_schema(writer, logsink_schema = {}, isSerializingDerivedType = false) { + if (!logsink_schema || isSerializingDerivedType) { + return; + } + serializeLogsink_verbose(writer, logsink_schema, isSerializingDerivedType); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Logsink_update The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeLogsink_update(writer, logsink_update = {}, isSerializingDerivedType = false) { + if (!logsink_update || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("config", logsink_update.config, serializeLogsink_update_config); + writer.writeAdditionalData(logsink_update.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Logsink_update_config The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeLogsink_update_config(writer, logsink_update_config = {}, isSerializingDerivedType = false) { + serializeDatadog_logsink(writer, logsink_update_config); + serializeElasticsearch_logsink(writer, logsink_update_config); + serializeOpensearch_logsink(writer, logsink_update_config); + serializeRsyslog_logsink(writer, logsink_update_config); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Logsink_verbose The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeLogsink_verbose(writer, logsink_verbose = {}, isSerializingDerivedType = false) { + if (!logsink_verbose || isSerializingDerivedType) { + return; + } + serializeLogsink_base_verbose(writer, logsink_verbose, isSerializingDerivedType); + writer.writeObjectValue("config", logsink_verbose.config, serializeLogsink_verbose_config); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Logsink_verbose_config The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeLogsink_verbose_config(writer, logsink_verbose_config = {}, isSerializingDerivedType = false) { + serializeDatadog_logsink(writer, logsink_verbose_config); + serializeElasticsearch_logsink(writer, logsink_verbose_config); + serializeOpensearch_logsink(writer, logsink_verbose_config); + serializeRsyslog_logsink(writer, logsink_verbose_config); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Maintenance_policy The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeMaintenance_policy(writer, maintenance_policy = {}, isSerializingDerivedType = false) { + if (!maintenance_policy || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("day", maintenance_policy.day); + writer.writeStringValue("start_time", maintenance_policy.startTime); + writer.writeAdditionalData(maintenance_policy.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Member The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeMember(writer, member = {}, isSerializingDerivedType = false) { + if (!member || isSerializingDerivedType) { + return; + } + writer.writeDateValue("created_at", member.createdAt); + writer.writeObjectValue("current_utilization", member.currentUtilization, serializeMember_current_utilization); + writer.writeNumberValue("droplet_id", member.dropletId); + writer.writeStringValue("health_status", member.healthStatus); + writer.writeEnumValue("status", member.status); + writer.writeDateValue("updated_at", member.updatedAt); + writer.writeAdditionalData(member.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Member_current_utilization The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeMember_current_utilization(writer, member_current_utilization = {}, isSerializingDerivedType = false) { + if (!member_current_utilization || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("cpu", member_current_utilization.cpu); + writer.writeNumberValue("memory", member_current_utilization.memory); + writer.writeAdditionalData(member_current_utilization.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Meta_properties The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeMeta_properties(writer, meta_properties = {}, isSerializingDerivedType = false) { + if (!meta_properties || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("total", meta_properties.total); + writer.writeAdditionalData(meta_properties.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Metrics The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeMetrics(writer, metrics = {}, isSerializingDerivedType = false) { + if (!metrics || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("data", metrics.data, serializeMetrics_data); + writer.writeEnumValue("status", metrics.status); + writer.writeAdditionalData(metrics.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Metrics_data The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeMetrics_data(writer, metrics_data = {}, isSerializingDerivedType = false) { + if (!metrics_data || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("result", metrics_data.result, serializeMetrics_result); + writer.writeEnumValue("resultType", metrics_data.resultType); + writer.writeAdditionalData(metrics_data.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Metrics_result The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeMetrics_result(writer, metrics_result = {}, isSerializingDerivedType = false) { + if (!metrics_result || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("metric", metrics_result.metric, serializeMetrics_result_metric); + writer.writeObjectValue("values", metrics_result.values); + writer.writeAdditionalData(metrics_result.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Metrics_result_metric The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeMetrics_result_metric(writer, metrics_result_metric = {}, isSerializingDerivedType = false) { + if (!metrics_result_metric || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(metrics_result_metric.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Mongo_advanced_config The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeMongo_advanced_config(writer, mongo_advanced_config = {}, isSerializingDerivedType = false) { + if (!mongo_advanced_config || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("default_read_concern", mongo_advanced_config.defaultReadConcern ?? Mongo_advanced_config_default_read_concernObject.Local); + writer.writeStringValue("default_write_concern", mongo_advanced_config.defaultWriteConcern ?? "majority"); + writer.writeNumberValue("slow_op_threshold_ms", mongo_advanced_config.slowOpThresholdMs); + writer.writeNumberValue("transaction_lifetime_limit_seconds", mongo_advanced_config.transactionLifetimeLimitSeconds); + writer.writeNumberValue("verbosity", mongo_advanced_config.verbosity); + writer.writeAdditionalData(mongo_advanced_config.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Multiregistry The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeMultiregistry(writer, multiregistry = {}, isSerializingDerivedType = false) { + if (!multiregistry || isSerializingDerivedType) { + return; + } + serializeRegistry_base(writer, multiregistry, isSerializingDerivedType); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Multiregistry_create The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeMultiregistry_create(writer, multiregistry_create = {}, isSerializingDerivedType = false) { + if (!multiregistry_create || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", multiregistry_create.name); + writer.writeEnumValue("region", multiregistry_create.region); + writer.writeEnumValue("subscription_tier_slug", multiregistry_create.subscriptionTierSlug); + writer.writeAdditionalData(multiregistry_create.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Mysql_advanced_config The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeMysql_advanced_config(writer, mysql_advanced_config = {}, isSerializingDerivedType = false) { + if (!mysql_advanced_config || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("backup_hour", mysql_advanced_config.backupHour); + writer.writeNumberValue("backup_minute", mysql_advanced_config.backupMinute); + writer.writeNumberValue("binlog_retention_period", mysql_advanced_config.binlogRetentionPeriod); + writer.writeNumberValue("connect_timeout", mysql_advanced_config.connectTimeout); + writer.writeStringValue("default_time_zone", mysql_advanced_config.defaultTimeZone); + writer.writeNumberValue("group_concat_max_len", mysql_advanced_config.groupConcatMaxLen); + writer.writeNumberValue("information_schema_stats_expiry", mysql_advanced_config.informationSchemaStatsExpiry); + writer.writeNumberValue("innodb_change_buffer_max_size", mysql_advanced_config.innodbChangeBufferMaxSize); + writer.writeNumberValue("innodb_flush_neighbors", mysql_advanced_config.innodbFlushNeighbors); + writer.writeNumberValue("innodb_ft_min_token_size", mysql_advanced_config.innodbFtMinTokenSize); + writer.writeStringValue("innodb_ft_server_stopword_table", mysql_advanced_config.innodbFtServerStopwordTable); + writer.writeNumberValue("innodb_lock_wait_timeout", mysql_advanced_config.innodbLockWaitTimeout); + writer.writeNumberValue("innodb_log_buffer_size", mysql_advanced_config.innodbLogBufferSize); + writer.writeNumberValue("innodb_online_alter_log_max_size", mysql_advanced_config.innodbOnlineAlterLogMaxSize); + writer.writeBooleanValue("innodb_print_all_deadlocks", mysql_advanced_config.innodbPrintAllDeadlocks); + writer.writeNumberValue("innodb_read_io_threads", mysql_advanced_config.innodbReadIoThreads); + writer.writeBooleanValue("innodb_rollback_on_timeout", mysql_advanced_config.innodbRollbackOnTimeout); + writer.writeNumberValue("innodb_thread_concurrency", mysql_advanced_config.innodbThreadConcurrency); + writer.writeNumberValue("innodb_write_io_threads", mysql_advanced_config.innodbWriteIoThreads); + writer.writeNumberValue("interactive_timeout", mysql_advanced_config.interactiveTimeout); + writer.writeEnumValue("internal_tmp_mem_storage_engine", mysql_advanced_config.internalTmpMemStorageEngine); + writer.writeEnumValue("log_output", mysql_advanced_config.logOutput ?? Mysql_advanced_config_log_outputObject.NONE); + writer.writeNumberValue("long_query_time", mysql_advanced_config.longQueryTime); + writer.writeNumberValue("max_allowed_packet", mysql_advanced_config.maxAllowedPacket); + writer.writeNumberValue("max_heap_table_size", mysql_advanced_config.maxHeapTableSize); + writer.writeObjectValue("mysql_incremental_backup", mysql_advanced_config.mysqlIncrementalBackup, serializeMysql_incremental_backup); + writer.writeNumberValue("net_buffer_length", mysql_advanced_config.netBufferLength); + writer.writeNumberValue("net_read_timeout", mysql_advanced_config.netReadTimeout); + writer.writeNumberValue("net_write_timeout", mysql_advanced_config.netWriteTimeout); + writer.writeBooleanValue("slow_query_log", mysql_advanced_config.slowQueryLog); + writer.writeNumberValue("sort_buffer_size", mysql_advanced_config.sortBufferSize); + writer.writeStringValue("sql_mode", mysql_advanced_config.sqlMode); + writer.writeBooleanValue("sql_require_primary_key", mysql_advanced_config.sqlRequirePrimaryKey); + writer.writeNumberValue("tmp_table_size", mysql_advanced_config.tmpTableSize); + writer.writeNumberValue("wait_timeout", mysql_advanced_config.waitTimeout); + writer.writeAdditionalData(mysql_advanced_config.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Mysql_incremental_backup The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeMysql_incremental_backup(writer, mysql_incremental_backup = {}, isSerializingDerivedType = false) { + if (!mysql_incremental_backup || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("enabled", mysql_incremental_backup.enabled); + writer.writeStringValue("full_backup_week_schedule", mysql_incremental_backup.fullBackupWeekSchedule); + writer.writeAdditionalData(mysql_incremental_backup.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Mysql_settings The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeMysql_settings(writer, mysql_settings = {}, isSerializingDerivedType = false) { + if (!mysql_settings || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("auth_plugin", mysql_settings.authPlugin); + writer.writeAdditionalData(mysql_settings.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Namespace_info The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNamespace_info(writer, namespace_info = {}, isSerializingDerivedType = false) { + if (!namespace_info || isSerializingDerivedType) { + return; + } + writer.writeStringValue("api_host", namespace_info.apiHost); + writer.writeStringValue("created_at", namespace_info.createdAt); + writer.writeStringValue("key", namespace_info.key); + writer.writeStringValue("label", namespace_info.label); + writer.writeStringValue("namespace", namespace_info.namespace); + writer.writeStringValue("region", namespace_info.region); + writer.writeStringValue("updated_at", namespace_info.updatedAt); + writer.writeStringValue("uuid", namespace_info.uuid); + writer.writeAdditionalData(namespace_info.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Neighbor_ids The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNeighbor_ids(writer, neighbor_ids = {}, isSerializingDerivedType = false) { + if (!neighbor_ids || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("neighbor_ids", neighbor_ids.neighborIds); + writer.writeAdditionalData(neighbor_ids.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Network_v4 The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNetwork_v4(writer, network_v4 = {}, isSerializingDerivedType = false) { + if (!network_v4 || isSerializingDerivedType) { + return; + } + writer.writeStringValue("gateway", network_v4.gateway); + writer.writeStringValue("ip_address", network_v4.ipAddress); + writer.writeStringValue("netmask", network_v4.netmask); + writer.writeEnumValue("type", network_v4.type); + writer.writeAdditionalData(network_v4.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Network_v6 The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNetwork_v6(writer, network_v6 = {}, isSerializingDerivedType = false) { + if (!network_v6 || isSerializingDerivedType) { + return; + } + writer.writeStringValue("gateway", network_v6.gateway); + writer.writeStringValue("ip_address", network_v6.ipAddress); + writer.writeNumberValue("netmask", network_v6.netmask); + writer.writeEnumValue("type", network_v6.type); + writer.writeAdditionalData(network_v6.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Nfs_action The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNfs_action(writer, nfs_action = {}, isSerializingDerivedType = false) { + if (!nfs_action || isSerializingDerivedType) { + return; + } + writer.writeStringValue("region", nfs_action.region); + writer.writeEnumValue("type", nfs_action.type); + writer.writeAdditionalData(nfs_action.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Nfs_action_attach The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNfs_action_attach(writer, nfs_action_attach = {}, isSerializingDerivedType = false) { + if (!nfs_action_attach || isSerializingDerivedType) { + return; + } + serializeNfs_action(writer, nfs_action_attach, isSerializingDerivedType); + writer.writeObjectValue("params", nfs_action_attach.params, serializeNfs_action_attach_params); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Nfs_action_attach_params The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNfs_action_attach_params(writer, nfs_action_attach_params = {}, isSerializingDerivedType = false) { + if (!nfs_action_attach_params || isSerializingDerivedType) { + return; + } + writer.writeStringValue("vpc_id", nfs_action_attach_params.vpcId); + writer.writeAdditionalData(nfs_action_attach_params.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Nfs_action_detach The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNfs_action_detach(writer, nfs_action_detach = {}, isSerializingDerivedType = false) { + if (!nfs_action_detach || isSerializingDerivedType) { + return; + } + serializeNfs_action(writer, nfs_action_detach, isSerializingDerivedType); + writer.writeObjectValue("params", nfs_action_detach.params, serializeNfs_action_detach_params); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Nfs_action_detach_params The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNfs_action_detach_params(writer, nfs_action_detach_params = {}, isSerializingDerivedType = false) { + if (!nfs_action_detach_params || isSerializingDerivedType) { + return; + } + writer.writeStringValue("vpc_id", nfs_action_detach_params.vpcId); + writer.writeAdditionalData(nfs_action_detach_params.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Nfs_action_resize The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNfs_action_resize(writer, nfs_action_resize = {}, isSerializingDerivedType = false) { + if (!nfs_action_resize || isSerializingDerivedType) { + return; + } + serializeNfs_action(writer, nfs_action_resize, isSerializingDerivedType); + writer.writeObjectValue("params", nfs_action_resize.params, serializeNfs_action_resize_params); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Nfs_action_resize_params The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNfs_action_resize_params(writer, nfs_action_resize_params = {}, isSerializingDerivedType = false) { + if (!nfs_action_resize_params || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("size_gib", nfs_action_resize_params.sizeGib); + writer.writeAdditionalData(nfs_action_resize_params.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Nfs_action_snapshot The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNfs_action_snapshot(writer, nfs_action_snapshot = {}, isSerializingDerivedType = false) { + if (!nfs_action_snapshot || isSerializingDerivedType) { + return; + } + serializeNfs_action(writer, nfs_action_snapshot, isSerializingDerivedType); + writer.writeObjectValue("params", nfs_action_snapshot.params, serializeNfs_action_snapshot_params); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Nfs_action_snapshot_params The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNfs_action_snapshot_params(writer, nfs_action_snapshot_params = {}, isSerializingDerivedType = false) { + if (!nfs_action_snapshot_params || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", nfs_action_snapshot_params.name); + writer.writeAdditionalData(nfs_action_snapshot_params.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Nfs_action_switch_performance_tier The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNfs_action_switch_performance_tier(writer, nfs_action_switch_performance_tier = {}, isSerializingDerivedType = false) { + if (!nfs_action_switch_performance_tier || isSerializingDerivedType) { + return; + } + serializeNfs_action(writer, nfs_action_switch_performance_tier, isSerializingDerivedType); + writer.writeObjectValue("params", nfs_action_switch_performance_tier.params, serializeNfs_action_switch_performance_tier_params); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Nfs_action_switch_performance_tier_params The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNfs_action_switch_performance_tier_params(writer, nfs_action_switch_performance_tier_params = {}, isSerializingDerivedType = false) { + if (!nfs_action_switch_performance_tier_params || isSerializingDerivedType) { + return; + } + writer.writeStringValue("performance_tier", nfs_action_switch_performance_tier_params.performanceTier); + writer.writeAdditionalData(nfs_action_switch_performance_tier_params.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Nfs_actions_response The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNfs_actions_response(writer, nfs_actions_response = {}, isSerializingDerivedType = false) { + if (!nfs_actions_response || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("action", nfs_actions_response.action, serializeNfs_actions_response_action); + writer.writeAdditionalData(nfs_actions_response.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Nfs_actions_response_action The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNfs_actions_response_action(writer, nfs_actions_response_action = {}, isSerializingDerivedType = false) { + if (!nfs_actions_response_action || isSerializingDerivedType) { + return; + } + writer.writeStringValue("region_slug", nfs_actions_response_action.regionSlug); + writer.writeGuidValue("resource_id", nfs_actions_response_action.resourceId); + writer.writeEnumValue("resource_type", nfs_actions_response_action.resourceType); + writer.writeDateValue("started_at", nfs_actions_response_action.startedAt); + writer.writeEnumValue("status", nfs_actions_response_action.status); + writer.writeStringValue("type", nfs_actions_response_action.type); + writer.writeAdditionalData(nfs_actions_response_action.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Nfs_create_response The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNfs_create_response(writer, nfs_create_response = {}, isSerializingDerivedType = false) { + if (!nfs_create_response || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("share", nfs_create_response.share, serializeNfs_response); + writer.writeAdditionalData(nfs_create_response.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Nfs_get_response The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNfs_get_response(writer, nfs_get_response = {}, isSerializingDerivedType = false) { + if (!nfs_get_response || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("share", nfs_get_response.share, serializeNfs_response); + writer.writeAdditionalData(nfs_get_response.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Nfs_list_response The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNfs_list_response(writer, nfs_list_response = {}, isSerializingDerivedType = false) { + if (!nfs_list_response || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("shares", nfs_list_response.shares, serializeNfs_response); + writer.writeAdditionalData(nfs_list_response.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Nfs_request The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNfs_request(writer, nfs_request = {}, isSerializingDerivedType = false) { + if (!nfs_request || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", nfs_request.name); + writer.writeStringValue("performance_tier", nfs_request.performanceTier); + writer.writeStringValue("region", nfs_request.region); + writer.writeNumberValue("size_gib", nfs_request.sizeGib); + writer.writeCollectionOfPrimitiveValues("vpc_ids", nfs_request.vpcIds); + writer.writeAdditionalData(nfs_request.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Nfs_response The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNfs_response(writer, nfs_response = {}, isSerializingDerivedType = false) { + if (!nfs_response || isSerializingDerivedType) { + return; + } + writer.writeStringValue("host", nfs_response.host); + writer.writeStringValue("mount_path", nfs_response.mountPath); + writer.writeStringValue("name", nfs_response.name); + writer.writeStringValue("region", nfs_response.region); + writer.writeNumberValue("size_gib", nfs_response.sizeGib); + writer.writeCollectionOfPrimitiveValues("vpc_ids", nfs_response.vpcIds); + writer.writeAdditionalData(nfs_response.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Nfs_snapshot_get_response The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNfs_snapshot_get_response(writer, nfs_snapshot_get_response = {}, isSerializingDerivedType = false) { + if (!nfs_snapshot_get_response || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("snapshot", nfs_snapshot_get_response.snapshot, serializeNfs_snapshot_response); + writer.writeAdditionalData(nfs_snapshot_get_response.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Nfs_snapshot_list_response The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNfs_snapshot_list_response(writer, nfs_snapshot_list_response = {}, isSerializingDerivedType = false) { + if (!nfs_snapshot_list_response || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("snapshots", nfs_snapshot_list_response.snapshots, serializeNfs_snapshot_response); + writer.writeAdditionalData(nfs_snapshot_list_response.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Nfs_snapshot_response The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNfs_snapshot_response(writer, nfs_snapshot_response = {}, isSerializingDerivedType = false) { + if (!nfs_snapshot_response || isSerializingDerivedType) { + return; + } + writer.writeDateValue("created_at", nfs_snapshot_response.createdAt); + writer.writeStringValue("id", nfs_snapshot_response.id); + writer.writeStringValue("name", nfs_snapshot_response.name); + writer.writeStringValue("region", nfs_snapshot_response.region); + writer.writeGuidValue("share_id", nfs_snapshot_response.shareId); + writer.writeNumberValue("size_gib", nfs_snapshot_response.sizeGib); + writer.writeEnumValue("status", nfs_snapshot_response.status); + writer.writeAdditionalData(nfs_snapshot_response.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Node The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNode(writer, node = {}, isSerializingDerivedType = false) { + if (!node || isSerializingDerivedType) { + return; + } + writer.writeDateValue("created_at", node.createdAt); + writer.writeStringValue("droplet_id", node.dropletId); + writer.writeGuidValue("id", node.id); + writer.writeStringValue("name", node.name); + writer.writeObjectValue("status", node.status, serializeNode_status); + writer.writeDateValue("updated_at", node.updatedAt); + writer.writeAdditionalData(node.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Node_status The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNode_status(writer, node_status = {}, isSerializingDerivedType = false) { + if (!node_status || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("state", node_status.state); + writer.writeAdditionalData(node_status.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Notification The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNotification(writer, notification = {}, isSerializingDerivedType = false) { + if (!notification || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("email", notification.email); + writer.writeCollectionOfObjectValues("slack", notification.slack, serializeNotification_slack); + writer.writeAdditionalData(notification.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Notification_slack The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNotification_slack(writer, notification_slack = {}, isSerializingDerivedType = false) { + if (!notification_slack || isSerializingDerivedType) { + return; + } + writer.writeStringValue("channel", notification_slack.channel); + writer.writeStringValue("url", notification_slack.url); + writer.writeAdditionalData(notification_slack.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Nvidia_gpu_device_plugin The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeNvidia_gpu_device_plugin(writer, nvidia_gpu_device_plugin = {}, isSerializingDerivedType = false) { + if (!nvidia_gpu_device_plugin || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("enabled", nvidia_gpu_device_plugin.enabled); + writer.writeAdditionalData(nvidia_gpu_device_plugin.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param OneClicks The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOneClicks(writer, oneClicks = {}, isSerializingDerivedType = false) { + if (!oneClicks || isSerializingDerivedType) { + return; + } + writer.writeStringValue("slug", oneClicks.slug); + writer.writeStringValue("type", oneClicks.type); + writer.writeAdditionalData(oneClicks.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param OneClicks_create The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOneClicks_create(writer, oneClicks_create = {}, isSerializingDerivedType = false) { + if (!oneClicks_create || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("addon_slugs", oneClicks_create.addonSlugs); + writer.writeStringValue("cluster_uuid", oneClicks_create.clusterUuid); + writer.writeAdditionalData(oneClicks_create.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Online_migration The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOnline_migration(writer, online_migration = {}, isSerializingDerivedType = false) { + if (!online_migration || isSerializingDerivedType) { + return; + } + writer.writeStringValue("created_at", online_migration.createdAt); + writer.writeStringValue("id", online_migration.id); + writer.writeEnumValue("status", online_migration.status); + writer.writeAdditionalData(online_migration.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Opensearch_advanced_config The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOpensearch_advanced_config(writer, opensearch_advanced_config = {}, isSerializingDerivedType = false) { + if (!opensearch_advanced_config || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("action_auto_create_index_enabled", opensearch_advanced_config.actionAutoCreateIndexEnabled); + writer.writeBooleanValue("action_destructive_requires_name", opensearch_advanced_config.actionDestructiveRequiresName); + writer.writeNumberValue("cluster_max_shards_per_node", opensearch_advanced_config.clusterMaxShardsPerNode); + writer.writeNumberValue("cluster_routing_allocation_node_concurrent_recoveries", opensearch_advanced_config.clusterRoutingAllocationNodeConcurrentRecoveries); + writer.writeBooleanValue("enable_security_audit", opensearch_advanced_config.enableSecurityAudit); + writer.writeNumberValue("http_max_content_length_bytes", opensearch_advanced_config.httpMaxContentLengthBytes); + writer.writeNumberValue("http_max_header_size_bytes", opensearch_advanced_config.httpMaxHeaderSizeBytes); + writer.writeNumberValue("http_max_initial_line_length_bytes", opensearch_advanced_config.httpMaxInitialLineLengthBytes); + writer.writeNumberValue("indices_fielddata_cache_size_percentage", opensearch_advanced_config.indicesFielddataCacheSizePercentage); + writer.writeNumberValue("indices_memory_index_buffer_size_percentage", opensearch_advanced_config.indicesMemoryIndexBufferSizePercentage); + writer.writeNumberValue("indices_memory_max_index_buffer_size_mb", opensearch_advanced_config.indicesMemoryMaxIndexBufferSizeMb); + writer.writeNumberValue("indices_memory_min_index_buffer_size_mb", opensearch_advanced_config.indicesMemoryMinIndexBufferSizeMb); + writer.writeNumberValue("indices_queries_cache_size_percentage", opensearch_advanced_config.indicesQueriesCacheSizePercentage); + writer.writeNumberValue("indices_query_bool_max_clause_count", opensearch_advanced_config.indicesQueryBoolMaxClauseCount); + writer.writeNumberValue("indices_recovery_max_concurrent_file_chunks", opensearch_advanced_config.indicesRecoveryMaxConcurrentFileChunks); + writer.writeNumberValue("indices_recovery_max_mb_per_sec", opensearch_advanced_config.indicesRecoveryMaxMbPerSec); + writer.writeBooleanValue("ism_enabled", opensearch_advanced_config.ismEnabled); + writer.writeBooleanValue("ism_history_enabled", opensearch_advanced_config.ismHistoryEnabled); + writer.writeNumberValue("ism_history_max_age_hours", opensearch_advanced_config.ismHistoryMaxAgeHours); + writer.writeNumberValue("ism_history_max_docs", opensearch_advanced_config.ismHistoryMaxDocs); + writer.writeNumberValue("ism_history_rollover_check_period_hours", opensearch_advanced_config.ismHistoryRolloverCheckPeriodHours); + writer.writeNumberValue("ism_history_rollover_retention_period_days", opensearch_advanced_config.ismHistoryRolloverRetentionPeriodDays); + writer.writeBooleanValue("keep_index_refresh_interval", opensearch_advanced_config.keepIndexRefreshInterval); + writer.writeBooleanValue("knn_memory_circuit_breaker_enabled", opensearch_advanced_config.knnMemoryCircuitBreakerEnabled); + writer.writeNumberValue("knn_memory_circuit_breaker_limit", opensearch_advanced_config.knnMemoryCircuitBreakerLimit); + writer.writeBooleanValue("override_main_response_version", opensearch_advanced_config.overrideMainResponseVersion); + writer.writeBooleanValue("plugins_alerting_filter_by_backend_roles_enabled", opensearch_advanced_config.pluginsAlertingFilterByBackendRolesEnabled); + writer.writeCollectionOfPrimitiveValues("reindex_remote_whitelist", opensearch_advanced_config.reindexRemoteWhitelist); + writer.writeStringValue("script_max_compilations_rate", opensearch_advanced_config.scriptMaxCompilationsRate ?? "use-context"); + writer.writeNumberValue("search_max_buckets", opensearch_advanced_config.searchMaxBuckets); + writer.writeNumberValue("thread_pool_analyze_queue_size", opensearch_advanced_config.threadPoolAnalyzeQueueSize); + writer.writeNumberValue("thread_pool_analyze_size", opensearch_advanced_config.threadPoolAnalyzeSize); + writer.writeNumberValue("thread_pool_force_merge_size", opensearch_advanced_config.threadPoolForceMergeSize); + writer.writeNumberValue("thread_pool_get_queue_size", opensearch_advanced_config.threadPoolGetQueueSize); + writer.writeNumberValue("thread_pool_get_size", opensearch_advanced_config.threadPoolGetSize); + writer.writeNumberValue("thread_pool_search_queue_size", opensearch_advanced_config.threadPoolSearchQueueSize); + writer.writeNumberValue("thread_pool_search_size", opensearch_advanced_config.threadPoolSearchSize); + writer.writeNumberValue("thread_pool_search_throttled_queue_size", opensearch_advanced_config.threadPoolSearchThrottledQueueSize); + writer.writeNumberValue("thread_pool_search_throttled_size", opensearch_advanced_config.threadPoolSearchThrottledSize); + writer.writeNumberValue("thread_pool_write_queue_size", opensearch_advanced_config.threadPoolWriteQueueSize); + writer.writeNumberValue("thread_pool_write_size", opensearch_advanced_config.threadPoolWriteSize); + writer.writeAdditionalData(opensearch_advanced_config.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Opensearch_config The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOpensearch_config(writer, opensearch_config = {}, isSerializingDerivedType = false) { + if (!opensearch_config || isSerializingDerivedType) { + return; + } + writer.writeStringValue("cluster_name", opensearch_config.clusterName); + writer.writeStringValue("cluster_uuid", opensearch_config.clusterUuid); + writer.writeObjectValue("credentials", opensearch_config.credentials, serializeOpensearch_config_credentials); + writer.writeStringValue("endpoint", opensearch_config.endpoint); + writer.writeStringValue("id", opensearch_config.id); + writer.writeStringValue("index_name", opensearch_config.indexName); + writer.writeNumberValue("retention_days", opensearch_config.retentionDays); + writer.writeAdditionalData(opensearch_config.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Opensearch_config_credentials The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOpensearch_config_credentials(writer, opensearch_config_credentials = {}, isSerializingDerivedType = false) { + if (!opensearch_config_credentials || isSerializingDerivedType) { + return; + } + writer.writeStringValue("password", opensearch_config_credentials.password); + writer.writeStringValue("username", opensearch_config_credentials.username); + writer.writeAdditionalData(opensearch_config_credentials.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Opensearch_config_omit_credentials The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOpensearch_config_omit_credentials(writer, opensearch_config_omit_credentials = {}, isSerializingDerivedType = false) { + if (!opensearch_config_omit_credentials || isSerializingDerivedType) { + return; + } + writer.writeStringValue("cluster_name", opensearch_config_omit_credentials.clusterName); + writer.writeStringValue("cluster_uuid", opensearch_config_omit_credentials.clusterUuid); + writer.writeStringValue("endpoint", opensearch_config_omit_credentials.endpoint); + writer.writeStringValue("id", opensearch_config_omit_credentials.id); + writer.writeStringValue("index_name", opensearch_config_omit_credentials.indexName); + writer.writeNumberValue("retention_days", opensearch_config_omit_credentials.retentionDays); + writer.writeAdditionalData(opensearch_config_omit_credentials.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Opensearch_config_request The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOpensearch_config_request(writer, opensearch_config_request = {}, isSerializingDerivedType = false) { + if (!opensearch_config_request || isSerializingDerivedType) { + return; + } + writer.writeStringValue("cluster_name", opensearch_config_request.clusterName); + writer.writeStringValue("cluster_uuid", opensearch_config_request.clusterUuid); + writer.writeObjectValue("credentials", opensearch_config_request.credentials, serializeOpensearch_config_request_credentials); + writer.writeStringValue("endpoint", opensearch_config_request.endpoint); + writer.writeStringValue("index_name", opensearch_config_request.indexName); + writer.writeNumberValue("retention_days", opensearch_config_request.retentionDays); + writer.writeAdditionalData(opensearch_config_request.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Opensearch_config_request_credentials The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOpensearch_config_request_credentials(writer, opensearch_config_request_credentials = {}, isSerializingDerivedType = false) { + if (!opensearch_config_request_credentials || isSerializingDerivedType) { + return; + } + writer.writeStringValue("password", opensearch_config_request_credentials.password); + writer.writeStringValue("username", opensearch_config_request_credentials.username); + writer.writeAdditionalData(opensearch_config_request_credentials.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Opensearch_connection The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOpensearch_connection(writer, opensearch_connection = {}, isSerializingDerivedType = false) { + if (!opensearch_connection || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(opensearch_connection.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Opensearch_index The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOpensearch_index(writer, opensearch_index = {}, isSerializingDerivedType = false) { + if (!opensearch_index || isSerializingDerivedType) { + return; + } + serializeOpensearch_index_base(writer, opensearch_index, isSerializingDerivedType); + writer.writeEnumValue("health", opensearch_index.health); + writer.writeEnumValue("status", opensearch_index.status); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Opensearch_index_base The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOpensearch_index_base(writer, opensearch_index_base = {}, isSerializingDerivedType = false) { + if (!opensearch_index_base || isSerializingDerivedType) { + return; + } + writer.writeDateValue("created_time", opensearch_index_base.createdTime); + writer.writeStringValue("index_name", opensearch_index_base.indexName); + writer.writeNumberValue("number_of_replicas", opensearch_index_base.numberOfReplicas); + writer.writeNumberValue("number_of_shards", opensearch_index_base.numberOfShards); + writer.writeNumberValue("size", opensearch_index_base.size); + writer.writeAdditionalData(opensearch_index_base.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Opensearch_logsink The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOpensearch_logsink(writer, opensearch_logsink = {}, isSerializingDerivedType = false) { + if (!opensearch_logsink || isSerializingDerivedType) { + return; + } + writer.writeStringValue("ca", opensearch_logsink.ca); + writer.writeNumberValue("index_days_max", opensearch_logsink.indexDaysMax); + writer.writeStringValue("index_prefix", opensearch_logsink.indexPrefix); + writer.writeNumberValue("timeout", opensearch_logsink.timeout); + writer.writeStringValue("url", opensearch_logsink.url); + writer.writeAdditionalData(opensearch_logsink.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Options The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOptions(writer, options = {}, isSerializingDerivedType = false) { + if (!options || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("options", options.options, serializeOptions_options); + writer.writeObjectValue("version_availability", options.versionAvailability, serializeOptions_version_availability); + writer.writeAdditionalData(options.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Options_options The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOptions_options(writer, options_options = {}, isSerializingDerivedType = false) { + if (!options_options || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("kafka", options_options.kafka, serializeOptions_options_kafka); + writer.writeObjectValue("mongodb", options_options.mongodb, serializeOptions_options_mongodb); + writer.writeObjectValue("mysql", options_options.mysql, serializeOptions_options_mysql); + writer.writeObjectValue("opensearch", options_options.opensearch, serializeOptions_options_opensearch); + writer.writeObjectValue("pg", options_options.pg, serializeOptions_options_pg); + writer.writeObjectValue("redis", options_options.redis, serializeOptions_options_redis); + writer.writeObjectValue("valkey", options_options.valkey, serializeOptions_options_valkey); + writer.writeAdditionalData(options_options.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Options_options_kafka The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOptions_options_kafka(writer, options_options_kafka = {}, isSerializingDerivedType = false) { + if (!options_options_kafka || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(options_options_kafka.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Options_options_mongodb The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOptions_options_mongodb(writer, options_options_mongodb = {}, isSerializingDerivedType = false) { + if (!options_options_mongodb || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(options_options_mongodb.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Options_options_mysql The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOptions_options_mysql(writer, options_options_mysql = {}, isSerializingDerivedType = false) { + if (!options_options_mysql || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(options_options_mysql.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Options_options_opensearch The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOptions_options_opensearch(writer, options_options_opensearch = {}, isSerializingDerivedType = false) { + if (!options_options_opensearch || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(options_options_opensearch.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Options_options_pg The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOptions_options_pg(writer, options_options_pg = {}, isSerializingDerivedType = false) { + if (!options_options_pg || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(options_options_pg.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Options_options_redis The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOptions_options_redis(writer, options_options_redis = {}, isSerializingDerivedType = false) { + if (!options_options_redis || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(options_options_redis.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Options_options_valkey The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOptions_options_valkey(writer, options_options_valkey = {}, isSerializingDerivedType = false) { + if (!options_options_valkey || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(options_options_valkey.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Options_version_availability The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOptions_version_availability(writer, options_version_availability = {}, isSerializingDerivedType = false) { + if (!options_version_availability || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("kafka", options_version_availability.kafka, serializeDatabase_version_availability); + writer.writeCollectionOfObjectValues("mongodb", options_version_availability.mongodb, serializeDatabase_version_availability); + writer.writeCollectionOfObjectValues("mysql", options_version_availability.mysql, serializeDatabase_version_availability); + writer.writeCollectionOfObjectValues("opensearch", options_version_availability.opensearch, serializeDatabase_version_availability); + writer.writeCollectionOfObjectValues("pg", options_version_availability.pg, serializeDatabase_version_availability); + writer.writeCollectionOfObjectValues("redis", options_version_availability.redis, serializeDatabase_version_availability); + writer.writeCollectionOfObjectValues("valkey", options_version_availability.valkey, serializeDatabase_version_availability); + writer.writeAdditionalData(options_version_availability.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Page_links The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializePage_links(writer, page_links = {}, isSerializingDerivedType = false) { + if (!page_links || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("pages", page_links.pages, serializePage_links_pages); + writer.writeAdditionalData(page_links.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Page_links_pages The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializePage_links_pages(writer, page_links_pages = {}, isSerializingDerivedType = false) { + serializeBackward_links(writer, page_links_pages); + serializeForward_links(writer, page_links_pages); + serializePage_links_pagesMember1(writer, page_links_pages); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Page_links_pagesMember1 The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializePage_links_pagesMember1(writer, page_links_pagesMember1 = {}, isSerializingDerivedType = false) { + if (!page_links_pagesMember1 || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(page_links_pagesMember1.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Pagination The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializePagination(writer, pagination = {}, isSerializingDerivedType = false) { + if (!pagination || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("links", pagination.links, serializePage_links); + writer.writeAdditionalData(pagination.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Partner_attachment The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializePartner_attachment(writer, partner_attachment = {}, isSerializingDerivedType = false) { + if (!partner_attachment || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("bgp", partner_attachment.bgp, serializePartner_attachment_bgp); + writer.writeNumberValue("connection_bandwidth_in_mbps", partner_attachment.connectionBandwidthInMbps); + writer.writeStringValue("naas_provider", partner_attachment.naasProvider); + writer.writeStringValue("name", partner_attachment.name); + writer.writeStringValue("region", partner_attachment.region); + writer.writeCollectionOfPrimitiveValues("vpc_ids", partner_attachment.vpcIds); + writer.writeAdditionalData(partner_attachment.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Partner_attachment_bgp The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializePartner_attachment_bgp(writer, partner_attachment_bgp = {}, isSerializingDerivedType = false) { + if (!partner_attachment_bgp || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("local_asn", partner_attachment_bgp.localAsn); + writer.writeStringValue("local_router_ip", partner_attachment_bgp.localRouterIp); + writer.writeNumberValue("peer_asn", partner_attachment_bgp.peerAsn); + writer.writeStringValue("peer_router_ip", partner_attachment_bgp.peerRouterIp); + writer.writeAdditionalData(partner_attachment_bgp.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Partner_attachment_remote_route The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializePartner_attachment_remote_route(writer, partner_attachment_remote_route = {}, isSerializingDerivedType = false) { + if (!partner_attachment_remote_route || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(partner_attachment_remote_route.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Partner_attachment_updatableMember1 The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializePartner_attachment_updatableMember1(writer, partner_attachment_updatableMember1 = {}, isSerializingDerivedType = false) { + if (!partner_attachment_updatableMember1 || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", partner_attachment_updatableMember1.name); + writer.writeAdditionalData(partner_attachment_updatableMember1.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Partner_attachment_updatableMember2 The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializePartner_attachment_updatableMember2(writer, partner_attachment_updatableMember2 = {}, isSerializingDerivedType = false) { + if (!partner_attachment_updatableMember2 || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("vpc_ids", partner_attachment_updatableMember2.vpcIds); + writer.writeAdditionalData(partner_attachment_updatableMember2.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Partner_attachment_updatableMember3 The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializePartner_attachment_updatableMember3(writer, partner_attachment_updatableMember3 = {}, isSerializingDerivedType = false) { + if (!partner_attachment_updatableMember3 || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("bgp", partner_attachment_updatableMember3.bgp, serializePartner_attachment_updatableMember3_bgp); + writer.writeAdditionalData(partner_attachment_updatableMember3.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Partner_attachment_updatableMember3_bgp The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializePartner_attachment_updatableMember3_bgp(writer, partner_attachment_updatableMember3_bgp = {}, isSerializingDerivedType = false) { + if (!partner_attachment_updatableMember3_bgp || isSerializingDerivedType) { + return; + } + writer.writeStringValue("auth_key", partner_attachment_updatableMember3_bgp.authKey); + writer.writeStringValue("local_router_ip", partner_attachment_updatableMember3_bgp.localRouterIp); + writer.writeNumberValue("peer_router_asn", partner_attachment_updatableMember3_bgp.peerRouterAsn); + writer.writeStringValue("peer_router_ip", partner_attachment_updatableMember3_bgp.peerRouterIp); + writer.writeAdditionalData(partner_attachment_updatableMember3_bgp.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Partner_attachment_writable The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializePartner_attachment_writable(writer, partner_attachment_writable = {}, isSerializingDerivedType = false) { + if (!partner_attachment_writable || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("bgp", partner_attachment_writable.bgp, serializePartner_attachment_writable_bgp); + writer.writeNumberValue("connection_bandwidth_in_mbps", partner_attachment_writable.connectionBandwidthInMbps); + writer.writeStringValue("naas_provider", partner_attachment_writable.naasProvider); + writer.writeStringValue("name", partner_attachment_writable.name); + writer.writeStringValue("parent_uuid", partner_attachment_writable.parentUuid); + writer.writeEnumValue("redundancy_zone", partner_attachment_writable.redundancyZone); + writer.writeEnumValue("region", partner_attachment_writable.region); + writer.writeCollectionOfPrimitiveValues("vpc_ids", partner_attachment_writable.vpcIds); + writer.writeAdditionalData(partner_attachment_writable.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Partner_attachment_writable_bgp The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializePartner_attachment_writable_bgp(writer, partner_attachment_writable_bgp = {}, isSerializingDerivedType = false) { + if (!partner_attachment_writable_bgp || isSerializingDerivedType) { + return; + } + writer.writeStringValue("auth_key", partner_attachment_writable_bgp.authKey); + writer.writeStringValue("local_router_ip", partner_attachment_writable_bgp.localRouterIp); + writer.writeNumberValue("peer_router_asn", partner_attachment_writable_bgp.peerRouterAsn); + writer.writeStringValue("peer_router_ip", partner_attachment_writable_bgp.peerRouterIp); + writer.writeAdditionalData(partner_attachment_writable_bgp.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Pgbouncer_advanced_config The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializePgbouncer_advanced_config(writer, pgbouncer_advanced_config = {}, isSerializingDerivedType = false) { + if (!pgbouncer_advanced_config || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("autodb_idle_timeout", pgbouncer_advanced_config.autodbIdleTimeout); + writer.writeNumberValue("autodb_max_db_connections", pgbouncer_advanced_config.autodbMaxDbConnections); + writer.writeEnumValue("autodb_pool_mode", pgbouncer_advanced_config.autodbPoolMode); + writer.writeNumberValue("autodb_pool_size", pgbouncer_advanced_config.autodbPoolSize); + if (pgbouncer_advanced_config.ignoreStartupParameters) + writer.writeCollectionOfEnumValues("ignore_startup_parameters", pgbouncer_advanced_config.ignoreStartupParameters); + writer.writeNumberValue("min_pool_size", pgbouncer_advanced_config.minPoolSize); + writer.writeNumberValue("server_idle_timeout", pgbouncer_advanced_config.serverIdleTimeout); + writer.writeNumberValue("server_lifetime", pgbouncer_advanced_config.serverLifetime); + writer.writeBooleanValue("server_reset_query_always", pgbouncer_advanced_config.serverResetQueryAlways); + writer.writeAdditionalData(pgbouncer_advanced_config.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Postgres_advanced_config The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializePostgres_advanced_config(writer, postgres_advanced_config = {}, isSerializingDerivedType = false) { + if (!postgres_advanced_config || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("autovacuum_analyze_scale_factor", postgres_advanced_config.autovacuumAnalyzeScaleFactor); + writer.writeNumberValue("autovacuum_analyze_threshold", postgres_advanced_config.autovacuumAnalyzeThreshold); + writer.writeNumberValue("autovacuum_freeze_max_age", postgres_advanced_config.autovacuumFreezeMaxAge); + writer.writeNumberValue("autovacuum_max_workers", postgres_advanced_config.autovacuumMaxWorkers); + writer.writeNumberValue("autovacuum_naptime", postgres_advanced_config.autovacuumNaptime); + writer.writeNumberValue("autovacuum_vacuum_cost_delay", postgres_advanced_config.autovacuumVacuumCostDelay); + writer.writeNumberValue("autovacuum_vacuum_cost_limit", postgres_advanced_config.autovacuumVacuumCostLimit); + writer.writeNumberValue("autovacuum_vacuum_scale_factor", postgres_advanced_config.autovacuumVacuumScaleFactor); + writer.writeNumberValue("autovacuum_vacuum_threshold", postgres_advanced_config.autovacuumVacuumThreshold); + writer.writeNumberValue("backup_hour", postgres_advanced_config.backupHour); + writer.writeNumberValue("backup_minute", postgres_advanced_config.backupMinute); + writer.writeNumberValue("bgwriter_delay", postgres_advanced_config.bgwriterDelay); + writer.writeNumberValue("bgwriter_flush_after", postgres_advanced_config.bgwriterFlushAfter); + writer.writeNumberValue("bgwriter_lru_maxpages", postgres_advanced_config.bgwriterLruMaxpages); + writer.writeNumberValue("bgwriter_lru_multiplier", postgres_advanced_config.bgwriterLruMultiplier); + writer.writeNumberValue("deadlock_timeout", postgres_advanced_config.deadlockTimeout); + writer.writeEnumValue("default_toast_compression", postgres_advanced_config.defaultToastCompression); + writer.writeNumberValue("idle_in_transaction_session_timeout", postgres_advanced_config.idleInTransactionSessionTimeout); + writer.writeBooleanValue("jit", postgres_advanced_config.jit); + writer.writeNumberValue("log_autovacuum_min_duration", postgres_advanced_config.logAutovacuumMinDuration); + writer.writeEnumValue("log_error_verbosity", postgres_advanced_config.logErrorVerbosity); + writer.writeEnumValue("log_line_prefix", postgres_advanced_config.logLinePrefix); + writer.writeNumberValue("log_min_duration_statement", postgres_advanced_config.logMinDurationStatement); + writer.writeNumberValue("max_connections", postgres_advanced_config.maxConnections); + writer.writeNumberValue("max_failover_replication_time_lag", postgres_advanced_config.maxFailoverReplicationTimeLag); + writer.writeNumberValue("max_files_per_process", postgres_advanced_config.maxFilesPerProcess); + writer.writeNumberValue("max_locks_per_transaction", postgres_advanced_config.maxLocksPerTransaction); + writer.writeNumberValue("max_logical_replication_workers", postgres_advanced_config.maxLogicalReplicationWorkers); + writer.writeNumberValue("max_parallel_workers", postgres_advanced_config.maxParallelWorkers); + writer.writeNumberValue("max_parallel_workers_per_gather", postgres_advanced_config.maxParallelWorkersPerGather); + writer.writeNumberValue("max_pred_locks_per_transaction", postgres_advanced_config.maxPredLocksPerTransaction); + writer.writeNumberValue("max_prepared_transactions", postgres_advanced_config.maxPreparedTransactions); + writer.writeNumberValue("max_replication_slots", postgres_advanced_config.maxReplicationSlots); + writer.writeNumberValue("max_slot_wal_keep_size", postgres_advanced_config.maxSlotWalKeepSize); + writer.writeNumberValue("max_stack_depth", postgres_advanced_config.maxStackDepth); + writer.writeNumberValue("max_standby_archive_delay", postgres_advanced_config.maxStandbyArchiveDelay); + writer.writeNumberValue("max_standby_streaming_delay", postgres_advanced_config.maxStandbyStreamingDelay); + writer.writeNumberValue("max_wal_senders", postgres_advanced_config.maxWalSenders); + writer.writeNumberValue("max_worker_processes", postgres_advanced_config.maxWorkerProcesses); + writer.writeObjectValue("pgbouncer", postgres_advanced_config.pgbouncer, serializePgbouncer_advanced_config); + writer.writeNumberValue("pg_partman_bgw.interval", postgres_advanced_config.pgPartmanBgwInterval); + writer.writeStringValue("pg_partman_bgw.role", postgres_advanced_config.pgPartmanBgwRole); + writer.writeEnumValue("pg_stat_statements.track", postgres_advanced_config.pgStatStatementsTrack); + writer.writeNumberValue("shared_buffers_percentage", postgres_advanced_config.sharedBuffersPercentage); + writer.writeBooleanValue("stat_monitor_enable", postgres_advanced_config.statMonitorEnable); + writer.writeEnumValue("synchronous_replication", postgres_advanced_config.synchronousReplication); + writer.writeNumberValue("temp_file_limit", postgres_advanced_config.tempFileLimit); + writer.writeObjectValue("timescaledb", postgres_advanced_config.timescaledb, serializeTimescaledb_advanced_config); + writer.writeStringValue("timezone", postgres_advanced_config.timezone); + writer.writeNumberValue("track_activity_query_size", postgres_advanced_config.trackActivityQuerySize); + writer.writeEnumValue("track_commit_timestamp", postgres_advanced_config.trackCommitTimestamp); + writer.writeEnumValue("track_functions", postgres_advanced_config.trackFunctions); + writer.writeEnumValue("track_io_timing", postgres_advanced_config.trackIoTiming); + writer.writeNumberValue("wal_sender_timeout", postgres_advanced_config.walSenderTimeout); + writer.writeNumberValue("wal_writer_delay", postgres_advanced_config.walWriterDelay); + writer.writeNumberValue("work_mem", postgres_advanced_config.workMem); + writer.writeAdditionalData(postgres_advanced_config.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Previous_outage The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializePrevious_outage(writer, previous_outage = {}, isSerializingDerivedType = false) { + if (!previous_outage || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("duration_seconds", previous_outage.durationSeconds); + writer.writeStringValue("ended_at", previous_outage.endedAt); + writer.writeStringValue("region", previous_outage.region); + writer.writeStringValue("started_at", previous_outage.startedAt); + writer.writeAdditionalData(previous_outage.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Product_charge_item The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeProduct_charge_item(writer, product_charge_item = {}, isSerializingDerivedType = false) { + if (!product_charge_item || isSerializingDerivedType) { + return; + } + writer.writeStringValue("amount", product_charge_item.amount); + writer.writeStringValue("count", product_charge_item.count); + writer.writeStringValue("name", product_charge_item.name); + writer.writeAdditionalData(product_charge_item.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Product_usage_charges The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeProduct_usage_charges(writer, product_usage_charges = {}, isSerializingDerivedType = false) { + if (!product_usage_charges || isSerializingDerivedType) { + return; + } + writer.writeStringValue("amount", product_usage_charges.amount); + writer.writeCollectionOfObjectValues("items", product_usage_charges.items, serializeProduct_charge_item); + writer.writeStringValue("name", product_usage_charges.name); + writer.writeAdditionalData(product_usage_charges.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Project The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeProject(writer, project = {}, isSerializingDerivedType = false) { + if (!project || isSerializingDerivedType) { + return; + } + serializeProject_base(writer, project, isSerializingDerivedType); + writer.writeBooleanValue("is_default", project.isDefault); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Project_assignment The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeProject_assignment(writer, project_assignment = {}, isSerializingDerivedType = false) { + if (!project_assignment || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("resources", project_assignment.resources); + writer.writeAdditionalData(project_assignment.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Project_base The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeProject_base(writer, project_base = {}, isSerializingDerivedType = false) { + if (!project_base || isSerializingDerivedType) { + return; + } + writer.writeStringValue("description", project_base.description); + writer.writeEnumValue("environment", project_base.environment); + writer.writeStringValue("name", project_base.name); + writer.writeStringValue("purpose", project_base.purpose); + writer.writeAdditionalData(project_base.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Purge_cache The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializePurge_cache(writer, purge_cache = {}, isSerializingDerivedType = false) { + if (!purge_cache || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("files", purge_cache.files); + writer.writeAdditionalData(purge_cache.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Rdma_shared_dev_plugin The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeRdma_shared_dev_plugin(writer, rdma_shared_dev_plugin = {}, isSerializingDerivedType = false) { + if (!rdma_shared_dev_plugin || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("enabled", rdma_shared_dev_plugin.enabled); + writer.writeAdditionalData(rdma_shared_dev_plugin.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Redis_advanced_config The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeRedis_advanced_config(writer, redis_advanced_config = {}, isSerializingDerivedType = false) { + if (!redis_advanced_config || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("redis_acl_channels_default", redis_advanced_config.redisAclChannelsDefault); + writer.writeNumberValue("redis_io_threads", redis_advanced_config.redisIoThreads); + writer.writeNumberValue("redis_lfu_decay_time", redis_advanced_config.redisLfuDecayTime); + writer.writeNumberValue("redis_lfu_log_factor", redis_advanced_config.redisLfuLogFactor); + writer.writeEnumValue("redis_maxmemory_policy", redis_advanced_config.redisMaxmemoryPolicy); + writer.writeStringValue("redis_notify_keyspace_events", redis_advanced_config.redisNotifyKeyspaceEvents); + writer.writeNumberValue("redis_number_of_databases", redis_advanced_config.redisNumberOfDatabases); + writer.writeEnumValue("redis_persistence", redis_advanced_config.redisPersistence); + writer.writeNumberValue("redis_pubsub_client_output_buffer_limit", redis_advanced_config.redisPubsubClientOutputBufferLimit); + writer.writeBooleanValue("redis_ssl", redis_advanced_config.redisSsl); + writer.writeNumberValue("redis_timeout", redis_advanced_config.redisTimeout); + writer.writeAdditionalData(redis_advanced_config.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Region The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeRegion(writer, region = {}, isSerializingDerivedType = false) { + if (!region || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("available", region.available); + writer.writeCollectionOfPrimitiveValues("features", region.features); + writer.writeStringValue("name", region.name); + writer.writeCollectionOfPrimitiveValues("sizes", region.sizes); + writer.writeStringValue("slug", region.slug); + writer.writeAdditionalData(region.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Region_state The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeRegion_state(writer, region_state = {}, isSerializingDerivedType = false) { + if (!region_state || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("status", region_state.status); + writer.writeStringValue("status_changed_at", region_state.statusChangedAt); + writer.writeNumberValue("thirty_day_uptime_percentage", region_state.thirtyDayUptimePercentage); + writer.writeAdditionalData(region_state.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Regional_state The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeRegional_state(writer, regional_state = {}, isSerializingDerivedType = false) { + if (!regional_state || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("eu_west", regional_state.euWest, serializeRegion_state); + writer.writeObjectValue("us_east", regional_state.usEast, serializeRegion_state); + writer.writeAdditionalData(regional_state.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Registry The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeRegistry(writer, registry = {}, isSerializingDerivedType = false) { + if (!registry || isSerializingDerivedType) { + return; + } + serializeRegistry_base(writer, registry, isSerializingDerivedType); + writer.writeObjectValue("subscription", registry.subscription, serializeSubscription); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Registry_base The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeRegistry_base(writer, registry_base = {}, isSerializingDerivedType = false) { + if (!registry_base || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", registry_base.name); + writer.writeStringValue("region", registry_base.region); + writer.writeAdditionalData(registry_base.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Registry_create The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeRegistry_create(writer, registry_create = {}, isSerializingDerivedType = false) { + if (!registry_create || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", registry_create.name); + writer.writeEnumValue("region", registry_create.region); + writer.writeEnumValue("subscription_tier_slug", registry_create.subscriptionTierSlug); + writer.writeAdditionalData(registry_create.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Registry_run_gc The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeRegistry_run_gc(writer, registry_run_gc = {}, isSerializingDerivedType = false) { + if (!registry_run_gc || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("type", registry_run_gc.type); + writer.writeAdditionalData(registry_run_gc.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Repository The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeRepository(writer, repository = {}, isSerializingDerivedType = false) { + if (!repository || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("latest_tag", repository.latestTag, serializeRepository_tag); + writer.writeStringValue("name", repository.name); + writer.writeStringValue("registry_name", repository.registryName); + writer.writeNumberValue("tag_count", repository.tagCount); + writer.writeAdditionalData(repository.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Repository_blob The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeRepository_blob(writer, repository_blob = {}, isSerializingDerivedType = false) { + if (!repository_blob || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("compressed_size_bytes", repository_blob.compressedSizeBytes); + writer.writeStringValue("digest", repository_blob.digest); + writer.writeAdditionalData(repository_blob.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Repository_manifest The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeRepository_manifest(writer, repository_manifest = {}, isSerializingDerivedType = false) { + if (!repository_manifest || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("blobs", repository_manifest.blobs, serializeRepository_blob); + writer.writeNumberValue("compressed_size_bytes", repository_manifest.compressedSizeBytes); + writer.writeStringValue("digest", repository_manifest.digest); + writer.writeStringValue("registry_name", repository_manifest.registryName); + writer.writeStringValue("repository", repository_manifest.repository); + writer.writeNumberValue("size_bytes", repository_manifest.sizeBytes); + writer.writeCollectionOfPrimitiveValues("tags", repository_manifest.tags); + writer.writeDateValue("updated_at", repository_manifest.updatedAt); + writer.writeAdditionalData(repository_manifest.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Repository_tag The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeRepository_tag(writer, repository_tag = {}, isSerializingDerivedType = false) { + if (!repository_tag || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("compressed_size_bytes", repository_tag.compressedSizeBytes); + writer.writeStringValue("manifest_digest", repository_tag.manifestDigest); + writer.writeStringValue("registry_name", repository_tag.registryName); + writer.writeStringValue("repository", repository_tag.repository); + writer.writeNumberValue("size_bytes", repository_tag.sizeBytes); + writer.writeStringValue("tag", repository_tag.tag); + writer.writeDateValue("updated_at", repository_tag.updatedAt); + writer.writeAdditionalData(repository_tag.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Repository_v2 The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeRepository_v2(writer, repository_v2 = {}, isSerializingDerivedType = false) { + if (!repository_v2 || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("latest_manifest", repository_v2.latestManifest, serializeRepository_manifest); + writer.writeNumberValue("manifest_count", repository_v2.manifestCount); + writer.writeStringValue("name", repository_v2.name); + writer.writeStringValue("registry_name", repository_v2.registryName); + writer.writeNumberValue("tag_count", repository_v2.tagCount); + writer.writeAdditionalData(repository_v2.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Reserved_ip The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeReserved_ip(writer, reserved_ip = {}, isSerializingDerivedType = false) { + if (!reserved_ip || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("droplet", reserved_ip.droplet, serializeDroplet); + writer.writeStringValue("ip", reserved_ip.ip); + writer.writeBooleanValue("locked", reserved_ip.locked); + writer.writeGuidValue("project_id", reserved_ip.projectId); + writer.writeObjectValue("region", reserved_ip.region, serializeRegion); + writer.writeAdditionalData(reserved_ip.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Reserved_ip_action_assign The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeReserved_ip_action_assign(writer, reserved_ip_action_assign = {}, isSerializingDerivedType = false) { + if (!reserved_ip_action_assign || isSerializingDerivedType) { + return; + } + serializeReserved_ip_action_type(writer, reserved_ip_action_assign, isSerializingDerivedType); + writer.writeNumberValue("droplet_id", reserved_ip_action_assign.dropletId); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Reserved_ip_action_type The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeReserved_ip_action_type(writer, reserved_ip_action_type = {}, isSerializingDerivedType = false) { + if (!reserved_ip_action_type || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("type", reserved_ip_action_type.type); + writer.writeAdditionalData(reserved_ip_action_type.additionalData); + switch (reserved_ip_action_type.type) { + case "assign": + serializeReserved_ip_action_assign(writer, reserved_ip_action_type, true); + break; + case "unassign": + serializeReserved_ip_action_unassign(writer, reserved_ip_action_type, true); + break; + } +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Reserved_ip_action_unassign The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeReserved_ip_action_unassign(writer, reserved_ip_action_unassign = {}, isSerializingDerivedType = false) { + if (!reserved_ip_action_unassign || isSerializingDerivedType) { + return; + } + serializeReserved_ip_action_type(writer, reserved_ip_action_unassign, isSerializingDerivedType); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Reserved_ip_createMember1 The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeReserved_ip_createMember1(writer, reserved_ip_createMember1 = {}, isSerializingDerivedType = false) { + if (!reserved_ip_createMember1 || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("droplet_id", reserved_ip_createMember1.dropletId); + writer.writeAdditionalData(reserved_ip_createMember1.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Reserved_ip_createMember2 The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeReserved_ip_createMember2(writer, reserved_ip_createMember2 = {}, isSerializingDerivedType = false) { + if (!reserved_ip_createMember2 || isSerializingDerivedType) { + return; + } + writer.writeGuidValue("project_id", reserved_ip_createMember2.projectId); + writer.writeStringValue("region", reserved_ip_createMember2.region); + writer.writeAdditionalData(reserved_ip_createMember2.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Reserved_ipv6 The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeReserved_ipv6(writer, reserved_ipv6 = {}, isSerializingDerivedType = false) { + if (!reserved_ipv6 || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("droplet", reserved_ipv6.droplet, serializeDroplet); + writer.writeStringValue("ip", reserved_ipv6.ip); + writer.writeStringValue("region_slug", reserved_ipv6.regionSlug); + writer.writeDateValue("reserved_at", reserved_ipv6.reservedAt); + writer.writeAdditionalData(reserved_ipv6.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Reserved_ipv6_action_assign The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeReserved_ipv6_action_assign(writer, reserved_ipv6_action_assign = {}, isSerializingDerivedType = false) { + if (!reserved_ipv6_action_assign || isSerializingDerivedType) { + return; + } + serializeReserved_ipv6_action_type(writer, reserved_ipv6_action_assign, isSerializingDerivedType); + writer.writeNumberValue("droplet_id", reserved_ipv6_action_assign.dropletId); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Reserved_ipv6_action_type The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeReserved_ipv6_action_type(writer, reserved_ipv6_action_type = {}, isSerializingDerivedType = false) { + if (!reserved_ipv6_action_type || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("type", reserved_ipv6_action_type.type); + writer.writeAdditionalData(reserved_ipv6_action_type.additionalData); + switch (reserved_ipv6_action_type.type) { + case "assign": + serializeReserved_ipv6_action_assign(writer, reserved_ipv6_action_type, true); + break; + case "unassign": + serializeReserved_ipv6_action_unassign(writer, reserved_ipv6_action_type, true); + break; + } +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Reserved_ipv6_action_unassign The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeReserved_ipv6_action_unassign(writer, reserved_ipv6_action_unassign = {}, isSerializingDerivedType = false) { + if (!reserved_ipv6_action_unassign || isSerializingDerivedType) { + return; + } + serializeReserved_ipv6_action_type(writer, reserved_ipv6_action_unassign, isSerializingDerivedType); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Reserved_ipv6_create The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeReserved_ipv6_create(writer, reserved_ipv6_create = {}, isSerializingDerivedType = false) { + if (!reserved_ipv6_create || isSerializingDerivedType) { + return; + } + writer.writeStringValue("region_slug", reserved_ipv6_create.regionSlug); + writer.writeAdditionalData(reserved_ipv6_create.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Resource The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeResource(writer, resource = {}, isSerializingDerivedType = false) { + if (!resource || isSerializingDerivedType) { + return; + } + writer.writeDateValue("assigned_at", resource.assignedAt); + writer.writeObjectValue("links", resource.links, serializeResource_links); + writer.writeEnumValue("status", resource.status); + writer.writeStringValue("urn", resource.urn); + writer.writeAdditionalData(resource.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Resource_links The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeResource_links(writer, resource_links = {}, isSerializingDerivedType = false) { + if (!resource_links || isSerializingDerivedType) { + return; + } + writer.writeStringValue("self", resource_links.self); + writer.writeAdditionalData(resource_links.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Routing_agent The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeRouting_agent(writer, routing_agent = {}, isSerializingDerivedType = false) { + if (!routing_agent || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("enabled", routing_agent.enabled); + writer.writeAdditionalData(routing_agent.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Rsyslog_logsink The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeRsyslog_logsink(writer, rsyslog_logsink = {}, isSerializingDerivedType = false) { + if (!rsyslog_logsink || isSerializingDerivedType) { + return; + } + writer.writeStringValue("ca", rsyslog_logsink.ca); + writer.writeStringValue("cert", rsyslog_logsink.cert); + writer.writeEnumValue("format", rsyslog_logsink.format); + writer.writeStringValue("key", rsyslog_logsink.key); + writer.writeStringValue("logline", rsyslog_logsink.logline); + writer.writeNumberValue("port", rsyslog_logsink.port); + writer.writeStringValue("sd", rsyslog_logsink.sd); + writer.writeStringValue("server", rsyslog_logsink.server); + writer.writeBooleanValue("tls", rsyslog_logsink.tls); + writer.writeAdditionalData(rsyslog_logsink.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Scheduled_details The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeScheduled_details(writer, scheduled_details = {}, isSerializingDerivedType = false) { + if (!scheduled_details || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("body", scheduled_details.body, serializeScheduled_details_body); + writer.writeStringValue("cron", scheduled_details.cron); + writer.writeAdditionalData(scheduled_details.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Scheduled_details_body The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeScheduled_details_body(writer, scheduled_details_body = {}, isSerializingDerivedType = false) { + if (!scheduled_details_body || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", scheduled_details_body.name); + writer.writeAdditionalData(scheduled_details_body.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Schema_registry_connection The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeSchema_registry_connection(writer, schema_registry_connection = {}, isSerializingDerivedType = false) { + if (!schema_registry_connection || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(schema_registry_connection.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Selective_destroy_associated_resource The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeSelective_destroy_associated_resource(writer, selective_destroy_associated_resource = {}, isSerializingDerivedType = false) { + if (!selective_destroy_associated_resource || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("floating_ips", selective_destroy_associated_resource.floatingIps); + writer.writeCollectionOfPrimitiveValues("reserved_ips", selective_destroy_associated_resource.reservedIps); + writer.writeCollectionOfPrimitiveValues("snapshots", selective_destroy_associated_resource.snapshots); + writer.writeCollectionOfPrimitiveValues("volumes", selective_destroy_associated_resource.volumes); + writer.writeCollectionOfPrimitiveValues("volume_snapshots", selective_destroy_associated_resource.volumeSnapshots); + writer.writeAdditionalData(selective_destroy_associated_resource.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Simple_charge The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeSimple_charge(writer, simple_charge = {}, isSerializingDerivedType = false) { + if (!simple_charge || isSerializingDerivedType) { + return; + } + writer.writeStringValue("amount", simple_charge.amount); + writer.writeStringValue("name", simple_charge.name); + writer.writeAdditionalData(simple_charge.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Sink_resource The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeSink_resource(writer, sink_resource = {}, isSerializingDerivedType = false) { + if (!sink_resource || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", sink_resource.name); + writer.writeStringValue("urn", sink_resource.urn); + writer.writeAdditionalData(sink_resource.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Sinks_response The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeSinks_response(writer, sinks_response = {}, isSerializingDerivedType = false) { + if (!sinks_response || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("destination", sinks_response.destination, serializeDestination); + writer.writeCollectionOfObjectValues("resources", sinks_response.resources, serializeSink_resource); + writer.writeAdditionalData(sinks_response.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Size The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeSize(writer, size = {}, isSerializingDerivedType = false) { + if (!size || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("available", size.available); + writer.writeStringValue("description", size.description); + writer.writeNumberValue("disk", size.disk); + writer.writeCollectionOfObjectValues("disk_info", size.diskInfo, serializeDisk_info); + writer.writeObjectValue("gpu_info", size.gpuInfo, serializeGpu_info); + writer.writeNumberValue("memory", size.memory); + writer.writeNumberValue("price_hourly", size.priceHourly); + writer.writeNumberValue("price_monthly", size.priceMonthly); + writer.writeCollectionOfPrimitiveValues("regions", size.regions); + writer.writeStringValue("slug", size.slug); + writer.writeNumberValue("transfer", size.transfer); + writer.writeNumberValue("vcpus", size.vcpus); + writer.writeAdditionalData(size.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Slack_details The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeSlack_details(writer, slack_details = {}, isSerializingDerivedType = false) { + if (!slack_details || isSerializingDerivedType) { + return; + } + writer.writeStringValue("channel", slack_details.channel); + writer.writeStringValue("url", slack_details.url); + writer.writeAdditionalData(slack_details.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Snapshots The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeSnapshots(writer, snapshots = {}, isSerializingDerivedType = false) { + if (!snapshots || isSerializingDerivedType) { + return; + } + serializeSnapshots_base(writer, snapshots, isSerializingDerivedType); + writer.writeStringValue("id", snapshots.id); + writer.writeStringValue("resource_id", snapshots.resourceId); + writer.writeEnumValue("resource_type", snapshots.resourceType); + writer.writeCollectionOfPrimitiveValues("tags", snapshots.tags); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Snapshots_base The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeSnapshots_base(writer, snapshots_base = {}, isSerializingDerivedType = false) { + if (!snapshots_base || isSerializingDerivedType) { + return; + } + writer.writeDateValue("created_at", snapshots_base.createdAt); + writer.writeNumberValue("min_disk_size", snapshots_base.minDiskSize); + writer.writeStringValue("name", snapshots_base.name); + writer.writeCollectionOfPrimitiveValues("regions", snapshots_base.regions); + writer.writeNumberValue("size_gigabytes", snapshots_base.sizeGigabytes); + writer.writeAdditionalData(snapshots_base.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Source_database The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeSource_database(writer, source_database = {}, isSerializingDerivedType = false) { + if (!source_database || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("disable_ssl", source_database.disableSsl); + writer.writeCollectionOfPrimitiveValues("ignore_dbs", source_database.ignoreDbs); + writer.writeObjectValue("source", source_database.source, serializeSource_database_source); + writer.writeAdditionalData(source_database.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Source_database_source The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeSource_database_source(writer, source_database_source = {}, isSerializingDerivedType = false) { + if (!source_database_source || isSerializingDerivedType) { + return; + } + writer.writeStringValue("dbname", source_database_source.dbname); + writer.writeStringValue("host", source_database_source.host); + writer.writeStringValue("password", source_database_source.password); + writer.writeNumberValue("port", source_database_source.port); + writer.writeStringValue("username", source_database_source.username); + writer.writeAdditionalData(source_database_source.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Sql_mode The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeSql_mode(writer, sql_mode = {}, isSerializingDerivedType = false) { + if (!sql_mode || isSerializingDerivedType) { + return; + } + writer.writeStringValue("sql_mode", sql_mode.sqlMode); + writer.writeAdditionalData(sql_mode.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param SshKeys The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeSshKeys(writer, sshKeys = {}, isSerializingDerivedType = false) { + if (!sshKeys || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", sshKeys.name); + writer.writeStringValue("public_key", sshKeys.publicKey); + writer.writeAdditionalData(sshKeys.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param State The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeState(writer, state = {}, isSerializingDerivedType = false) { + if (!state || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("previous_outage", state.previousOutage, serializePrevious_outage); + writer.writeObjectValue("regions", state.regions, serializeRegional_state); + writer.writeAdditionalData(state.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Status_messages The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeStatus_messages(writer, status_messages = {}, isSerializingDerivedType = false) { + if (!status_messages || isSerializingDerivedType) { + return; + } + writer.writeAdditionalData(status_messages.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Sticky_sessions The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeSticky_sessions(writer, sticky_sessions = {}, isSerializingDerivedType = false) { + if (!sticky_sessions || isSerializingDerivedType) { + return; + } + writer.writeStringValue("cookie_name", sticky_sessions.cookieName); + writer.writeNumberValue("cookie_ttl_seconds", sticky_sessions.cookieTtlSeconds); + writer.writeEnumValue("type", sticky_sessions.type ?? Sticky_sessions_typeObject.None); + writer.writeAdditionalData(sticky_sessions.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Subscription The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeSubscription(writer, subscription = {}, isSerializingDerivedType = false) { + if (!subscription || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("tier", subscription.tier, serializeSubscription_tier_base); + writer.writeAdditionalData(subscription.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Subscription_tier_base The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeSubscription_tier_base(writer, subscription_tier_base = {}, isSerializingDerivedType = false) { + if (!subscription_tier_base || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("allow_storage_overage", subscription_tier_base.allowStorageOverage); + writer.writeNumberValue("included_bandwidth_bytes", subscription_tier_base.includedBandwidthBytes); + writer.writeNumberValue("included_repositories", subscription_tier_base.includedRepositories); + writer.writeNumberValue("included_storage_bytes", subscription_tier_base.includedStorageBytes); + writer.writeNumberValue("monthly_price_in_cents", subscription_tier_base.monthlyPriceInCents); + writer.writeStringValue("name", subscription_tier_base.name); + writer.writeStringValue("slug", subscription_tier_base.slug); + writer.writeNumberValue("storage_overage_price_in_cents", subscription_tier_base.storageOveragePriceInCents); + writer.writeAdditionalData(subscription_tier_base.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Supported_droplet_backup_policy The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeSupported_droplet_backup_policy(writer, supported_droplet_backup_policy = {}, isSerializingDerivedType = false) { + if (!supported_droplet_backup_policy || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", supported_droplet_backup_policy.name); + writer.writeCollectionOfPrimitiveValues("possible_days", supported_droplet_backup_policy.possibleDays); + writer.writeCollectionOfPrimitiveValues("possible_window_starts", supported_droplet_backup_policy.possibleWindowStarts); + writer.writeNumberValue("retention_period_days", supported_droplet_backup_policy.retentionPeriodDays); + writer.writeNumberValue("window_length_hours", supported_droplet_backup_policy.windowLengthHours); + writer.writeAdditionalData(supported_droplet_backup_policy.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Tags The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeTags(writer, tags = {}, isSerializingDerivedType = false) { + if (!tags || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", tags.name); + writer.writeAdditionalData(tags.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Tags_metadata The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeTags_metadata(writer, tags_metadata = {}, isSerializingDerivedType = false) { + if (!tags_metadata || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("count", tags_metadata.count); + writer.writeStringValue("last_tagged_uri", tags_metadata.lastTaggedUri); + writer.writeAdditionalData(tags_metadata.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Tags_resource The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeTags_resource(writer, tags_resource = {}, isSerializingDerivedType = false) { + if (!tags_resource || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("resources", tags_resource.resources, serializeTags_resource_resources); + writer.writeAdditionalData(tags_resource.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Tags_resource_resources The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeTags_resource_resources(writer, tags_resource_resources = {}, isSerializingDerivedType = false) { + if (!tags_resource_resources || isSerializingDerivedType) { + return; + } + writer.writeStringValue("resource_id", tags_resource_resources.resourceId); + writer.writeEnumValue("resource_type", tags_resource_resources.resourceType); + writer.writeAdditionalData(tags_resource_resources.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Tags_resources The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeTags_resources(writer, tags_resources = {}, isSerializingDerivedType = false) { + if (!tags_resources || isSerializingDerivedType) { + return; + } + serializeTags_metadata(writer, tags_resources, isSerializingDerivedType); + writer.writeObjectValue("databases", tags_resources.databases, serializeTags_metadata); + writer.writeObjectValue("droplets", tags_resources.droplets, serializeTags_metadata); + writer.writeObjectValue("imgages", tags_resources.imgages, serializeTags_metadata); + writer.writeObjectValue("volumes", tags_resources.volumes, serializeTags_metadata); + writer.writeObjectValue("volume_snapshots", tags_resources.volumeSnapshots, serializeTags_metadata); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Timescaledb_advanced_config The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeTimescaledb_advanced_config(writer, timescaledb_advanced_config = {}, isSerializingDerivedType = false) { + if (!timescaledb_advanced_config || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("max_background_workers", timescaledb_advanced_config.maxBackgroundWorkers); + writer.writeAdditionalData(timescaledb_advanced_config.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Trigger_info The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeTrigger_info(writer, trigger_info = {}, isSerializingDerivedType = false) { + if (!trigger_info || isSerializingDerivedType) { + return; + } + writer.writeStringValue("created_at", trigger_info.createdAt); + writer.writeStringValue("function", trigger_info.functionEscaped); + writer.writeBooleanValue("is_enabled", trigger_info.isEnabled); + writer.writeStringValue("name", trigger_info.name); + writer.writeStringValue("namespace", trigger_info.namespace); + writer.writeObjectValue("scheduled_details", trigger_info.scheduledDetails, serializeScheduled_details); + writer.writeObjectValue("scheduled_runs", trigger_info.scheduledRuns, serializeTrigger_info_scheduled_runs); + writer.writeStringValue("type", trigger_info.type); + writer.writeStringValue("updated_at", trigger_info.updatedAt); + writer.writeAdditionalData(trigger_info.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Trigger_info_scheduled_runs The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeTrigger_info_scheduled_runs(writer, trigger_info_scheduled_runs = {}, isSerializingDerivedType = false) { + if (!trigger_info_scheduled_runs || isSerializingDerivedType) { + return; + } + writer.writeStringValue("last_run_at", trigger_info_scheduled_runs.lastRunAt); + writer.writeStringValue("next_run_at", trigger_info_scheduled_runs.nextRunAt); + writer.writeAdditionalData(trigger_info_scheduled_runs.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Update_endpoint The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeUpdate_endpoint(writer, update_endpoint = {}, isSerializingDerivedType = false) { + if (!update_endpoint || isSerializingDerivedType) { + return; + } + writer.writeGuidValue("certificate_id", update_endpoint.certificateId); + writer.writeStringValue("custom_domain", update_endpoint.customDomain); + writer.writeNumberValue("ttl", update_endpoint.ttl); + writer.writeAdditionalData(update_endpoint.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Update_registry The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeUpdate_registry(writer, update_registry = {}, isSerializingDerivedType = false) { + if (!update_registry || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("cancel", update_registry.cancel); + writer.writeAdditionalData(update_registry.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Update_trigger The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeUpdate_trigger(writer, update_trigger = {}, isSerializingDerivedType = false) { + if (!update_trigger || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("is_enabled", update_trigger.isEnabled); + writer.writeObjectValue("scheduled_details", update_trigger.scheduledDetails, serializeScheduled_details); + writer.writeAdditionalData(update_trigger.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param User The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeUser(writer, user = {}, isSerializingDerivedType = false) { + if (!user || isSerializingDerivedType) { + return; + } + writer.writeObjectValue("kubernetes_cluster_user", user.kubernetesClusterUser, serializeUser_kubernetes_cluster_user); + writer.writeAdditionalData(user.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param User_kubernetes_cluster_user The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeUser_kubernetes_cluster_user(writer, user_kubernetes_cluster_user = {}, isSerializingDerivedType = false) { + if (!user_kubernetes_cluster_user || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("groups", user_kubernetes_cluster_user.groups); + writer.writeStringValue("username", user_kubernetes_cluster_user.username); + writer.writeAdditionalData(user_kubernetes_cluster_user.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param User_settings The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeUser_settings(writer, user_settings = {}, isSerializingDerivedType = false) { + if (!user_settings || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("acl", user_settings.acl, serializeUser_settings_acl); + writer.writeObjectValue("mongo_user_settings", user_settings.mongoUserSettings, serializeUser_settings_mongo_user_settings); + writer.writeCollectionOfObjectValues("opensearch_acl", user_settings.opensearchAcl, serializeUser_settings_opensearch_acl); + writer.writeBooleanValue("pg_allow_replication", user_settings.pgAllowReplication); + writer.writeAdditionalData(user_settings.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param User_settings_acl The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeUser_settings_acl(writer, user_settings_acl = {}, isSerializingDerivedType = false) { + if (!user_settings_acl || isSerializingDerivedType) { + return; + } + writer.writeStringValue("id", user_settings_acl.id); + writer.writeEnumValue("permission", user_settings_acl.permission); + writer.writeStringValue("topic", user_settings_acl.topic); + writer.writeAdditionalData(user_settings_acl.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param User_settings_mongo_user_settings The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeUser_settings_mongo_user_settings(writer, user_settings_mongo_user_settings = {}, isSerializingDerivedType = false) { + if (!user_settings_mongo_user_settings || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfPrimitiveValues("databases", user_settings_mongo_user_settings.databases); + writer.writeEnumValue("role", user_settings_mongo_user_settings.role); + writer.writeAdditionalData(user_settings_mongo_user_settings.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param User_settings_opensearch_acl The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeUser_settings_opensearch_acl(writer, user_settings_opensearch_acl = {}, isSerializingDerivedType = false) { + if (!user_settings_opensearch_acl || isSerializingDerivedType) { + return; + } + writer.writeStringValue("index", user_settings_opensearch_acl.index); + writer.writeEnumValue("permission", user_settings_opensearch_acl.permission); + writer.writeAdditionalData(user_settings_opensearch_acl.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Validate_registry The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeValidate_registry(writer, validate_registry = {}, isSerializingDerivedType = false) { + if (!validate_registry || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", validate_registry.name); + writer.writeAdditionalData(validate_registry.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Valkey_advanced_config The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeValkey_advanced_config(writer, valkey_advanced_config = {}, isSerializingDerivedType = false) { + if (!valkey_advanced_config || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("frequent_snapshots", valkey_advanced_config.frequentSnapshots); + writer.writeEnumValue("valkey_acl_channels_default", valkey_advanced_config.valkeyAclChannelsDefault); + writer.writeNumberValue("valkey_active_expire_effort", valkey_advanced_config.valkeyActiveExpireEffort); + writer.writeNumberValue("valkey_io_threads", valkey_advanced_config.valkeyIoThreads); + writer.writeNumberValue("valkey_lfu_decay_time", valkey_advanced_config.valkeyLfuDecayTime); + writer.writeNumberValue("valkey_lfu_log_factor", valkey_advanced_config.valkeyLfuLogFactor); + writer.writeEnumValue("valkey_maxmemory_policy", valkey_advanced_config.valkeyMaxmemoryPolicy); + writer.writeStringValue("valkey_notify_keyspace_events", valkey_advanced_config.valkeyNotifyKeyspaceEvents); + writer.writeNumberValue("valkey_number_of_databases", valkey_advanced_config.valkeyNumberOfDatabases); + writer.writeEnumValue("valkey_persistence", valkey_advanced_config.valkeyPersistence); + writer.writeNumberValue("valkey_pubsub_client_output_buffer_limit", valkey_advanced_config.valkeyPubsubClientOutputBufferLimit); + writer.writeBooleanValue("valkey_ssl", valkey_advanced_config.valkeySsl); + writer.writeNumberValue("valkey_timeout", valkey_advanced_config.valkeyTimeout); + writer.writeAdditionalData(valkey_advanced_config.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Version2 The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeVersion2(writer, version2 = {}, isSerializingDerivedType = false) { + if (!version2 || isSerializingDerivedType) { + return; + } + writer.writeStringValue("version", version2.version); + writer.writeAdditionalData(version2.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Volume_action_post_attach The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeVolume_action_post_attach(writer, volume_action_post_attach = {}, isSerializingDerivedType = false) { + if (!volume_action_post_attach || isSerializingDerivedType) { + return; + } + serializeVolume_action_post_base(writer, volume_action_post_attach, isSerializingDerivedType); + writer.writeNumberValue("droplet_id", volume_action_post_attach.dropletId); + writer.writeCollectionOfPrimitiveValues("tags", volume_action_post_attach.tags); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Volume_action_post_base The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeVolume_action_post_base(writer, volume_action_post_base = {}, isSerializingDerivedType = false) { + if (!volume_action_post_base || isSerializingDerivedType) { + return; + } + writer.writeEnumValue("region", volume_action_post_base.region); + writer.writeEnumValue("type", volume_action_post_base.type); + writer.writeAdditionalData(volume_action_post_base.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Volume_action_post_detach The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeVolume_action_post_detach(writer, volume_action_post_detach = {}, isSerializingDerivedType = false) { + if (!volume_action_post_detach || isSerializingDerivedType) { + return; + } + serializeVolume_action_post_base(writer, volume_action_post_detach, isSerializingDerivedType); + writer.writeNumberValue("droplet_id", volume_action_post_detach.dropletId); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Volume_action_post_resize The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeVolume_action_post_resize(writer, volume_action_post_resize = {}, isSerializingDerivedType = false) { + if (!volume_action_post_resize || isSerializingDerivedType) { + return; + } + serializeVolume_action_post_base(writer, volume_action_post_resize, isSerializingDerivedType); + writer.writeNumberValue("size_gigabytes", volume_action_post_resize.sizeGigabytes); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Volume_base_read The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeVolume_base_read(writer, volume_base_read = {}, isSerializingDerivedType = false) { + if (!volume_base_read || isSerializingDerivedType) { + return; + } + writer.writeStringValue("description", volume_base_read.description); + writer.writeStringValue("name", volume_base_read.name); + writer.writeNumberValue("size_gigabytes", volume_base_read.sizeGigabytes); + writer.writeCollectionOfPrimitiveValues("tags", volume_base_read.tags); + writer.writeAdditionalData(volume_base_read.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Volume_full The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeVolume_full(writer, volume_full = {}, isSerializingDerivedType = false) { + if (!volume_full || isSerializingDerivedType) { + return; + } + serializeVolume_base_read(writer, volume_full, isSerializingDerivedType); + writer.writeStringValue("filesystem_label", volume_full.filesystemLabel); + writer.writeStringValue("filesystem_type", volume_full.filesystemType); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param VolumeAction The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeVolumeAction(writer, volumeAction = {}, isSerializingDerivedType = false) { + if (!volumeAction || isSerializingDerivedType) { + return; + } + serializeAction(writer, volumeAction, isSerializingDerivedType); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Volumes_ext4 The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeVolumes_ext4(writer, volumes_ext4 = {}, isSerializingDerivedType = false) { + if (!volumes_ext4 || isSerializingDerivedType) { + return; + } + writer.writeStringValue("description", volumes_ext4.description); + writer.writeStringValue("filesystem_label", volumes_ext4.filesystemLabel); + writer.writeStringValue("filesystem_type", volumes_ext4.filesystemType); + writer.writeStringValue("name", volumes_ext4.name); + writer.writeEnumValue("region", volumes_ext4.region); + writer.writeNumberValue("size_gigabytes", volumes_ext4.sizeGigabytes); + writer.writeStringValue("snapshot_id", volumes_ext4.snapshotId); + writer.writeCollectionOfPrimitiveValues("tags", volumes_ext4.tags); + writer.writeAdditionalData(volumes_ext4.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Volumes_xfs The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeVolumes_xfs(writer, volumes_xfs = {}, isSerializingDerivedType = false) { + if (!volumes_xfs || isSerializingDerivedType) { + return; + } + writer.writeStringValue("description", volumes_xfs.description); + writer.writeStringValue("filesystem_label", volumes_xfs.filesystemLabel); + writer.writeStringValue("filesystem_type", volumes_xfs.filesystemType); + writer.writeStringValue("name", volumes_xfs.name); + writer.writeEnumValue("region", volumes_xfs.region); + writer.writeNumberValue("size_gigabytes", volumes_xfs.sizeGigabytes); + writer.writeStringValue("snapshot_id", volumes_xfs.snapshotId); + writer.writeCollectionOfPrimitiveValues("tags", volumes_xfs.tags); + writer.writeAdditionalData(volumes_xfs.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Vpc The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeVpc(writer, vpc = {}, isSerializingDerivedType = false) { + if (!vpc || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("default", vpc.defaultEscaped); + writer.writeStringValue("description", vpc.description); + writer.writeStringValue("ip_range", vpc.ipRange); + writer.writeStringValue("name", vpc.name); + writer.writeStringValue("region", vpc.region); + writer.writeStringValue("urn", vpc.urn); + writer.writeAdditionalData(vpc.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Vpc_member The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeVpc_member(writer, vpc_member = {}, isSerializingDerivedType = false) { + if (!vpc_member || isSerializingDerivedType) { + return; + } + writer.writeStringValue("created_at", vpc_member.createdAt); + writer.writeStringValue("name", vpc_member.name); + writer.writeStringValue("urn", vpc_member.urn); + writer.writeAdditionalData(vpc_member.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Vpc_nat_gateway_create The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeVpc_nat_gateway_create(writer, vpc_nat_gateway_create = {}, isSerializingDerivedType = false) { + if (!vpc_nat_gateway_create || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("icmp_timeout_seconds", vpc_nat_gateway_create.icmpTimeoutSeconds); + writer.writeStringValue("name", vpc_nat_gateway_create.name); + writer.writeEnumValue("region", vpc_nat_gateway_create.region); + writer.writeNumberValue("size", vpc_nat_gateway_create.size); + writer.writeNumberValue("tcp_timeout_seconds", vpc_nat_gateway_create.tcpTimeoutSeconds); + writer.writeEnumValue("type", vpc_nat_gateway_create.type); + writer.writeNumberValue("udp_timeout_seconds", vpc_nat_gateway_create.udpTimeoutSeconds); + writer.writeCollectionOfObjectValues("vpcs", vpc_nat_gateway_create.vpcs, serializeVpc_nat_gateway_create_vpcs); + writer.writeAdditionalData(vpc_nat_gateway_create.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Vpc_nat_gateway_create_vpcs The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeVpc_nat_gateway_create_vpcs(writer, vpc_nat_gateway_create_vpcs = {}, isSerializingDerivedType = false) { + if (!vpc_nat_gateway_create_vpcs || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("default_gateway", vpc_nat_gateway_create_vpcs.defaultGateway); + writer.writeStringValue("vpc_uuid", vpc_nat_gateway_create_vpcs.vpcUuid); + writer.writeAdditionalData(vpc_nat_gateway_create_vpcs.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Vpc_nat_gateway_get The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeVpc_nat_gateway_get(writer, vpc_nat_gateway_get = {}, isSerializingDerivedType = false) { + if (!vpc_nat_gateway_get || isSerializingDerivedType) { + return; + } + writer.writeDateValue("created_at", vpc_nat_gateway_get.createdAt); + writer.writeObjectValue("egresses", vpc_nat_gateway_get.egresses, serializeVpc_nat_gateway_get_egresses); + writer.writeNumberValue("icmp_timeout_seconds", vpc_nat_gateway_get.icmpTimeoutSeconds); + writer.writeStringValue("id", vpc_nat_gateway_get.id); + writer.writeStringValue("name", vpc_nat_gateway_get.name); + writer.writeEnumValue("region", vpc_nat_gateway_get.region); + writer.writeNumberValue("size", vpc_nat_gateway_get.size); + writer.writeEnumValue("state", vpc_nat_gateway_get.state); + writer.writeNumberValue("tcp_timeout_seconds", vpc_nat_gateway_get.tcpTimeoutSeconds); + writer.writeEnumValue("type", vpc_nat_gateway_get.type); + writer.writeNumberValue("udp_timeout_seconds", vpc_nat_gateway_get.udpTimeoutSeconds); + writer.writeDateValue("updated_at", vpc_nat_gateway_get.updatedAt); + writer.writeCollectionOfObjectValues("vpcs", vpc_nat_gateway_get.vpcs, serializeVpc_nat_gateway_get_vpcs); + writer.writeAdditionalData(vpc_nat_gateway_get.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Vpc_nat_gateway_get_egresses The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeVpc_nat_gateway_get_egresses(writer, vpc_nat_gateway_get_egresses = {}, isSerializingDerivedType = false) { + if (!vpc_nat_gateway_get_egresses || isSerializingDerivedType) { + return; + } + writer.writeCollectionOfObjectValues("public_gateways", vpc_nat_gateway_get_egresses.publicGateways, serializeVpc_nat_gateway_get_egresses_public_gateways); + writer.writeAdditionalData(vpc_nat_gateway_get_egresses.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Vpc_nat_gateway_get_egresses_public_gateways The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeVpc_nat_gateway_get_egresses_public_gateways(writer, vpc_nat_gateway_get_egresses_public_gateways = {}, isSerializingDerivedType = false) { + if (!vpc_nat_gateway_get_egresses_public_gateways || isSerializingDerivedType) { + return; + } + writer.writeStringValue("ipv4", vpc_nat_gateway_get_egresses_public_gateways.ipv4); + writer.writeAdditionalData(vpc_nat_gateway_get_egresses_public_gateways.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Vpc_nat_gateway_get_vpcs The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeVpc_nat_gateway_get_vpcs(writer, vpc_nat_gateway_get_vpcs = {}, isSerializingDerivedType = false) { + if (!vpc_nat_gateway_get_vpcs || isSerializingDerivedType) { + return; + } + writer.writeStringValue("gateway_ip", vpc_nat_gateway_get_vpcs.gatewayIp); + writer.writeStringValue("vpc_uuid", vpc_nat_gateway_get_vpcs.vpcUuid); + writer.writeAdditionalData(vpc_nat_gateway_get_vpcs.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Vpc_nat_gateway_update The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeVpc_nat_gateway_update(writer, vpc_nat_gateway_update = {}, isSerializingDerivedType = false) { + if (!vpc_nat_gateway_update || isSerializingDerivedType) { + return; + } + writer.writeNumberValue("icmp_timeout_seconds", vpc_nat_gateway_update.icmpTimeoutSeconds); + writer.writeStringValue("name", vpc_nat_gateway_update.name); + writer.writeNumberValue("size", vpc_nat_gateway_update.size); + writer.writeNumberValue("tcp_timeout_seconds", vpc_nat_gateway_update.tcpTimeoutSeconds); + writer.writeNumberValue("udp_timeout_seconds", vpc_nat_gateway_update.udpTimeoutSeconds); + writer.writeCollectionOfObjectValues("vpcs", vpc_nat_gateway_update.vpcs, serializeVpc_nat_gateway_update_vpcs); + writer.writeAdditionalData(vpc_nat_gateway_update.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Vpc_nat_gateway_update_vpcs The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeVpc_nat_gateway_update_vpcs(writer, vpc_nat_gateway_update_vpcs = {}, isSerializingDerivedType = false) { + if (!vpc_nat_gateway_update_vpcs || isSerializingDerivedType) { + return; + } + writer.writeBooleanValue("default_gateway", vpc_nat_gateway_update_vpcs.defaultGateway); + writer.writeStringValue("vpc_uuid", vpc_nat_gateway_update_vpcs.vpcUuid); + writer.writeAdditionalData(vpc_nat_gateway_update_vpcs.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Vpc_peering The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeVpc_peering(writer, vpc_peering = {}, isSerializingDerivedType = false) { + if (!vpc_peering || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", vpc_peering.name); + writer.writeCollectionOfPrimitiveValues("vpc_ids", vpc_peering.vpcIds); + writer.writeAdditionalData(vpc_peering.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Vpc_peering_updatable The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeVpc_peering_updatable(writer, vpc_peering_updatable = {}, isSerializingDerivedType = false) { + if (!vpc_peering_updatable || isSerializingDerivedType) { + return; + } + writer.writeStringValue("name", vpc_peering_updatable.name); + writer.writeAdditionalData(vpc_peering_updatable.additionalData); +} +/** + * This value is one of "active", "warning" or "locked". + */ +export const Account_statusObject = { + Active: "active", + Warning: "warning", + Locked: "locked", +}; +/** + * The current status of the action. This can be "in-progress", "completed", or "errored". + */ +export const Action_statusObject = { + InProgress: "in-progress", + Completed: "completed", + Errored: "errored", +}; +/** + * The data type of the metadata value. + */ +export const Addons_app_metadata_typeObject = { + String: "string", + Boolean: "boolean", +}; +/** + * Feature type, indicating the kind of data it holds. + */ +export const Addons_feature_typeObject = { + Unknown: "unknown", + String: "string", + Boolean: "boolean", + Allowance: "allowance", +}; +/** + * Unit of measurement for the feature, if applicable. Units apply to allowance features. + */ +export const Addons_feature_unitObject = { + Unit_unknown: "unit_unknown", + GB: "GB", + GIB: "GIB", + Count: "count", + Byte: "byte", + Byte_second: "byte_second", +}; +/** + * Current state of the plan. + */ +export const Addons_plan_stateObject = { + Unknown: "unknown", + Draft: "draft", + In_review: "in_review", + Approved: "approved", + Suspended: "suspended", + Archived: "archived", +}; +/** + * The state the resource is currently in. + */ +export const Addons_resource_stateObject = { + Pending: "pending", + Provisioning: "provisioning", + Provisioned: "provisioned", + Deprovisioning: "deprovisioning", + Deprovisioned: "deprovisioned", + ProvisioningFailed: "provisioning-failed", + DeprovisioningFailed: "deprovisioning-failed", + Suspended: "suspended", +}; +/** + * The comparison operator used against the alert's threshold. + */ +export const Alert_comparisonObject = { + Greater_than: "greater_than", + Less_than: "less_than", +}; +/** + * Period of time the threshold must be exceeded to trigger the alert. + */ +export const Alert_periodObject = { + Twom: "2m", + Threem: "3m", + Fivem: "5m", + OneZerom: "10m", + OneFivem: "15m", + ThreeZerom: "30m", + Oneh: "1h", +}; +export const Alert_policy_compareObject = { + GreaterThan: "GreaterThan", + LessThan: "LessThan", +}; +export const Alert_policy_request_compareObject = { + GreaterThan: "GreaterThan", + LessThan: "LessThan", +}; +export const Alert_policy_request_typeObject = { + V1InsightsDropletLoad_1: "v1/insights/droplet/load_1", + V1InsightsDropletLoad_5: "v1/insights/droplet/load_5", + V1InsightsDropletLoad_15: "v1/insights/droplet/load_15", + V1InsightsDropletMemory_utilization_percent: "v1/insights/droplet/memory_utilization_percent", + V1InsightsDropletDisk_utilization_percent: "v1/insights/droplet/disk_utilization_percent", + V1InsightsDropletCpu: "v1/insights/droplet/cpu", + V1InsightsDropletDisk_read: "v1/insights/droplet/disk_read", + V1InsightsDropletDisk_write: "v1/insights/droplet/disk_write", + V1InsightsDropletPublic_outbound_bandwidth: "v1/insights/droplet/public_outbound_bandwidth", + V1InsightsDropletPublic_inbound_bandwidth: "v1/insights/droplet/public_inbound_bandwidth", + V1InsightsDropletPrivate_outbound_bandwidth: "v1/insights/droplet/private_outbound_bandwidth", + V1InsightsDropletPrivate_inbound_bandwidth: "v1/insights/droplet/private_inbound_bandwidth", + V1InsightsLbaasAvg_cpu_utilization_percent: "v1/insights/lbaas/avg_cpu_utilization_percent", + V1InsightsLbaasConnection_utilization_percent: "v1/insights/lbaas/connection_utilization_percent", + V1InsightsLbaasDroplet_health: "v1/insights/lbaas/droplet_health", + V1InsightsLbaasTls_connections_per_second_utilization_percent: "v1/insights/lbaas/tls_connections_per_second_utilization_percent", + V1InsightsLbaasIncrease_in_http_error_rate_percentage_5xx: "v1/insights/lbaas/increase_in_http_error_rate_percentage_5xx", + V1InsightsLbaasIncrease_in_http_error_rate_percentage_4xx: "v1/insights/lbaas/increase_in_http_error_rate_percentage_4xx", + V1InsightsLbaasIncrease_in_http_error_rate_count_5xx: "v1/insights/lbaas/increase_in_http_error_rate_count_5xx", + V1InsightsLbaasIncrease_in_http_error_rate_count_4xx: "v1/insights/lbaas/increase_in_http_error_rate_count_4xx", + V1InsightsLbaasHigh_http_request_response_time: "v1/insights/lbaas/high_http_request_response_time", + V1InsightsLbaasHigh_http_request_response_time_50p: "v1/insights/lbaas/high_http_request_response_time_50p", + V1InsightsLbaasHigh_http_request_response_time_95p: "v1/insights/lbaas/high_http_request_response_time_95p", + V1InsightsLbaasHigh_http_request_response_time_99p: "v1/insights/lbaas/high_http_request_response_time_99p", + V1DbaasAlertsLoad_15_alerts: "v1/dbaas/alerts/load_15_alerts", + V1DbaasAlertsMemory_utilization_alerts: "v1/dbaas/alerts/memory_utilization_alerts", + V1DbaasAlertsDisk_utilization_alerts: "v1/dbaas/alerts/disk_utilization_alerts", + V1DbaasAlertsCpu_alerts: "v1/dbaas/alerts/cpu_alerts", + V1DropletAutoscale_alertsCurrent_instances: "v1/droplet/autoscale_alerts/current_instances", + V1DropletAutoscale_alertsTarget_instances: "v1/droplet/autoscale_alerts/target_instances", + V1DropletAutoscale_alertsCurrent_cpu_utilization: "v1/droplet/autoscale_alerts/current_cpu_utilization", + V1DropletAutoscale_alertsTarget_cpu_utilization: "v1/droplet/autoscale_alerts/target_cpu_utilization", + V1DropletAutoscale_alertsCurrent_memory_utilization: "v1/droplet/autoscale_alerts/current_memory_utilization", + V1DropletAutoscale_alertsTarget_memory_utilization: "v1/droplet/autoscale_alerts/target_memory_utilization", + V1DropletAutoscale_alertsScale_up: "v1/droplet/autoscale_alerts/scale_up", + V1DropletAutoscale_alertsScale_down: "v1/droplet/autoscale_alerts/scale_down", +}; +export const Alert_policy_request_windowObject = { + Fivem: "5m", + OneZerom: "10m", + ThreeZerom: "30m", + Oneh: "1h", +}; +export const Alert_policy_typeObject = { + V1InsightsDropletLoad_1: "v1/insights/droplet/load_1", + V1InsightsDropletLoad_5: "v1/insights/droplet/load_5", + V1InsightsDropletLoad_15: "v1/insights/droplet/load_15", + V1InsightsDropletMemory_utilization_percent: "v1/insights/droplet/memory_utilization_percent", + V1InsightsDropletDisk_utilization_percent: "v1/insights/droplet/disk_utilization_percent", + V1InsightsDropletCpu: "v1/insights/droplet/cpu", + V1InsightsDropletDisk_read: "v1/insights/droplet/disk_read", + V1InsightsDropletDisk_write: "v1/insights/droplet/disk_write", + V1InsightsDropletPublic_outbound_bandwidth: "v1/insights/droplet/public_outbound_bandwidth", + V1InsightsDropletPublic_inbound_bandwidth: "v1/insights/droplet/public_inbound_bandwidth", + V1InsightsDropletPrivate_outbound_bandwidth: "v1/insights/droplet/private_outbound_bandwidth", + V1InsightsDropletPrivate_inbound_bandwidth: "v1/insights/droplet/private_inbound_bandwidth", + V1InsightsLbaasAvg_cpu_utilization_percent: "v1/insights/lbaas/avg_cpu_utilization_percent", + V1InsightsLbaasConnection_utilization_percent: "v1/insights/lbaas/connection_utilization_percent", + V1InsightsLbaasDroplet_health: "v1/insights/lbaas/droplet_health", + V1InsightsLbaasTls_connections_per_second_utilization_percent: "v1/insights/lbaas/tls_connections_per_second_utilization_percent", + V1InsightsLbaasIncrease_in_http_error_rate_percentage_5xx: "v1/insights/lbaas/increase_in_http_error_rate_percentage_5xx", + V1InsightsLbaasIncrease_in_http_error_rate_percentage_4xx: "v1/insights/lbaas/increase_in_http_error_rate_percentage_4xx", + V1InsightsLbaasIncrease_in_http_error_rate_count_5xx: "v1/insights/lbaas/increase_in_http_error_rate_count_5xx", + V1InsightsLbaasIncrease_in_http_error_rate_count_4xx: "v1/insights/lbaas/increase_in_http_error_rate_count_4xx", + V1InsightsLbaasHigh_http_request_response_time: "v1/insights/lbaas/high_http_request_response_time", + V1InsightsLbaasHigh_http_request_response_time_50p: "v1/insights/lbaas/high_http_request_response_time_50p", + V1InsightsLbaasHigh_http_request_response_time_95p: "v1/insights/lbaas/high_http_request_response_time_95p", + V1InsightsLbaasHigh_http_request_response_time_99p: "v1/insights/lbaas/high_http_request_response_time_99p", + V1DbaasAlertsLoad_15_alerts: "v1/dbaas/alerts/load_15_alerts", + V1DbaasAlertsMemory_utilization_alerts: "v1/dbaas/alerts/memory_utilization_alerts", + V1DbaasAlertsDisk_utilization_alerts: "v1/dbaas/alerts/disk_utilization_alerts", + V1DbaasAlertsCpu_alerts: "v1/dbaas/alerts/cpu_alerts", + V1DropletAutoscale_alertsCurrent_instances: "v1/droplet/autoscale_alerts/current_instances", + V1DropletAutoscale_alertsTarget_instances: "v1/droplet/autoscale_alerts/target_instances", + V1DropletAutoscale_alertsCurrent_cpu_utilization: "v1/droplet/autoscale_alerts/current_cpu_utilization", + V1DropletAutoscale_alertsTarget_cpu_utilization: "v1/droplet/autoscale_alerts/target_cpu_utilization", + V1DropletAutoscale_alertsCurrent_memory_utilization: "v1/droplet/autoscale_alerts/current_memory_utilization", + V1DropletAutoscale_alertsTarget_memory_utilization: "v1/droplet/autoscale_alerts/target_memory_utilization", + V1DropletAutoscale_alertsScale_up: "v1/droplet/autoscale_alerts/scale_up", + V1DropletAutoscale_alertsScale_down: "v1/droplet/autoscale_alerts/scale_down", +}; +export const Alert_policy_windowObject = { + Fivem: "5m", + OneZerom: "10m", + ThreeZerom: "30m", + Oneh: "1h", +}; +/** + * The type of alert. + */ +export const Alert_typeObject = { + Latency: "latency", + Down: "down", + Down_global: "down_global", + Ssl_expiry: "ssl_expiry", +}; +/** + * The comparison operator used against the alert's threshold. + */ +export const Alert_updatable_comparisonObject = { + Greater_than: "greater_than", + Less_than: "less_than", +}; +/** + * Period of time the threshold must be exceeded to trigger the alert. + */ +export const Alert_updatable_periodObject = { + Twom: "2m", + Threem: "3m", + Fivem: "5m", + OneZerom: "10m", + OneFivem: "15m", + ThreeZerom: "30m", + Oneh: "1h", +}; +/** + * The type of alert. + */ +export const Alert_updatable_typeObject = { + Latency: "latency", + Down: "down", + Down_global: "down_global", + Ssl_expiry: "ssl_expiry", +}; +/** + * - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template + */ +export const ApiAgentTemplateTypeObject = { + AGENT_TEMPLATE_TYPE_STANDARD: "AGENT_TEMPLATE_TYPE_STANDARD", + AGENT_TEMPLATE_TYPE_ONE_CLICK: "AGENT_TEMPLATE_TYPE_ONE_CLICK", +}; +export const ApiBatchJobPhaseObject = { + BATCH_JOB_PHASE_UNKNOWN: "BATCH_JOB_PHASE_UNKNOWN", + BATCH_JOB_PHASE_PENDING: "BATCH_JOB_PHASE_PENDING", + BATCH_JOB_PHASE_RUNNING: "BATCH_JOB_PHASE_RUNNING", + BATCH_JOB_PHASE_SUCCEEDED: "BATCH_JOB_PHASE_SUCCEEDED", + BATCH_JOB_PHASE_FAILED: "BATCH_JOB_PHASE_FAILED", + BATCH_JOB_PHASE_ERROR: "BATCH_JOB_PHASE_ERROR", + BATCH_JOB_PHASE_CANCELLED: "BATCH_JOB_PHASE_CANCELLED", +}; +/** + * The chunking algorithm to use for processing data sources.**Note: This feature requires enabling the knowledgebase enhancements feature preview flag.** + */ +export const ApiChunkingAlgorithmObject = { + CHUNKING_ALGORITHM_UNKNOWN: "CHUNKING_ALGORITHM_UNKNOWN", + CHUNKING_ALGORITHM_SECTION_BASED: "CHUNKING_ALGORITHM_SECTION_BASED", + CHUNKING_ALGORITHM_HIERARCHICAL: "CHUNKING_ALGORITHM_HIERARCHICAL", + CHUNKING_ALGORITHM_SEMANTIC: "CHUNKING_ALGORITHM_SEMANTIC", + CHUNKING_ALGORITHM_FIXED_LENGTH: "CHUNKING_ALGORITHM_FIXED_LENGTH", +}; +/** + * Options for specifying how URLs found on pages should be handled. - UNKNOWN: Default unknown value - SCOPED: Only include the base URL. - PATH: Crawl the base URL and linked pages within the URL path. - DOMAIN: Crawl the base URL and linked pages within the same domain. - SUBDOMAINS: Crawl the base URL and linked pages for any subdomain. - SITEMAP: Crawl URLs discovered in the sitemap. + */ +export const ApiCrawlingOptionObject = { + UNKNOWN: "UNKNOWN", + SCOPED: "SCOPED", + PATH: "PATH", + DOMAIN: "DOMAIN", + SUBDOMAINS: "SUBDOMAINS", + SITEMAP: "SITEMAP", +}; +export const ApiDeploymentStatusObject = { + STATUS_UNKNOWN: "STATUS_UNKNOWN", + STATUS_WAITING_FOR_DEPLOYMENT: "STATUS_WAITING_FOR_DEPLOYMENT", + STATUS_DEPLOYING: "STATUS_DEPLOYING", + STATUS_RUNNING: "STATUS_RUNNING", + STATUS_FAILED: "STATUS_FAILED", + STATUS_WAITING_FOR_UNDEPLOYMENT: "STATUS_WAITING_FOR_UNDEPLOYMENT", + STATUS_UNDEPLOYING: "STATUS_UNDEPLOYING", + STATUS_UNDEPLOYMENT_FAILED: "STATUS_UNDEPLOYMENT_FAILED", + STATUS_DELETED: "STATUS_DELETED", + STATUS_BUILDING: "STATUS_BUILDING", +}; +/** + * - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys + */ +export const ApiDeploymentVisibilityObject = { + VISIBILITY_UNKNOWN: "VISIBILITY_UNKNOWN", + VISIBILITY_DISABLED: "VISIBILITY_DISABLED", + VISIBILITY_PLAYGROUND: "VISIBILITY_PLAYGROUND", + VISIBILITY_PUBLIC: "VISIBILITY_PUBLIC", + VISIBILITY_PRIVATE: "VISIBILITY_PRIVATE", +}; +export const ApiEvaluationDatasetTypeObject = { + EVALUATION_DATASET_TYPE_UNKNOWN: "EVALUATION_DATASET_TYPE_UNKNOWN", + EVALUATION_DATASET_TYPE_ADK: "EVALUATION_DATASET_TYPE_ADK", + EVALUATION_DATASET_TYPE_NON_ADK: "EVALUATION_DATASET_TYPE_NON_ADK", +}; +export const ApiEvaluationMetricCategoryObject = { + METRIC_CATEGORY_UNSPECIFIED: "METRIC_CATEGORY_UNSPECIFIED", + METRIC_CATEGORY_CORRECTNESS: "METRIC_CATEGORY_CORRECTNESS", + METRIC_CATEGORY_USER_OUTCOMES: "METRIC_CATEGORY_USER_OUTCOMES", + METRIC_CATEGORY_SAFETY_AND_SECURITY: "METRIC_CATEGORY_SAFETY_AND_SECURITY", + METRIC_CATEGORY_CONTEXT_QUALITY: "METRIC_CATEGORY_CONTEXT_QUALITY", + METRIC_CATEGORY_MODEL_FIT: "METRIC_CATEGORY_MODEL_FIT", +}; +export const ApiEvaluationMetricTypeObject = { + METRIC_TYPE_UNSPECIFIED: "METRIC_TYPE_UNSPECIFIED", + METRIC_TYPE_GENERAL_QUALITY: "METRIC_TYPE_GENERAL_QUALITY", + METRIC_TYPE_RAG_AND_TOOL: "METRIC_TYPE_RAG_AND_TOOL", +}; +export const ApiEvaluationMetricValueTypeObject = { + METRIC_VALUE_TYPE_UNSPECIFIED: "METRIC_VALUE_TYPE_UNSPECIFIED", + METRIC_VALUE_TYPE_NUMBER: "METRIC_VALUE_TYPE_NUMBER", + METRIC_VALUE_TYPE_STRING: "METRIC_VALUE_TYPE_STRING", + METRIC_VALUE_TYPE_PERCENTAGE: "METRIC_VALUE_TYPE_PERCENTAGE", +}; +/** + * Evaluation Run Statuses + */ +export const ApiEvaluationRunStatusObject = { + EVALUATION_RUN_STATUS_UNSPECIFIED: "EVALUATION_RUN_STATUS_UNSPECIFIED", + EVALUATION_RUN_QUEUED: "EVALUATION_RUN_QUEUED", + EVALUATION_RUN_RUNNING_DATASET: "EVALUATION_RUN_RUNNING_DATASET", + EVALUATION_RUN_EVALUATING_RESULTS: "EVALUATION_RUN_EVALUATING_RESULTS", + EVALUATION_RUN_CANCELLING: "EVALUATION_RUN_CANCELLING", + EVALUATION_RUN_CANCELLED: "EVALUATION_RUN_CANCELLED", + EVALUATION_RUN_SUCCESSFUL: "EVALUATION_RUN_SUCCESSFUL", + EVALUATION_RUN_PARTIALLY_SUCCESSFUL: "EVALUATION_RUN_PARTIALLY_SUCCESSFUL", + EVALUATION_RUN_FAILED: "EVALUATION_RUN_FAILED", +}; +export const ApiGuardrailTypeObject = { + GUARDRAIL_TYPE_UNKNOWN: "GUARDRAIL_TYPE_UNKNOWN", + GUARDRAIL_TYPE_JAILBREAK: "GUARDRAIL_TYPE_JAILBREAK", + GUARDRAIL_TYPE_SENSITIVE_DATA: "GUARDRAIL_TYPE_SENSITIVE_DATA", + GUARDRAIL_TYPE_CONTENT_MODERATION: "GUARDRAIL_TYPE_CONTENT_MODERATION", +}; +export const ApiIndexedDataSourceStatusObject = { + DATA_SOURCE_STATUS_UNKNOWN: "DATA_SOURCE_STATUS_UNKNOWN", + DATA_SOURCE_STATUS_IN_PROGRESS: "DATA_SOURCE_STATUS_IN_PROGRESS", + DATA_SOURCE_STATUS_UPDATED: "DATA_SOURCE_STATUS_UPDATED", + DATA_SOURCE_STATUS_PARTIALLY_UPDATED: "DATA_SOURCE_STATUS_PARTIALLY_UPDATED", + DATA_SOURCE_STATUS_NOT_UPDATED: "DATA_SOURCE_STATUS_NOT_UPDATED", + DATA_SOURCE_STATUS_FAILED: "DATA_SOURCE_STATUS_FAILED", + DATA_SOURCE_STATUS_CANCELLED: "DATA_SOURCE_STATUS_CANCELLED", +}; +export const ApiIndexJobStatusObject = { + INDEX_JOB_STATUS_UNKNOWN: "INDEX_JOB_STATUS_UNKNOWN", + INDEX_JOB_STATUS_PARTIAL: "INDEX_JOB_STATUS_PARTIAL", + INDEX_JOB_STATUS_IN_PROGRESS: "INDEX_JOB_STATUS_IN_PROGRESS", + INDEX_JOB_STATUS_COMPLETED: "INDEX_JOB_STATUS_COMPLETED", + INDEX_JOB_STATUS_FAILED: "INDEX_JOB_STATUS_FAILED", + INDEX_JOB_STATUS_NO_CHANGES: "INDEX_JOB_STATUS_NO_CHANGES", + INDEX_JOB_STATUS_PENDING: "INDEX_JOB_STATUS_PENDING", + INDEX_JOB_STATUS_CANCELLED: "INDEX_JOB_STATUS_CANCELLED", +}; +export const ApiModelProviderObject = { + MODEL_PROVIDER_DIGITALOCEAN: "MODEL_PROVIDER_DIGITALOCEAN", + MODEL_PROVIDER_ANTHROPIC: "MODEL_PROVIDER_ANTHROPIC", + MODEL_PROVIDER_OPENAI: "MODEL_PROVIDER_OPENAI", +}; +/** + * - MODEL_USECASE_UNKNOWN: The use case of the model is unknown - MODEL_USECASE_AGENT: The model maybe used in an agent - MODEL_USECASE_FINETUNED: The model maybe used for fine tuning - MODEL_USECASE_KNOWLEDGEBASE: The model maybe used for knowledge bases (embedding models) - MODEL_USECASE_GUARDRAIL: The model maybe used for guardrails - MODEL_USECASE_REASONING: The model usecase for reasoning - MODEL_USECASE_SERVERLESS: The model usecase for serverless inference + */ +export const ApiModelUsecaseObject = { + MODEL_USECASE_UNKNOWN: "MODEL_USECASE_UNKNOWN", + MODEL_USECASE_AGENT: "MODEL_USECASE_AGENT", + MODEL_USECASE_FINETUNED: "MODEL_USECASE_FINETUNED", + MODEL_USECASE_KNOWLEDGEBASE: "MODEL_USECASE_KNOWLEDGEBASE", + MODEL_USECASE_GUARDRAIL: "MODEL_USECASE_GUARDRAIL", + MODEL_USECASE_REASONING: "MODEL_USECASE_REASONING", + MODEL_USECASE_SERVERLESS: "MODEL_USECASE_SERVERLESS", +}; +/** + * - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none + */ +export const ApiRetrievalMethodObject = { + RETRIEVAL_METHOD_UNKNOWN: "RETRIEVAL_METHOD_UNKNOWN", + RETRIEVAL_METHOD_REWRITE: "RETRIEVAL_METHOD_REWRITE", + RETRIEVAL_METHOD_STEP_BACK: "RETRIEVAL_METHOD_STEP_BACK", + RETRIEVAL_METHOD_SUB_QUERIES: "RETRIEVAL_METHOD_SUB_QUERIES", + RETRIEVAL_METHOD_NONE: "RETRIEVAL_METHOD_NONE", +}; +/** + * Types of spans in a trace + */ +export const ApiTraceSpanTypeObject = { + TRACE_SPAN_TYPE_UNKNOWN: "TRACE_SPAN_TYPE_UNKNOWN", + TRACE_SPAN_TYPE_LLM: "TRACE_SPAN_TYPE_LLM", + TRACE_SPAN_TYPE_RETRIEVER: "TRACE_SPAN_TYPE_RETRIEVER", + TRACE_SPAN_TYPE_TOOL: "TRACE_SPAN_TYPE_TOOL", +}; +export const App_alert_phaseObject = { + UNKNOWN: "UNKNOWN", + PENDING: "PENDING", + CONFIGURING: "CONFIGURING", + ACTIVE: "ACTIVE", + ERROREscaped: "ERROR", +}; +export const App_alert_progress_step_statusObject = { + UNKNOWN: "UNKNOWN", + PENDING: "PENDING", + RUNNING: "RUNNING", + ERROREscaped: "ERROR", + SUCCESS: "SUCCESS", +}; +export const App_alert_spec_operatorObject = { + UNSPECIFIED_OPERATOR: "UNSPECIFIED_OPERATOR", + GREATER_THAN: "GREATER_THAN", + LESS_THAN: "LESS_THAN", +}; +export const App_alert_spec_ruleObject = { + UNSPECIFIED_RULE: "UNSPECIFIED_RULE", + CPU_UTILIZATION: "CPU_UTILIZATION", + MEM_UTILIZATION: "MEM_UTILIZATION", + RESTART_COUNT: "RESTART_COUNT", + DEPLOYMENT_FAILED: "DEPLOYMENT_FAILED", + DEPLOYMENT_LIVE: "DEPLOYMENT_LIVE", + DOMAIN_FAILED: "DOMAIN_FAILED", + DOMAIN_LIVE: "DOMAIN_LIVE", + AUTOSCALE_FAILED: "AUTOSCALE_FAILED", + AUTOSCALE_SUCCEEDED: "AUTOSCALE_SUCCEEDED", + FUNCTIONS_ACTIVATION_COUNT: "FUNCTIONS_ACTIVATION_COUNT", + FUNCTIONS_AVERAGE_DURATION_MS: "FUNCTIONS_AVERAGE_DURATION_MS", + FUNCTIONS_ERROR_RATE_PER_MINUTE: "FUNCTIONS_ERROR_RATE_PER_MINUTE", + FUNCTIONS_AVERAGE_WAIT_TIME_MS: "FUNCTIONS_AVERAGE_WAIT_TIME_MS", + FUNCTIONS_ERROR_COUNT: "FUNCTIONS_ERROR_COUNT", + FUNCTIONS_GB_RATE_PER_SECOND: "FUNCTIONS_GB_RATE_PER_SECOND", +}; +export const App_alert_spec_windowObject = { + UNSPECIFIED_WINDOW: "UNSPECIFIED_WINDOW", + FIVE_MINUTES: "FIVE_MINUTES", + TEN_MINUTES: "TEN_MINUTES", + THIRTY_MINUTES: "THIRTY_MINUTES", + ONE_HOUR: "ONE_HOUR", +}; +export const App_component_health_stateObject = { + UNKNOWN: "UNKNOWN", + HEALTHY: "HEALTHY", + UNHEALTHY: "UNHEALTHY", +}; +/** + * - MYSQL: MySQL- PG: PostgreSQL- REDIS: Caching- MONGODB: MongoDB- KAFKA: Kafka- OPENSEARCH: OpenSearch- VALKEY: ValKey + */ +export const App_database_spec_engineObject = { + UNSET: "UNSET", + MYSQL: "MYSQL", + PG: "PG", + REDIS: "REDIS", + MONGODB: "MONGODB", + KAFKA: "KAFKA", + OPENSEARCH: "OPENSEARCH", + VALKEY: "VALKEY", +}; +/** + * The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: `"1.2"` or `"1.3"`. + */ +export const App_domain_spec_minimum_tls_versionObject = { + OneTwo: "1.2", + OneThree: "1.3", +}; +/** + * - DEFAULT: The default `.ondigitalocean.app` domain assigned to this app- PRIMARY: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary.- ALIAS: A non-primary domain + */ +export const App_domain_spec_typeObject = { + UNSPECIFIED: "UNSPECIFIED", + DEFAULTEscaped: "DEFAULT", + PRIMARY: "PRIMARY", + ALIAS: "ALIAS", +}; +export const App_egress_type_specObject = { + AUTOASSIGN: "AUTOASSIGN", + DEDICATED_IP: "DEDICATED_IP", +}; +/** + * Supported compute component by DigitalOcean App Platform. + */ +export const App_instance_component_typeObject = { + SERVICE: "SERVICE", + WORKER: "WORKER", + JOB: "JOB", +}; +/** + * The phase of the job invocation + */ +export const App_job_invocation_phaseObject = { + UNKNOWN: "UNKNOWN", + PENDING: "PENDING", + RUNNING: "RUNNING", + SUCCEEDED: "SUCCEEDED", + FAILED: "FAILED", + CANCELED: "CANCELED", + SKIPPED: "SKIPPED", +}; +/** + * The type of trigger that initiated the job invocation. + */ +export const App_job_invocation_trigger_typeObject = { + MANUAL: "MANUAL", + SCHEDULE: "SCHEDULE", + UNKNOWN: "UNKNOWN", +}; +/** + * - UNSPECIFIED: Default job type, will auto-complete to POST_DEPLOY kind.- PRE_DEPLOY: Indicates a job that runs before an app deployment.- POST_DEPLOY: Indicates a job that runs after an app deployment.- FAILED_DEPLOY: Indicates a job that runs after a component fails to deploy. + */ +export const App_job_spec_kindObject = { + UNSPECIFIED: "UNSPECIFIED", + PRE_DEPLOY: "PRE_DEPLOY", + POST_DEPLOY: "POST_DEPLOY", + FAILED_DEPLOY: "FAILED_DEPLOY", +}; +/** + * A code identifier that represents the failing condition.Failing conditions: - `incompatible_phase` - indicates that the deployment's phase is not suitable for rollback. - `incompatible_result` - indicates that the deployment's result is not suitable for rollback. - `exceeded_revision_limit` - indicates that the app has exceeded the rollback revision limits for its tier. - `app_pinned` - indicates that there is already a rollback in progress and the app is pinned. - `database_config_conflict` - indicates that the deployment's database config is different than the current config. - `region_conflict` - indicates that the deployment's region differs from the current app region. Warning conditions: - `static_site_requires_rebuild` - indicates that the deployment contains at least one static site that will require a rebuild. - `image_source_missing_digest` - indicates that the deployment contains at least one component with an image source that is missing a digest. + */ +export const App_rollback_validation_condition_codeObject = { + Incompatible_phase: "incompatible_phase", + Incompatible_result: "incompatible_result", + Exceeded_revision_limit: "exceeded_revision_limit", + App_pinned: "app_pinned", + Database_config_conflict: "database_config_conflict", + Region_conflict: "region_conflict", + Static_site_requires_rebuild: "static_site_requires_rebuild", + Image_source_missing_digest: "image_source_missing_digest", +}; +/** + * The protocol which the service uses to serve traffic on the http_port.- `HTTP`: The app is serving the HTTP protocol. Default.- `HTTP2`: The app is serving the HTTP/2 protocol. Currently, this needs to be implemented in the service by serving HTTP/2 cleartext (h2c). + */ +export const App_service_spec_protocolObject = { + HTTP: "HTTP", + HTTP2: "HTTP2", +}; +/** + * The slug form of the geographical origin of the app. Default: `nearest available` + */ +export const App_spec_regionObject = { + Atl: "atl", + Nyc: "nyc", + Sfo: "sfo", + Tor: "tor", + Ams: "ams", + Fra: "fra", + Lon: "lon", + Blr: "blr", + Sgp: "sgp", + Syd: "syd", +}; +/** + * - RUN_TIME: Made available only at run-time- BUILD_TIME: Made available only at build-time- RUN_AND_BUILD_TIME: Made available at both build and run-time + */ +export const App_variable_definition_scopeObject = { + UNSET: "UNSET", + RUN_TIME: "RUN_TIME", + BUILD_TIME: "BUILD_TIME", + RUN_AND_BUILD_TIME: "RUN_AND_BUILD_TIME", +}; +/** + * - GENERAL: A plain-text environment variable- SECRET: A secret encrypted environment variable + */ +export const App_variable_definition_typeObject = { + GENERAL: "GENERAL", + SECRET: "SECRET", +}; +export const Apps_dedicated_egress_ip_statusObject = { + UNKNOWN: "UNKNOWN", + ASSIGNING: "ASSIGNING", + ASSIGNED: "ASSIGNED", + REMOVED: "REMOVED", +}; +export const Apps_deployment_phaseObject = { + UNKNOWN: "UNKNOWN", + PENDING_BUILD: "PENDING_BUILD", + BUILDING: "BUILDING", + PENDING_DEPLOY: "PENDING_DEPLOY", + DEPLOYING: "DEPLOYING", + ACTIVE: "ACTIVE", + SUPERSEDED: "SUPERSEDED", + ERROREscaped: "ERROR", + CANCELED: "CANCELED", +}; +export const Apps_deployment_progress_step_statusObject = { + UNKNOWN: "UNKNOWN", + PENDING: "PENDING", + RUNNING: "RUNNING", + ERROREscaped: "ERROR", + SUCCESS: "SUCCESS", +}; +export const Apps_domain_phaseObject = { + UNKNOWN: "UNKNOWN", + PENDING: "PENDING", + CONFIGURING: "CONFIGURING", + ACTIVE: "ACTIVE", + ERROREscaped: "ERROR", +}; +/** + * - DOCKER_HUB: The DockerHub container registry type.- DOCR: The DigitalOcean container registry type.- GHCR: The Github container registry type. + */ +export const Apps_image_source_spec_registry_typeObject = { + DOCKER_HUB: "DOCKER_HUB", + DOCR: "DOCR", + GHCR: "GHCR", +}; +/** + * The datacenter in which all of the Droplets will be created. + */ +export const Autoscale_pool_droplet_template_regionObject = { + Nyc1: "nyc1", + Nyc2: "nyc2", + Nyc3: "nyc3", + Ams2: "ams2", + Ams3: "ams3", + Sfo1: "sfo1", + Sfo2: "sfo2", + Sfo3: "sfo3", + Sgp1: "sgp1", + Lon1: "lon1", + Fra1: "fra1", + Tor1: "tor1", + Blr1: "blr1", + Syd1: "syd1", +}; +/** + * The current status of the autoscale pool. + */ +export const Autoscale_pool_statusObject = { + Active: "active", + Deleting: "deleting", + ErrorEscaped: "error", +}; +/** + * Type of billing history entry. + */ +export const Billing_history_typeObject = { + ACHFailure: "ACHFailure", + Adjustment: "Adjustment", + AttemptFailed: "AttemptFailed", + Chargeback: "Chargeback", + Credit: "Credit", + CreditExpiration: "CreditExpiration", + Invoice: "Invoice", + Payment: "Payment", + Refund: "Refund", + Reversal: "Reversal", +}; +/** + * A string representing the type of the certificate. The value will be `custom` for a user-uploaded certificate or `lets_encrypt` for one automatically generated with Let's Encrypt. + */ +export const Certificate_create_base_typeObject = { + Custom: "custom", + Lets_encrypt: "lets_encrypt", +}; +/** + * A string representing the current state of the certificate. It may be `pending`, `verified`, or `error`. + */ +export const Certificate_stateObject = { + Pending: "pending", + Verified: "verified", + ErrorEscaped: "error", +}; +/** + * A string representing the type of the certificate. The value will be `custom` for a user-uploaded certificate or `lets_encrypt` for one automatically generated with Let's Encrypt. + */ +export const Certificate_typeObject = { + Custom: "custom", + Lets_encrypt: "lets_encrypt", +}; +export const Check_regionsObject = { + Us_east: "us_east", + Us_west: "us_west", + Eu_west: "eu_west", + Se_asia: "se_asia", +}; +/** + * The type of health check to perform. + */ +export const Check_typeObject = { + Ping: "ping", + Http: "http", + Https: "https", +}; +export const Check_updatable_regionsObject = { + Us_east: "us_east", + Us_west: "us_west", + Eu_west: "eu_west", + Se_asia: "se_asia", +}; +/** + * The type of health check to perform. + */ +export const Check_updatable_typeObject = { + Ping: "ping", + Http: "http", + Https: "https", +}; +export const Cluster_autoscaler_configuration_expandersObject = { + Random: "random", + Priority: "priority", + Least_waste: "least_waste", +}; +/** + * A string indicating the current status of the cluster. + */ +export const Cluster_read_status_stateObject = { + Running: "running", + Provisioning: "provisioning", + Degraded: "degraded", + ErrorEscaped: "error", + Deleted: "deleted", + Upgrading: "upgrading", + Deleting: "deleting", +}; +/** + * A string indicating the current status of the cluster. + */ +export const Cluster_status_stateObject = { + Running: "running", + Provisioning: "provisioning", + Degraded: "degraded", + ErrorEscaped: "error", + Deleted: "deleted", + Upgrading: "upgrading", + Deleting: "deleting", +}; +/** + * A slug representing the database engine used for the cluster. The possible values are: "pg" for PostgreSQL, "mysql" for MySQL, "redis" for Caching, "mongodb" for MongoDB, "kafka" for Kafka, "opensearch" for OpenSearch, and "valkey" for Valkey. + */ +export const Database_cluster_engineObject = { + Pg: "pg", + Mysql: "mysql", + Redis: "redis", + Valkey: "valkey", + Mongodb: "mongodb", + Kafka: "kafka", + Opensearch: "opensearch", +}; +/** + * A slug representing the database engine used for the cluster. The possible values are: "pg" for PostgreSQL, "mysql" for MySQL, "redis" for Caching, "mongodb" for MongoDB, "kafka" for Kafka, "opensearch" for OpenSearch, and "valkey" for Valkey. + */ +export const Database_cluster_read_engineObject = { + Pg: "pg", + Mysql: "mysql", + Redis: "redis", + Valkey: "valkey", + Mongodb: "mongodb", + Kafka: "kafka", + Opensearch: "opensearch", +}; +/** + * A string representing the current status of the database cluster. + */ +export const Database_cluster_read_statusObject = { + Creating: "creating", + Online: "online", + Resizing: "resizing", + Migrating: "migrating", + Forking: "forking", +}; +/** + * A string representing the current status of the database cluster. + */ +export const Database_cluster_statusObject = { + Creating: "creating", + Online: "online", + Resizing: "resizing", + Migrating: "migrating", + Forking: "forking", +}; +/** + * The type of the schema. + */ +export const Database_kafka_schema_create_schema_typeObject = { + AVRO: "AVRO", + JSON: "JSON", + PROTOBUF: "PROTOBUF", +}; +/** + * A string representing the current status of the database cluster. + */ +export const Database_replica_read_statusObject = { + Creating: "creating", + Online: "online", + Resizing: "resizing", + Migrating: "migrating", + Forking: "forking", +}; +/** + * A string representing the current status of the database cluster. + */ +export const Database_replica_statusObject = { + Creating: "creating", + Online: "online", + Resizing: "resizing", + Migrating: "migrating", + Forking: "forking", +}; +/** + * A string representing the database user's role. The value will be either"primary" or "normal". + */ +export const Database_user_roleObject = { + Primary: "primary", + Normal: "normal", +}; +export const DbaasClusterStatusObject = { + CREATING: "CREATING", + ONLINE: "ONLINE", + POWEROFF: "POWEROFF", + REBUILDING: "REBUILDING", + REBALANCING: "REBALANCING", + DECOMMISSIONED: "DECOMMISSIONED", + FORKING: "FORKING", + MIGRATING: "MIGRATING", + RESIZING: "RESIZING", + RESTORING: "RESTORING", + POWERING_ON: "POWERING_ON", + UNHEALTHY: "UNHEALTHY", +}; +/** + * The destination type. `opensearch_dbaas` for a DigitalOcean managed OpenSearchcluster or `opensearch_ext` for an externally managed one. + */ +export const Destination_omit_credentials_typeObject = { + Opensearch_dbaas: "opensearch_dbaas", + Opensearch_ext: "opensearch_ext", +}; +/** + * The destination type. `opensearch_dbaas` for a DigitalOcean managed OpenSearchcluster or `opensearch_ext` for an externally managed one. + */ +export const Destination_request_typeObject = { + Opensearch_dbaas: "opensearch_dbaas", + Opensearch_ext: "opensearch_ext", +}; +/** + * The destination type. `opensearch_dbaas` for a DigitalOcean managed OpenSearchcluster or `opensearch_ext` for an externally managed one. + */ +export const Destination_typeObject = { + Opensearch_dbaas: "opensearch_dbaas", + Opensearch_ext: "opensearch_ext", +}; +/** + * The type of disk. All Droplets contain a `local` disk. Additionally, GPU Droplets can also have a `scratch` disk for non-persistent data. + */ +export const Disk_info_typeObject = { + Local: "local", + Scratch: "scratch", +}; +/** + * The name of a custom image's distribution. Currently, the valid values are `Arch Linux`, `CentOS`, `CoreOS`, `Debian`, `Fedora`, `Fedora Atomic`, `FreeBSD`, `Gentoo`, `openSUSE`, `RancherOS`, `Rocky Linux`, `Ubuntu`, and `Unknown`. Any other value will be accepted but ignored, and `Unknown` will be used in its place. + */ +export const DistributionObject = { + ArchLinux: "Arch Linux", + CentOS: "CentOS", + CoreOS: "CoreOS", + Debian: "Debian", + Fedora: "Fedora", + FedoraAtomic: "Fedora Atomic", + FreeBSD: "FreeBSD", + Gentoo: "Gentoo", + OpenSUSE: "openSUSE", + RancherOS: "RancherOS", + RockyLinux: "Rocky Linux", + Ubuntu: "Ubuntu", + Unknown: "Unknown", +}; +/** + * The type of action to initiate for the Droplet. + */ +export const Droplet_action_typeObject = { + Enable_backups: "enable_backups", + Disable_backups: "disable_backups", + Reboot: "reboot", + Power_cycle: "power_cycle", + Shutdown: "shutdown", + Power_off: "power_off", + Power_on: "power_on", + Restore: "restore", + Password_reset: "password_reset", + Resize: "resize", + Rebuild: "rebuild", + Rename: "rename", + Change_kernel: "change_kernel", + Enable_ipv6: "enable_ipv6", + Snapshot: "snapshot", +}; +/** + * The backup plan used for the Droplet. The plan can be either `daily` or `weekly`. + */ +export const Droplet_backup_policy_planObject = { + Daily: "daily", + Weekly: "weekly", +}; +/** + * The day of the week on which the backup will occur. + */ +export const Droplet_backup_policy_weekdayObject = { + SUN: "SUN", + MON: "MON", + TUE: "TUE", + WED: "WED", + THU: "THU", + FRI: "FRI", + SAT: "SAT", +}; +/** + * Describes the kind of image. It may be one of `snapshot` or `backup`. This specifies whether an image is a user-generated Droplet snapshot or automatically created Droplet backup. + */ +export const Droplet_snapshot_typeObject = { + Snapshot: "snapshot", + Backup: "backup", +}; +/** + * A status string indicating the state of the Droplet instance. This may be "new", "active", "off", or "archive". + */ +export const Droplet_statusObject = { + NewEscaped: "new", + Active: "active", + Off: "off", + Archive: "archive", +}; +/** + * Type of the event. + */ +export const Events_logs_event_typeObject = { + Cluster_maintenance_perform: "cluster_maintenance_perform", + Cluster_master_promotion: "cluster_master_promotion", + Cluster_create: "cluster_create", + Cluster_update: "cluster_update", + Cluster_delete: "cluster_delete", + Cluster_poweron: "cluster_poweron", + Cluster_poweroff: "cluster_poweroff", +}; +/** + * A string specifying the desired eviction policy for a Caching or Valkey cluster.- `noeviction`: Don't evict any data, returns error when memory limit is reached.- `allkeys_lru:` Evict any key, least recently used (LRU) first.- `allkeys_random`: Evict keys in a random order.- `volatile_lru`: Evict keys with expiration only, least recently used (LRU) first.- `volatile_random`: Evict keys with expiration only in a random order.- `volatile_ttl`: Evict keys with expiration only, shortest time-to-live (TTL) first. + */ +export const Eviction_policy_modelObject = { + Noeviction: "noeviction", + Allkeys_lru: "allkeys_lru", + Allkeys_random: "allkeys_random", + Volatile_lru: "volatile_lru", + Volatile_random: "volatile_random", + Volatile_ttl: "volatile_ttl", +}; +/** + * The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. + */ +export const Firewall_rule_base_protocolObject = { + Tcp: "tcp", + Udp: "udp", + Icmp: "icmp", +}; +/** + * The type of resource that the firewall rule allows to access the database cluster. + */ +export const Firewall_rule_typeObject = { + Droplet: "droplet", + K8s: "k8s", + Ip_addr: "ip_addr", + Tag: "tag", + App: "app", +}; +/** + * A status string indicating the current state of the firewall. This can be "waiting", "succeeded", or "failed". + */ +export const Firewall_statusObject = { + Waiting: "waiting", + Succeeded: "succeeded", + Failed: "failed", +}; +/** + * The type of action to initiate for the floating IP. + */ +export const FloatingIPsAction_typeObject = { + Assign: "assign", + Unassign: "unassign", +}; +/** + * The protocol used for traffic to the load balancer. The possible values are: `http`, `https`, `http2`, `http3`, `tcp`, or `udp`. If you set the `entry_protocol` to `udp`, the `target_protocol` must be set to `udp`. When using UDP, the load balancer requires that you set up a health check with a port that uses TCP, HTTP, or HTTPS to work properly. + */ +export const Forwarding_rule_entry_protocolObject = { + Http: "http", + Https: "https", + Http2: "http2", + Http3: "http3", + Tcp: "tcp", + Udp: "udp", +}; +/** + * The protocol used for traffic from the load balancer to the backend Droplets. The possible values are: `http`, `https`, `http2`, `tcp`, or `udp`. If you set the `target_protocol` to `udp`, the `entry_protocol` must be set to `udp`. When using UDP, the load balancer requires that you set up a health check with a port that uses TCP, HTTP, or HTTPS to work properly. + */ +export const Forwarding_rule_target_protocolObject = { + Http: "http", + Https: "https", + Http2: "http2", + Tcp: "tcp", + Udp: "udp", +}; +/** + * The current status of this garbage collection. + */ +export const Garbage_collection_statusObject = { + Requested: "requested", + WaitingForWriteJWTsToExpire: "waiting for write JWTs to expire", + ScanningManifests: "scanning manifests", + DeletingUnreferencedBlobs: "deleting unreferenced blobs", + Cancelling: "cancelling", + Failed: "failed", + Succeeded: "succeeded", + Cancelled: "cancelled", +}; +/** + * The protocol used for forwarding traffic from the load balancer to the target backends. The possible values are `http`, `https` and `http2`. + */ +export const Glb_settings_target_protocolObject = { + Http: "http", + Https: "https", + Http2: "http2", +}; +/** + * The protocol used for health checks sent to the backend Droplets. The possible values are `http`, `https`, or `tcp`. + */ +export const Health_check_protocolObject = { + Http: "http", + Https: "https", + Tcp: "tcp", +}; +/** + * The reason for the scaling event. + */ +export const History_reasonObject = { + CONFIGURATION_CHANGE: "CONFIGURATION_CHANGE", + SCALE_UP: "SCALE_UP", + SCALE_DOWN: "SCALE_DOWN", +}; +/** + * The status of the scaling event. + */ +export const History_statusObject = { + In_progress: "in_progress", + Success: "success", + ErrorEscaped: "error", +}; +/** + * The action to be taken on the image. Can be either `convert` or `transfer`. + */ +export const Image_action_base_typeObject = { + Convert: "convert", + Transfer: "transfer", +}; +/** + * A status string indicating the state of a custom image. This may be `NEW`, `available`, `pending`, `deleted`, or `retired`. + */ +export const Image_statusObject = { + NEWEscaped: "NEW", + Available: "available", + Pending: "pending", + Deleted: "deleted", + Retired: "retired", +}; +/** + * Describes the kind of image. It may be one of `base`, `snapshot`, `backup`, `custom`, or `admin`. Respectively, this specifies whether an image is a DigitalOcean base OS image, user-generated Droplet snapshot, automatically created Droplet backup, user-provided virtual machine image, or an image used for DigitalOcean managed resources (e.g. DOKS worker nodes). + */ +export const Image_typeObject = { + Base: "base", + Snapshot: "snapshot", + Backup: "backup", + Custom: "custom", + Admin: "admin", +}; +export const Instance_size_cpu_typeObject = { + UNSPECIFIED: "UNSPECIFIED", + SHARED: "SHARED", + DEDICATED: "DEDICATED", +}; +/** + * Specify the final compression type for a given topic. This configuration accepts the standard compression codecs ('gzip', 'snappy', 'lz4', 'zstd'). It additionally accepts 'uncompressed' which is equivalent to no compression; and 'producer' which means retain the original compression codec set by the producer. + */ +export const Kafka_advanced_config_compression_typeObject = { + Gzip: "gzip", + Snappy: "snappy", + Lz4: "lz4", + Zstd: "zstd", + Uncompressed: "uncompressed", + Producer: "producer", +}; +/** + * The default cleanup policy for segments beyond the retention window + */ +export const Kafka_advanced_config_log_cleanup_policyObject = { + Delete: "delete", + Compact: "compact", + CompactDelete: "compact,delete", +}; +/** + * Define whether the timestamp in the message is message create time or log append time. + */ +export const Kafka_advanced_config_log_message_timestamp_typeObject = { + CreateTime: "CreateTime", + LogAppendTime: "LogAppendTime", +}; +/** + * The type of the schema. + */ +export const Kafka_schema_verbose_schema_typeObject = { + AVRO: "AVRO", + JSON: "JSON", + PROTOBUF: "PROTOBUF", +}; +/** + * The type of the schema. + */ +export const Kafka_schema_version_verbose_schema_typeObject = { + AVRO: "AVRO", + JSON: "JSON", + PROTOBUF: "PROTOBUF", +}; +/** + * The cleanup_policy sets the retention policy to use on log segments. 'delete' will discard old segments when retention time/size limits are reached. 'compact' will enable log compaction, resulting in retention of the latest value for each key. + */ +export const Kafka_topic_config_cleanup_policyObject = { + Delete: "delete", + Compact: "compact", + Compact_delete: "compact_delete", +}; +/** + * The compression_type specifies the compression type of the topic. + */ +export const Kafka_topic_config_compression_typeObject = { + Producer: "producer", + Gzip: "gzip", + Snappy: "snappy", + Iz4: "Iz4", + Zstd: "zstd", + Uncompressed: "uncompressed", +}; +/** + * The message_format_version specifies the message format version used by the broker to append messages to the logs. The value of this setting is assumed to be 3.0-IV1 if the broker protocol version is 3.0 or higher. By setting a particular message format version, all existing messages on disk must be smaller or equal to the specified version. + */ +export const Kafka_topic_config_message_format_versionObject = { + ZeroEightZero: "0.8.0", + ZeroEightOne: "0.8.1", + ZeroEightTwo: "0.8.2", + ZeroNineZero: "0.9.0", + ZeroOneZeroZeroIV0: "0.10.0-IV0", + ZeroOneZeroZeroIV1: "0.10.0-IV1", + ZeroOneZeroOneIV0: "0.10.1-IV0", + ZeroOneZeroOneIV1: "0.10.1-IV1", + ZeroOneZeroOneIV2: "0.10.1-IV2", + ZeroOneZeroTwoIV0: "0.10.2-IV0", + ZeroOneOneZeroIV0: "0.11.0-IV0", + ZeroOneOneZeroIV1: "0.11.0-IV1", + ZeroOneOneZeroIV2: "0.11.0-IV2", + OneZeroIV0: "1.0-IV0", + OneOneIV0: "1.1-IV0", + TwoZeroIV0: "2.0-IV0", + TwoZeroIV1: "2.0-IV1", + TwoOneIV0: "2.1-IV0", + TwoOneIV1: "2.1-IV1", + TwoOneIV2: "2.1-IV2", + TwoTwoIV0: "2.2-IV0", + TwoTwoIV1: "2.2-IV1", + TwoThreeIV0: "2.3-IV0", + TwoThreeIV1: "2.3-IV1", + TwoFourIV0: "2.4-IV0", + TwoFourIV1: "2.4-IV1", + TwoFiveIV0: "2.5-IV0", + TwoSixIV0: "2.6-IV0", + TwoSevenIV0: "2.7-IV0", + TwoSevenIV1: "2.7-IV1", + TwoSevenIV2: "2.7-IV2", + TwoEightIV0: "2.8-IV0", + TwoEightIV1: "2.8-IV1", + ThreeZeroIV0: "3.0-IV0", + ThreeZeroIV1: "3.0-IV1", + ThreeOneIV0: "3.1-IV0", + ThreeTwoIV0: "3.2-IV0", + ThreeThreeIV0: "3.3-IV0", + ThreeThreeIV1: "3.3-IV1", + ThreeThreeIV2: "3.3-IV2", + ThreeThreeIV3: "3.3-IV3", +}; +/** + * The message_timestamp_type specifies whether to use the message create time or log append time as the timestamp on a message. + */ +export const Kafka_topic_config_message_timestamp_typeObject = { + Create_time: "create_time", + Log_append_time: "log_append_time", +}; +/** + * The state of the Kafka topic. + */ +export const Kafka_topic_stateObject = { + Active: "active", + Configuring: "configuring", + Deleting: "deleting", + Unknown: "unknown", +}; +/** + * The state of the Kafka topic. + */ +export const Kafka_topic_verbose_stateObject = { + Active: "active", + Configuring: "configuring", + Deleting: "deleting", + Unknown: "unknown", +}; +/** + * How the node reacts to pods that it won't tolerate. Available effect values are `NoSchedule`, `PreferNoSchedule`, and `NoExecute`. + */ +export const Kubernetes_node_pool_taint_effectObject = { + NoSchedule: "NoSchedule", + PreferNoSchedule: "PreferNoSchedule", + NoExecute: "NoExecute", +}; +/** + * This field has been deprecated. You can no longer specify an algorithm for load balancers. + * @deprecated + */ +export const Load_balancer_base_algorithmObject = { + Round_robin: "round_robin", + Least_connections: "least_connections", +}; +/** + * A string indicating whether the load balancer will support IPv4 or both IPv4 and IPv6 networking. This property cannot be updated after creating the load balancer. + */ +export const Load_balancer_base_network_stackObject = { + IPV4: "IPV4", + DUALSTACK: "DUALSTACK", +}; +/** + * A string indicating whether the load balancer should be external or internal. Internal load balancers have no public IPs and are only accessible to resources on the same VPC network. This property cannot be updated after creating the load balancer. + */ +export const Load_balancer_base_networkObject = { + EXTERNAL: "EXTERNAL", + INTERNAL: "INTERNAL", +}; +/** + * This field has been replaced by the `size_unit` field for all regions except in AMS2, NYC2, and SFO1. Each available load balancer size now equates to the load balancer having a set number of nodes.* `lb-small` = 1 node* `lb-medium` = 3 nodes* `lb-large` = 6 nodesYou can resize load balancers after creation up to once per hour. You cannot resize a load balancer within the first hour of its creation. + * @deprecated + */ +export const Load_balancer_base_sizeObject = { + LbSmall: "lb-small", + LbMedium: "lb-medium", + LbLarge: "lb-large", +}; +/** + * A status string indicating the current state of the load balancer. This can be `new`, `active`, or `errored`. + */ +export const Load_balancer_base_statusObject = { + NewEscaped: "new", + Active: "active", + Errored: "errored", +}; +/** + * A string indicating the policy for the TLS cipher suites used by the load balancer. The possible values are `DEFAULT` or `STRONG`. The default value is `DEFAULT`. + */ +export const Load_balancer_base_tls_cipher_policyObject = { + DEFAULTEscaped: "DEFAULT", + STRONG: "STRONG", +}; +/** + * A string indicating whether the load balancer should be a standard regional HTTP load balancer, a regional network load balancer that routes traffic at the TCP/UDP transport layer, or a global load balancer. + */ +export const Load_balancer_base_typeObject = { + REGIONAL: "REGIONAL", + REGIONAL_NETWORK: "REGIONAL_NETWORK", + GLOBAL: "GLOBAL", +}; +/** + * Type of logsink integration.- Use `datadog` for Datadog integration **only with MongoDB clusters**.- For non-MongoDB clusters, use `rsyslog` for general syslog forwarding.- Other supported types include `elasticsearch` and `opensearch`.More details about the configuration can be found in the `config` property. + */ +export const Logsink_base_sink_typeObject = { + Rsyslog: "rsyslog", + Elasticsearch: "elasticsearch", + Opensearch: "opensearch", + Datadog: "datadog", +}; +export const Logsink_base_verbose_sink_typeObject = { + Rsyslog: "rsyslog", + Elasticsearch: "elasticsearch", + Opensearch: "opensearch", +}; +/** + * The day of the maintenance window policy. May be one of `monday` through `sunday`, or `any` to indicate an arbitrary week day. + */ +export const Maintenance_policy_dayObject = { + Any: "any", + Monday: "monday", + Tuesday: "tuesday", + Wednesday: "wednesday", + Thursday: "thursday", + Friday: "friday", + Saturday: "saturday", + Sunday: "sunday", +}; +/** + * The power status of the Droplet. + */ +export const Member_statusObject = { + Provisioning: "provisioning", + Active: "active", + Deleting: "deleting", + Off: "off", +}; +export const Metrics_data_resultTypeObject = { + Matrix: "matrix", +}; +export const Metrics_statusObject = { + Success: "success", + ErrorEscaped: "error", +}; +/** + * Specifies the default consistency behavior of reads from the database. Data that is returned from the query with may or may not have been acknowledged by all nodes in the replicaset depending on this value. Learn more [here](https://www.mongodb.com/docs/manual/reference/read-concern/). + */ +export const Mongo_advanced_config_default_read_concernObject = { + Local: "local", + Available: "available", + Majority: "majority", +}; +/** + * Slug of the region where registry data is stored. When not provided, a region will be selected. + */ +export const Multiregistry_create_regionObject = { + Nyc3: "nyc3", + Sfo3: "sfo3", + Sfo2: "sfo2", + Ams3: "ams3", + Sgp1: "sgp1", + Fra1: "fra1", + Blr1: "blr1", + Syd1: "syd1", +}; +/** + * The slug of the subscription tier to sign up for. Valid values can be retrieved using the options endpoint. + */ +export const Multiregistry_create_subscription_tier_slugObject = { + Starter: "starter", + Basic: "basic", + Professional: "professional", +}; +/** + * The storage engine for in-memory internal temporary tables. + */ +export const Mysql_advanced_config_internal_tmp_mem_storage_engineObject = { + TempTable: "TempTable", + MEMORY: "MEMORY", +}; +/** + * Defines the destination for logs. Can be `INSIGHTS`, `TABLE`, or both (`INSIGHTS,TABLE`), or `NONE` to disable logs. To specify both destinations, use `INSIGHTS,TABLE` (order matters). Default is NONE. + */ +export const Mysql_advanced_config_log_outputObject = { + INSIGHTS: "INSIGHTS", + TABLE: "TABLE", + INSIGHTSTABLE: "INSIGHTS,TABLE", + NONE: "NONE", +}; +/** + * A string specifying the authentication method to be used for connectionsto the MySQL user account. The valid values are `mysql_native_password`or `caching_sha2_password`. If excluded when creating a new user, thedefault for the version of MySQL in use will be used. As of MySQL 8.0, thedefault is `caching_sha2_password`. + */ +export const Mysql_settings_auth_pluginObject = { + Mysql_native_password: "mysql_native_password", + Caching_sha2_password: "caching_sha2_password", +}; +/** + * The type of the IPv4 network interface. + */ +export const Network_v4_typeObject = { + Public: "public", + Private: "private", +}; +/** + * The type of the IPv6 network interface.**Note**: IPv6 private networking is not currently supported. + */ +export const Network_v6_typeObject = { + Public: "public", +}; +/** + * The type of action to initiate for the NFS share (such as resize or snapshot). + */ +export const Nfs_action_typeObject = { + Resize: "resize", + Snapshot: "snapshot", +}; +/** + * The type of resource on which the action is being performed. + */ +export const Nfs_actions_response_action_resource_typeObject = { + Network_file_share: "network_file_share", + Network_file_share_snapshot: "network_file_share_snapshot", +}; +/** + * The current status of the action. + */ +export const Nfs_actions_response_action_statusObject = { + InProgress: "in-progress", + Completed: "completed", + Errored: "errored", +}; +/** + * The current status of the share. + */ +export const Nfs_response_statusObject = { + CREATING: "CREATING", + ACTIVE: "ACTIVE", + FAILED: "FAILED", + DELETED: "DELETED", +}; +/** + * The current status of the snapshot. + */ +export const Nfs_snapshot_response_statusObject = { + UNKNOWN: "UNKNOWN", + CREATING: "CREATING", + ACTIVE: "ACTIVE", + FAILED: "FAILED", + DELETED: "DELETED", +}; +/** + * A string indicating the current status of the node. + */ +export const Node_status_stateObject = { + Provisioning: "provisioning", + Running: "running", + Draining: "draining", + Deleting: "deleting", +}; +/** + * The current status of the migration. + */ +export const Online_migration_statusObject = { + Running: "running", + Syncing: "syncing", + Canceled: "canceled", + ErrorEscaped: "error", + Done: "done", +}; +/** + * The health of the OpenSearch index. + */ +export const Opensearch_index_healthObject = { + Unknown: "unknown", + Green: "green", + Yellow: "yellow", + Red: "red", +}; +/** + * The status of the OpenSearch index. + */ +export const Opensearch_index_statusObject = { + Unknown: "unknown", + Open: "open", + Close: "close", + None: "none", +}; +/** + * Optional redundancy zone for the partner attachment. + */ +export const Partner_attachment_writable_redundancy_zoneObject = { + MEGAPORT_BLUE: "MEGAPORT_BLUE", + MEGAPORT_RED: "MEGAPORT_RED", +}; +/** + * The region to create the partner attachment. + */ +export const Partner_attachment_writable_regionObject = { + Nyc: "nyc", + Sfo: "sfo", + Fra: "fra", + Ams: "ams", + Sgp: "sgp", +}; +/** + * PGBouncer pool mode + */ +export const Pgbouncer_advanced_config_autodb_pool_modeObject = { + Session: "session", + Transaction: "transaction", + Statement: "statement", +}; +/** + * Enum of parameters to ignore when given in startup packet. + */ +export const Pgbouncer_advanced_config_ignore_startup_parametersObject = { + Extra_float_digits: "extra_float_digits", + Search_path: "search_path", +}; +/** + * Specifies the default TOAST compression method for values of compressible columns (the default is lz4). + */ +export const Postgres_advanced_config_default_toast_compressionObject = { + Lz4: "lz4", + Pglz: "pglz", +}; +/** + * Controls the amount of detail written in the server log for each message that is logged. + */ +export const Postgres_advanced_config_log_error_verbosityObject = { + TERSE: "TERSE", + DEFAULTEscaped: "DEFAULT", + VERBOSE: "VERBOSE", +}; +/** + * Selects one of the available log-formats. These can support popular log analyzers like pgbadger, pganalyze, etc. + */ +export const Postgres_advanced_config_log_line_prefixObject = { + PidPUserUDbDAppAClientH: "pid=%p,user=%u,db=%d,app=%a,client=%h", + MPQUserUDbDAppA: "%m [%p] %q[user=%u,db=%d,app=%a]", + TPL1UserUDbDAppAClientH: "%t [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h", +}; +/** + * Controls which statements are counted. Specify 'top' to track top-level statements (those issued directly by clients), 'all' to also track nested statements (such as statements invoked within functions), or 'none' to disable statement statistics collection. The default value is top. + */ +export const Postgres_advanced_config_pg_stat_statementsTrackObject = { + All: "all", + Top: "top", + None: "none", +}; +/** + * Synchronous replication type. Note that the service plan also needs to support synchronous replication. + */ +export const Postgres_advanced_config_synchronous_replicationObject = { + Off: "off", + Quorum: "quorum", +}; +/** + * Record commit time of transactions. + */ +export const Postgres_advanced_config_track_commit_timestampObject = { + Off: "off", + On: "on", +}; +/** + * Enables tracking of function call counts and time used. + */ +export const Postgres_advanced_config_track_functionsObject = { + All: "all", + Pl: "pl", + None: "none", +}; +/** + * Enables timing of database I/O calls. This parameter is off by default, because it will repeatedly query the operating system for the current time, which may cause significant overhead on some platforms. + */ +export const Postgres_advanced_config_track_io_timingObject = { + Off: "off", + On: "on", +}; +/** + * The environment of the project's resources. + */ +export const Project_base_environmentObject = { + Development: "Development", + Staging: "Staging", + Production: "Production", +}; +/** + * Determines default pub/sub channels' ACL for new users if ACL is not supplied. When this option is not defined, all_channels is assumed to keep backward compatibility. This option doesn't affect Caching configuration acl-pubsub-default. + */ +export const Redis_advanced_config_redis_acl_channels_defaultObject = { + Allchannels: "allchannels", + Resetchannels: "resetchannels", +}; +/** + * A string specifying the desired eviction policy for the Caching cluster.- `noeviction`: Don't evict any data, returns error when memory limit is reached.- `allkeys-lru:` Evict any key, least recently used (LRU) first.- `allkeys-random`: Evict keys in a random order.- `volatile-lru`: Evict keys with expiration only, least recently used (LRU) first.- `volatile-random`: Evict keys with expiration only in a random order.- `volatile-ttl`: Evict keys with expiration only, shortest time-to-live (TTL) first. + */ +export const Redis_advanced_config_redis_maxmemory_policyObject = { + Noeviction: "noeviction", + AllkeysLru: "allkeys-lru", + AllkeysRandom: "allkeys-random", + VolatileLru: "volatile-lru", + VolatileRandom: "volatile-random", + VolatileTtl: "volatile-ttl", +}; +/** + * Creates an RDB dump of the database every 10 minutes that can be used to recover data after a node crash. The database does not create the dump if no keys have changed since the last dump. When set to `off`, the database cannot fork services, and data can be lost if a service is restarted or powered off. DigitalOcean Managed Caching databases do not support the Append Only File (AOF) persistence method. + */ +export const Redis_advanced_config_redis_persistenceObject = { + Off: "off", + Rdb: "rdb", +}; +/** + * The slug identifier for the region where the resource will initially be available. + */ +export const Region_slugObject = { + Ams1: "ams1", + Ams2: "ams2", + Ams3: "ams3", + Blr1: "blr1", + Fra1: "fra1", + Lon1: "lon1", + Nyc1: "nyc1", + Nyc2: "nyc2", + Nyc3: "nyc3", + Sfo1: "sfo1", + Sfo2: "sfo2", + Sfo3: "sfo3", + Sgp1: "sgp1", + Tor1: "tor1", + Syd1: "syd1", +}; +export const Region_state_statusObject = { + DOWN: "DOWN", + UP: "UP", + CHECKING: "CHECKING", +}; +/** + * Slug of the region where registry data is stored. When not provided, a region will be selected. + */ +export const Registry_create_regionObject = { + Nyc3: "nyc3", + Sfo3: "sfo3", + Ams3: "ams3", + Sgp1: "sgp1", + Fra1: "fra1", +}; +/** + * The slug of the subscription tier to sign up for. Valid values can be retrieved using the options endpoint. + */ +export const Registry_create_subscription_tier_slugObject = { + Starter: "starter", + Basic: "basic", + Professional: "professional", +}; +/** + * Type of the garbage collection to run against this registry + */ +export const Registry_run_gc_typeObject = { + UntaggedManifestsOnly: "untagged manifests only", + UnreferencedBlobsOnly: "unreferenced blobs only", + UntaggedManifestsAndUnreferencedBlobs: "untagged manifests and unreferenced blobs", +}; +/** + * The type of action to initiate for the reserved IP. + */ +export const Reserved_ip_action_type_typeObject = { + Assign: "assign", + Unassign: "unassign", +}; +/** + * The type of action to initiate for the reserved IPv6. + */ +export const Reserved_ipv6_action_type_typeObject = { + Assign: "assign", + Unassign: "unassign", +}; +/** + * The status of assigning and fetching the resources. + */ +export const Resource_statusObject = { + Ok: "ok", + Not_found: "not_found", + Assigned: "assigned", + Already_assigned: "already_assigned", + Service_down: "service_down", +}; +/** + * Message format used by the server, this can be either rfc3164 (the old BSD style message format), `rfc5424` (current syslog message format) or custom + */ +export const Rsyslog_logsink_formatObject = { + Rfc5424: "rfc5424", + Rfc3164: "rfc3164", + Custom: "custom", +}; +/** + * The type of resource that the snapshot originated from. + */ +export const Snapshots_resource_typeObject = { + Droplet: "droplet", + Volume: "volume", +}; +/** + * An attribute indicating how and if requests from a client will be persistently served by the same backend Droplet. The possible values are `cookies` or `none`. + */ +export const Sticky_sessions_typeObject = { + Cookies: "cookies", + None: "none", +}; +/** + * The type of the resource. + */ +export const Tags_resource_resources_resource_typeObject = { + Droplet: "droplet", + Image: "image", + Volume: "volume", + Volume_snapshot: "volume_snapshot", +}; +/** + * Permission set applied to the ACL. 'consume' allows for messages to be consumed from the topic. 'produce' allows for messages to be published to the topic. 'produceconsume' allows for both 'consume' and 'produce' permission. 'admin' allows for 'produceconsume' as well as any operations to administer the topic (delete, update). + */ +export const User_settings_acl_permissionObject = { + Admin: "admin", + Consume: "consume", + Produce: "produce", + Produceconsume: "produceconsume", +}; +/** + * The role to assign to the user with each role mapping to a MongoDB built-in role. `readOnly` maps to a [read](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-read) role. `readWrite` maps to a [readWrite](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-readWrite) role. `dbAdmin` maps to a [dbAdmin](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-dbAdmin) role. + */ +export const User_settings_mongo_user_settings_roleObject = { + ReadOnly: "readOnly", + ReadWrite: "readWrite", + DbAdmin: "dbAdmin", +}; +/** + * Permission set applied to the ACL. 'read' allows user to read from the index. 'write' allows for user to write to the index. 'readwrite' allows for both 'read' and 'write' permission. 'deny'(default) restricts user from performing any operation over an index. 'admin' allows for 'readwrite' as well as any operations to administer the index. + */ +export const User_settings_opensearch_acl_permissionObject = { + Deny: "deny", + Admin: "admin", + Read: "read", + Readwrite: "readwrite", + Write: "write", +}; +/** + * Determines default pub/sub channels' ACL for new users if ACL is not supplied. When this option is not defined, all_channels is assumed to keep backward compatibility. This option doesn't affect Valkey configuration acl-pubsub-default. + */ +export const Valkey_advanced_config_valkey_acl_channels_defaultObject = { + Allchannels: "allchannels", + Resetchannels: "resetchannels", +}; +/** + * When persistence is 'rdb', Valkey does RDB dumps each 10 minutes if any key is changed. Also RDB dumps are done according to backup schedule for backup purposes. When persistence is 'off', no RDB dumps and backups are done, so data can be lost at any moment if service is restarted for any reason, or if service is powered off. Also service can't be forked. + */ +export const Valkey_advanced_config_valkey_persistenceObject = { + Off: "off", + Rdb: "rdb", +}; +/** + * The volume action to initiate. + */ +export const Volume_action_post_base_typeObject = { + Attach: "attach", + Detach: "detach", + Resize: "resize", +}; +/** + * The region in which the VPC NAT gateway is created. + */ +export const Vpc_nat_gateway_create_regionObject = { + Nyc1: "nyc1", + Nyc2: "nyc2", + Nyc3: "nyc3", + Ams2: "ams2", + Ams3: "ams3", + Sfo1: "sfo1", + Sfo2: "sfo2", + Sfo3: "sfo3", + Sgp1: "sgp1", + Lon1: "lon1", + Fra1: "fra1", + Tor1: "tor1", + Blr1: "blr1", + Syd1: "syd1", + Atl1: "atl1", +}; +/** + * The type of the VPC NAT gateway. + */ +export const Vpc_nat_gateway_create_typeObject = { + PUBLIC: "PUBLIC", +}; +/** + * The region in which the VPC NAT gateway is created. + */ +export const Vpc_nat_gateway_get_regionObject = { + Nyc1: "nyc1", + Nyc2: "nyc2", + Nyc3: "nyc3", + Ams2: "ams2", + Ams3: "ams3", + Sfo1: "sfo1", + Sfo2: "sfo2", + Sfo3: "sfo3", + Sgp1: "sgp1", + Lon1: "lon1", + Fra1: "fra1", + Tor1: "tor1", + Blr1: "blr1", + Syd1: "syd1", + Atl1: "atl1", +}; +/** + * The current state of the VPC NAT gateway. + */ +export const Vpc_nat_gateway_get_stateObject = { + NEWEscaped: "NEW", + PROVISIONING: "PROVISIONING", + ACTIVE: "ACTIVE", + DELETING: "DELETING", + ERROREscaped: "ERROR", + INVALID: "INVALID", +}; +/** + * The type of the VPC NAT gateway. + */ +export const Vpc_nat_gateway_get_typeObject = { + PUBLIC: "PUBLIC", +}; +/** + * The current status of the VPC peering. + */ +export const Vpc_peering_statusObject = { + PROVISIONING: "PROVISIONING", + ACTIVE: "ACTIVE", + DELETING: "DELETING", +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/src/dots/services/index.js b/src/dots/services/index.js new file mode 100644 index 0000000000..6f53deebaa --- /dev/null +++ b/src/dots/services/index.js @@ -0,0 +1,155 @@ +import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary"; +import { DigitalOceanApiKeyAuthenticationProvider } from "../DigitalOceanApiKeyAuthenticationProvider.js"; +/** + * Service types + */ +export var ServiceType; +(function (ServiceType) { + ServiceType["DIGITALOCEAN_API"] = "digitalocean_api"; + ServiceType["SERVERLESS_INFERENCE"] = "serverless_inference"; + ServiceType["AGENT_INFERENCE"] = "agent_inference"; +})(ServiceType || (ServiceType = {})); +/** + * Bearer token authentication provider (for inference endpoints) + */ +class BearerTokenAuthenticationProvider { + constructor(token) { + this.token = token; + } + async authenticateRequest(request, _additionalAuthenticationContextProvider) { + request.headers.add("Authorization", `Bearer ${this.token}`); + } +} +/** + * Create a DigitalOcean API v2 client + * Default: https://api.digitalocean.com/v2 + */ +export function createDigitalOceanClient(apiKey) { + const config = { + type: ServiceType.DIGITALOCEAN_API, + baseUrl: "https://api.digitalocean.com", + apiKey: apiKey, + }; + const authProvider = new DigitalOceanApiKeyAuthenticationProvider(apiKey); + const adapter = new FetchRequestAdapter(authProvider); + return { + adapter, + authProvider, + baseUrl: config.baseUrl, + config, + }; +} +/** + * Create a serverless inference client + * Default: https://inference.do-ai.run + */ +export function createServerlessInferenceClient(authToken, baseUrl) { + if (!authToken) { + throw new Error("authToken is required for serverless inference"); + } + const config = { + type: ServiceType.SERVERLESS_INFERENCE, + baseUrl: baseUrl || "https://inference.do-ai.run", + authToken: authToken, + }; + const authProvider = new BearerTokenAuthenticationProvider(authToken); + const adapter = new FetchRequestAdapter(authProvider); + return { + adapter, + authProvider, + baseUrl: config.baseUrl, + config, + }; +} +/** + * Create an agent inference client + */ +export function createAgentInferenceClient(agentUrl, authToken, customHeaders) { + if (!agentUrl) { + throw new Error("agentUrl is required for agent inference"); + } + const normalizedUrl = agentUrl.startsWith("http") + ? agentUrl + : `https://${agentUrl}`; + // Strip trailing /api/v1 — the Kiota URI templates already include path segments + const baseUrl = normalizedUrl.replace(/\/api\/v1\/?$/, ""); + const config = { + type: ServiceType.AGENT_INFERENCE, + baseUrl: baseUrl, + authToken: authToken, + headers: customHeaders, + }; + let authProvider; + if (authToken) { + authProvider = new BearerTokenAuthenticationProvider(authToken); + } + else { + // Create a no-op auth provider if no token provided + authProvider = new (class { + async authenticateRequest(_request, _additionalAuthenticationContextProvider) { + // No authentication + } + })(); + } + const adapter = new FetchRequestAdapter(authProvider); + return { + adapter, + authProvider, + baseUrl: config.baseUrl, + config, + }; +} +/** + * Multi-service client manager + */ +export class ServiceManager { + constructor() { + this.services = new Map(); + } + /** + * Register a service + */ + registerService(name, client) { + this.services.set(name, client); + } + /** + * Get a registered service + */ + getService(name) { + return this.services.get(name); + } + /** + * Get all registered services + */ + getAllServices() { + return this.services; + } + /** + * Remove a service + */ + removeService(name) { + return this.services.delete(name); + } + /** + * List all service names + */ + listServices() { + return Array.from(this.services.keys()); + } +} +/** + * Create a service manager with pre-configured services + */ +export function createServiceManager(configs) { + const manager = new ServiceManager(); + if (configs.digitalOcean) { + manager.registerService("digitalocean", createDigitalOceanClient(configs.digitalOcean)); + } + if (configs.serverlessInference) { + manager.registerService("serverless-inference", createServerlessInferenceClient(configs.serverlessInference.token, configs.serverlessInference.baseUrl)); + } + if (configs.agentInference) { + manager.registerService("agent-inference", createAgentInferenceClient(configs.agentInference.url, configs.agentInference.token, configs.agentInference.headers)); + } + return manager; +} diff --git a/src/dots/services/index.ts b/src/dots/services/index.ts new file mode 100644 index 0000000000..8916fcc6b4 --- /dev/null +++ b/src/dots/services/index.ts @@ -0,0 +1,235 @@ +import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary"; +import { + AuthenticationProvider, + RequestInformation, +} from "@microsoft/kiota-abstractions"; +import { DigitalOceanApiKeyAuthenticationProvider } from "../DigitalOceanApiKeyAuthenticationProvider.js"; + +/** + * Service types + */ +export enum ServiceType { + DIGITALOCEAN_API = "digitalocean_api", + SERVERLESS_INFERENCE = "serverless_inference", + AGENT_INFERENCE = "agent_inference", +} + +/** + * Service configuration + */ +export interface ServiceConfig { + type: ServiceType; + baseUrl: string; + apiKey?: string; + authToken?: string; + headers?: Record; +} + +/** + * Service client + */ +export interface ServiceClient { + adapter: FetchRequestAdapter; + authProvider: AuthenticationProvider; + baseUrl: string; + config: ServiceConfig; +} + +/** + * Bearer token authentication provider (for inference endpoints) + */ +class BearerTokenAuthenticationProvider implements AuthenticationProvider { + constructor(private token: string) {} + + async authenticateRequest( + request: RequestInformation, + _additionalAuthenticationContextProvider?: Record + ): Promise { + request.headers.add("Authorization", `Bearer ${this.token}`); + } +} + +/** + * Create a DigitalOcean API v2 client + * Default: https://api.digitalocean.com + */ +export function createDigitalOceanClient(apiKey: string): ServiceClient { + const config: ServiceConfig = { + type: ServiceType.DIGITALOCEAN_API, + baseUrl: "https://api.digitalocean.com", + apiKey: apiKey, + }; + + const authProvider = new DigitalOceanApiKeyAuthenticationProvider(apiKey); + const adapter = new FetchRequestAdapter(authProvider); + + return { + adapter, + authProvider, + baseUrl: config.baseUrl, + config, + }; +} + +/** + * Create a serverless inference client + * Default: https://inference.do-ai.run + */ +export function createServerlessInferenceClient( + authToken: string, + baseUrl?: string +): ServiceClient { + if (!authToken) { + throw new Error("authToken is required for serverless inference"); + } + + const config: ServiceConfig = { + type: ServiceType.SERVERLESS_INFERENCE, + baseUrl: baseUrl || "https://inference.do-ai.run", + authToken: authToken, + }; + + const authProvider = new BearerTokenAuthenticationProvider(authToken); + const adapter = new FetchRequestAdapter(authProvider); + + return { + adapter, + authProvider, + baseUrl: config.baseUrl, + config, + }; +} + +/** + * Create an agent inference client + */ +export function createAgentInferenceClient( + agentUrl: string, + authToken?: string, + customHeaders?: Record +): ServiceClient { + if (!agentUrl) { + throw new Error("agentUrl is required for agent inference"); + } + + const normalizedUrl = agentUrl.startsWith("http") + ? agentUrl + : `https://${agentUrl}`; + // Strip trailing /api/v1 — the Kiota URI templates already include path segments + const baseUrl = normalizedUrl.replace(/\/api\/v1\/?$/, ""); + + const config: ServiceConfig = { + type: ServiceType.AGENT_INFERENCE, + baseUrl: baseUrl, + authToken: authToken, + headers: customHeaders, + }; + + let authProvider: AuthenticationProvider; + + if (authToken) { + authProvider = new BearerTokenAuthenticationProvider(authToken); + } else { + // Create a no-op auth provider if no token provided + authProvider = new (class implements AuthenticationProvider { + async authenticateRequest( + _request: RequestInformation, + _additionalAuthenticationContextProvider?: Record + ): Promise { + // No authentication + } + })(); + } + + const adapter = new FetchRequestAdapter(authProvider); + + return { + adapter, + authProvider, + baseUrl: config.baseUrl, + config, + }; +} + +/** + * Multi-service client manager + */ +export class ServiceManager { + private services: Map = new Map(); + + /** + * Register a service + */ + registerService(name: string, client: ServiceClient): void { + this.services.set(name, client); + } + + /** + * Get a registered service + */ + getService(name: string): ServiceClient | undefined { + return this.services.get(name); + } + + /** + * Get all registered services + */ + getAllServices(): Map { + return this.services; + } + + /** + * Remove a service + */ + removeService(name: string): boolean { + return this.services.delete(name); + } + + /** + * List all service names + */ + listServices(): string[] { + return Array.from(this.services.keys()); + } +} + +/** + * Create a service manager with pre-configured services + */ +export function createServiceManager(configs: { + digitalOcean?: string; + serverlessInference?: { token: string; baseUrl?: string }; + agentInference?: { url: string; token?: string; headers?: Record }; +}): ServiceManager { + const manager = new ServiceManager(); + + if (configs.digitalOcean) { + manager.registerService( + "digitalocean", + createDigitalOceanClient(configs.digitalOcean) + ); + } + + if (configs.serverlessInference) { + manager.registerService( + "serverless-inference", + createServerlessInferenceClient( + configs.serverlessInference.token, + configs.serverlessInference.baseUrl + ) + ); + } + + if (configs.agentInference) { + manager.registerService( + "agent-inference", + createAgentInferenceClient( + configs.agentInference.url, + configs.agentInference.token, + configs.agentInference.headers + ) + ); + } + + return manager; +} diff --git a/src/dots/streaming/StreamingRequestAdapter.js b/src/dots/streaming/StreamingRequestAdapter.js new file mode 100644 index 0000000000..3c252b6715 --- /dev/null +++ b/src/dots/streaming/StreamingRequestAdapter.js @@ -0,0 +1,171 @@ +/** + * Supported streaming response types + */ +export var StreamingResponseType; +(function (StreamingResponseType) { + /** Server-Sent Events format */ + StreamingResponseType["TEXT_EVENT_STREAM"] = "text/event-stream"; + /** NDJSON format (newline-delimited JSON) */ + StreamingResponseType["APPLICATION_NDJSON"] = "application/x-ndjson"; + /** Plain text format */ + StreamingResponseType["TEXT_PLAIN"] = "text/plain"; +})(StreamingResponseType || (StreamingResponseType = {})); +/** + * Adapter that wraps a request adapter to add streaming capabilities + * Supports SSE, NDJSON, and plain text streaming + */ +export class StreamingRequestAdapter { + /** + * Creates a new StreamingRequestAdapter + * @param underlyingAdapter The underlying RequestAdapter to wrap + */ + constructor(underlyingAdapter, authenticationProvider) { + this.underlyingAdapter = underlyingAdapter; + this.authenticationProvider = authenticationProvider; + if (!underlyingAdapter) { + throw new Error("underlyingAdapter cannot be null"); + } + } + /** + * Stream data from an endpoint + * @param requestInfo The request information + * @param callbacks Callbacks for stream lifecycle + * @param options Streaming options + */ + async stream(requestInfo, callbacks, options) { + try { + const streamType = options?.streamType || StreamingResponseType.TEXT_EVENT_STREAM; + if (this.authenticationProvider) { + await this.authenticationProvider.authenticateRequest(requestInfo); + } + // Build headers - flatten Set values to strings + const headers = {}; + if (requestInfo.headers) { + for (const [key, values] of requestInfo.headers.entries()) { + headers[key] = Array.from(values).join(", "); + } + } + const response = await fetch(requestInfo.URL ?? "", { + method: requestInfo.httpMethod?.toString() || "GET", + headers, + body: requestInfo.content ?? undefined, + }); + if (!response.ok) { + throw new Error(`HTTP ${response.status}: ${response.statusText}`); + } + if (!response.body) { + throw new Error("Response body is null"); + } + const reader = response.body.getReader(); + const decoder = new TextDecoder(); + let buffer = ""; + try { + while (true) { + const { done, value } = await reader.read(); + if (done) + break; + buffer += decoder.decode(value, { stream: true }); + if (streamType === StreamingResponseType.TEXT_EVENT_STREAM) { + buffer = this.processSSE(buffer, callbacks, options); + } + else if (streamType === StreamingResponseType.APPLICATION_NDJSON) { + buffer = this.processNDJSON(buffer, callbacks, options); + } + else if (streamType === StreamingResponseType.TEXT_PLAIN) { + buffer = this.processPlainText(buffer, callbacks, options); + } + } + // Flush any remaining data + if (buffer.trim()) { + if (streamType === StreamingResponseType.TEXT_EVENT_STREAM) { + this.processSSE(buffer, callbacks, options); + } + else if (streamType === StreamingResponseType.APPLICATION_NDJSON) { + this.processNDJSON(buffer, callbacks, options); + } + else { + this.emitData(buffer.trim(), callbacks, options); + } + } + callbacks.onComplete?.(); + } + finally { + reader.releaseLock(); + } + } + catch (error) { + const err = error instanceof Error ? error : new Error(String(error)); + callbacks.onError?.(err); + throw err; + } + } + /** + * Process Server-Sent Events format + */ + processSSE(buffer, callbacks, options) { + const events = buffer.split("\n\n"); + for (let i = 0; i < events.length - 1; i++) { + const event = events[i]; + if (!event.trim()) + continue; + const lines = event.split("\n"); + for (const line of lines) { + if (line.startsWith("data:")) { + const data = line.substring(5).trim(); + this.emitData(data, callbacks, options); + } + } + } + return events[events.length - 1]; + } + /** + * Process NDJSON (newline-delimited JSON) format + */ + processNDJSON(buffer, callbacks, options) { + const lines = buffer.split("\n"); + for (let i = 0; i < lines.length - 1; i++) { + const line = lines[i]; + if (line.trim()) { + this.emitData(line, callbacks, options); + } + } + return lines[lines.length - 1]; + } + /** + * Process plain text format + */ + processPlainText(buffer, callbacks, options) { + // For plain text, emit lines as they come + const lines = buffer.split("\n"); + for (let i = 0; i < lines.length - 1; i++) { + const line = lines[i]; + if (line.trim()) { + this.emitData(line.trim(), callbacks, options); + } + } + return lines[lines.length - 1]; + } + /** + * Emit data to the callback + */ + emitData(data, callbacks, options) { + try { + let parsed; + if (options?.parseJsonLines !== false) { + try { + parsed = JSON.parse(data); + } + catch { + parsed = data; + } + } + else { + parsed = data; + } + callbacks.onData?.(parsed); + } + catch { + // Continue on parse errors + } + } +} diff --git a/src/dots/streaming/StreamingRequestAdapter.ts b/src/dots/streaming/StreamingRequestAdapter.ts new file mode 100644 index 0000000000..c8b0fa2aeb --- /dev/null +++ b/src/dots/streaming/StreamingRequestAdapter.ts @@ -0,0 +1,245 @@ +import { + type AuthenticationProvider, + RequestAdapter, + RequestInformation, +} from "@microsoft/kiota-abstractions"; +import type { Parsable, ParsableFactory } from "@microsoft/kiota-abstractions"; + +/** + * Supported streaming response types + */ +export enum StreamingResponseType { + /** Server-Sent Events format */ + TEXT_EVENT_STREAM = "text/event-stream", + /** NDJSON format (newline-delimited JSON) */ + APPLICATION_NDJSON = "application/x-ndjson", + /** Plain text format */ + TEXT_PLAIN = "text/plain", +} + +/** + * Callbacks for streaming responses + */ +export interface StreamingResponseCallbacks { + onData?: (data: T) => void; + onError?: (error: Error) => void; + onComplete?: () => void; +} + +/** + * Options for streaming requests + */ +export interface StreamingRequestOptions { + /** Type of streaming response format */ + streamType?: StreamingResponseType; + /** Whether to parse as JSON lines */ + parseJsonLines?: boolean; + /** Factory function to create typed messages */ + messageFactory?: ParsableFactory; +} + +/** + * Adapter that wraps a request adapter to add streaming capabilities + * Supports SSE, NDJSON, and plain text streaming + */ +export class StreamingRequestAdapter { + /** + * Creates a new StreamingRequestAdapter + * @param underlyingAdapter The underlying RequestAdapter to wrap + * @param authenticationProvider Optional auth provider used to authenticate streaming requests + */ + constructor( + private readonly underlyingAdapter: RequestAdapter, + private readonly authenticationProvider?: AuthenticationProvider, + ) { + if (!underlyingAdapter) { + throw new Error("underlyingAdapter cannot be null"); + } + } + + /** + * Stream data from an endpoint + * @param requestInfo The request information + * @param callbacks Callbacks for stream lifecycle + * @param options Streaming options + */ + async stream( + requestInfo: RequestInformation, + callbacks: StreamingResponseCallbacks, + options?: StreamingRequestOptions + ): Promise { + try { + const streamType = options?.streamType || StreamingResponseType.TEXT_EVENT_STREAM; + + if (this.authenticationProvider) { + await this.authenticationProvider.authenticateRequest(requestInfo); + } + + // Build headers - flatten Set values to strings + const headers: Record = {}; + if (requestInfo.headers) { + for (const [key, values] of requestInfo.headers.entries()) { + headers[key] = Array.from(values).join(", "); + } + } + + const response = await fetch( + requestInfo.URL ?? "", + { + method: requestInfo.httpMethod?.toString() || "GET", + headers, + body: requestInfo.content ?? undefined, + } + ); + + if (!response.ok) { + throw new Error( + `HTTP ${response.status}: ${response.statusText}` + ); + } + + if (!response.body) { + throw new Error("Response body is null"); + } + + const reader = response.body.getReader(); + const decoder = new TextDecoder(); + let buffer = ""; + + try { + while (true) { + const { done, value } = await reader.read(); + + if (done) break; + + buffer += decoder.decode(value, { stream: true }); + + if (streamType === StreamingResponseType.TEXT_EVENT_STREAM) { + buffer = this.processSSE(buffer, callbacks, options); + } else if ( + streamType === StreamingResponseType.APPLICATION_NDJSON + ) { + buffer = this.processNDJSON(buffer, callbacks, options); + } else if (streamType === StreamingResponseType.TEXT_PLAIN) { + buffer = this.processPlainText(buffer, callbacks, options); + } + } + + // Flush any remaining data + if (buffer.trim()) { + if (streamType === StreamingResponseType.TEXT_EVENT_STREAM) { + this.processSSE(buffer, callbacks, options); + } else if ( + streamType === StreamingResponseType.APPLICATION_NDJSON + ) { + this.processNDJSON(buffer, callbacks, options); + } else { + this.emitData(buffer.trim(), callbacks, options); + } + } + + callbacks.onComplete?.(); + } finally { + reader.releaseLock(); + } + } catch (error) { + const err = error instanceof Error ? error : new Error(String(error)); + callbacks.onError?.(err); + throw err; + } + } + + /** + * Process Server-Sent Events format + */ + private processSSE( + buffer: string, + callbacks: StreamingResponseCallbacks, + options?: StreamingRequestOptions + ): string { + const events = buffer.split("\n\n"); + + for (let i = 0; i < events.length - 1; i++) { + const event = events[i]; + if (!event.trim()) continue; + + const lines = event.split("\n"); + for (const line of lines) { + if (line.startsWith("data:")) { + const data = line.substring(5).trim(); + this.emitData(data, callbacks, options); + } + } + } + + return events[events.length - 1]; + } + + /** + * Process NDJSON (newline-delimited JSON) format + */ + private processNDJSON( + buffer: string, + callbacks: StreamingResponseCallbacks, + options?: StreamingRequestOptions + ): string { + const lines = buffer.split("\n"); + + for (let i = 0; i < lines.length - 1; i++) { + const line = lines[i]; + if (line.trim()) { + this.emitData(line, callbacks, options); + } + } + + return lines[lines.length - 1]; + } + + /** + * Process plain text format + */ + private processPlainText( + buffer: string, + callbacks: StreamingResponseCallbacks, + options?: StreamingRequestOptions + ): string { + // For plain text, emit lines as they come + const lines = buffer.split("\n"); + + for (let i = 0; i < lines.length - 1; i++) { + const line = lines[i]; + if (line.trim()) { + this.emitData(line.trim(), callbacks, options); + } + } + + return lines[lines.length - 1]; + } + + /** + * Emit data to the callback + */ + private emitData( + data: string, + callbacks: StreamingResponseCallbacks, + options?: StreamingRequestOptions + ): void { + try { + let parsed: T; + + if (options?.parseJsonLines !== false) { + try { + parsed = JSON.parse(data) as T; + } catch { + parsed = data as T; + } + } else { + parsed = data as T; + } + + callbacks.onData?.(parsed); + } catch { + // Continue on parse errors + } + } +} diff --git a/src/dots/streaming/index.js b/src/dots/streaming/index.js new file mode 100644 index 0000000000..001538c125 --- /dev/null +++ b/src/dots/streaming/index.js @@ -0,0 +1,5 @@ +/** + * Streaming module - Support for SSE, NDJSON, and plain text streams + */ +export { StreamingRequestAdapter, StreamingResponseType, } from "./StreamingRequestAdapter.js"; +export { collectStream, createStreamingAdapter, streamWithHandler, } from "./streamingUtils.js"; diff --git a/src/dots/streaming/index.ts b/src/dots/streaming/index.ts new file mode 100644 index 0000000000..728fc310b4 --- /dev/null +++ b/src/dots/streaming/index.ts @@ -0,0 +1,17 @@ +/** + * Streaming module - Support for SSE, NDJSON, and plain text streams + */ + +export { + StreamingRequestAdapter, + StreamingResponseType, + type StreamingResponseCallbacks, + type StreamingRequestOptions, +} from "./StreamingRequestAdapter.js"; + +export { + collectStream, + createStreamingAdapter, + streamWithHandler, + type StreamingOptions, +} from "./streamingUtils.js"; diff --git a/src/dots/streaming/streamingUtils.js b/src/dots/streaming/streamingUtils.js new file mode 100644 index 0000000000..6ed276731d --- /dev/null +++ b/src/dots/streaming/streamingUtils.js @@ -0,0 +1,50 @@ +/** + * Streaming utility functions for DoTs + */ +import { StreamingRequestAdapter, StreamingResponseType, } from "./StreamingRequestAdapter.js"; +/** + * Collect all streaming data into an array + */ +export async function collectStream(streamingAdapter, requestInfo, options = {}) { + const results = []; + const errors = []; + await streamingAdapter.stream(requestInfo, { + onData: (chunk) => { + const data = options.factory ? options.factory(chunk) : chunk; + results.push(data); + }, + onError: (error) => errors.push(error), + }, options); + if (errors.length > 0) { + const errorMessages = errors.map((e) => e.message).join("; "); + throw new Error(`Streaming errors: ${errorMessages}`); + } + return results; +} +/** + * Create a streaming adapter from a request adapter + */ +export function createStreamingAdapter(underlyingAdapter, authenticationProvider) { + return new StreamingRequestAdapter(underlyingAdapter, authenticationProvider); +} +/** + * Stream data with custom handler + */ +export async function streamWithHandler(streamingAdapter, requestInfo, handler, options) { + return new Promise((resolve, reject) => { + streamingAdapter.stream(requestInfo, { + onData: async (data) => { + try { + const processed = options?.factory ? options.factory(data) : data; + await handler(processed); + } + catch (error) { + reject(error); + } + }, + onError: reject, + onComplete: resolve, + }, options).catch(reject); + }); +} +export { StreamingRequestAdapter, StreamingResponseType }; diff --git a/src/dots/streaming/streamingUtils.ts b/src/dots/streaming/streamingUtils.ts new file mode 100644 index 0000000000..253b8a511c --- /dev/null +++ b/src/dots/streaming/streamingUtils.ts @@ -0,0 +1,91 @@ +/** + * Streaming utility functions for DoTs + */ + +import { + StreamingRequestAdapter, + StreamingResponseType, + type StreamingResponseCallbacks, + type StreamingRequestOptions, +} from "./StreamingRequestAdapter.js"; +import type { AuthenticationProvider, RequestAdapter, RequestInformation } from "@microsoft/kiota-abstractions"; + +/** + * Helper type for streaming options with factory function + */ +export interface StreamingOptions extends StreamingRequestOptions { + factory?: (data: unknown) => T; +} + +/** + * Collect all streaming data into an array + */ +export async function collectStream( + streamingAdapter: StreamingRequestAdapter, + requestInfo: RequestInformation, + options: StreamingOptions = {} +): Promise { + const results: T[] = []; + const errors: Error[] = []; + + await streamingAdapter.stream( + requestInfo, + { + onData: (chunk) => { + const data = options.factory ? options.factory(chunk) : chunk; + results.push(data as T); + }, + onError: (error) => errors.push(error), + }, + options + ); + + if (errors.length > 0) { + const errorMessages = errors.map((e) => e.message).join("; "); + throw new Error(`Streaming errors: ${errorMessages}`); + } + + return results; +} + +/** + * Create a streaming adapter from a request adapter + */ +export function createStreamingAdapter( + underlyingAdapter: RequestAdapter, + authenticationProvider?: AuthenticationProvider, +): StreamingRequestAdapter { + return new StreamingRequestAdapter(underlyingAdapter, authenticationProvider); +} + +/** + * Stream data with custom handler + */ +export async function streamWithHandler( + streamingAdapter: StreamingRequestAdapter, + requestInfo: RequestInformation, + handler: (data: T) => Promise | void, + options?: StreamingOptions +): Promise { + return new Promise((resolve, reject) => { + streamingAdapter.stream( + requestInfo, + { + onData: async (data) => { + try { + const processed = options?.factory ? options.factory(data) : data; + await handler(processed as T); + } catch (error) { + reject(error); + } + }, + onError: reject, + onComplete: resolve, + }, + options + ).catch(reject); + }); +} + +export { StreamingRequestAdapter, StreamingResponseType }; +export type { StreamingResponseCallbacks, StreamingRequestOptions };