/* eslint-disable */
/**
 * This file was automatically generated by json-schema-to-typescript.
 * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
 * and run json-schema-to-typescript to regenerate this file.
 */

/**
 * Compose application or sub-projects to be included.
 */
export type Include =
  | string
  | {
      /**
       * Path to the Compose application or sub-project files to include.
       */
      path?: string | ListOfStrings;
      /**
       * Path to the environment files to use to define default values when interpolating variables in the Compose files being parsed.
       */
      env_file?: string | ListOfStrings;
      /**
       * Path to resolve relative paths set in the Compose file
       */
      project_directory?: string;
    };
/**
 * A list of string values.
 */
export type ListOfStrings = string[];
/**
 * Development configuration for the service, used for development workflows.
 */
export type Development = {
  /**
   * Configure watch mode for the service, which monitors file changes and performs actions in response.
   */
  watch?: {
    /**
     * Patterns to exclude from watching.
     */
    ignore?: string | ListOfStrings;
    /**
     * Patterns to include in watching.
     */
    include?: string | ListOfStrings;
    /**
     * Path to watch for changes.
     */
    path: string;
    /**
     * Action to take when a change is detected: rebuild the container, sync files, restart the container, sync and restart, or sync and execute a command.
     */
    action: "rebuild" | "sync" | "restart" | "sync+restart" | "sync+exec";
    /**
     * Target path in the container for sync operations.
     */
    target?: string;
    exec?: ServiceHook;
    /**
     * Ensure that an initial synchronization is done before starting watch mode for sync+x triggers
     */
    initial_sync?: boolean;
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^x-".
     */
    [k: string]: unknown;
  }[];
  /**
   * This interface was referenced by `undefined`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   *
   * This interface was referenced by `undefined`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   */
  [k: string]: unknown;
} & Development1;
export type Development1 = {
  /**
   * Configure watch mode for the service, which monitors file changes and performs actions in response.
   */
  watch?: {
    /**
     * Patterns to exclude from watching.
     */
    ignore?: string | ListOfStrings;
    /**
     * Patterns to include in watching.
     */
    include?: string | ListOfStrings;
    /**
     * Path to watch for changes.
     */
    path: string;
    /**
     * Action to take when a change is detected: rebuild the container, sync files, restart the container, sync and restart, or sync and execute a command.
     */
    action: "rebuild" | "sync" | "restart" | "sync+restart" | "sync+exec";
    /**
     * Target path in the container for sync operations.
     */
    target?: string;
    exec?: ServiceHook;
    /**
     * Ensure that an initial synchronization is done before starting watch mode for sync+x triggers
     */
    initial_sync?: boolean;
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^x-".
     */
    [k: string]: unknown;
  }[];
  /**
   * This interface was referenced by `undefined`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   *
   * This interface was referenced by `undefined`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   */
  [k: string]: unknown;
} | null;
/**
 * Deployment configuration for the service.
 */
export type Deployment = {
  /**
   * Deployment mode for the service: 'replicated' (default) or 'global'.
   */
  mode?: string;
  /**
   * Endpoint mode for the service: 'vip' (default) or 'dnsrr'.
   */
  endpoint_mode?: string;
  /**
   * Number of replicas of the service container to run.
   */
  replicas?: number | string;
  /**
   * Labels to apply to the service.
   */
  labels?:
    | {
        /**
         * Value for the key, which can be a string, number, boolean, or null.
         *
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` ".+".
         */
        [k: string]: string | number | boolean | null;
      }
    | string[];
  /**
   * Configuration for rolling back a service update.
   */
  rollback_config?: {
    /**
     * The number of containers to rollback at a time. If set to 0, all containers rollback simultaneously.
     */
    parallelism?: number | string;
    /**
     * The time to wait between each container group's rollback (e.g., '1s', '1m30s').
     */
    delay?: string;
    /**
     * Action to take if a rollback fails: 'continue', 'pause'.
     */
    failure_action?: string;
    /**
     * Duration to monitor each task for failures after it is created (e.g., '1s', '1m30s').
     */
    monitor?: string;
    /**
     * Failure rate to tolerate during a rollback.
     */
    max_failure_ratio?: number | string;
    /**
     * Order of operations during rollbacks: 'stop-first' (default) or 'start-first'.
     */
    order?: "start-first" | "stop-first";
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^x-".
     */
    [k: string]: unknown;
  };
  /**
   * Configuration for updating a service.
   */
  update_config?: {
    /**
     * The number of containers to update at a time.
     */
    parallelism?: number | string;
    /**
     * The time to wait between updating a group of containers (e.g., '1s', '1m30s').
     */
    delay?: string;
    /**
     * Action to take if an update fails: 'continue', 'pause', 'rollback'.
     */
    failure_action?: string;
    /**
     * Duration to monitor each updated task for failures after it is created (e.g., '1s', '1m30s').
     */
    monitor?: string;
    /**
     * Failure rate to tolerate during an update (0 to 1).
     */
    max_failure_ratio?: number | string;
    /**
     * Order of operations during updates: 'stop-first' (default) or 'start-first'.
     */
    order?: "start-first" | "stop-first";
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^x-".
     */
    [k: string]: unknown;
  };
  /**
   * Resource constraints and reservations for the service.
   */
  resources?: {
    /**
     * Resource limits for the service containers.
     */
    limits?: {
      /**
       * Limit for how much of the available CPU resources, as number of cores, a container can use.
       */
      cpus?: number | string;
      /**
       * Limit on the amount of memory a container can allocate (e.g., '1g', '1024m').
       */
      memory?: string;
      /**
       * Maximum number of PIDs available to the container.
       */
      pids?: number | string;
      /**
       * This interface was referenced by `undefined`'s JSON-Schema definition
       * via the `patternProperty` "^x-".
       */
      [k: string]: unknown;
    };
    /**
     * Resource reservations for the service containers.
     */
    reservations?: {
      /**
       * Reservation for how much of the available CPU resources, as number of cores, a container can use.
       */
      cpus?: number | string;
      /**
       * Reservation on the amount of memory a container can allocate (e.g., '1g', '1024m').
       */
      memory?: string;
      generic_resources?: GenericResources;
      devices?: Devices;
      /**
       * This interface was referenced by `undefined`'s JSON-Schema definition
       * via the `patternProperty` "^x-".
       */
      [k: string]: unknown;
    };
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^x-".
     */
    [k: string]: unknown;
  };
  /**
   * Restart policy for the service containers.
   */
  restart_policy?: {
    /**
     * Condition for restarting the container: 'none', 'on-failure', 'any'.
     */
    condition?: string;
    /**
     * Delay between restart attempts (e.g., '1s', '1m30s').
     */
    delay?: string;
    /**
     * Maximum number of restart attempts before giving up.
     */
    max_attempts?: number | string;
    /**
     * Time window used to evaluate the restart policy (e.g., '1s', '1m30s').
     */
    window?: string;
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^x-".
     */
    [k: string]: unknown;
  };
  /**
   * Constraints and preferences for the platform to select a physical node to run service containers
   */
  placement?: {
    /**
     * Placement constraints for the service (e.g., 'node.role==manager').
     */
    constraints?: string[];
    /**
     * Placement preferences for the service.
     */
    preferences?: {
      /**
       * Spread tasks evenly across values of the specified node label.
       */
      spread?: string;
      /**
       * This interface was referenced by `undefined`'s JSON-Schema definition
       * via the `patternProperty` "^x-".
       */
      [k: string]: unknown;
    }[];
    /**
     * Maximum number of replicas of the service.
     */
    max_replicas_per_node?: number | string;
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^x-".
     */
    [k: string]: unknown;
  };
  /**
   * This interface was referenced by `undefined`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   *
   * This interface was referenced by `undefined`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   */
  [k: string]: unknown;
} & Deployment1;
/**
 * User-defined resources to reserve.
 */
export type GenericResources = {
  /**
   * Specification for discrete (countable) resources.
   */
  discrete_resource_spec?: {
    /**
     * Type of resource (e.g., 'GPU', 'FPGA', 'SSD').
     */
    kind?: string;
    /**
     * Number of resources of this kind to reserve.
     */
    value?: number | string;
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^x-".
     */
    [k: string]: unknown;
  };
  /**
   * This interface was referenced by `undefined`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   */
  [k: string]: unknown;
}[];
/**
 * List of capabilities the device needs to have (e.g., 'gpu', 'compute', 'utility').
 */
export type ListOfStrings1 = string[];
/**
 * List of specific device IDs to reserve.
 */
export type ListOfStrings2 = string[];
/**
 * Device reservations for the container.
 */
export type Devices = {
  capabilities: ListOfStrings1;
  /**
   * Number of devices of this type to reserve.
   */
  count?: string | number;
  device_ids?: ListOfStrings2;
  /**
   * Device driver to use (e.g., 'nvidia').
   */
  driver?: string;
  /**
   * Driver-specific options for the device.
   */
  options?:
    | {
        /**
         * Value for the key, which can be a string, number, boolean, or null.
         *
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` ".+".
         */
        [k: string]: string | number | boolean | null;
      }
    | string[];
  /**
   * This interface was referenced by `undefined`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   */
  [k: string]: unknown;
}[];
export type Deployment1 = {
  /**
   * Deployment mode for the service: 'replicated' (default) or 'global'.
   */
  mode?: string;
  /**
   * Endpoint mode for the service: 'vip' (default) or 'dnsrr'.
   */
  endpoint_mode?: string;
  /**
   * Number of replicas of the service container to run.
   */
  replicas?: number | string;
  /**
   * Labels to apply to the service.
   */
  labels?:
    | {
        /**
         * Value for the key, which can be a string, number, boolean, or null.
         *
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` ".+".
         */
        [k: string]: string | number | boolean | null;
      }
    | string[];
  /**
   * Configuration for rolling back a service update.
   */
  rollback_config?: {
    /**
     * The number of containers to rollback at a time. If set to 0, all containers rollback simultaneously.
     */
    parallelism?: number | string;
    /**
     * The time to wait between each container group's rollback (e.g., '1s', '1m30s').
     */
    delay?: string;
    /**
     * Action to take if a rollback fails: 'continue', 'pause'.
     */
    failure_action?: string;
    /**
     * Duration to monitor each task for failures after it is created (e.g., '1s', '1m30s').
     */
    monitor?: string;
    /**
     * Failure rate to tolerate during a rollback.
     */
    max_failure_ratio?: number | string;
    /**
     * Order of operations during rollbacks: 'stop-first' (default) or 'start-first'.
     */
    order?: "start-first" | "stop-first";
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^x-".
     */
    [k: string]: unknown;
  };
  /**
   * Configuration for updating a service.
   */
  update_config?: {
    /**
     * The number of containers to update at a time.
     */
    parallelism?: number | string;
    /**
     * The time to wait between updating a group of containers (e.g., '1s', '1m30s').
     */
    delay?: string;
    /**
     * Action to take if an update fails: 'continue', 'pause', 'rollback'.
     */
    failure_action?: string;
    /**
     * Duration to monitor each updated task for failures after it is created (e.g., '1s', '1m30s').
     */
    monitor?: string;
    /**
     * Failure rate to tolerate during an update (0 to 1).
     */
    max_failure_ratio?: number | string;
    /**
     * Order of operations during updates: 'stop-first' (default) or 'start-first'.
     */
    order?: "start-first" | "stop-first";
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^x-".
     */
    [k: string]: unknown;
  };
  /**
   * Resource constraints and reservations for the service.
   */
  resources?: {
    /**
     * Resource limits for the service containers.
     */
    limits?: {
      /**
       * Limit for how much of the available CPU resources, as number of cores, a container can use.
       */
      cpus?: number | string;
      /**
       * Limit on the amount of memory a container can allocate (e.g., '1g', '1024m').
       */
      memory?: string;
      /**
       * Maximum number of PIDs available to the container.
       */
      pids?: number | string;
      /**
       * This interface was referenced by `undefined`'s JSON-Schema definition
       * via the `patternProperty` "^x-".
       */
      [k: string]: unknown;
    };
    /**
     * Resource reservations for the service containers.
     */
    reservations?: {
      /**
       * Reservation for how much of the available CPU resources, as number of cores, a container can use.
       */
      cpus?: number | string;
      /**
       * Reservation on the amount of memory a container can allocate (e.g., '1g', '1024m').
       */
      memory?: string;
      generic_resources?: GenericResources;
      devices?: Devices;
      /**
       * This interface was referenced by `undefined`'s JSON-Schema definition
       * via the `patternProperty` "^x-".
       */
      [k: string]: unknown;
    };
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^x-".
     */
    [k: string]: unknown;
  };
  /**
   * Restart policy for the service containers.
   */
  restart_policy?: {
    /**
     * Condition for restarting the container: 'none', 'on-failure', 'any'.
     */
    condition?: string;
    /**
     * Delay between restart attempts (e.g., '1s', '1m30s').
     */
    delay?: string;
    /**
     * Maximum number of restart attempts before giving up.
     */
    max_attempts?: number | string;
    /**
     * Time window used to evaluate the restart policy (e.g., '1s', '1m30s').
     */
    window?: string;
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^x-".
     */
    [k: string]: unknown;
  };
  /**
   * Constraints and preferences for the platform to select a physical node to run service containers
   */
  placement?: {
    /**
     * Placement constraints for the service (e.g., 'node.role==manager').
     */
    constraints?: string[];
    /**
     * Placement preferences for the service.
     */
    preferences?: {
      /**
       * Spread tasks evenly across values of the specified node label.
       */
      spread?: string;
      /**
       * This interface was referenced by `undefined`'s JSON-Schema definition
       * via the `patternProperty` "^x-".
       */
      [k: string]: unknown;
    }[];
    /**
     * Maximum number of replicas of the service.
     */
    max_replicas_per_node?: number | string;
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^x-".
     */
    [k: string]: unknown;
  };
  /**
   * This interface was referenced by `undefined`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   *
   * This interface was referenced by `undefined`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   */
  [k: string]: unknown;
} | null;
/**
 * Either a dictionary mapping keys to values, or a list of strings.
 */
export type ListOrDict =
  | {
      /**
       * Value for the key, which can be a string, number, boolean, or null.
       *
       * This interface was referenced by `undefined`'s JSON-Schema definition
       * via the `patternProperty` ".+".
       */
      [k: string]: string | number | boolean | null;
    }
  | string[];
/**
 * Secrets to expose to the build. These are accessible at build-time.
 */
export type ServiceConfigOrSecret = (
  | string
  | {
      /**
       * Name of the config or secret as defined in the top-level configs or secrets section.
       */
      source?: string;
      /**
       * Path in the container where the config or secret will be mounted. Defaults to /<source> for configs and /run/secrets/<source> for secrets.
       */
      target?: string;
      /**
       * UID of the file in the container. Default is 0 (root).
       */
      uid?: string;
      /**
       * GID of the file in the container. Default is 0 (root).
       */
      gid?: string;
      /**
       * File permission mode inside the container, in octal. Default is 0444 for configs and 0400 for secrets.
       */
      mode?: number | string;
      /**
       * This interface was referenced by `undefined`'s JSON-Schema definition
       * via the `patternProperty` "^x-".
       */
      [k: string]: unknown;
    }
)[];
/**
 * Grant access to Configs on a per-service basis.
 */
export type ServiceConfigOrSecret1 = (
  | string
  | {
      /**
       * Name of the config or secret as defined in the top-level configs or secrets section.
       */
      source?: string;
      /**
       * Path in the container where the config or secret will be mounted. Defaults to /<source> for configs and /run/secrets/<source> for secrets.
       */
      target?: string;
      /**
       * UID of the file in the container. Default is 0 (root).
       */
      uid?: string;
      /**
       * GID of the file in the container. Default is 0 (root).
       */
      gid?: string;
      /**
       * File permission mode inside the container, in octal. Default is 0444 for configs and 0400 for secrets.
       */
      mode?: number | string;
      /**
       * This interface was referenced by `undefined`'s JSON-Schema definition
       * via the `patternProperty` "^x-".
       */
      [k: string]: unknown;
    }
)[];
/**
 * A list of unique string values.
 */
export type ListOfStrings3 = string[];
/**
 * A list of unique string values.
 */
export type ListOfStrings4 = string[];
/**
 * A list of unique string values.
 */
export type ListOfStrings5 = string[];
/**
 * A list of unique string values.
 */
export type ListOfStrings6 = string[];
/**
 * A list of unique string values.
 */
export type ListOfStrings7 = string[];
/**
 * A list of unique string values.
 */
export type ListOfStrings8 = string[];
/**
 * A list of unique string values.
 */
export type ListOfStrings9 = string[];
/**
 * Grant access to Secrets on a per-service basis.
 */
export type ServiceConfigOrSecret2 = (
  | string
  | {
      /**
       * Name of the config or secret as defined in the top-level configs or secrets section.
       */
      source?: string;
      /**
       * Path in the container where the config or secret will be mounted. Defaults to /<source> for configs and /run/secrets/<source> for secrets.
       */
      target?: string;
      /**
       * UID of the file in the container. Default is 0 (root).
       */
      uid?: string;
      /**
       * GID of the file in the container. Default is 0 (root).
       */
      gid?: string;
      /**
       * File permission mode inside the container, in octal. Default is 0444 for configs and 0400 for secrets.
       */
      mode?: number | string;
      /**
       * This interface was referenced by `undefined`'s JSON-Schema definition
       * via the `patternProperty` "^x-".
       */
      [k: string]: unknown;
    }
)[];
/**
 * Network configuration for the Compose application.
 *
 * This interface was referenced by `undefined`'s JSON-Schema definition
 * via the `patternProperty` "^[a-zA-Z0-9._-]+$".
 */
export type Network = {
  /**
   * Custom name for this network.
   */
  name?: string;
  /**
   * Specify which driver should be used for this network. Default is 'bridge'.
   */
  driver?: string;
  /**
   * Specify driver-specific options defined as key/value pairs.
   */
  driver_opts?: {
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^.+$".
     */
    [k: string]: string | number;
  };
  /**
   * Custom IP Address Management configuration for this network.
   */
  ipam?: {
    /**
     * Custom IPAM driver, instead of the default.
     */
    driver?: string;
    /**
     * List of IPAM configuration blocks.
     */
    config?: {
      /**
       * Subnet in CIDR format that represents a network segment.
       */
      subnet?: string;
      /**
       * Range of IPs from which to allocate container IPs.
       */
      ip_range?: string;
      /**
       * IPv4 or IPv6 gateway for the subnet.
       */
      gateway?: string;
      /**
       * Auxiliary IPv4 or IPv6 addresses used by Network driver.
       */
      aux_addresses?: {
        /**
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` "^.+$".
         */
        [k: string]: string;
      };
      /**
       * This interface was referenced by `undefined`'s JSON-Schema definition
       * via the `patternProperty` "^x-".
       */
      [k: string]: unknown;
    }[];
    /**
     * Driver-specific options for the IPAM driver.
     */
    options?: {
      /**
       * This interface was referenced by `undefined`'s JSON-Schema definition
       * via the `patternProperty` "^.+$".
       */
      [k: string]: string;
    };
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^x-".
     */
    [k: string]: unknown;
  };
  /**
   * Specifies that this network already exists and was created outside of Compose.
   */
  external?:
    | boolean
    | string
    | {
        /**
         * @deprecated
         * Specifies the name of the external network. Deprecated: use the 'name' property instead.
         */
        name?: string;
        /**
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` "^x-".
         */
        [k: string]: unknown;
      };
  /**
   * Create an externally isolated network.
   */
  internal?: boolean | string;
  /**
   * Enable IPv4 networking.
   */
  enable_ipv4?: boolean | string;
  /**
   * Enable IPv6 networking.
   */
  enable_ipv6?: boolean | string;
  /**
   * If true, standalone containers can attach to this network.
   */
  attachable?: boolean | string;
  /**
   * Either a dictionary mapping keys to values, or a list of strings.
   */
  labels?:
    | {
        /**
         * Value for the key, which can be a string, number, boolean, or null.
         *
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` ".+".
         */
        [k: string]: string | number | boolean | null;
      }
    | string[];
  /**
   * This interface was referenced by `undefined`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   *
   * This interface was referenced by `undefined`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   */
  [k: string]: unknown;
} & Network1;
export type Network1 = {
  /**
   * Custom name for this network.
   */
  name?: string;
  /**
   * Specify which driver should be used for this network. Default is 'bridge'.
   */
  driver?: string;
  /**
   * Specify driver-specific options defined as key/value pairs.
   */
  driver_opts?: {
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^.+$".
     */
    [k: string]: string | number;
  };
  /**
   * Custom IP Address Management configuration for this network.
   */
  ipam?: {
    /**
     * Custom IPAM driver, instead of the default.
     */
    driver?: string;
    /**
     * List of IPAM configuration blocks.
     */
    config?: {
      /**
       * Subnet in CIDR format that represents a network segment.
       */
      subnet?: string;
      /**
       * Range of IPs from which to allocate container IPs.
       */
      ip_range?: string;
      /**
       * IPv4 or IPv6 gateway for the subnet.
       */
      gateway?: string;
      /**
       * Auxiliary IPv4 or IPv6 addresses used by Network driver.
       */
      aux_addresses?: {
        /**
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` "^.+$".
         */
        [k: string]: string;
      };
      /**
       * This interface was referenced by `undefined`'s JSON-Schema definition
       * via the `patternProperty` "^x-".
       */
      [k: string]: unknown;
    }[];
    /**
     * Driver-specific options for the IPAM driver.
     */
    options?: {
      /**
       * This interface was referenced by `undefined`'s JSON-Schema definition
       * via the `patternProperty` "^.+$".
       */
      [k: string]: string;
    };
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^x-".
     */
    [k: string]: unknown;
  };
  /**
   * Specifies that this network already exists and was created outside of Compose.
   */
  external?:
    | boolean
    | string
    | {
        /**
         * @deprecated
         * Specifies the name of the external network. Deprecated: use the 'name' property instead.
         */
        name?: string;
        /**
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` "^x-".
         */
        [k: string]: unknown;
      };
  /**
   * Create an externally isolated network.
   */
  internal?: boolean | string;
  /**
   * Enable IPv4 networking.
   */
  enable_ipv4?: boolean | string;
  /**
   * Enable IPv6 networking.
   */
  enable_ipv6?: boolean | string;
  /**
   * If true, standalone containers can attach to this network.
   */
  attachable?: boolean | string;
  /**
   * Either a dictionary mapping keys to values, or a list of strings.
   */
  labels?:
    | {
        /**
         * Value for the key, which can be a string, number, boolean, or null.
         *
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` ".+".
         */
        [k: string]: string | number | boolean | null;
      }
    | string[];
  /**
   * This interface was referenced by `undefined`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   *
   * This interface was referenced by `undefined`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   */
  [k: string]: unknown;
} | null;
/**
 * Volume configuration for the Compose application.
 *
 * This interface was referenced by `undefined`'s JSON-Schema definition
 * via the `patternProperty` "^[a-zA-Z0-9._-]+$".
 */
export type Volume = {
  /**
   * Custom name for this volume.
   */
  name?: string;
  /**
   * Specify which volume driver should be used for this volume.
   */
  driver?: string;
  /**
   * Specify driver-specific options.
   */
  driver_opts?: {
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^.+$".
     */
    [k: string]: string | number;
  };
  /**
   * Specifies that this volume already exists and was created outside of Compose.
   */
  external?:
    | boolean
    | string
    | {
        /**
         * @deprecated
         * Specifies the name of the external volume. Deprecated: use the 'name' property instead.
         */
        name?: string;
        /**
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` "^x-".
         */
        [k: string]: unknown;
      };
  /**
   * Either a dictionary mapping keys to values, or a list of strings.
   */
  labels?:
    | {
        /**
         * Value for the key, which can be a string, number, boolean, or null.
         *
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` ".+".
         */
        [k: string]: string | number | boolean | null;
      }
    | string[];
  /**
   * This interface was referenced by `undefined`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   *
   * This interface was referenced by `undefined`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   */
  [k: string]: unknown;
} & Volume1;
export type Volume1 = {
  /**
   * Custom name for this volume.
   */
  name?: string;
  /**
   * Specify which volume driver should be used for this volume.
   */
  driver?: string;
  /**
   * Specify driver-specific options.
   */
  driver_opts?: {
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^.+$".
     */
    [k: string]: string | number;
  };
  /**
   * Specifies that this volume already exists and was created outside of Compose.
   */
  external?:
    | boolean
    | string
    | {
        /**
         * @deprecated
         * Specifies the name of the external volume. Deprecated: use the 'name' property instead.
         */
        name?: string;
        /**
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` "^x-".
         */
        [k: string]: unknown;
      };
  /**
   * Either a dictionary mapping keys to values, or a list of strings.
   */
  labels?:
    | {
        /**
         * Value for the key, which can be a string, number, boolean, or null.
         *
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` ".+".
         */
        [k: string]: string | number | boolean | null;
      }
    | string[];
  /**
   * This interface was referenced by `undefined`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   *
   * This interface was referenced by `undefined`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   */
  [k: string]: unknown;
} | null;

/**
 * The Compose file is a YAML file defining a multi-containers based application.
 */
export interface ComposeSpecification {
  /**
   * @deprecated
   * declared for backward compatibility, ignored. Please remove it.
   */
  version?: string;
  /**
   * define the Compose project name, until user defines one explicitly.
   */
  name?: string;
  /**
   * compose sub-projects to be included.
   */
  include?: Include[];
  /**
   * The services that will be used by your application.
   */
  services?: {
    [k: string]: Service;
  };
  /**
   * Language models that will be used by your application.
   */
  models?: {
    [k: string]: Model;
  };
  /**
   * Networks that are shared among multiple services.
   */
  networks?: {
    [k: string]: Network;
  };
  /**
   * Named volumes that are shared among multiple services.
   */
  volumes?: {
    [k: string]: Volume;
  };
  /**
   * Secrets that are shared among multiple services.
   */
  secrets?: {
    [k: string]: Secret;
  };
  /**
   * Configurations that are shared among multiple services.
   */
  configs?: {
    [k: string]: Config;
  };
  /**
   * This interface was referenced by `ComposeSpecification`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   */
  [k: string]: unknown;
}
/**
 * Configuration for a service.
 *
 * This interface was referenced by `undefined`'s JSON-Schema definition
 * via the `patternProperty` "^[a-zA-Z0-9._-]+$".
 */
export interface Service {
  develop?: Development;
  deploy?: Deployment;
  annotations?: ListOrDict;
  attach?: boolean | string;
  /**
   * Configuration options for building the service's image.
   */
  build?:
    | string
    | {
        /**
         * Path to the build context. Can be a relative path or a URL.
         */
        context?: string;
        /**
         * Name of the Dockerfile to use for building the image.
         */
        dockerfile?: string;
        /**
         * Inline Dockerfile content to use instead of a Dockerfile from the build context.
         */
        dockerfile_inline?: string;
        /**
         * List of extra privileged entitlements to grant to the build process.
         */
        entitlements?: string[];
        /**
         * Either a dictionary mapping keys to values, or a list of strings.
         */
        args?:
          | {
              /**
               * Value for the key, which can be a string, number, boolean, or null.
               *
               * This interface was referenced by `undefined`'s JSON-Schema definition
               * via the `patternProperty` ".+".
               */
              [k: string]: string | number | boolean | null;
            }
          | string[];
        /**
         * Either a dictionary mapping keys to values, or a list of strings.
         */
        ssh?:
          | {
              /**
               * Value for the key, which can be a string, number, boolean, or null.
               *
               * This interface was referenced by `undefined`'s JSON-Schema definition
               * via the `patternProperty` ".+".
               */
              [k: string]: string | number | boolean | null;
            }
          | string[];
        /**
         * Either a dictionary mapping keys to values, or a list of strings.
         */
        labels?:
          | {
              /**
               * Value for the key, which can be a string, number, boolean, or null.
               *
               * This interface was referenced by `undefined`'s JSON-Schema definition
               * via the `patternProperty` ".+".
               */
              [k: string]: string | number | boolean | null;
            }
          | string[];
        /**
         * List of sources the image builder should use for cache resolution
         */
        cache_from?: string[];
        /**
         * Cache destinations for the build cache.
         */
        cache_to?: string[];
        /**
         * Do not use cache when building the image.
         */
        no_cache?: boolean | string;
        /**
         * Do not use build cache for the specified stages.
         */
        no_cache_filter?: string | ListOfStrings;
        /**
         * Either a dictionary mapping keys to values, or a list of strings.
         */
        additional_contexts?:
          | {
              /**
               * Value for the key, which can be a string, number, boolean, or null.
               *
               * This interface was referenced by `undefined`'s JSON-Schema definition
               * via the `patternProperty` ".+".
               */
              [k: string]: string | number | boolean | null;
            }
          | string[];
        /**
         * Network mode to use for the build. Options include 'default', 'none', 'host', or a network name.
         */
        network?: string;
        /**
         * Add a provenance attestation
         */
        provenance?: string | boolean;
        /**
         * Add a SBOM attestation
         */
        sbom?: string | boolean;
        /**
         * Always attempt to pull a newer version of the image.
         */
        pull?: boolean | string;
        /**
         * Build stage to target in a multi-stage Dockerfile.
         */
        target?: string;
        /**
         * Size of /dev/shm for the build container. A string value can use suffix like '2g' for 2 gigabytes.
         */
        shm_size?: number | string;
        /**
         * Add hostname mappings for the build container.
         */
        extra_hosts?:
          | {
              /**
               * This interface was referenced by `undefined`'s JSON-Schema definition
               * via the `patternProperty` ".+".
               */
              [k: string]: string | string[];
            }
          | string[];
        /**
         * Container isolation technology to use for the build process.
         */
        isolation?: string;
        /**
         * Give extended privileges to the build container.
         */
        privileged?: boolean | string;
        secrets?: ServiceConfigOrSecret;
        /**
         * Additional tags to apply to the built image.
         */
        tags?: string[];
        ulimits?: Ulimits;
        /**
         * Platforms to build for, e.g., 'linux/amd64', 'linux/arm64', or 'windows/amd64'.
         */
        platforms?: string[];
        /**
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` "^x-".
         */
        [k: string]: unknown;
      };
  /**
   * Block IO configuration for the service.
   */
  blkio_config?: {
    /**
     * Limit read rate (bytes per second) from a device.
     */
    device_read_bps?: BlkioLimit[];
    /**
     * Limit read rate (IO per second) from a device.
     */
    device_read_iops?: BlkioLimit[];
    /**
     * Limit write rate (bytes per second) to a device.
     */
    device_write_bps?: BlkioLimit[];
    /**
     * Limit write rate (IO per second) to a device.
     */
    device_write_iops?: BlkioLimit[];
    /**
     * Block IO weight (relative weight) for the service, between 10 and 1000.
     */
    weight?: number | string;
    /**
     * Block IO weight (relative weight) for specific devices.
     */
    weight_device?: BlkioWeight[];
  };
  /**
   * Add Linux capabilities. For example, 'CAP_SYS_ADMIN', 'SYS_ADMIN', or 'NET_ADMIN'.
   */
  cap_add?: string[];
  /**
   * Drop Linux capabilities. For example, 'CAP_SYS_ADMIN', 'SYS_ADMIN', or 'NET_ADMIN'.
   */
  cap_drop?: string[];
  /**
   * Specify the cgroup namespace to join. Use 'host' to use the host's cgroup namespace, or 'private' to use a private cgroup namespace.
   */
  cgroup?: "host" | "private";
  /**
   * Specify an optional parent cgroup for the container.
   */
  cgroup_parent?: string;
  /**
   * Override the default command declared by the container image, for example 'CMD' in Dockerfile.
   */
  command?: null | string | string[];
  configs?: ServiceConfigOrSecret1;
  /**
   * Specify a custom container name, rather than a generated default name.
   */
  container_name?: string;
  /**
   * Number of usable CPUs.
   */
  cpu_count?: string | number;
  /**
   * Percentage of CPU resources to use.
   */
  cpu_percent?: string | number;
  /**
   * CPU shares (relative weight) for the container.
   */
  cpu_shares?: number | string;
  /**
   * Limit the CPU CFS (Completely Fair Scheduler) quota.
   */
  cpu_quota?: number | string;
  /**
   * Limit the CPU CFS (Completely Fair Scheduler) period.
   */
  cpu_period?: number | string;
  /**
   * Limit the CPU real-time period in microseconds or a duration.
   */
  cpu_rt_period?: number | string;
  /**
   * Limit the CPU real-time runtime in microseconds or a duration.
   */
  cpu_rt_runtime?: number | string;
  /**
   * Number of CPUs to use. A floating-point value is supported to request partial CPUs.
   */
  cpus?: number | string;
  /**
   * CPUs in which to allow execution (0-3, 0,1).
   */
  cpuset?: string;
  /**
   * Configure the credential spec for managed service account.
   */
  credential_spec?: {
    /**
     * The name of the credential spec Config to use.
     */
    config?: string;
    /**
     * Path to a credential spec file.
     */
    file?: string;
    /**
     * Path to a credential spec in the Windows registry.
     */
    registry?: string;
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^x-".
     */
    [k: string]: unknown;
  };
  /**
   * Express dependency between services. Service dependencies cause services to be started in dependency order. The dependent service will wait for the dependency to be ready before starting.
   */
  depends_on?:
    | ListOfStrings3
    | {
        /**
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` "^[a-zA-Z0-9._-]+$".
         */
        [k: string]: {
          /**
           * Whether to restart dependent services when this service is restarted.
           */
          restart?: boolean | string;
          /**
           * Whether the dependency is required for the dependent service to start.
           */
          required?: boolean;
          /**
           * Condition to wait for. 'service_started' waits until the service has started, 'service_healthy' waits until the service is healthy (as defined by its healthcheck), 'service_completed_successfully' waits until the service has completed successfully.
           */
          condition: "service_started" | "service_healthy" | "service_completed_successfully";
          /**
           * This interface was referenced by `undefined`'s JSON-Schema definition
           * via the `patternProperty` "^x-".
           */
          [k: string]: unknown;
        };
      };
  device_cgroup_rules?: ListOfStrings4;
  /**
   * List of device mappings for the container.
   */
  devices?: (
    | string
    | {
        /**
         * Path on the host to the device.
         */
        source: string;
        /**
         * Path in the container where the device will be mapped.
         */
        target?: string;
        /**
         * Cgroup permissions for the device (rwm).
         */
        permissions?: string;
        /**
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` "^x-".
         */
        [k: string]: unknown;
      }
  )[];
  /**
   * Custom DNS servers to set for the service container.
   */
  dns?: string | ListOfStrings;
  /**
   * Custom DNS options to be passed to the container's DNS resolver.
   */
  dns_opt?: string[];
  /**
   * Custom DNS search domains to set on the service container.
   */
  dns_search?: string | ListOfStrings;
  /**
   * Custom domain name to use for the service container.
   */
  domainname?: string;
  /**
   * Override the default entrypoint declared by the container image, for example 'ENTRYPOINT' in Dockerfile.
   */
  entrypoint?: null | string | string[];
  /**
   * Add environment variables from a file or multiple files. Can be a single file path or a list of file paths.
   */
  env_file?:
    | string
    | (
        | string
        | {
            /**
             * Path to the environment file.
             */
            path: string;
            /**
             * Format attribute lets you to use an alternative file formats for env_file. When not set, env_file is parsed according to Compose rules.
             */
            format?: string;
            /**
             * Whether the file is required. If true and the file doesn't exist, an error will be raised.
             */
            required?: boolean | string;
          }
      )[];
  /**
   * Add metadata to containers using files containing Docker labels.
   */
  label_file?: string | string[];
  /**
   * Either a dictionary mapping keys to values, or a list of strings.
   */
  environment?:
    | {
        /**
         * Value for the key, which can be a string, number, boolean, or null.
         *
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` ".+".
         */
        [k: string]: string | number | boolean | null;
      }
    | string[];
  /**
   * Expose ports without publishing them to the host machine - they'll only be accessible to linked services.
   */
  expose?: (string | number)[];
  /**
   * Extend another service, in the current file or another file.
   */
  extends?:
    | string
    | {
        /**
         * The name of the service to extend.
         */
        service: string;
        /**
         * The file path where the service to extend is defined.
         */
        file?: string;
      };
  /**
   * Specify a service which will not be manage by Compose directly, and delegate its management to an external provider.
   */
  provider?: {
    /**
     * External component used by Compose to manage setup and teardown lifecycle of the service.
     */
    type: string;
    /**
     * Provider-specific options.
     */
    options?: {
      /**
       * This interface was referenced by `undefined`'s JSON-Schema definition
       * via the `patternProperty` "^.+$".
       */
      [k: string]: (string | number | boolean) | (string | number | boolean)[];
    };
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^x-".
     */
    [k: string]: unknown;
  };
  /**
   * Link to services started outside this Compose application. Specify services as <service_name>:<alias>.
   */
  external_links?: string[];
  /**
   * Add hostname mappings to the container network interface configuration.
   */
  extra_hosts?:
    | {
        /**
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` ".+".
         */
        [k: string]: string | string[];
      }
    | string[];
  /**
   * Define GPU devices to use. Can be set to 'all' to use all GPUs, or a list of specific GPU devices.
   */
  gpus?:
    | "all"
    | {
        capabilities?: ListOfStrings5;
        /**
         * Number of GPUs to use.
         */
        count?: string | number;
        device_ids?: ListOfStrings6;
        /**
         * GPU driver to use (e.g., 'nvidia').
         */
        driver?: string;
        /**
         * Either a dictionary mapping keys to values, or a list of strings.
         */
        options?:
          | {
              /**
               * Value for the key, which can be a string, number, boolean, or null.
               *
               * This interface was referenced by `undefined`'s JSON-Schema definition
               * via the `patternProperty` ".+".
               */
              [k: string]: string | number | boolean | null;
            }
          | string[];
        [k: string]: unknown;
      }[];
  /**
   * Add additional groups which user inside the container should be member of.
   */
  group_add?: (string | number)[];
  healthcheck?: Healthcheck;
  /**
   * Define a custom hostname for the service container.
   */
  hostname?: string;
  /**
   * Specify the image to start the container from. Can be a repository/tag, a digest, or a local image ID.
   */
  image?: string;
  /**
   * Run as an init process inside the container that forwards signals and reaps processes.
   */
  init?: boolean | string;
  /**
   * IPC sharing mode for the service container. Use 'host' to share the host's IPC namespace, 'service:[service_name]' to share with another service, or 'shareable' to allow other services to share this service's IPC namespace.
   */
  ipc?: string;
  /**
   * Container isolation technology to use. Supported values are platform-specific.
   */
  isolation?: string;
  /**
   * Either a dictionary mapping keys to values, or a list of strings.
   */
  labels?:
    | {
        /**
         * Value for the key, which can be a string, number, boolean, or null.
         *
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` ".+".
         */
        [k: string]: string | number | boolean | null;
      }
    | string[];
  /**
   * Link to containers in another service. Either specify both the service name and a link alias (SERVICE:ALIAS), or just the service name.
   */
  links?: string[];
  /**
   * Logging configuration for the service.
   */
  logging?: {
    /**
     * Logging driver to use, such as 'json-file', 'syslog', 'journald', etc.
     */
    driver?: string;
    /**
     * Options for the logging driver.
     */
    options?: {
      /**
       * This interface was referenced by `undefined`'s JSON-Schema definition
       * via the `patternProperty` "^.+$".
       */
      [k: string]: string | number | null;
    };
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^x-".
     */
    [k: string]: unknown;
  };
  /**
   * Container MAC address to set.
   */
  mac_address?: string;
  /**
   * Memory limit for the container. A string value can use suffix like '2g' for 2 gigabytes.
   */
  mem_limit?: number | string;
  /**
   * Memory reservation for the container.
   */
  mem_reservation?: string | number;
  /**
   * Container memory swappiness as percentage (0 to 100).
   */
  mem_swappiness?: number | string;
  /**
   * Amount of memory the container is allowed to swap to disk. Set to -1 to enable unlimited swap.
   */
  memswap_limit?: number | string;
  /**
   * Network mode. Values can be 'bridge', 'host', 'none', 'service:[service name]', or 'container:[container name]'.
   */
  network_mode?: string;
  /**
   * AI Models to use, referencing entries under the top-level models key.
   */
  models?:
    | ListOfStrings3
    | {
        /**
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` "^[a-zA-Z0-9._-]+$".
         */
        [k: string]: {
          /**
           * Environment variable set to AI model endpoint.
           */
          endpoint_var?: string;
          /**
           * Environment variable set to AI model name.
           */
          model_var?: string;
          /**
           * This interface was referenced by `undefined`'s JSON-Schema definition
           * via the `patternProperty` "^x-".
           */
          [k: string]: unknown;
        } | null;
      };
  /**
   * Networks to join, referencing entries under the top-level networks key. Can be a list of network names or a mapping of network name to network configuration.
   */
  networks?:
    | ListOfStrings3
    | {
        /**
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` "^[a-zA-Z0-9._-]+$".
         */
        [k: string]: {
          aliases?: ListOfStrings7;
          /**
           * Interface network name used to connect to network
           */
          interface_name?: string;
          /**
           * Specify a static IPv4 address for this service on this network.
           */
          ipv4_address?: string;
          /**
           * Specify a static IPv6 address for this service on this network.
           */
          ipv6_address?: string;
          link_local_ips?: ListOfStrings8;
          /**
           * Specify a MAC address for this service on this network.
           */
          mac_address?: string;
          /**
           * Driver options for this network.
           */
          driver_opts?: {
            /**
             * This interface was referenced by `undefined`'s JSON-Schema definition
             * via the `patternProperty` "^.+$".
             */
            [k: string]: string | number;
          };
          /**
           * Specify the priority for the network connection.
           */
          priority?: number;
          /**
           * Specify the gateway priority for the network connection.
           */
          gw_priority?: number;
          /**
           * This interface was referenced by `undefined`'s JSON-Schema definition
           * via the `patternProperty` "^x-".
           */
          [k: string]: unknown;
        } | null;
      };
  /**
   * Disable OOM Killer for the container.
   */
  oom_kill_disable?: boolean | string;
  /**
   * Tune host's OOM preferences for the container (accepts -1000 to 1000).
   */
  oom_score_adj?: string | number;
  /**
   * PID mode for container.
   */
  pid?: string | null;
  /**
   * Tune a container's PIDs limit. Set to -1 for unlimited PIDs.
   */
  pids_limit?: number | string;
  /**
   * Target platform to run on, e.g., 'linux/amd64', 'linux/arm64', or 'windows/amd64'.
   */
  platform?: string;
  /**
   * Expose container ports. Short format ([HOST:]CONTAINER[/PROTOCOL]).
   */
  ports?: (
    | number
    | string
    | {
        /**
         * A human-readable name for this port mapping.
         */
        name?: string;
        /**
         * The port binding mode, either 'host' for publishing a host port or 'ingress' for load balancing.
         */
        mode?: string;
        /**
         * The host IP to bind to.
         */
        host_ip?: string;
        /**
         * The port inside the container.
         */
        target?: number | string;
        /**
         * The publicly exposed port.
         */
        published?: string | number;
        /**
         * The port protocol (tcp or udp).
         */
        protocol?: string;
        /**
         * Application protocol to use with the port (e.g., http, https, mysql).
         */
        app_protocol?: string;
        /**
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` "^x-".
         */
        [k: string]: unknown;
      }
  )[];
  /**
   * Commands to run after the container starts. If any command fails, the container stops.
   */
  post_start?: ServiceHook1[];
  /**
   * Commands to run before the container stops. If any command fails, the container stop is aborted.
   */
  pre_stop?: ServiceHook1[];
  /**
   * Give extended privileges to the service container.
   */
  privileged?: boolean | string;
  profiles?: ListOfStrings9;
  /**
   * Policy for pulling images. Options include: 'always', 'never', 'if_not_present', 'missing', 'build', or time-based refresh policies.
   */
  pull_policy?: string;
  /**
   * Time after which to refresh the image. Used with pull_policy=refresh.
   */
  pull_refresh_after?: string;
  /**
   * Mount the container's filesystem as read only.
   */
  read_only?: boolean | string;
  /**
   * Restart policy for the service container. Options include: 'no', 'always', 'on-failure', and 'unless-stopped'.
   */
  restart?: string;
  /**
   * Runtime to use for this container, e.g., 'runc'.
   */
  runtime?: string;
  /**
   * Number of containers to deploy for this service.
   */
  scale?: number | string;
  /**
   * Override the default labeling scheme for each container.
   */
  security_opt?: string[];
  /**
   * Size of /dev/shm. A string value can use suffix like '2g' for 2 gigabytes.
   */
  shm_size?: number | string;
  secrets?: ServiceConfigOrSecret2;
  /**
   * Either a dictionary mapping keys to values, or a list of strings.
   */
  sysctls?:
    | {
        /**
         * Value for the key, which can be a string, number, boolean, or null.
         *
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` ".+".
         */
        [k: string]: string | number | boolean | null;
      }
    | string[];
  /**
   * Keep STDIN open even if not attached.
   */
  stdin_open?: boolean | string;
  /**
   * Time to wait for the container to stop gracefully before sending SIGKILL (e.g., '1s', '1m30s').
   */
  stop_grace_period?: string;
  /**
   * Signal to stop the container (e.g., 'SIGTERM', 'SIGINT').
   */
  stop_signal?: string;
  /**
   * Storage driver options for the container.
   */
  storage_opt?: {
    [k: string]: unknown;
  };
  /**
   * Mount a temporary filesystem (tmpfs) into the container. Can be a single value or a list.
   */
  tmpfs?: string | ListOfStrings;
  /**
   * Allocate a pseudo-TTY to service container.
   */
  tty?: boolean | string;
  ulimits?: Ulimits1;
  /**
   * Bind mount Docker API socket and required auth.
   */
  use_api_socket?: boolean;
  /**
   * Username or UID to run the container process as.
   */
  user?: string;
  /**
   * UTS namespace to use. 'host' shares the host's UTS namespace.
   */
  uts?: string;
  /**
   * User namespace to use. 'host' shares the host's user namespace.
   */
  userns_mode?: string;
  /**
   * Mount host paths or named volumes accessible to the container. Short syntax (VOLUME:CONTAINER_PATH[:MODE])
   */
  volumes?: (
    | string
    | {
        /**
         * The mount type: bind for mounting host directories, volume for named volumes, tmpfs for temporary filesystems, cluster for cluster volumes, npipe for named pipes, or image for mounting from an image.
         */
        type: "bind" | "volume" | "tmpfs" | "cluster" | "npipe" | "image";
        /**
         * The source of the mount, a path on the host for a bind mount, a docker image reference for an image mount, or the name of a volume defined in the top-level volumes key. Not applicable for a tmpfs mount.
         */
        source?: string;
        /**
         * The path in the container where the volume is mounted.
         */
        target?: string;
        /**
         * Flag to set the volume as read-only.
         */
        read_only?: boolean | string;
        /**
         * The consistency requirements for the mount. Available values are platform specific.
         */
        consistency?: string;
        /**
         * Configuration specific to bind mounts.
         */
        bind?: {
          /**
           * The propagation mode for the bind mount: 'shared', 'slave', 'private', 'rshared', 'rslave', or 'rprivate'.
           */
          propagation?: string;
          /**
           * Create the host path if it doesn't exist.
           */
          create_host_path?: boolean | string;
          /**
           * Recursively mount the source directory.
           */
          recursive?: "enabled" | "disabled" | "writable" | "readonly";
          /**
           * SELinux relabeling options: 'z' for shared content, 'Z' for private unshared content.
           */
          selinux?: "z" | "Z";
          /**
           * This interface was referenced by `undefined`'s JSON-Schema definition
           * via the `patternProperty` "^x-".
           */
          [k: string]: unknown;
        };
        /**
         * Configuration specific to volume mounts.
         */
        volume?: {
          /**
           * Either a dictionary mapping keys to values, or a list of strings.
           */
          labels?:
            | {
                /**
                 * Value for the key, which can be a string, number, boolean, or null.
                 *
                 * This interface was referenced by `undefined`'s JSON-Schema definition
                 * via the `patternProperty` ".+".
                 */
                [k: string]: string | number | boolean | null;
              }
            | string[];
          /**
           * Flag to disable copying of data from a container when a volume is created.
           */
          nocopy?: boolean | string;
          /**
           * Path within the volume to mount instead of the volume root.
           */
          subpath?: string;
          /**
           * This interface was referenced by `undefined`'s JSON-Schema definition
           * via the `patternProperty` "^x-".
           */
          [k: string]: unknown;
        };
        /**
         * Configuration specific to tmpfs mounts.
         */
        tmpfs?: {
          /**
           * Size of the tmpfs mount in bytes.
           */
          size?: number | string;
          /**
           * File mode of the tmpfs in octal.
           */
          mode?: number | string;
          /**
           * This interface was referenced by `undefined`'s JSON-Schema definition
           * via the `patternProperty` "^x-".
           */
          [k: string]: unknown;
        };
        /**
         * Configuration specific to image mounts.
         */
        image?: {
          /**
           * Path within the image to mount instead of the image root.
           */
          subpath?: string;
          /**
           * This interface was referenced by `undefined`'s JSON-Schema definition
           * via the `patternProperty` "^x-".
           */
          [k: string]: unknown;
        };
        /**
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` "^x-".
         */
        [k: string]: unknown;
      }
  )[];
  /**
   * Mount volumes from another service or container. Optionally specify read-only access (ro) or read-write (rw).
   */
  volumes_from?: string[];
  /**
   * The working directory in which the entrypoint or command will be run
   */
  working_dir?: string;
  /**
   * This interface was referenced by `Service`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   */
  [k: string]: unknown;
}
/**
 * Command to execute when a change is detected and action is sync+exec.
 */
export interface ServiceHook {
  /**
   * Command to execute as part of the hook.
   */
  command: null | string | string[];
  /**
   * User to run the command as.
   */
  user?: string;
  /**
   * Whether to run the command with extended privileges.
   */
  privileged?: boolean | string;
  /**
   * Working directory for the command.
   */
  working_dir?: string;
  /**
   * Environment variables for the command.
   */
  environment?:
    | {
        /**
         * Value for the key, which can be a string, number, boolean, or null.
         *
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` ".+".
         */
        [k: string]: string | number | boolean | null;
      }
    | string[];
  /**
   * This interface was referenced by `ServiceHook`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   *
   * This interface was referenced by `ServiceHook1`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   */
  [k: string]: unknown;
}
/**
 * Override the default ulimits for the build container.
 */
export interface Ulimits {
  /**
   * This interface was referenced by `Ulimits`'s JSON-Schema definition
   * via the `patternProperty` "^[a-z]+$".
   *
   * This interface was referenced by `Ulimits1`'s JSON-Schema definition
   * via the `patternProperty` "^[a-z]+$".
   */
  [k: string]:
    | (number | string)
    | {
        /**
         * Hard limit for the ulimit type. This is the maximum allowed value.
         */
        hard: number | string;
        /**
         * Soft limit for the ulimit type. This is the value that's actually enforced.
         */
        soft: number | string;
        /**
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` "^x-".
         */
        [k: string]: unknown;
      };
}
/**
 * Block IO limit for a specific device.
 */
export interface BlkioLimit {
  /**
   * Path to the device (e.g., '/dev/sda').
   */
  path?: string;
  /**
   * Rate limit in bytes per second or IO operations per second.
   */
  rate?: number | string;
}
/**
 * Block IO weight for a specific device.
 */
export interface BlkioWeight {
  /**
   * Path to the device (e.g., '/dev/sda').
   */
  path?: string;
  /**
   * Relative weight for the device, between 10 and 1000.
   */
  weight?: number | string;
}
/**
 * Configure a health check for the container to monitor its health status.
 */
export interface Healthcheck {
  /**
   * Disable any container-specified healthcheck. Set to true to disable.
   */
  disable?: boolean | string;
  /**
   * Time between running the check (e.g., '1s', '1m30s'). Default: 30s.
   */
  interval?: string;
  /**
   * Number of consecutive failures needed to consider the container as unhealthy. Default: 3.
   */
  retries?: number | string;
  /**
   * The test to perform to check container health. Can be a string or a list. The first item is either NONE, CMD, or CMD-SHELL. If it's CMD, the rest of the command is exec'd. If it's CMD-SHELL, the rest is run in the shell.
   */
  test?: string | string[];
  /**
   * Maximum time to allow one check to run (e.g., '1s', '1m30s'). Default: 30s.
   */
  timeout?: string;
  /**
   * Start period for the container to initialize before starting health-retries countdown (e.g., '1s', '1m30s'). Default: 0s.
   */
  start_period?: string;
  /**
   * Time between running the check during the start period (e.g., '1s', '1m30s'). Default: interval value.
   */
  start_interval?: string;
  /**
   * This interface was referenced by `Healthcheck`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   */
  [k: string]: unknown;
}
/**
 * Configuration for service lifecycle hooks, which are commands executed at specific points in a container's lifecycle.
 */
export interface ServiceHook1 {
  /**
   * Command to execute as part of the hook.
   */
  command: null | string | string[];
  /**
   * User to run the command as.
   */
  user?: string;
  /**
   * Whether to run the command with extended privileges.
   */
  privileged?: boolean | string;
  /**
   * Working directory for the command.
   */
  working_dir?: string;
  /**
   * Environment variables for the command.
   */
  environment?:
    | {
        /**
         * Value for the key, which can be a string, number, boolean, or null.
         *
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` ".+".
         */
        [k: string]: string | number | boolean | null;
      }
    | string[];
  /**
   * This interface was referenced by `ServiceHook`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   *
   * This interface was referenced by `ServiceHook1`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   */
  [k: string]: unknown;
}
/**
 * Override the default ulimits for a container.
 */
export interface Ulimits1 {
  /**
   * This interface was referenced by `Ulimits`'s JSON-Schema definition
   * via the `patternProperty` "^[a-z]+$".
   *
   * This interface was referenced by `Ulimits1`'s JSON-Schema definition
   * via the `patternProperty` "^[a-z]+$".
   */
  [k: string]:
    | (number | string)
    | {
        /**
         * Hard limit for the ulimit type. This is the maximum allowed value.
         */
        hard: number | string;
        /**
         * Soft limit for the ulimit type. This is the value that's actually enforced.
         */
        soft: number | string;
        /**
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` "^x-".
         */
        [k: string]: unknown;
      };
}
/**
 * Language Model for the Compose application.
 *
 * This interface was referenced by `undefined`'s JSON-Schema definition
 * via the `patternProperty` "^[a-zA-Z0-9._-]+$".
 */
export interface Model {
  /**
   * Custom name for this model.
   */
  name?: string;
  /**
   * Language Model to run.
   */
  model: string;
  context_size?: number;
  /**
   * Raw runtime flags to pass to the inference engine.
   */
  runtime_flags?: string[];
  /**
   * This interface was referenced by `Model`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   */
  [k: string]: unknown;
}
/**
 * Secret configuration for the Compose application.
 *
 * This interface was referenced by `undefined`'s JSON-Schema definition
 * via the `patternProperty` "^[a-zA-Z0-9._-]+$".
 */
export interface Secret {
  /**
   * Custom name for this secret.
   */
  name?: string;
  /**
   * Name of an environment variable from which to get the secret value.
   */
  environment?: string;
  /**
   * Path to a file containing the secret value.
   */
  file?: string;
  /**
   * Specifies that this secret already exists and was created outside of Compose.
   */
  external?:
    | boolean
    | string
    | {
        /**
         * Specifies the name of the external secret.
         */
        name?: string;
        [k: string]: unknown;
      };
  /**
   * Either a dictionary mapping keys to values, or a list of strings.
   */
  labels?:
    | {
        /**
         * Value for the key, which can be a string, number, boolean, or null.
         *
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` ".+".
         */
        [k: string]: string | number | boolean | null;
      }
    | string[];
  /**
   * Specify which secret driver should be used for this secret.
   */
  driver?: string;
  /**
   * Specify driver-specific options.
   */
  driver_opts?: {
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^.+$".
     */
    [k: string]: string | number;
  };
  /**
   * Driver to use for templating the secret's value.
   */
  template_driver?: string;
  /**
   * This interface was referenced by `Secret`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   */
  [k: string]: unknown;
}
/**
 * Config configuration for the Compose application.
 *
 * This interface was referenced by `undefined`'s JSON-Schema definition
 * via the `patternProperty` "^[a-zA-Z0-9._-]+$".
 */
export interface Config {
  /**
   * Custom name for this config.
   */
  name?: string;
  /**
   * Inline content of the config.
   */
  content?: string;
  /**
   * Name of an environment variable from which to get the config value.
   */
  environment?: string;
  /**
   * Path to a file containing the config value.
   */
  file?: string;
  /**
   * Specifies that this config already exists and was created outside of Compose.
   */
  external?:
    | boolean
    | string
    | {
        /**
         * @deprecated
         * Specifies the name of the external config. Deprecated: use the 'name' property instead.
         */
        name?: string;
        [k: string]: unknown;
      };
  /**
   * Either a dictionary mapping keys to values, or a list of strings.
   */
  labels?:
    | {
        /**
         * Value for the key, which can be a string, number, boolean, or null.
         *
         * This interface was referenced by `undefined`'s JSON-Schema definition
         * via the `patternProperty` ".+".
         */
        [k: string]: string | number | boolean | null;
      }
    | string[];
  /**
   * Driver to use for templating the config's value.
   */
  template_driver?: string;
  /**
   * This interface was referenced by `Config`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   */
  [k: string]: unknown;
}
