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

import * as z from "zod/v3";

/**
 * Optional git commit information
 */
export type V2DeployGitCommit = {
  /**
   * Git commit SHA
   */
  commitSha?: string | undefined;
  /**
   * Git commit message
   */
  commitMessage?: string | undefined;
  /**
   * Git author handle/username
   */
  authorHandle?: string | undefined;
  /**
   * Git author avatar URL
   */
  authorAvatarUrl?: string | undefined;
  /**
   * Commit timestamp in milliseconds
   */
  timestamp?: number | undefined;
};

/** @internal */
export type V2DeployGitCommit$Outbound = {
  commitSha?: string | undefined;
  commitMessage?: string | undefined;
  authorHandle?: string | undefined;
  authorAvatarUrl?: string | undefined;
  timestamp?: number | undefined;
};

/** @internal */
export const V2DeployGitCommit$outboundSchema: z.ZodType<
  V2DeployGitCommit$Outbound,
  z.ZodTypeDef,
  V2DeployGitCommit
> = z.object({
  commitSha: z.string().optional(),
  commitMessage: z.string().optional(),
  authorHandle: z.string().optional(),
  authorAvatarUrl: z.string().optional(),
  timestamp: z.number().int().optional(),
});

export function v2DeployGitCommitToJSON(
  v2DeployGitCommit: V2DeployGitCommit,
): string {
  return JSON.stringify(
    V2DeployGitCommit$outboundSchema.parse(v2DeployGitCommit),
  );
}
