/*
 * 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 "./sdkvalidationerror.js";

export type DeleteStorageStoresBlobByIdRequest = {
  id: string;
};

export type DeleteStorageStoresBlobByIdResponseBody = {
  id: string;
};

/** @internal */
export type DeleteStorageStoresBlobByIdRequest$Outbound = {
  id: string;
};

/** @internal */
export const DeleteStorageStoresBlobByIdRequest$outboundSchema: z.ZodType<
  DeleteStorageStoresBlobByIdRequest$Outbound,
  z.ZodTypeDef,
  DeleteStorageStoresBlobByIdRequest
> = z.object({
  id: z.string(),
});

export function deleteStorageStoresBlobByIdRequestToJSON(
  deleteStorageStoresBlobByIdRequest: DeleteStorageStoresBlobByIdRequest,
): string {
  return JSON.stringify(
    DeleteStorageStoresBlobByIdRequest$outboundSchema.parse(
      deleteStorageStoresBlobByIdRequest,
    ),
  );
}

/** @internal */
export const DeleteStorageStoresBlobByIdResponseBody$inboundSchema: z.ZodType<
  DeleteStorageStoresBlobByIdResponseBody,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: types.string(),
});

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