/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { AuthenticationRequiredType, AuthenticationRequiredType$inboundSchema, AuthenticationRequiredType$outboundSchema, } from "./authenticationrequiredtype.js"; import { AuthenticationType, AuthenticationType$inboundSchema, AuthenticationType$outboundSchema, } from "./authenticationtype.js"; import { CertificateValidationType, CertificateValidationType$inboundSchema, CertificateValidationType$outboundSchema, } from "./certificatevalidationtype.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { ProxyType, ProxyType$inboundSchema, ProxyType$outboundSchema, } from "./proxytype.js"; import { UpdateMechanism, UpdateMechanism$inboundSchema, UpdateMechanism$outboundSchema, } from "./updatemechanism.js"; export type HostConfigResource = { id?: number | undefined; bindAddress?: string | null | undefined; port?: number | undefined; sslPort?: number | undefined; enableSsl?: boolean | undefined; launchBrowser?: boolean | undefined; authenticationMethod?: AuthenticationType | undefined; authenticationRequired?: AuthenticationRequiredType | undefined; analyticsEnabled?: boolean | undefined; username?: string | null | undefined; password?: string | null | undefined; passwordConfirmation?: string | null | undefined; logLevel?: string | null | undefined; logSizeLimit?: number | undefined; consoleLogLevel?: string | null | undefined; branch?: string | null | undefined; apiKey?: string | null | undefined; sslCertPath?: string | null | undefined; sslCertPassword?: string | null | undefined; urlBase?: string | null | undefined; instanceName?: string | null | undefined; applicationUrl?: string | null | undefined; updateAutomatically?: boolean | undefined; updateMechanism?: UpdateMechanism | undefined; updateScriptPath?: string | null | undefined; proxyEnabled?: boolean | undefined; proxyType?: ProxyType | undefined; proxyHostname?: string | null | undefined; proxyPort?: number | undefined; proxyUsername?: string | null | undefined; proxyPassword?: string | null | undefined; proxyBypassFilter?: string | null | undefined; proxyBypassLocalAddresses?: boolean | undefined; certificateValidation?: CertificateValidationType | undefined; backupFolder?: string | null | undefined; backupInterval?: number | undefined; backupRetention?: number | undefined; historyCleanupDays?: number | undefined; trustCgnatIpAddresses?: boolean | undefined; }; /** @internal */ export const HostConfigResource$inboundSchema: z.ZodType< HostConfigResource, z.ZodTypeDef, unknown > = z.object({ id: z.number().int().optional(), bindAddress: z.nullable(z.string()).optional(), port: z.number().int().optional(), sslPort: z.number().int().optional(), enableSsl: z.boolean().optional(), launchBrowser: z.boolean().optional(), authenticationMethod: AuthenticationType$inboundSchema.optional(), authenticationRequired: AuthenticationRequiredType$inboundSchema.optional(), analyticsEnabled: z.boolean().optional(), username: z.nullable(z.string()).optional(), password: z.nullable(z.string()).optional(), passwordConfirmation: z.nullable(z.string()).optional(), logLevel: z.nullable(z.string()).optional(), logSizeLimit: z.number().int().optional(), consoleLogLevel: z.nullable(z.string()).optional(), branch: z.nullable(z.string()).optional(), apiKey: z.nullable(z.string()).optional(), sslCertPath: z.nullable(z.string()).optional(), sslCertPassword: z.nullable(z.string()).optional(), urlBase: z.nullable(z.string()).optional(), instanceName: z.nullable(z.string()).optional(), applicationUrl: z.nullable(z.string()).optional(), updateAutomatically: z.boolean().optional(), updateMechanism: UpdateMechanism$inboundSchema.optional(), updateScriptPath: z.nullable(z.string()).optional(), proxyEnabled: z.boolean().optional(), proxyType: ProxyType$inboundSchema.optional(), proxyHostname: z.nullable(z.string()).optional(), proxyPort: z.number().int().optional(), proxyUsername: z.nullable(z.string()).optional(), proxyPassword: z.nullable(z.string()).optional(), proxyBypassFilter: z.nullable(z.string()).optional(), proxyBypassLocalAddresses: z.boolean().optional(), certificateValidation: CertificateValidationType$inboundSchema.optional(), backupFolder: z.nullable(z.string()).optional(), backupInterval: z.number().int().optional(), backupRetention: z.number().int().optional(), historyCleanupDays: z.number().int().optional(), trustCgnatIpAddresses: z.boolean().optional(), }); /** @internal */ export type HostConfigResource$Outbound = { id?: number | undefined; bindAddress?: string | null | undefined; port?: number | undefined; sslPort?: number | undefined; enableSsl?: boolean | undefined; launchBrowser?: boolean | undefined; authenticationMethod?: string | undefined; authenticationRequired?: string | undefined; analyticsEnabled?: boolean | undefined; username?: string | null | undefined; password?: string | null | undefined; passwordConfirmation?: string | null | undefined; logLevel?: string | null | undefined; logSizeLimit?: number | undefined; consoleLogLevel?: string | null | undefined; branch?: string | null | undefined; apiKey?: string | null | undefined; sslCertPath?: string | null | undefined; sslCertPassword?: string | null | undefined; urlBase?: string | null | undefined; instanceName?: string | null | undefined; applicationUrl?: string | null | undefined; updateAutomatically?: boolean | undefined; updateMechanism?: string | undefined; updateScriptPath?: string | null | undefined; proxyEnabled?: boolean | undefined; proxyType?: string | undefined; proxyHostname?: string | null | undefined; proxyPort?: number | undefined; proxyUsername?: string | null | undefined; proxyPassword?: string | null | undefined; proxyBypassFilter?: string | null | undefined; proxyBypassLocalAddresses?: boolean | undefined; certificateValidation?: string | undefined; backupFolder?: string | null | undefined; backupInterval?: number | undefined; backupRetention?: number | undefined; historyCleanupDays?: number | undefined; trustCgnatIpAddresses?: boolean | undefined; }; /** @internal */ export const HostConfigResource$outboundSchema: z.ZodType< HostConfigResource$Outbound, z.ZodTypeDef, HostConfigResource > = z.object({ id: z.number().int().optional(), bindAddress: z.nullable(z.string()).optional(), port: z.number().int().optional(), sslPort: z.number().int().optional(), enableSsl: z.boolean().optional(), launchBrowser: z.boolean().optional(), authenticationMethod: AuthenticationType$outboundSchema.optional(), authenticationRequired: AuthenticationRequiredType$outboundSchema.optional(), analyticsEnabled: z.boolean().optional(), username: z.nullable(z.string()).optional(), password: z.nullable(z.string()).optional(), passwordConfirmation: z.nullable(z.string()).optional(), logLevel: z.nullable(z.string()).optional(), logSizeLimit: z.number().int().optional(), consoleLogLevel: z.nullable(z.string()).optional(), branch: z.nullable(z.string()).optional(), apiKey: z.nullable(z.string()).optional(), sslCertPath: z.nullable(z.string()).optional(), sslCertPassword: z.nullable(z.string()).optional(), urlBase: z.nullable(z.string()).optional(), instanceName: z.nullable(z.string()).optional(), applicationUrl: z.nullable(z.string()).optional(), updateAutomatically: z.boolean().optional(), updateMechanism: UpdateMechanism$outboundSchema.optional(), updateScriptPath: z.nullable(z.string()).optional(), proxyEnabled: z.boolean().optional(), proxyType: ProxyType$outboundSchema.optional(), proxyHostname: z.nullable(z.string()).optional(), proxyPort: z.number().int().optional(), proxyUsername: z.nullable(z.string()).optional(), proxyPassword: z.nullable(z.string()).optional(), proxyBypassFilter: z.nullable(z.string()).optional(), proxyBypassLocalAddresses: z.boolean().optional(), certificateValidation: CertificateValidationType$outboundSchema.optional(), backupFolder: z.nullable(z.string()).optional(), backupInterval: z.number().int().optional(), backupRetention: z.number().int().optional(), historyCleanupDays: z.number().int().optional(), trustCgnatIpAddresses: z.boolean().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace HostConfigResource$ { /** @deprecated use `HostConfigResource$inboundSchema` instead. */ export const inboundSchema = HostConfigResource$inboundSchema; /** @deprecated use `HostConfigResource$outboundSchema` instead. */ export const outboundSchema = HostConfigResource$outboundSchema; /** @deprecated use `HostConfigResource$Outbound` instead. */ export type Outbound = HostConfigResource$Outbound; } export function hostConfigResourceToJSON( hostConfigResource: HostConfigResource, ): string { return JSON.stringify( HostConfigResource$outboundSchema.parse(hostConfigResource), ); } export function hostConfigResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => HostConfigResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HostConfigResource' from JSON`, ); }