/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 0ee18e593b57
 */

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

export type GetCampaignsV1ObservabilityCampaignsGetRequest = {
  pageSize?: number | undefined;
  page?: number | undefined;
  q?: string | null | undefined;
};

/** @internal */
export type GetCampaignsV1ObservabilityCampaignsGetRequest$Outbound = {
  page_size: number;
  page: number;
  q?: string | null | undefined;
};

/** @internal */
export const GetCampaignsV1ObservabilityCampaignsGetRequest$outboundSchema:
  z.ZodType<
    GetCampaignsV1ObservabilityCampaignsGetRequest$Outbound,
    GetCampaignsV1ObservabilityCampaignsGetRequest
  > = z.object({
    pageSize: z.int().default(50),
    page: z.int().default(1),
    q: z.nullable(z.string()).optional(),
  }).transform((v) => {
    return remap$(v, {
      pageSize: "page_size",
    });
  });

export function getCampaignsV1ObservabilityCampaignsGetRequestToJSON(
  getCampaignsV1ObservabilityCampaignsGetRequest:
    GetCampaignsV1ObservabilityCampaignsGetRequest,
): string {
  return JSON.stringify(
    GetCampaignsV1ObservabilityCampaignsGetRequest$outboundSchema.parse(
      getCampaignsV1ObservabilityCampaignsGetRequest,
    ),
  );
}
