/*
 * 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 * as types from "../../types/primitives.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";

export type BrandLogos = {
  primary?: string | null | undefined;
  secondary?: string | null | undefined;
  email?: string | null | undefined;
};

/** @internal */
export const BrandLogos$inboundSchema: z.ZodType<
  BrandLogos,
  z.ZodTypeDef,
  unknown
> = z.object({
  primary: z.nullable(types.string()).optional(),
  secondary: z.nullable(types.string()).optional(),
  email: z.nullable(types.string()).optional(),
});

export function brandLogosFromJSON(
  jsonString: string,
): SafeParseResult<BrandLogos, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => BrandLogos$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'BrandLogos' from JSON`,
  );
}
