/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */

import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js";

export type GetFileHashRequest = {
  /**
   * This is the path to the local file, must be prefixed by `file://`
   */
  url: string;
  /**
   * Item type
   */
  type?: number | undefined;
};

export type GetFileHashResponse = {
  /**
   * HTTP response content type for this operation
   */
  contentType: string;
  /**
   * HTTP response status code for this operation
   */
  statusCode: number;
  /**
   * Raw HTTP response; suitable for custom response parsing
   */
  rawResponse: Response;
};

/** @internal */
export const GetFileHashRequest$inboundSchema: z.ZodType<
  GetFileHashRequest,
  z.ZodTypeDef,
  unknown
> = z.object({
  url: z.string(),
  type: z.number().optional(),
});

/** @internal */
export type GetFileHashRequest$Outbound = {
  url: string;
  type?: number | undefined;
};

/** @internal */
export const GetFileHashRequest$outboundSchema: z.ZodType<
  GetFileHashRequest$Outbound,
  z.ZodTypeDef,
  GetFileHashRequest
> = z.object({
  url: z.string(),
  type: z.number().optional(),
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace GetFileHashRequest$ {
  /** @deprecated use `GetFileHashRequest$inboundSchema` instead. */
  export const inboundSchema = GetFileHashRequest$inboundSchema;
  /** @deprecated use `GetFileHashRequest$outboundSchema` instead. */
  export const outboundSchema = GetFileHashRequest$outboundSchema;
  /** @deprecated use `GetFileHashRequest$Outbound` instead. */
  export type Outbound = GetFileHashRequest$Outbound;
}

/** @internal */
export const GetFileHashResponse$inboundSchema: z.ZodType<
  GetFileHashResponse,
  z.ZodTypeDef,
  unknown
> = z.object({
  ContentType: z.string(),
  StatusCode: z.number().int(),
  RawResponse: z.instanceof(Response),
}).transform((v) => {
  return remap$(v, {
    "ContentType": "contentType",
    "StatusCode": "statusCode",
    "RawResponse": "rawResponse",
  });
});

/** @internal */
export type GetFileHashResponse$Outbound = {
  ContentType: string;
  StatusCode: number;
  RawResponse: never;
};

/** @internal */
export const GetFileHashResponse$outboundSchema: z.ZodType<
  GetFileHashResponse$Outbound,
  z.ZodTypeDef,
  GetFileHashResponse
> = z.object({
  contentType: z.string(),
  statusCode: z.number().int(),
  rawResponse: z.instanceof(Response).transform(() => {
    throw new Error("Response cannot be serialized");
  }),
}).transform((v) => {
  return remap$(v, {
    contentType: "ContentType",
    statusCode: "StatusCode",
    rawResponse: "RawResponse",
  });
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace GetFileHashResponse$ {
  /** @deprecated use `GetFileHashResponse$inboundSchema` instead. */
  export const inboundSchema = GetFileHashResponse$inboundSchema;
  /** @deprecated use `GetFileHashResponse$outboundSchema` instead. */
  export const outboundSchema = GetFileHashResponse$outboundSchema;
  /** @deprecated use `GetFileHashResponse$Outbound` instead. */
  export type Outbound = GetFileHashResponse$Outbound;
}
