/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: ec87c4f49425 */ import * as z from "zod/v4"; import { ClosedEnum } from "../types/enums.js"; import { StackSettings, StackSettings$Outbound, StackSettings$outboundSchema, } from "./stacksettings.js"; /** * raw: a kubectl-applyable manifest for one cluster. helm: a paste-into-your-chart template whose namespace and environment name come from Helm at install time. */ export const RenderOperatorManifestRequestFormat = { Raw: "raw", Helm: "helm", } as const; /** * raw: a kubectl-applyable manifest for one cluster. helm: a paste-into-your-chart template whose namespace and environment name come from Helm at install time. */ export type RenderOperatorManifestRequestFormat = ClosedEnum< typeof RenderOperatorManifestRequestFormat >; /** * namespace: a namespaced Role that manages the install namespace. cluster: a ClusterRole that manages every namespace. */ export const RenderOperatorManifestRequestScope = { Namespace: "namespace", Cluster: "cluster", } as const; /** * namespace: a namespaced Role that manages the install namespace. cluster: a ClusterRole that manages every namespace. */ export type RenderOperatorManifestRequestScope = ClosedEnum< typeof RenderOperatorManifestRequestScope >; /** * Operator permission tier */ export const RenderOperatorManifestRequestPermission = { Diagnostics: "diagnostics", Remediation: "remediation", } as const; /** * Operator permission tier */ export type RenderOperatorManifestRequestPermission = ClosedEnum< typeof RenderOperatorManifestRequestPermission >; /** * Enable the node log collector DaemonSet for raw pod logs. */ export type LogCollector = { enabled?: boolean | undefined; }; export type RenderOperatorManifestRequest = { /** * Filter by project ID or name. */ project: string; /** * raw: a kubectl-applyable manifest for one cluster. helm: a paste-into-your-chart template whose namespace and environment name come from Helm at install time. */ format?: RenderOperatorManifestRequestFormat | undefined; /** * Per-environment identity. Required for raw output, ignored for helm. */ environmentName?: string | undefined; /** * Namespace to observe and install into. Omit for helm to use the release namespace. */ namespace?: string | undefined; /** * namespace: a namespaced Role that manages the install namespace. cluster: a ClusterRole that manages every namespace. */ scope?: RenderOperatorManifestRequestScope | undefined; /** * Optional Kubernetes label selector narrowing what is managed, applied within the scope. */ labelSelector?: string | undefined; /** * Operator permission tier */ permission?: RenderOperatorManifestRequestPermission | undefined; /** * Ready operator-image package to use for the Operator image. If omitted, the latest ready operator-image package for the project is used. */ operatorImagePackageId?: string | undefined; /** * Deployment-group token embedded in the operator Secret */ deploymentGroupToken: string; /** * Enable the node log collector DaemonSet for raw pod logs. */ logCollector?: LogCollector | undefined; /** * User-customizable deployment settings specified at deploy time. * * @remarks * * These settings are provided by the customer via CloudFormation parameters, * Terraform attributes, CLI flags, or Helm values. They customize how the * deployment runs and what capabilities are enabled. * * **Key distinction**: StackSettings is user-customizable, while ManagementConfig * is platform-derived (from the Manager's ServiceAccount). */ stackSettings?: StackSettings | undefined; }; /** @internal */ export const RenderOperatorManifestRequestFormat$outboundSchema: z.ZodEnum< typeof RenderOperatorManifestRequestFormat > = z.enum(RenderOperatorManifestRequestFormat); /** @internal */ export const RenderOperatorManifestRequestScope$outboundSchema: z.ZodEnum< typeof RenderOperatorManifestRequestScope > = z.enum(RenderOperatorManifestRequestScope); /** @internal */ export const RenderOperatorManifestRequestPermission$outboundSchema: z.ZodEnum< typeof RenderOperatorManifestRequestPermission > = z.enum(RenderOperatorManifestRequestPermission); /** @internal */ export type LogCollector$Outbound = { enabled: boolean; }; /** @internal */ export const LogCollector$outboundSchema: z.ZodType< LogCollector$Outbound, LogCollector > = z.object({ enabled: z.boolean().default(false), }); export function logCollectorToJSON(logCollector: LogCollector): string { return JSON.stringify(LogCollector$outboundSchema.parse(logCollector)); } /** @internal */ export type RenderOperatorManifestRequest$Outbound = { project: string; format: string; environmentName?: string | undefined; namespace?: string | undefined; scope: string; labelSelector?: string | undefined; permission: string; operatorImagePackageId?: string | undefined; deploymentGroupToken: string; logCollector?: LogCollector$Outbound | undefined; stackSettings?: StackSettings$Outbound | undefined; }; /** @internal */ export const RenderOperatorManifestRequest$outboundSchema: z.ZodType< RenderOperatorManifestRequest$Outbound, RenderOperatorManifestRequest > = z.object({ project: z.string(), format: RenderOperatorManifestRequestFormat$outboundSchema.default("raw"), environmentName: z.string().optional(), namespace: z.string().optional(), scope: RenderOperatorManifestRequestScope$outboundSchema.default("namespace"), labelSelector: z.string().optional(), permission: RenderOperatorManifestRequestPermission$outboundSchema.default( "diagnostics", ), operatorImagePackageId: z.string().optional(), deploymentGroupToken: z.string(), logCollector: z.lazy(() => LogCollector$outboundSchema).optional(), stackSettings: StackSettings$outboundSchema.optional(), }); export function renderOperatorManifestRequestToJSON( renderOperatorManifestRequest: RenderOperatorManifestRequest, ): string { return JSON.stringify( RenderOperatorManifestRequest$outboundSchema.parse( renderOperatorManifestRequest, ), ); }