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

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

export const NotFoundType = {
  InvalidRequestError: "invalid_request_error",
} as const;
export type NotFoundType = ClosedEnum<typeof NotFoundType>;

export const NotFoundCode = {
  NotFound: "not_found",
} as const;
export type NotFoundCode = ClosedEnum<typeof NotFoundCode>;

/**
 * Not Found
 */
export type GetV2ObjectsObjectNotFoundErrorData = {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;
  message: string;
};

/**
 * Not Found
 */
export class GetV2ObjectsObjectNotFoundError extends Error {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;

  /** The original data that was passed to this error instance. */
  data$: GetV2ObjectsObjectNotFoundErrorData;

  constructor(err: GetV2ObjectsObjectNotFoundErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "GetV2ObjectsObjectNotFoundError";
  }
}

export const ConflictType = {
  InvalidRequestError: "invalid_request_error",
} as const;
export type ConflictType = ClosedEnum<typeof ConflictType>;

export const ConflictCode = {
  SlugConflict: "slug_conflict",
} as const;
export type ConflictCode = ClosedEnum<typeof ConflictCode>;

/**
 * Conflict
 */
export type PostV2ObjectsSlugConflictErrorData = {
  statusCode: number;
  type: ConflictType;
  code: ConflictCode;
  message: string;
};

/**
 * Conflict
 */
export class PostV2ObjectsSlugConflictError extends Error {
  statusCode: number;
  type: ConflictType;
  code: ConflictCode;

  /** The original data that was passed to this error instance. */
  data$: PostV2ObjectsSlugConflictErrorData;

  constructor(err: PostV2ObjectsSlugConflictErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "PostV2ObjectsSlugConflictError";
  }
}

/**
 * Conflict
 */
export type PatchV2ObjectsObjectSlugConflictErrorData = {
  statusCode: number;
  type: ConflictType;
  code: ConflictCode;
  message: string;
};

/**
 * Conflict
 */
export class PatchV2ObjectsObjectSlugConflictError extends Error {
  statusCode: number;
  type: ConflictType;
  code: ConflictCode;

  /** The original data that was passed to this error instance. */
  data$: PatchV2ObjectsObjectSlugConflictErrorData;

  constructor(err: PatchV2ObjectsObjectSlugConflictErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "PatchV2ObjectsObjectSlugConflictError";
  }
}

export const BadRequestType = {
  InvalidRequestError: "invalid_request_error",
} as const;
export type BadRequestType = ClosedEnum<typeof BadRequestType>;

export const CodeValidationType = {
  ValidationType: "validation_type",
} as const;
export type CodeValidationType = ClosedEnum<typeof CodeValidationType>;

/**
 * Bad Request
 */
export type PatchV2ObjectsObjectValidationTypeErrorData = {
  statusCode: number;
  type: BadRequestType;
  code: CodeValidationType;
  message: string;
};

/**
 * Bad Request
 */
export class PatchV2ObjectsObjectValidationTypeError extends Error {
  statusCode: number;
  type: BadRequestType;
  code: CodeValidationType;

  /** The original data that was passed to this error instance. */
  data$: PatchV2ObjectsObjectValidationTypeErrorData;

  constructor(err: PatchV2ObjectsObjectValidationTypeErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "PatchV2ObjectsObjectValidationTypeError";
  }
}

/**
 * Conflict
 */
export type PostV2TargetIdentifierAttributesSlugConflictErrorData = {
  statusCode: number;
  type: ConflictType;
  code: ConflictCode;
  message: string;
};

/**
 * Conflict
 */
export class PostV2TargetIdentifierAttributesSlugConflictError extends Error {
  statusCode: number;
  type: ConflictType;
  code: ConflictCode;

  /** The original data that was passed to this error instance. */
  data$: PostV2TargetIdentifierAttributesSlugConflictErrorData;

  constructor(err: PostV2TargetIdentifierAttributesSlugConflictErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "PostV2TargetIdentifierAttributesSlugConflictError";
  }
}

/**
 * Not Found
 */
export type PostV2TargetIdentifierAttributesNotFoundErrorData = {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;
  message: string;
};

/**
 * Not Found
 */
export class PostV2TargetIdentifierAttributesNotFoundError extends Error {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;

  /** The original data that was passed to this error instance. */
  data$: PostV2TargetIdentifierAttributesNotFoundErrorData;

  constructor(err: PostV2TargetIdentifierAttributesNotFoundErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "PostV2TargetIdentifierAttributesNotFoundError";
  }
}

/**
 * Bad Request
 */
export type PostV2TargetIdentifierAttributesValidationTypeErrorData = {
  statusCode: number;
  type: BadRequestType;
  code: CodeValidationType;
  message: string;
};

/**
 * Bad Request
 */
export class PostV2TargetIdentifierAttributesValidationTypeError extends Error {
  statusCode: number;
  type: BadRequestType;
  code: CodeValidationType;

  /** The original data that was passed to this error instance. */
  data$: PostV2TargetIdentifierAttributesValidationTypeErrorData;

  constructor(err: PostV2TargetIdentifierAttributesValidationTypeErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "PostV2TargetIdentifierAttributesValidationTypeError";
  }
}

/**
 * Not Found
 */
export type GetV2TargetIdentifierAttributesAttributeNotFoundErrorData = {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;
  message: string;
};

/**
 * Not Found
 */
export class GetV2TargetIdentifierAttributesAttributeNotFoundError
  extends Error
{
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;

  /** The original data that was passed to this error instance. */
  data$: GetV2TargetIdentifierAttributesAttributeNotFoundErrorData;

  constructor(err: GetV2TargetIdentifierAttributesAttributeNotFoundErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "GetV2TargetIdentifierAttributesAttributeNotFoundError";
  }
}

export const PatchV2TargetIdentifierAttributesAttributeCode = {
  SystemEditUnauthorized: "system_edit_unauthorized",
} as const;
export type PatchV2TargetIdentifierAttributesAttributeCode = ClosedEnum<
  typeof PatchV2TargetIdentifierAttributesAttributeCode
>;

/**
 * Bad Request
 */
export type SystemEditUnauthorizedErrorData = {
  statusCode: number;
  type: BadRequestType;
  code: PatchV2TargetIdentifierAttributesAttributeCode;
  message: string;
};

/**
 * Bad Request
 */
export class SystemEditUnauthorizedError extends Error {
  statusCode: number;
  type: BadRequestType;
  code: PatchV2TargetIdentifierAttributesAttributeCode;

  /** The original data that was passed to this error instance. */
  data$: SystemEditUnauthorizedErrorData;

  constructor(err: SystemEditUnauthorizedErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "SystemEditUnauthorizedError";
  }
}

/**
 * Conflict
 */
export type PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictErrorData =
  {
    statusCode: number;
    type: ConflictType;
    code: ConflictCode;
    message: string;
  };

/**
 * Conflict
 */
export class PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError
  extends Error
{
  statusCode: number;
  type: ConflictType;
  code: ConflictCode;

  /** The original data that was passed to this error instance. */
  data$: PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictErrorData;

  constructor(
    err: PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictErrorData,
  ) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name =
      "PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError";
  }
}

/**
 * Bad Request
 */
export type PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeErrorData =
  {
    statusCode: number;
    type: BadRequestType;
    code: CodeValidationType;
    message: string;
  };

/**
 * Bad Request
 */
export class PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError
  extends Error
{
  statusCode: number;
  type: BadRequestType;
  code: CodeValidationType;

  /** The original data that was passed to this error instance. */
  data$:
    PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeErrorData;

  constructor(
    err:
      PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeErrorData,
  ) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name =
      "PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError";
  }
}

export const BadRequestCode = {
  ValueNotFound: "value_not_found",
  MissingValue: "missing_value",
} as const;
export type BadRequestCode = ClosedEnum<typeof BadRequestCode>;

/**
 * Bad Request
 */
export type PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestErrorData =
  {
    statusCode: number;
    type: BadRequestType;
    code: BadRequestCode;
    message: string;
  };

/**
 * Bad Request
 */
export class PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError
  extends Error
{
  statusCode: number;
  type: BadRequestType;
  code: BadRequestCode;

  /** The original data that was passed to this error instance. */
  data$:
    PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestErrorData;

  constructor(
    err:
      PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestErrorData,
  ) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name =
      "PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError";
  }
}

/**
 * Conflict
 */
export type PostV2TargetIdentifierAttributesAttributeStatusesSlugConflictErrorData =
  {
    statusCode: number;
    type: ConflictType;
    code: ConflictCode;
    message: string;
  };

/**
 * Conflict
 */
export class PostV2TargetIdentifierAttributesAttributeStatusesSlugConflictError
  extends Error
{
  statusCode: number;
  type: ConflictType;
  code: ConflictCode;

  /** The original data that was passed to this error instance. */
  data$: PostV2TargetIdentifierAttributesAttributeStatusesSlugConflictErrorData;

  constructor(
    err: PostV2TargetIdentifierAttributesAttributeStatusesSlugConflictErrorData,
  ) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name =
      "PostV2TargetIdentifierAttributesAttributeStatusesSlugConflictError";
  }
}

/**
 * Bad Request
 */
export type PostV2TargetIdentifierAttributesAttributeStatusesValidationTypeErrorData =
  {
    statusCode: number;
    type: BadRequestType;
    code: CodeValidationType;
    message: string;
  };

/**
 * Bad Request
 */
export class PostV2TargetIdentifierAttributesAttributeStatusesValidationTypeError
  extends Error
{
  statusCode: number;
  type: BadRequestType;
  code: CodeValidationType;

  /** The original data that was passed to this error instance. */
  data$:
    PostV2TargetIdentifierAttributesAttributeStatusesValidationTypeErrorData;

  constructor(
    err:
      PostV2TargetIdentifierAttributesAttributeStatusesValidationTypeErrorData,
  ) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name =
      "PostV2TargetIdentifierAttributesAttributeStatusesValidationTypeError";
  }
}

/**
 * Bad Request
 */
export type PatchV2TargetIdentifierAttributesAttributeStatusesStatusInvalidRequestErrorData =
  {
    statusCode: number;
    type: BadRequestType;
    code: BadRequestCode;
    message: string;
  };

/**
 * Bad Request
 */
export class PatchV2TargetIdentifierAttributesAttributeStatusesStatusInvalidRequestError
  extends Error
{
  statusCode: number;
  type: BadRequestType;
  code: BadRequestCode;

  /** The original data that was passed to this error instance. */
  data$:
    PatchV2TargetIdentifierAttributesAttributeStatusesStatusInvalidRequestErrorData;

  constructor(
    err:
      PatchV2TargetIdentifierAttributesAttributeStatusesStatusInvalidRequestErrorData,
  ) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name =
      "PatchV2TargetIdentifierAttributesAttributeStatusesStatusInvalidRequestError";
  }
}

/**
 * Not Found
 */
export type PostV2ObjectsObjectRecordsQueryNotFoundErrorData = {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;
  message: string;
};

/**
 * Not Found
 */
export class PostV2ObjectsObjectRecordsQueryNotFoundError extends Error {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;

  /** The original data that was passed to this error instance. */
  data$: PostV2ObjectsObjectRecordsQueryNotFoundErrorData;

  constructor(err: PostV2ObjectsObjectRecordsQueryNotFoundErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "PostV2ObjectsObjectRecordsQueryNotFoundError";
  }
}

export const PostV2ObjectsObjectRecordsQueryCode = {
  FilterError: "filter_error",
} as const;
export type PostV2ObjectsObjectRecordsQueryCode = ClosedEnum<
  typeof PostV2ObjectsObjectRecordsQueryCode
>;

/**
 * Bad Request
 */
export type FilterErrorData = {
  statusCode: number;
  type: BadRequestType;
  code: PostV2ObjectsObjectRecordsQueryCode;
  message: string;
};

/**
 * Bad Request
 */
export class FilterError extends Error {
  statusCode: number;
  type: BadRequestType;
  code: PostV2ObjectsObjectRecordsQueryCode;

  /** The original data that was passed to this error instance. */
  data$: FilterErrorData;

  constructor(err: FilterErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "FilterError";
  }
}

/**
 * Bad Request
 */
export type PostV2ObjectsObjectRecordsInvalidRequestErrorData = {
  statusCode: number;
  type: BadRequestType;
  code: BadRequestCode;
  message: string;
};

/**
 * Bad Request
 */
export class PostV2ObjectsObjectRecordsInvalidRequestError extends Error {
  statusCode: number;
  type: BadRequestType;
  code: BadRequestCode;

  /** The original data that was passed to this error instance. */
  data$: PostV2ObjectsObjectRecordsInvalidRequestErrorData;

  constructor(err: PostV2ObjectsObjectRecordsInvalidRequestErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "PostV2ObjectsObjectRecordsInvalidRequestError";
  }
}

/**
 * Bad Request
 */
export type PutV2ObjectsObjectRecordsInvalidRequestErrorData = {
  statusCode: number;
  type: BadRequestType;
  code: BadRequestCode;
  message: string;
};

/**
 * Bad Request
 */
export class PutV2ObjectsObjectRecordsInvalidRequestError extends Error {
  statusCode: number;
  type: BadRequestType;
  code: BadRequestCode;

  /** The original data that was passed to this error instance. */
  data$: PutV2ObjectsObjectRecordsInvalidRequestErrorData;

  constructor(err: PutV2ObjectsObjectRecordsInvalidRequestErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "PutV2ObjectsObjectRecordsInvalidRequestError";
  }
}

/**
 * Not Found
 */
export type GetV2ObjectsObjectRecordsRecordIdInvalidRequestErrorData = {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;
  message: string;
};

/**
 * Not Found
 */
export class GetV2ObjectsObjectRecordsRecordIdInvalidRequestError
  extends Error
{
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;

  /** The original data that was passed to this error instance. */
  data$: GetV2ObjectsObjectRecordsRecordIdInvalidRequestErrorData;

  constructor(err: GetV2ObjectsObjectRecordsRecordIdInvalidRequestErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "GetV2ObjectsObjectRecordsRecordIdInvalidRequestError";
  }
}

export const CodeMissingValue = {
  MissingValue: "missing_value",
} as const;
export type CodeMissingValue = ClosedEnum<typeof CodeMissingValue>;

/**
 * Bad Request
 */
export type MissingValueErrorData = {
  statusCode: number;
  type: BadRequestType;
  code: CodeMissingValue;
  message: string;
};

/**
 * Bad Request
 */
export class MissingValueError extends Error {
  statusCode: number;
  type: BadRequestType;
  code: CodeMissingValue;

  /** The original data that was passed to this error instance. */
  data$: MissingValueErrorData;

  constructor(err: MissingValueErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "MissingValueError";
  }
}

/**
 * Bad Request
 */
export type GetV2ObjectsObjectRecordsRecordIdAttributesAttributeValuesValidationTypeErrorData =
  {
    statusCode: number;
    type: BadRequestType;
    code: CodeValidationType;
    message: string;
  };

/**
 * Bad Request
 */
export class GetV2ObjectsObjectRecordsRecordIdAttributesAttributeValuesValidationTypeError
  extends Error
{
  statusCode: number;
  type: BadRequestType;
  code: CodeValidationType;

  /** The original data that was passed to this error instance. */
  data$:
    GetV2ObjectsObjectRecordsRecordIdAttributesAttributeValuesValidationTypeErrorData;

  constructor(
    err:
      GetV2ObjectsObjectRecordsRecordIdAttributesAttributeValuesValidationTypeErrorData,
  ) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name =
      "GetV2ObjectsObjectRecordsRecordIdAttributesAttributeValuesValidationTypeError";
  }
}

/**
 * Not Found
 */
export type PostV2ListsNotFoundErrorData = {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;
  message: string;
};

/**
 * Not Found
 */
export class PostV2ListsNotFoundError extends Error {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;

  /** The original data that was passed to this error instance. */
  data$: PostV2ListsNotFoundErrorData;

  constructor(err: PostV2ListsNotFoundErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "PostV2ListsNotFoundError";
  }
}

export const PostV2ListsType = {
  AuthError: "auth_error",
} as const;
export type PostV2ListsType = ClosedEnum<typeof PostV2ListsType>;

export const PostV2ListsCode = {
  BillingError: "billing_error",
} as const;
export type PostV2ListsCode = ClosedEnum<typeof PostV2ListsCode>;

/**
 * Forbidden
 */
export type BillingErrorData = {
  statusCode: number;
  type: PostV2ListsType;
  code: PostV2ListsCode;
  message: string;
};

/**
 * Forbidden
 */
export class BillingError extends Error {
  statusCode: number;
  type: PostV2ListsType;
  code: PostV2ListsCode;

  /** The original data that was passed to this error instance. */
  data$: BillingErrorData;

  constructor(err: BillingErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "BillingError";
  }
}

/**
 * Bad Request
 */
export type PostV2ListsInvalidRequestErrorData = {
  statusCode: number;
  type: BadRequestType;
  code: BadRequestCode;
  message: string;
};

/**
 * Bad Request
 */
export class PostV2ListsInvalidRequestError extends Error {
  statusCode: number;
  type: BadRequestType;
  code: BadRequestCode;

  /** The original data that was passed to this error instance. */
  data$: PostV2ListsInvalidRequestErrorData;

  constructor(err: PostV2ListsInvalidRequestErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "PostV2ListsInvalidRequestError";
  }
}

/**
 * Not Found
 */
export type GetV2ListsListNotFoundErrorData = {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;
  message: string;
};

/**
 * Not Found
 */
export class GetV2ListsListNotFoundError extends Error {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;

  /** The original data that was passed to this error instance. */
  data$: GetV2ListsListNotFoundErrorData;

  constructor(err: GetV2ListsListNotFoundErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "GetV2ListsListNotFoundError";
  }
}

/**
 * Not Found
 */
export type PostV2ListsListEntriesNotFoundErrorData = {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;
  message: string;
};

/**
 * Not Found
 */
export class PostV2ListsListEntriesNotFoundError extends Error {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;

  /** The original data that was passed to this error instance. */
  data$: PostV2ListsListEntriesNotFoundErrorData;

  constructor(err: PostV2ListsListEntriesNotFoundErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "PostV2ListsListEntriesNotFoundError";
  }
}

/**
 * Bad Request
 */
export type PostV2ListsListEntriesInvalidRequestErrorData = {
  statusCode: number;
  type: BadRequestType;
  code: BadRequestCode;
  message: string;
};

/**
 * Bad Request
 */
export class PostV2ListsListEntriesInvalidRequestError extends Error {
  statusCode: number;
  type: BadRequestType;
  code: BadRequestCode;

  /** The original data that was passed to this error instance. */
  data$: PostV2ListsListEntriesInvalidRequestErrorData;

  constructor(err: PostV2ListsListEntriesInvalidRequestErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "PostV2ListsListEntriesInvalidRequestError";
  }
}

/**
 * Not Found
 */
export type PutV2ListsListEntriesNotFoundErrorData = {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;
  message: string;
};

/**
 * Not Found
 */
export class PutV2ListsListEntriesNotFoundError extends Error {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;

  /** The original data that was passed to this error instance. */
  data$: PutV2ListsListEntriesNotFoundErrorData;

  constructor(err: PutV2ListsListEntriesNotFoundErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "PutV2ListsListEntriesNotFoundError";
  }
}

export const PutV2ListsListEntriesCode = {
  MultipleMatchResults: "multiple_match_results",
} as const;
export type PutV2ListsListEntriesCode = ClosedEnum<
  typeof PutV2ListsListEntriesCode
>;

/**
 * Bad Request
 */
export type MultipleMatchResultsErrorData = {
  statusCode: number;
  type: BadRequestType;
  code: PutV2ListsListEntriesCode;
  message: string;
};

/**
 * Bad Request
 */
export class MultipleMatchResultsError extends Error {
  statusCode: number;
  type: BadRequestType;
  code: PutV2ListsListEntriesCode;

  /** The original data that was passed to this error instance. */
  data$: MultipleMatchResultsErrorData;

  constructor(err: MultipleMatchResultsErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "MultipleMatchResultsError";
  }
}

export const CodeImmutableValue = {
  ImmutableValue: "immutable_value",
} as const;
export type CodeImmutableValue = ClosedEnum<typeof CodeImmutableValue>;

/**
 * Bad Request
 */
export type ImmutableValueErrorData = {
  statusCode: number;
  type: BadRequestType;
  code: CodeImmutableValue;
  message: string;
};

/**
 * Bad Request
 */
export class ImmutableValueError extends Error {
  statusCode: number;
  type: BadRequestType;
  code: CodeImmutableValue;

  /** The original data that was passed to this error instance. */
  data$: ImmutableValueErrorData;

  constructor(err: ImmutableValueErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "ImmutableValueError";
  }
}

/**
 * Not Found
 */
export type GetV2WorkspaceMembersWorkspaceMemberIdInvalidRequestErrorData = {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;
  message: string;
};

/**
 * Not Found
 */
export class GetV2WorkspaceMembersWorkspaceMemberIdInvalidRequestError
  extends Error
{
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;

  /** The original data that was passed to this error instance. */
  data$: GetV2WorkspaceMembersWorkspaceMemberIdInvalidRequestErrorData;

  constructor(
    err: GetV2WorkspaceMembersWorkspaceMemberIdInvalidRequestErrorData,
  ) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "GetV2WorkspaceMembersWorkspaceMemberIdInvalidRequestError";
  }
}

/**
 * Not Found
 */
export type GetV2NotesNoteIdNotFoundErrorData = {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;
  message: string;
};

/**
 * Not Found
 */
export class GetV2NotesNoteIdNotFoundError extends Error {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;

  /** The original data that was passed to this error instance. */
  data$: GetV2NotesNoteIdNotFoundErrorData;

  constructor(err: GetV2NotesNoteIdNotFoundErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "GetV2NotesNoteIdNotFoundError";
  }
}

/**
 * Bad Request
 */
export type PostV2TasksValidationTypeErrorData = {
  statusCode: number;
  type: BadRequestType;
  code: CodeValidationType;
  message: string;
};

/**
 * Bad Request
 */
export class PostV2TasksValidationTypeError extends Error {
  statusCode: number;
  type: BadRequestType;
  code: CodeValidationType;

  /** The original data that was passed to this error instance. */
  data$: PostV2TasksValidationTypeErrorData;

  constructor(err: PostV2TasksValidationTypeErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "PostV2TasksValidationTypeError";
  }
}

/**
 * Not Found
 */
export type GetV2TasksTaskIdNotFoundErrorData = {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;
  message: string;
};

/**
 * Not Found
 */
export class GetV2TasksTaskIdNotFoundError extends Error {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;

  /** The original data that was passed to this error instance. */
  data$: GetV2TasksTaskIdNotFoundErrorData;

  constructor(err: GetV2TasksTaskIdNotFoundErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "GetV2TasksTaskIdNotFoundError";
  }
}

/**
 * Not Found
 */
export type PatchV2TasksTaskIdNotFoundErrorData = {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;
  message: string;
};

/**
 * Not Found
 */
export class PatchV2TasksTaskIdNotFoundError extends Error {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;

  /** The original data that was passed to this error instance. */
  data$: PatchV2TasksTaskIdNotFoundErrorData;

  constructor(err: PatchV2TasksTaskIdNotFoundErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "PatchV2TasksTaskIdNotFoundError";
  }
}

/**
 * Not Found
 */
export type GetV2ThreadsThreadIdNotFoundErrorData = {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;
  message: string;
};

/**
 * Not Found
 */
export class GetV2ThreadsThreadIdNotFoundError extends Error {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;

  /** The original data that was passed to this error instance. */
  data$: GetV2ThreadsThreadIdNotFoundErrorData;

  constructor(err: GetV2ThreadsThreadIdNotFoundErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "GetV2ThreadsThreadIdNotFoundError";
  }
}

/**
 * Bad Request
 */
export type PostV2CommentsInvalidRequestErrorData = {
  statusCode: number;
  type: BadRequestType;
  code: BadRequestCode;
  message: string;
};

/**
 * Bad Request
 */
export class PostV2CommentsInvalidRequestError extends Error {
  statusCode: number;
  type: BadRequestType;
  code: BadRequestCode;

  /** The original data that was passed to this error instance. */
  data$: PostV2CommentsInvalidRequestErrorData;

  constructor(err: PostV2CommentsInvalidRequestErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "PostV2CommentsInvalidRequestError";
  }
}

/**
 * Not Found
 */
export type GetV2CommentsCommentIdNotFoundErrorData = {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;
  message: string;
};

/**
 * Not Found
 */
export class GetV2CommentsCommentIdNotFoundError extends Error {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;

  /** The original data that was passed to this error instance. */
  data$: GetV2CommentsCommentIdNotFoundErrorData;

  constructor(err: GetV2CommentsCommentIdNotFoundErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "GetV2CommentsCommentIdNotFoundError";
  }
}

/**
 * Not Found
 */
export type DeleteV2CommentsCommentIdNotFoundErrorData = {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;
  message: string;
};

/**
 * Not Found
 */
export class DeleteV2CommentsCommentIdNotFoundError extends Error {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;

  /** The original data that was passed to this error instance. */
  data$: DeleteV2CommentsCommentIdNotFoundErrorData;

  constructor(err: DeleteV2CommentsCommentIdNotFoundErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "DeleteV2CommentsCommentIdNotFoundError";
  }
}

/**
 * Bad Request
 */
export type PostV2WebhooksValidationTypeErrorData = {
  statusCode: number;
  type: BadRequestType;
  code: CodeValidationType;
  message: string;
};

/**
 * Bad Request
 */
export class PostV2WebhooksValidationTypeError extends Error {
  statusCode: number;
  type: BadRequestType;
  code: CodeValidationType;

  /** The original data that was passed to this error instance. */
  data$: PostV2WebhooksValidationTypeErrorData;

  constructor(err: PostV2WebhooksValidationTypeErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "PostV2WebhooksValidationTypeError";
  }
}

/**
 * Not Found
 */
export type GetV2WebhooksWebhookIdNotFoundErrorData = {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;
  message: string;
};

/**
 * Not Found
 */
export class GetV2WebhooksWebhookIdNotFoundError extends Error {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;

  /** The original data that was passed to this error instance. */
  data$: GetV2WebhooksWebhookIdNotFoundErrorData;

  constructor(err: GetV2WebhooksWebhookIdNotFoundErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "GetV2WebhooksWebhookIdNotFoundError";
  }
}

/**
 * Not Found
 */
export type DeleteV2WebhooksWebhookIdNotFoundErrorData = {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;
  message: string;
};

/**
 * Not Found
 */
export class DeleteV2WebhooksWebhookIdNotFoundError extends Error {
  statusCode: number;
  type: NotFoundType;
  code: NotFoundCode;

  /** The original data that was passed to this error instance. */
  data$: DeleteV2WebhooksWebhookIdNotFoundErrorData;

  constructor(err: DeleteV2WebhooksWebhookIdNotFoundErrorData) {
    const message = "message" in err && typeof err.message === "string"
      ? err.message
      : `API error occurred: ${JSON.stringify(err)}`;
    super(message);
    this.data$ = err;

    this.statusCode = err.statusCode;
    this.type = err.type;
    this.code = err.code;

    this.name = "DeleteV2WebhooksWebhookIdNotFoundError";
  }
}

/** @internal */
export const NotFoundType$inboundSchema: z.ZodNativeEnum<typeof NotFoundType> =
  z.nativeEnum(NotFoundType);

/** @internal */
export const NotFoundType$outboundSchema: z.ZodNativeEnum<typeof NotFoundType> =
  NotFoundType$inboundSchema;

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

/** @internal */
export const NotFoundCode$inboundSchema: z.ZodNativeEnum<typeof NotFoundCode> =
  z.nativeEnum(NotFoundCode);

/** @internal */
export const NotFoundCode$outboundSchema: z.ZodNativeEnum<typeof NotFoundCode> =
  NotFoundCode$inboundSchema;

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

/** @internal */
export const GetV2ObjectsObjectNotFoundError$inboundSchema: z.ZodType<
  GetV2ObjectsObjectNotFoundError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: NotFoundType$inboundSchema,
  code: NotFoundCode$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new GetV2ObjectsObjectNotFoundError(remapped);
  });

/** @internal */
export type GetV2ObjectsObjectNotFoundError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const GetV2ObjectsObjectNotFoundError$outboundSchema: z.ZodType<
  GetV2ObjectsObjectNotFoundError$Outbound,
  z.ZodTypeDef,
  GetV2ObjectsObjectNotFoundError
> = z.instanceof(GetV2ObjectsObjectNotFoundError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: NotFoundType$outboundSchema,
      code: NotFoundCode$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const ConflictType$inboundSchema: z.ZodNativeEnum<typeof ConflictType> =
  z.nativeEnum(ConflictType);

/** @internal */
export const ConflictType$outboundSchema: z.ZodNativeEnum<typeof ConflictType> =
  ConflictType$inboundSchema;

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

/** @internal */
export const ConflictCode$inboundSchema: z.ZodNativeEnum<typeof ConflictCode> =
  z.nativeEnum(ConflictCode);

/** @internal */
export const ConflictCode$outboundSchema: z.ZodNativeEnum<typeof ConflictCode> =
  ConflictCode$inboundSchema;

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

/** @internal */
export const PostV2ObjectsSlugConflictError$inboundSchema: z.ZodType<
  PostV2ObjectsSlugConflictError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: ConflictType$inboundSchema,
  code: ConflictCode$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new PostV2ObjectsSlugConflictError(remapped);
  });

/** @internal */
export type PostV2ObjectsSlugConflictError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const PostV2ObjectsSlugConflictError$outboundSchema: z.ZodType<
  PostV2ObjectsSlugConflictError$Outbound,
  z.ZodTypeDef,
  PostV2ObjectsSlugConflictError
> = z.instanceof(PostV2ObjectsSlugConflictError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: ConflictType$outboundSchema,
      code: ConflictCode$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const PatchV2ObjectsObjectSlugConflictError$inboundSchema: z.ZodType<
  PatchV2ObjectsObjectSlugConflictError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: ConflictType$inboundSchema,
  code: ConflictCode$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new PatchV2ObjectsObjectSlugConflictError(remapped);
  });

/** @internal */
export type PatchV2ObjectsObjectSlugConflictError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const PatchV2ObjectsObjectSlugConflictError$outboundSchema: z.ZodType<
  PatchV2ObjectsObjectSlugConflictError$Outbound,
  z.ZodTypeDef,
  PatchV2ObjectsObjectSlugConflictError
> = z.instanceof(PatchV2ObjectsObjectSlugConflictError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: ConflictType$outboundSchema,
      code: ConflictCode$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const BadRequestType$inboundSchema: z.ZodNativeEnum<
  typeof BadRequestType
> = z.nativeEnum(BadRequestType);

/** @internal */
export const BadRequestType$outboundSchema: z.ZodNativeEnum<
  typeof BadRequestType
> = BadRequestType$inboundSchema;

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

/** @internal */
export const CodeValidationType$inboundSchema: z.ZodNativeEnum<
  typeof CodeValidationType
> = z.nativeEnum(CodeValidationType);

/** @internal */
export const CodeValidationType$outboundSchema: z.ZodNativeEnum<
  typeof CodeValidationType
> = CodeValidationType$inboundSchema;

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

/** @internal */
export const PatchV2ObjectsObjectValidationTypeError$inboundSchema: z.ZodType<
  PatchV2ObjectsObjectValidationTypeError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: BadRequestType$inboundSchema,
  code: CodeValidationType$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new PatchV2ObjectsObjectValidationTypeError(remapped);
  });

/** @internal */
export type PatchV2ObjectsObjectValidationTypeError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const PatchV2ObjectsObjectValidationTypeError$outboundSchema: z.ZodType<
  PatchV2ObjectsObjectValidationTypeError$Outbound,
  z.ZodTypeDef,
  PatchV2ObjectsObjectValidationTypeError
> = z.instanceof(PatchV2ObjectsObjectValidationTypeError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: BadRequestType$outboundSchema,
      code: CodeValidationType$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const PostV2TargetIdentifierAttributesSlugConflictError$inboundSchema:
  z.ZodType<
    PostV2TargetIdentifierAttributesSlugConflictError,
    z.ZodTypeDef,
    unknown
  > = z.object({
    status_code: z.number(),
    type: ConflictType$inboundSchema,
    code: ConflictCode$inboundSchema,
    message: z.string(),
  })
    .transform((v) => {
      const remapped = remap$(v, {
        "status_code": "statusCode",
      });

      return new PostV2TargetIdentifierAttributesSlugConflictError(remapped);
    });

/** @internal */
export type PostV2TargetIdentifierAttributesSlugConflictError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const PostV2TargetIdentifierAttributesSlugConflictError$outboundSchema:
  z.ZodType<
    PostV2TargetIdentifierAttributesSlugConflictError$Outbound,
    z.ZodTypeDef,
    PostV2TargetIdentifierAttributesSlugConflictError
  > = z.instanceof(PostV2TargetIdentifierAttributesSlugConflictError)
    .transform(v => v.data$)
    .pipe(
      z.object({
        statusCode: z.number(),
        type: ConflictType$outboundSchema,
        code: ConflictCode$outboundSchema,
        message: z.string(),
      }).transform((v) => {
        return remap$(v, {
          statusCode: "status_code",
        });
      }),
    );

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

/** @internal */
export const PostV2TargetIdentifierAttributesNotFoundError$inboundSchema:
  z.ZodType<
    PostV2TargetIdentifierAttributesNotFoundError,
    z.ZodTypeDef,
    unknown
  > = z.object({
    status_code: z.number(),
    type: NotFoundType$inboundSchema,
    code: NotFoundCode$inboundSchema,
    message: z.string(),
  })
    .transform((v) => {
      const remapped = remap$(v, {
        "status_code": "statusCode",
      });

      return new PostV2TargetIdentifierAttributesNotFoundError(remapped);
    });

/** @internal */
export type PostV2TargetIdentifierAttributesNotFoundError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const PostV2TargetIdentifierAttributesNotFoundError$outboundSchema:
  z.ZodType<
    PostV2TargetIdentifierAttributesNotFoundError$Outbound,
    z.ZodTypeDef,
    PostV2TargetIdentifierAttributesNotFoundError
  > = z.instanceof(PostV2TargetIdentifierAttributesNotFoundError)
    .transform(v => v.data$)
    .pipe(
      z.object({
        statusCode: z.number(),
        type: NotFoundType$outboundSchema,
        code: NotFoundCode$outboundSchema,
        message: z.string(),
      }).transform((v) => {
        return remap$(v, {
          statusCode: "status_code",
        });
      }),
    );

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

/** @internal */
export const PostV2TargetIdentifierAttributesValidationTypeError$inboundSchema:
  z.ZodType<
    PostV2TargetIdentifierAttributesValidationTypeError,
    z.ZodTypeDef,
    unknown
  > = z.object({
    status_code: z.number(),
    type: BadRequestType$inboundSchema,
    code: CodeValidationType$inboundSchema,
    message: z.string(),
  })
    .transform((v) => {
      const remapped = remap$(v, {
        "status_code": "statusCode",
      });

      return new PostV2TargetIdentifierAttributesValidationTypeError(remapped);
    });

/** @internal */
export type PostV2TargetIdentifierAttributesValidationTypeError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const PostV2TargetIdentifierAttributesValidationTypeError$outboundSchema:
  z.ZodType<
    PostV2TargetIdentifierAttributesValidationTypeError$Outbound,
    z.ZodTypeDef,
    PostV2TargetIdentifierAttributesValidationTypeError
  > = z.instanceof(PostV2TargetIdentifierAttributesValidationTypeError)
    .transform(v => v.data$)
    .pipe(
      z.object({
        statusCode: z.number(),
        type: BadRequestType$outboundSchema,
        code: CodeValidationType$outboundSchema,
        message: z.string(),
      }).transform((v) => {
        return remap$(v, {
          statusCode: "status_code",
        });
      }),
    );

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

/** @internal */
export const GetV2TargetIdentifierAttributesAttributeNotFoundError$inboundSchema:
  z.ZodType<
    GetV2TargetIdentifierAttributesAttributeNotFoundError,
    z.ZodTypeDef,
    unknown
  > = z.object({
    status_code: z.number(),
    type: NotFoundType$inboundSchema,
    code: NotFoundCode$inboundSchema,
    message: z.string(),
  })
    .transform((v) => {
      const remapped = remap$(v, {
        "status_code": "statusCode",
      });

      return new GetV2TargetIdentifierAttributesAttributeNotFoundError(
        remapped,
      );
    });

/** @internal */
export type GetV2TargetIdentifierAttributesAttributeNotFoundError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const GetV2TargetIdentifierAttributesAttributeNotFoundError$outboundSchema:
  z.ZodType<
    GetV2TargetIdentifierAttributesAttributeNotFoundError$Outbound,
    z.ZodTypeDef,
    GetV2TargetIdentifierAttributesAttributeNotFoundError
  > = z.instanceof(GetV2TargetIdentifierAttributesAttributeNotFoundError)
    .transform(v => v.data$)
    .pipe(
      z.object({
        statusCode: z.number(),
        type: NotFoundType$outboundSchema,
        code: NotFoundCode$outboundSchema,
        message: z.string(),
      }).transform((v) => {
        return remap$(v, {
          statusCode: "status_code",
        });
      }),
    );

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

/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeCode$inboundSchema:
  z.ZodNativeEnum<typeof PatchV2TargetIdentifierAttributesAttributeCode> = z
    .nativeEnum(PatchV2TargetIdentifierAttributesAttributeCode);

/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeCode$outboundSchema:
  z.ZodNativeEnum<typeof PatchV2TargetIdentifierAttributesAttributeCode> =
    PatchV2TargetIdentifierAttributesAttributeCode$inboundSchema;

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

/** @internal */
export const SystemEditUnauthorizedError$inboundSchema: z.ZodType<
  SystemEditUnauthorizedError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: BadRequestType$inboundSchema,
  code: PatchV2TargetIdentifierAttributesAttributeCode$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new SystemEditUnauthorizedError(remapped);
  });

/** @internal */
export type SystemEditUnauthorizedError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const SystemEditUnauthorizedError$outboundSchema: z.ZodType<
  SystemEditUnauthorizedError$Outbound,
  z.ZodTypeDef,
  SystemEditUnauthorizedError
> = z.instanceof(SystemEditUnauthorizedError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: BadRequestType$outboundSchema,
      code: PatchV2TargetIdentifierAttributesAttributeCode$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError$inboundSchema:
  z.ZodType<
    PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError,
    z.ZodTypeDef,
    unknown
  > = z.object({
    status_code: z.number(),
    type: ConflictType$inboundSchema,
    code: ConflictCode$inboundSchema,
    message: z.string(),
  })
    .transform((v) => {
      const remapped = remap$(v, {
        "status_code": "statusCode",
      });

      return new PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError(
        remapped,
      );
    });

/** @internal */
export type PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError$Outbound =
  {
    status_code: number;
    type: string;
    code: string;
    message: string;
  };

/** @internal */
export const PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError$outboundSchema:
  z.ZodType<
    PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError$Outbound,
    z.ZodTypeDef,
    PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError
  > = z.instanceof(
    PostV2TargetIdentifierAttributesAttributeOptionsSlugConflictError,
  )
    .transform(v => v.data$)
    .pipe(
      z.object({
        statusCode: z.number(),
        type: ConflictType$outboundSchema,
        code: ConflictCode$outboundSchema,
        message: z.string(),
      }).transform((v) => {
        return remap$(v, {
          statusCode: "status_code",
        });
      }),
    );

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

/** @internal */
export const PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError$inboundSchema:
  z.ZodType<
    PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError,
    z.ZodTypeDef,
    unknown
  > = z.object({
    status_code: z.number(),
    type: BadRequestType$inboundSchema,
    code: CodeValidationType$inboundSchema,
    message: z.string(),
  })
    .transform((v) => {
      const remapped = remap$(v, {
        "status_code": "statusCode",
      });

      return new PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError(
        remapped,
      );
    });

/** @internal */
export type PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError$Outbound =
  {
    status_code: number;
    type: string;
    code: string;
    message: string;
  };

/** @internal */
export const PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError$outboundSchema:
  z.ZodType<
    PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError$Outbound,
    z.ZodTypeDef,
    PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError
  > = z.instanceof(
    PostV2TargetIdentifierAttributesAttributeOptionsValidationTypeError,
  )
    .transform(v => v.data$)
    .pipe(
      z.object({
        statusCode: z.number(),
        type: BadRequestType$outboundSchema,
        code: CodeValidationType$outboundSchema,
        message: z.string(),
      }).transform((v) => {
        return remap$(v, {
          statusCode: "status_code",
        });
      }),
    );

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

/** @internal */
export const BadRequestCode$inboundSchema: z.ZodNativeEnum<
  typeof BadRequestCode
> = z.nativeEnum(BadRequestCode);

/** @internal */
export const BadRequestCode$outboundSchema: z.ZodNativeEnum<
  typeof BadRequestCode
> = BadRequestCode$inboundSchema;

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

/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError$inboundSchema:
  z.ZodType<
    PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError,
    z.ZodTypeDef,
    unknown
  > = z.object({
    status_code: z.number(),
    type: BadRequestType$inboundSchema,
    code: BadRequestCode$inboundSchema,
    message: z.string(),
  })
    .transform((v) => {
      const remapped = remap$(v, {
        "status_code": "statusCode",
      });

      return new PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError(
        remapped,
      );
    });

/** @internal */
export type PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError$Outbound =
  {
    status_code: number;
    type: string;
    code: string;
    message: string;
  };

/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError$outboundSchema:
  z.ZodType<
    PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError$Outbound,
    z.ZodTypeDef,
    PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError
  > = z.instanceof(
    PatchV2TargetIdentifierAttributesAttributeOptionsOptionInvalidRequestError,
  )
    .transform(v => v.data$)
    .pipe(
      z.object({
        statusCode: z.number(),
        type: BadRequestType$outboundSchema,
        code: BadRequestCode$outboundSchema,
        message: z.string(),
      }).transform((v) => {
        return remap$(v, {
          statusCode: "status_code",
        });
      }),
    );

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

/** @internal */
export const PostV2TargetIdentifierAttributesAttributeStatusesSlugConflictError$inboundSchema:
  z.ZodType<
    PostV2TargetIdentifierAttributesAttributeStatusesSlugConflictError,
    z.ZodTypeDef,
    unknown
  > = z.object({
    status_code: z.number(),
    type: ConflictType$inboundSchema,
    code: ConflictCode$inboundSchema,
    message: z.string(),
  })
    .transform((v) => {
      const remapped = remap$(v, {
        "status_code": "statusCode",
      });

      return new PostV2TargetIdentifierAttributesAttributeStatusesSlugConflictError(
        remapped,
      );
    });

/** @internal */
export type PostV2TargetIdentifierAttributesAttributeStatusesSlugConflictError$Outbound =
  {
    status_code: number;
    type: string;
    code: string;
    message: string;
  };

/** @internal */
export const PostV2TargetIdentifierAttributesAttributeStatusesSlugConflictError$outboundSchema:
  z.ZodType<
    PostV2TargetIdentifierAttributesAttributeStatusesSlugConflictError$Outbound,
    z.ZodTypeDef,
    PostV2TargetIdentifierAttributesAttributeStatusesSlugConflictError
  > = z.instanceof(
    PostV2TargetIdentifierAttributesAttributeStatusesSlugConflictError,
  )
    .transform(v => v.data$)
    .pipe(
      z.object({
        statusCode: z.number(),
        type: ConflictType$outboundSchema,
        code: ConflictCode$outboundSchema,
        message: z.string(),
      }).transform((v) => {
        return remap$(v, {
          statusCode: "status_code",
        });
      }),
    );

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

/** @internal */
export const PostV2TargetIdentifierAttributesAttributeStatusesValidationTypeError$inboundSchema:
  z.ZodType<
    PostV2TargetIdentifierAttributesAttributeStatusesValidationTypeError,
    z.ZodTypeDef,
    unknown
  > = z.object({
    status_code: z.number(),
    type: BadRequestType$inboundSchema,
    code: CodeValidationType$inboundSchema,
    message: z.string(),
  })
    .transform((v) => {
      const remapped = remap$(v, {
        "status_code": "statusCode",
      });

      return new PostV2TargetIdentifierAttributesAttributeStatusesValidationTypeError(
        remapped,
      );
    });

/** @internal */
export type PostV2TargetIdentifierAttributesAttributeStatusesValidationTypeError$Outbound =
  {
    status_code: number;
    type: string;
    code: string;
    message: string;
  };

/** @internal */
export const PostV2TargetIdentifierAttributesAttributeStatusesValidationTypeError$outboundSchema:
  z.ZodType<
    PostV2TargetIdentifierAttributesAttributeStatusesValidationTypeError$Outbound,
    z.ZodTypeDef,
    PostV2TargetIdentifierAttributesAttributeStatusesValidationTypeError
  > = z.instanceof(
    PostV2TargetIdentifierAttributesAttributeStatusesValidationTypeError,
  )
    .transform(v => v.data$)
    .pipe(
      z.object({
        statusCode: z.number(),
        type: BadRequestType$outboundSchema,
        code: CodeValidationType$outboundSchema,
        message: z.string(),
      }).transform((v) => {
        return remap$(v, {
          statusCode: "status_code",
        });
      }),
    );

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

/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeStatusesStatusInvalidRequestError$inboundSchema:
  z.ZodType<
    PatchV2TargetIdentifierAttributesAttributeStatusesStatusInvalidRequestError,
    z.ZodTypeDef,
    unknown
  > = z.object({
    status_code: z.number(),
    type: BadRequestType$inboundSchema,
    code: BadRequestCode$inboundSchema,
    message: z.string(),
  })
    .transform((v) => {
      const remapped = remap$(v, {
        "status_code": "statusCode",
      });

      return new PatchV2TargetIdentifierAttributesAttributeStatusesStatusInvalidRequestError(
        remapped,
      );
    });

/** @internal */
export type PatchV2TargetIdentifierAttributesAttributeStatusesStatusInvalidRequestError$Outbound =
  {
    status_code: number;
    type: string;
    code: string;
    message: string;
  };

/** @internal */
export const PatchV2TargetIdentifierAttributesAttributeStatusesStatusInvalidRequestError$outboundSchema:
  z.ZodType<
    PatchV2TargetIdentifierAttributesAttributeStatusesStatusInvalidRequestError$Outbound,
    z.ZodTypeDef,
    PatchV2TargetIdentifierAttributesAttributeStatusesStatusInvalidRequestError
  > = z.instanceof(
    PatchV2TargetIdentifierAttributesAttributeStatusesStatusInvalidRequestError,
  )
    .transform(v => v.data$)
    .pipe(
      z.object({
        statusCode: z.number(),
        type: BadRequestType$outboundSchema,
        code: BadRequestCode$outboundSchema,
        message: z.string(),
      }).transform((v) => {
        return remap$(v, {
          statusCode: "status_code",
        });
      }),
    );

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

/** @internal */
export const PostV2ObjectsObjectRecordsQueryNotFoundError$inboundSchema:
  z.ZodType<
    PostV2ObjectsObjectRecordsQueryNotFoundError,
    z.ZodTypeDef,
    unknown
  > = z.object({
    status_code: z.number(),
    type: NotFoundType$inboundSchema,
    code: NotFoundCode$inboundSchema,
    message: z.string(),
  })
    .transform((v) => {
      const remapped = remap$(v, {
        "status_code": "statusCode",
      });

      return new PostV2ObjectsObjectRecordsQueryNotFoundError(remapped);
    });

/** @internal */
export type PostV2ObjectsObjectRecordsQueryNotFoundError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const PostV2ObjectsObjectRecordsQueryNotFoundError$outboundSchema:
  z.ZodType<
    PostV2ObjectsObjectRecordsQueryNotFoundError$Outbound,
    z.ZodTypeDef,
    PostV2ObjectsObjectRecordsQueryNotFoundError
  > = z.instanceof(PostV2ObjectsObjectRecordsQueryNotFoundError)
    .transform(v => v.data$)
    .pipe(
      z.object({
        statusCode: z.number(),
        type: NotFoundType$outboundSchema,
        code: NotFoundCode$outboundSchema,
        message: z.string(),
      }).transform((v) => {
        return remap$(v, {
          statusCode: "status_code",
        });
      }),
    );

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

/** @internal */
export const PostV2ObjectsObjectRecordsQueryCode$inboundSchema: z.ZodNativeEnum<
  typeof PostV2ObjectsObjectRecordsQueryCode
> = z.nativeEnum(PostV2ObjectsObjectRecordsQueryCode);

/** @internal */
export const PostV2ObjectsObjectRecordsQueryCode$outboundSchema:
  z.ZodNativeEnum<typeof PostV2ObjectsObjectRecordsQueryCode> =
    PostV2ObjectsObjectRecordsQueryCode$inboundSchema;

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

/** @internal */
export const FilterError$inboundSchema: z.ZodType<
  FilterError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: BadRequestType$inboundSchema,
  code: PostV2ObjectsObjectRecordsQueryCode$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new FilterError(remapped);
  });

/** @internal */
export type FilterError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const FilterError$outboundSchema: z.ZodType<
  FilterError$Outbound,
  z.ZodTypeDef,
  FilterError
> = z.instanceof(FilterError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: BadRequestType$outboundSchema,
      code: PostV2ObjectsObjectRecordsQueryCode$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const PostV2ObjectsObjectRecordsInvalidRequestError$inboundSchema:
  z.ZodType<
    PostV2ObjectsObjectRecordsInvalidRequestError,
    z.ZodTypeDef,
    unknown
  > = z.object({
    status_code: z.number(),
    type: BadRequestType$inboundSchema,
    code: BadRequestCode$inboundSchema,
    message: z.string(),
  })
    .transform((v) => {
      const remapped = remap$(v, {
        "status_code": "statusCode",
      });

      return new PostV2ObjectsObjectRecordsInvalidRequestError(remapped);
    });

/** @internal */
export type PostV2ObjectsObjectRecordsInvalidRequestError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const PostV2ObjectsObjectRecordsInvalidRequestError$outboundSchema:
  z.ZodType<
    PostV2ObjectsObjectRecordsInvalidRequestError$Outbound,
    z.ZodTypeDef,
    PostV2ObjectsObjectRecordsInvalidRequestError
  > = z.instanceof(PostV2ObjectsObjectRecordsInvalidRequestError)
    .transform(v => v.data$)
    .pipe(
      z.object({
        statusCode: z.number(),
        type: BadRequestType$outboundSchema,
        code: BadRequestCode$outboundSchema,
        message: z.string(),
      }).transform((v) => {
        return remap$(v, {
          statusCode: "status_code",
        });
      }),
    );

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

/** @internal */
export const PutV2ObjectsObjectRecordsInvalidRequestError$inboundSchema:
  z.ZodType<
    PutV2ObjectsObjectRecordsInvalidRequestError,
    z.ZodTypeDef,
    unknown
  > = z.object({
    status_code: z.number(),
    type: BadRequestType$inboundSchema,
    code: BadRequestCode$inboundSchema,
    message: z.string(),
  })
    .transform((v) => {
      const remapped = remap$(v, {
        "status_code": "statusCode",
      });

      return new PutV2ObjectsObjectRecordsInvalidRequestError(remapped);
    });

/** @internal */
export type PutV2ObjectsObjectRecordsInvalidRequestError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const PutV2ObjectsObjectRecordsInvalidRequestError$outboundSchema:
  z.ZodType<
    PutV2ObjectsObjectRecordsInvalidRequestError$Outbound,
    z.ZodTypeDef,
    PutV2ObjectsObjectRecordsInvalidRequestError
  > = z.instanceof(PutV2ObjectsObjectRecordsInvalidRequestError)
    .transform(v => v.data$)
    .pipe(
      z.object({
        statusCode: z.number(),
        type: BadRequestType$outboundSchema,
        code: BadRequestCode$outboundSchema,
        message: z.string(),
      }).transform((v) => {
        return remap$(v, {
          statusCode: "status_code",
        });
      }),
    );

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

/** @internal */
export const GetV2ObjectsObjectRecordsRecordIdInvalidRequestError$inboundSchema:
  z.ZodType<
    GetV2ObjectsObjectRecordsRecordIdInvalidRequestError,
    z.ZodTypeDef,
    unknown
  > = z.object({
    status_code: z.number(),
    type: NotFoundType$inboundSchema,
    code: NotFoundCode$inboundSchema,
    message: z.string(),
  })
    .transform((v) => {
      const remapped = remap$(v, {
        "status_code": "statusCode",
      });

      return new GetV2ObjectsObjectRecordsRecordIdInvalidRequestError(remapped);
    });

/** @internal */
export type GetV2ObjectsObjectRecordsRecordIdInvalidRequestError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const GetV2ObjectsObjectRecordsRecordIdInvalidRequestError$outboundSchema:
  z.ZodType<
    GetV2ObjectsObjectRecordsRecordIdInvalidRequestError$Outbound,
    z.ZodTypeDef,
    GetV2ObjectsObjectRecordsRecordIdInvalidRequestError
  > = z.instanceof(GetV2ObjectsObjectRecordsRecordIdInvalidRequestError)
    .transform(v => v.data$)
    .pipe(
      z.object({
        statusCode: z.number(),
        type: NotFoundType$outboundSchema,
        code: NotFoundCode$outboundSchema,
        message: z.string(),
      }).transform((v) => {
        return remap$(v, {
          statusCode: "status_code",
        });
      }),
    );

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

/** @internal */
export const CodeMissingValue$inboundSchema: z.ZodNativeEnum<
  typeof CodeMissingValue
> = z.nativeEnum(CodeMissingValue);

/** @internal */
export const CodeMissingValue$outboundSchema: z.ZodNativeEnum<
  typeof CodeMissingValue
> = CodeMissingValue$inboundSchema;

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

/** @internal */
export const MissingValueError$inboundSchema: z.ZodType<
  MissingValueError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: BadRequestType$inboundSchema,
  code: CodeMissingValue$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new MissingValueError(remapped);
  });

/** @internal */
export type MissingValueError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const MissingValueError$outboundSchema: z.ZodType<
  MissingValueError$Outbound,
  z.ZodTypeDef,
  MissingValueError
> = z.instanceof(MissingValueError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: BadRequestType$outboundSchema,
      code: CodeMissingValue$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const GetV2ObjectsObjectRecordsRecordIdAttributesAttributeValuesValidationTypeError$inboundSchema:
  z.ZodType<
    GetV2ObjectsObjectRecordsRecordIdAttributesAttributeValuesValidationTypeError,
    z.ZodTypeDef,
    unknown
  > = z.object({
    status_code: z.number(),
    type: BadRequestType$inboundSchema,
    code: CodeValidationType$inboundSchema,
    message: z.string(),
  })
    .transform((v) => {
      const remapped = remap$(v, {
        "status_code": "statusCode",
      });

      return new GetV2ObjectsObjectRecordsRecordIdAttributesAttributeValuesValidationTypeError(
        remapped,
      );
    });

/** @internal */
export type GetV2ObjectsObjectRecordsRecordIdAttributesAttributeValuesValidationTypeError$Outbound =
  {
    status_code: number;
    type: string;
    code: string;
    message: string;
  };

/** @internal */
export const GetV2ObjectsObjectRecordsRecordIdAttributesAttributeValuesValidationTypeError$outboundSchema:
  z.ZodType<
    GetV2ObjectsObjectRecordsRecordIdAttributesAttributeValuesValidationTypeError$Outbound,
    z.ZodTypeDef,
    GetV2ObjectsObjectRecordsRecordIdAttributesAttributeValuesValidationTypeError
  > = z.instanceof(
    GetV2ObjectsObjectRecordsRecordIdAttributesAttributeValuesValidationTypeError,
  )
    .transform(v => v.data$)
    .pipe(
      z.object({
        statusCode: z.number(),
        type: BadRequestType$outboundSchema,
        code: CodeValidationType$outboundSchema,
        message: z.string(),
      }).transform((v) => {
        return remap$(v, {
          statusCode: "status_code",
        });
      }),
    );

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

/** @internal */
export const PostV2ListsNotFoundError$inboundSchema: z.ZodType<
  PostV2ListsNotFoundError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: NotFoundType$inboundSchema,
  code: NotFoundCode$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new PostV2ListsNotFoundError(remapped);
  });

/** @internal */
export type PostV2ListsNotFoundError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const PostV2ListsNotFoundError$outboundSchema: z.ZodType<
  PostV2ListsNotFoundError$Outbound,
  z.ZodTypeDef,
  PostV2ListsNotFoundError
> = z.instanceof(PostV2ListsNotFoundError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: NotFoundType$outboundSchema,
      code: NotFoundCode$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const PostV2ListsType$inboundSchema: z.ZodNativeEnum<
  typeof PostV2ListsType
> = z.nativeEnum(PostV2ListsType);

/** @internal */
export const PostV2ListsType$outboundSchema: z.ZodNativeEnum<
  typeof PostV2ListsType
> = PostV2ListsType$inboundSchema;

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

/** @internal */
export const PostV2ListsCode$inboundSchema: z.ZodNativeEnum<
  typeof PostV2ListsCode
> = z.nativeEnum(PostV2ListsCode);

/** @internal */
export const PostV2ListsCode$outboundSchema: z.ZodNativeEnum<
  typeof PostV2ListsCode
> = PostV2ListsCode$inboundSchema;

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

/** @internal */
export const BillingError$inboundSchema: z.ZodType<
  BillingError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: PostV2ListsType$inboundSchema,
  code: PostV2ListsCode$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new BillingError(remapped);
  });

/** @internal */
export type BillingError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const BillingError$outboundSchema: z.ZodType<
  BillingError$Outbound,
  z.ZodTypeDef,
  BillingError
> = z.instanceof(BillingError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: PostV2ListsType$outboundSchema,
      code: PostV2ListsCode$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const PostV2ListsInvalidRequestError$inboundSchema: z.ZodType<
  PostV2ListsInvalidRequestError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: BadRequestType$inboundSchema,
  code: BadRequestCode$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new PostV2ListsInvalidRequestError(remapped);
  });

/** @internal */
export type PostV2ListsInvalidRequestError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const PostV2ListsInvalidRequestError$outboundSchema: z.ZodType<
  PostV2ListsInvalidRequestError$Outbound,
  z.ZodTypeDef,
  PostV2ListsInvalidRequestError
> = z.instanceof(PostV2ListsInvalidRequestError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: BadRequestType$outboundSchema,
      code: BadRequestCode$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const GetV2ListsListNotFoundError$inboundSchema: z.ZodType<
  GetV2ListsListNotFoundError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: NotFoundType$inboundSchema,
  code: NotFoundCode$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new GetV2ListsListNotFoundError(remapped);
  });

/** @internal */
export type GetV2ListsListNotFoundError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const GetV2ListsListNotFoundError$outboundSchema: z.ZodType<
  GetV2ListsListNotFoundError$Outbound,
  z.ZodTypeDef,
  GetV2ListsListNotFoundError
> = z.instanceof(GetV2ListsListNotFoundError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: NotFoundType$outboundSchema,
      code: NotFoundCode$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const PostV2ListsListEntriesNotFoundError$inboundSchema: z.ZodType<
  PostV2ListsListEntriesNotFoundError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: NotFoundType$inboundSchema,
  code: NotFoundCode$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new PostV2ListsListEntriesNotFoundError(remapped);
  });

/** @internal */
export type PostV2ListsListEntriesNotFoundError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const PostV2ListsListEntriesNotFoundError$outboundSchema: z.ZodType<
  PostV2ListsListEntriesNotFoundError$Outbound,
  z.ZodTypeDef,
  PostV2ListsListEntriesNotFoundError
> = z.instanceof(PostV2ListsListEntriesNotFoundError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: NotFoundType$outboundSchema,
      code: NotFoundCode$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const PostV2ListsListEntriesInvalidRequestError$inboundSchema: z.ZodType<
  PostV2ListsListEntriesInvalidRequestError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: BadRequestType$inboundSchema,
  code: BadRequestCode$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new PostV2ListsListEntriesInvalidRequestError(remapped);
  });

/** @internal */
export type PostV2ListsListEntriesInvalidRequestError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const PostV2ListsListEntriesInvalidRequestError$outboundSchema:
  z.ZodType<
    PostV2ListsListEntriesInvalidRequestError$Outbound,
    z.ZodTypeDef,
    PostV2ListsListEntriesInvalidRequestError
  > = z.instanceof(PostV2ListsListEntriesInvalidRequestError)
    .transform(v => v.data$)
    .pipe(
      z.object({
        statusCode: z.number(),
        type: BadRequestType$outboundSchema,
        code: BadRequestCode$outboundSchema,
        message: z.string(),
      }).transform((v) => {
        return remap$(v, {
          statusCode: "status_code",
        });
      }),
    );

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

/** @internal */
export const PutV2ListsListEntriesNotFoundError$inboundSchema: z.ZodType<
  PutV2ListsListEntriesNotFoundError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: NotFoundType$inboundSchema,
  code: NotFoundCode$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new PutV2ListsListEntriesNotFoundError(remapped);
  });

/** @internal */
export type PutV2ListsListEntriesNotFoundError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const PutV2ListsListEntriesNotFoundError$outboundSchema: z.ZodType<
  PutV2ListsListEntriesNotFoundError$Outbound,
  z.ZodTypeDef,
  PutV2ListsListEntriesNotFoundError
> = z.instanceof(PutV2ListsListEntriesNotFoundError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: NotFoundType$outboundSchema,
      code: NotFoundCode$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const PutV2ListsListEntriesCode$inboundSchema: z.ZodNativeEnum<
  typeof PutV2ListsListEntriesCode
> = z.nativeEnum(PutV2ListsListEntriesCode);

/** @internal */
export const PutV2ListsListEntriesCode$outboundSchema: z.ZodNativeEnum<
  typeof PutV2ListsListEntriesCode
> = PutV2ListsListEntriesCode$inboundSchema;

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

/** @internal */
export const MultipleMatchResultsError$inboundSchema: z.ZodType<
  MultipleMatchResultsError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: BadRequestType$inboundSchema,
  code: PutV2ListsListEntriesCode$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new MultipleMatchResultsError(remapped);
  });

/** @internal */
export type MultipleMatchResultsError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const MultipleMatchResultsError$outboundSchema: z.ZodType<
  MultipleMatchResultsError$Outbound,
  z.ZodTypeDef,
  MultipleMatchResultsError
> = z.instanceof(MultipleMatchResultsError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: BadRequestType$outboundSchema,
      code: PutV2ListsListEntriesCode$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const CodeImmutableValue$inboundSchema: z.ZodNativeEnum<
  typeof CodeImmutableValue
> = z.nativeEnum(CodeImmutableValue);

/** @internal */
export const CodeImmutableValue$outboundSchema: z.ZodNativeEnum<
  typeof CodeImmutableValue
> = CodeImmutableValue$inboundSchema;

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

/** @internal */
export const ImmutableValueError$inboundSchema: z.ZodType<
  ImmutableValueError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: BadRequestType$inboundSchema,
  code: CodeImmutableValue$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new ImmutableValueError(remapped);
  });

/** @internal */
export type ImmutableValueError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const ImmutableValueError$outboundSchema: z.ZodType<
  ImmutableValueError$Outbound,
  z.ZodTypeDef,
  ImmutableValueError
> = z.instanceof(ImmutableValueError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: BadRequestType$outboundSchema,
      code: CodeImmutableValue$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const GetV2WorkspaceMembersWorkspaceMemberIdInvalidRequestError$inboundSchema:
  z.ZodType<
    GetV2WorkspaceMembersWorkspaceMemberIdInvalidRequestError,
    z.ZodTypeDef,
    unknown
  > = z.object({
    status_code: z.number(),
    type: NotFoundType$inboundSchema,
    code: NotFoundCode$inboundSchema,
    message: z.string(),
  })
    .transform((v) => {
      const remapped = remap$(v, {
        "status_code": "statusCode",
      });

      return new GetV2WorkspaceMembersWorkspaceMemberIdInvalidRequestError(
        remapped,
      );
    });

/** @internal */
export type GetV2WorkspaceMembersWorkspaceMemberIdInvalidRequestError$Outbound =
  {
    status_code: number;
    type: string;
    code: string;
    message: string;
  };

/** @internal */
export const GetV2WorkspaceMembersWorkspaceMemberIdInvalidRequestError$outboundSchema:
  z.ZodType<
    GetV2WorkspaceMembersWorkspaceMemberIdInvalidRequestError$Outbound,
    z.ZodTypeDef,
    GetV2WorkspaceMembersWorkspaceMemberIdInvalidRequestError
  > = z.instanceof(GetV2WorkspaceMembersWorkspaceMemberIdInvalidRequestError)
    .transform(v => v.data$)
    .pipe(
      z.object({
        statusCode: z.number(),
        type: NotFoundType$outboundSchema,
        code: NotFoundCode$outboundSchema,
        message: z.string(),
      }).transform((v) => {
        return remap$(v, {
          statusCode: "status_code",
        });
      }),
    );

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

/** @internal */
export const GetV2NotesNoteIdNotFoundError$inboundSchema: z.ZodType<
  GetV2NotesNoteIdNotFoundError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: NotFoundType$inboundSchema,
  code: NotFoundCode$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new GetV2NotesNoteIdNotFoundError(remapped);
  });

/** @internal */
export type GetV2NotesNoteIdNotFoundError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const GetV2NotesNoteIdNotFoundError$outboundSchema: z.ZodType<
  GetV2NotesNoteIdNotFoundError$Outbound,
  z.ZodTypeDef,
  GetV2NotesNoteIdNotFoundError
> = z.instanceof(GetV2NotesNoteIdNotFoundError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: NotFoundType$outboundSchema,
      code: NotFoundCode$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const PostV2TasksValidationTypeError$inboundSchema: z.ZodType<
  PostV2TasksValidationTypeError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: BadRequestType$inboundSchema,
  code: CodeValidationType$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new PostV2TasksValidationTypeError(remapped);
  });

/** @internal */
export type PostV2TasksValidationTypeError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const PostV2TasksValidationTypeError$outboundSchema: z.ZodType<
  PostV2TasksValidationTypeError$Outbound,
  z.ZodTypeDef,
  PostV2TasksValidationTypeError
> = z.instanceof(PostV2TasksValidationTypeError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: BadRequestType$outboundSchema,
      code: CodeValidationType$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const GetV2TasksTaskIdNotFoundError$inboundSchema: z.ZodType<
  GetV2TasksTaskIdNotFoundError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: NotFoundType$inboundSchema,
  code: NotFoundCode$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new GetV2TasksTaskIdNotFoundError(remapped);
  });

/** @internal */
export type GetV2TasksTaskIdNotFoundError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const GetV2TasksTaskIdNotFoundError$outboundSchema: z.ZodType<
  GetV2TasksTaskIdNotFoundError$Outbound,
  z.ZodTypeDef,
  GetV2TasksTaskIdNotFoundError
> = z.instanceof(GetV2TasksTaskIdNotFoundError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: NotFoundType$outboundSchema,
      code: NotFoundCode$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const PatchV2TasksTaskIdNotFoundError$inboundSchema: z.ZodType<
  PatchV2TasksTaskIdNotFoundError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: NotFoundType$inboundSchema,
  code: NotFoundCode$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new PatchV2TasksTaskIdNotFoundError(remapped);
  });

/** @internal */
export type PatchV2TasksTaskIdNotFoundError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const PatchV2TasksTaskIdNotFoundError$outboundSchema: z.ZodType<
  PatchV2TasksTaskIdNotFoundError$Outbound,
  z.ZodTypeDef,
  PatchV2TasksTaskIdNotFoundError
> = z.instanceof(PatchV2TasksTaskIdNotFoundError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: NotFoundType$outboundSchema,
      code: NotFoundCode$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const GetV2ThreadsThreadIdNotFoundError$inboundSchema: z.ZodType<
  GetV2ThreadsThreadIdNotFoundError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: NotFoundType$inboundSchema,
  code: NotFoundCode$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new GetV2ThreadsThreadIdNotFoundError(remapped);
  });

/** @internal */
export type GetV2ThreadsThreadIdNotFoundError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const GetV2ThreadsThreadIdNotFoundError$outboundSchema: z.ZodType<
  GetV2ThreadsThreadIdNotFoundError$Outbound,
  z.ZodTypeDef,
  GetV2ThreadsThreadIdNotFoundError
> = z.instanceof(GetV2ThreadsThreadIdNotFoundError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: NotFoundType$outboundSchema,
      code: NotFoundCode$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const PostV2CommentsInvalidRequestError$inboundSchema: z.ZodType<
  PostV2CommentsInvalidRequestError,
  z.ZodTypeDef,
  unknown
> = z.object({
  statusCode: z.number(),
  type: BadRequestType$inboundSchema,
  code: BadRequestCode$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    return new PostV2CommentsInvalidRequestError(v);
  });

/** @internal */
export type PostV2CommentsInvalidRequestError$Outbound = {
  statusCode: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const PostV2CommentsInvalidRequestError$outboundSchema: z.ZodType<
  PostV2CommentsInvalidRequestError$Outbound,
  z.ZodTypeDef,
  PostV2CommentsInvalidRequestError
> = z.instanceof(PostV2CommentsInvalidRequestError)
  .transform(v => v.data$)
  .pipe(z.object({
    statusCode: z.number(),
    type: BadRequestType$outboundSchema,
    code: BadRequestCode$outboundSchema,
    message: z.string(),
  }));

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

/** @internal */
export const GetV2CommentsCommentIdNotFoundError$inboundSchema: z.ZodType<
  GetV2CommentsCommentIdNotFoundError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: NotFoundType$inboundSchema,
  code: NotFoundCode$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new GetV2CommentsCommentIdNotFoundError(remapped);
  });

/** @internal */
export type GetV2CommentsCommentIdNotFoundError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const GetV2CommentsCommentIdNotFoundError$outboundSchema: z.ZodType<
  GetV2CommentsCommentIdNotFoundError$Outbound,
  z.ZodTypeDef,
  GetV2CommentsCommentIdNotFoundError
> = z.instanceof(GetV2CommentsCommentIdNotFoundError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: NotFoundType$outboundSchema,
      code: NotFoundCode$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const DeleteV2CommentsCommentIdNotFoundError$inboundSchema: z.ZodType<
  DeleteV2CommentsCommentIdNotFoundError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: NotFoundType$inboundSchema,
  code: NotFoundCode$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new DeleteV2CommentsCommentIdNotFoundError(remapped);
  });

/** @internal */
export type DeleteV2CommentsCommentIdNotFoundError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const DeleteV2CommentsCommentIdNotFoundError$outboundSchema: z.ZodType<
  DeleteV2CommentsCommentIdNotFoundError$Outbound,
  z.ZodTypeDef,
  DeleteV2CommentsCommentIdNotFoundError
> = z.instanceof(DeleteV2CommentsCommentIdNotFoundError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: NotFoundType$outboundSchema,
      code: NotFoundCode$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const PostV2WebhooksValidationTypeError$inboundSchema: z.ZodType<
  PostV2WebhooksValidationTypeError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: BadRequestType$inboundSchema,
  code: CodeValidationType$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new PostV2WebhooksValidationTypeError(remapped);
  });

/** @internal */
export type PostV2WebhooksValidationTypeError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const PostV2WebhooksValidationTypeError$outboundSchema: z.ZodType<
  PostV2WebhooksValidationTypeError$Outbound,
  z.ZodTypeDef,
  PostV2WebhooksValidationTypeError
> = z.instanceof(PostV2WebhooksValidationTypeError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: BadRequestType$outboundSchema,
      code: CodeValidationType$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const GetV2WebhooksWebhookIdNotFoundError$inboundSchema: z.ZodType<
  GetV2WebhooksWebhookIdNotFoundError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: NotFoundType$inboundSchema,
  code: NotFoundCode$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new GetV2WebhooksWebhookIdNotFoundError(remapped);
  });

/** @internal */
export type GetV2WebhooksWebhookIdNotFoundError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const GetV2WebhooksWebhookIdNotFoundError$outboundSchema: z.ZodType<
  GetV2WebhooksWebhookIdNotFoundError$Outbound,
  z.ZodTypeDef,
  GetV2WebhooksWebhookIdNotFoundError
> = z.instanceof(GetV2WebhooksWebhookIdNotFoundError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: NotFoundType$outboundSchema,
      code: NotFoundCode$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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

/** @internal */
export const DeleteV2WebhooksWebhookIdNotFoundError$inboundSchema: z.ZodType<
  DeleteV2WebhooksWebhookIdNotFoundError,
  z.ZodTypeDef,
  unknown
> = z.object({
  status_code: z.number(),
  type: NotFoundType$inboundSchema,
  code: NotFoundCode$inboundSchema,
  message: z.string(),
})
  .transform((v) => {
    const remapped = remap$(v, {
      "status_code": "statusCode",
    });

    return new DeleteV2WebhooksWebhookIdNotFoundError(remapped);
  });

/** @internal */
export type DeleteV2WebhooksWebhookIdNotFoundError$Outbound = {
  status_code: number;
  type: string;
  code: string;
  message: string;
};

/** @internal */
export const DeleteV2WebhooksWebhookIdNotFoundError$outboundSchema: z.ZodType<
  DeleteV2WebhooksWebhookIdNotFoundError$Outbound,
  z.ZodTypeDef,
  DeleteV2WebhooksWebhookIdNotFoundError
> = z.instanceof(DeleteV2WebhooksWebhookIdNotFoundError)
  .transform(v => v.data$)
  .pipe(
    z.object({
      statusCode: z.number(),
      type: NotFoundType$outboundSchema,
      code: NotFoundCode$outboundSchema,
      message: z.string(),
    }).transform((v) => {
      return remap$(v, {
        statusCode: "status_code",
      });
    }),
  );

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