/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; import { AlertSettings, AlertSettings$Outbound, AlertSettings$outboundSchema, } from "./alert-settings.js"; import { MeterFilter, MeterFilter$Outbound, MeterFilter$outboundSchema, } from "./meter-filter.js"; import { ReportingUnit, ReportingUnit$Outbound, ReportingUnit$outboundSchema, } from "./reporting-unit.js"; export type UpdateFeatureRequest = { alertSettings?: AlertSettings | undefined; description?: string | undefined; filters?: Array | undefined; /** * GroupID is the id of the group to assign the feature to. Pass empty string to clear. */ groupId?: string | undefined; metadata?: { [k: string]: string } | undefined; name?: string | undefined; reportingUnit?: ReportingUnit | undefined; unitPlural?: string | undefined; unitSingular?: string | undefined; }; /** @internal */ export type UpdateFeatureRequest$Outbound = { alert_settings?: AlertSettings$Outbound | undefined; description?: string | undefined; filters?: Array | undefined; group_id?: string | undefined; metadata?: { [k: string]: string } | undefined; name?: string | undefined; reporting_unit?: ReportingUnit$Outbound | undefined; unit_plural?: string | undefined; unit_singular?: string | undefined; }; /** @internal */ export const UpdateFeatureRequest$outboundSchema: z.ZodMiniType< UpdateFeatureRequest$Outbound, UpdateFeatureRequest > = z.pipe( z.object({ alertSettings: z.optional(AlertSettings$outboundSchema), description: z.optional(z.string()), filters: z.optional(z.array(MeterFilter$outboundSchema)), groupId: z.optional(z.string()), metadata: z.optional(z.record(z.string(), z.string())), name: z.optional(z.string()), reportingUnit: z.optional(ReportingUnit$outboundSchema), unitPlural: z.optional(z.string()), unitSingular: z.optional(z.string()), }), z.transform((v) => { return remap$(v, { alertSettings: "alert_settings", groupId: "group_id", reportingUnit: "reporting_unit", unitPlural: "unit_plural", unitSingular: "unit_singular", }); }), ); export function updateFeatureRequestToJSON( updateFeatureRequest: UpdateFeatureRequest, ): string { return JSON.stringify( UpdateFeatureRequest$outboundSchema.parse(updateFeatureRequest), ); }