/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ShellNetworkPolicyDomainSecret = { /** * The domain to associate this secret with. */ domain: string; /** * The name/placeholder for the secret (e.g., $API_KEY). */ name: string; /** * The secret value to substitute. */ value: string; }; /** @internal */ export const ShellNetworkPolicyDomainSecret$inboundSchema: z.ZodType< ShellNetworkPolicyDomainSecret, z.ZodTypeDef, unknown > = z.object({ domain: z.string(), name: z.string(), value: z.string(), }); /** @internal */ export type ShellNetworkPolicyDomainSecret$Outbound = { domain: string; name: string; value: string; }; /** @internal */ export const ShellNetworkPolicyDomainSecret$outboundSchema: z.ZodType< ShellNetworkPolicyDomainSecret$Outbound, z.ZodTypeDef, ShellNetworkPolicyDomainSecret > = z.object({ domain: z.string(), name: z.string(), value: z.string(), }); export function shellNetworkPolicyDomainSecretToJSON( shellNetworkPolicyDomainSecret: ShellNetworkPolicyDomainSecret, ): string { return JSON.stringify( ShellNetworkPolicyDomainSecret$outboundSchema.parse( shellNetworkPolicyDomainSecret, ), ); } export function shellNetworkPolicyDomainSecretFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ShellNetworkPolicyDomainSecret$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ShellNetworkPolicyDomainSecret' from JSON`, ); }