/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 791ddc74f2f1 */ import * as z from "zod/v4"; import { ClosedEnum } from "../types/enums.js"; import { PrivateManagerCloud, PrivateManagerCloud$outboundSchema, } from "./privatemanagercloud.js"; import { PrivateManagerSetupMethod, PrivateManagerSetupMethod$outboundSchema, } from "./privatemanagersetupmethod.js"; /** * Optional network mode for the private-manager setup. Defaults to create for production isolation; default uses the provider default network for faster dev/test setup. */ export const NetworkEnum = { Create: "create", Default: "default", } as const; /** * Optional network mode for the private-manager setup. Defaults to create for production isolation; default uses the provider default network for faster dev/test setup. */ export type NetworkEnum = ClosedEnum; /** * Optional external OTLP config for forwarding logs to Axiom, Datadog, etc. Falls back to built-in DeepStore when not set. */ export type OtlpConfig = { /** * External OTLP logs endpoint (e.g. https://api.axiom.co/v1/logs) */ logsEndpoint: string; /** * Auth header in 'key=value,...' format (e.g. 'authorization=Bearer ,x-axiom-dataset=') */ logsAuthHeader: string; }; export type NewManagerRequest = { name: string; /** * Cloud where the private manager will be deployed. */ cloud: PrivateManagerCloud; /** * Cloud region for the manager. */ region: string; /** * Optional setup method. Defaults to cloudformation for AWS, google-oauth for GCP, and terraform for Azure. */ setupMethod?: PrivateManagerSetupMethod | undefined; /** * Optional network mode for the private-manager setup. Defaults to create for production isolation; default uses the provider default network for faster dev/test setup. */ network?: NetworkEnum | undefined; /** * Optional external OTLP config for forwarding logs to Axiom, Datadog, etc. Falls back to built-in DeepStore when not set. */ otlpConfig?: OtlpConfig | undefined; }; /** @internal */ export const NetworkEnum$outboundSchema: z.ZodEnum = z.enum( NetworkEnum, ); /** @internal */ export type OtlpConfig$Outbound = { logsEndpoint: string; logsAuthHeader: string; }; /** @internal */ export const OtlpConfig$outboundSchema: z.ZodType< OtlpConfig$Outbound, OtlpConfig > = z.object({ logsEndpoint: z.string(), logsAuthHeader: z.string(), }); export function otlpConfigToJSON(otlpConfig: OtlpConfig): string { return JSON.stringify(OtlpConfig$outboundSchema.parse(otlpConfig)); } /** @internal */ export type NewManagerRequest$Outbound = { name: string; cloud: string; region: string; setupMethod?: string | undefined; network?: string | undefined; otlpConfig?: OtlpConfig$Outbound | undefined; }; /** @internal */ export const NewManagerRequest$outboundSchema: z.ZodType< NewManagerRequest$Outbound, NewManagerRequest > = z.object({ name: z.string(), cloud: PrivateManagerCloud$outboundSchema, region: z.string(), setupMethod: PrivateManagerSetupMethod$outboundSchema.optional(), network: NetworkEnum$outboundSchema.optional(), otlpConfig: z.lazy(() => OtlpConfig$outboundSchema).optional(), }); export function newManagerRequestToJSON( newManagerRequest: NewManagerRequest, ): string { return JSON.stringify( NewManagerRequest$outboundSchema.parse(newManagerRequest), ); }