# `Dagger.Module`
[🔗](https://github.com/dagger/dagger/blob/v0.20.5/sdk/elixir/lib/dagger/gen/module.ex#L2)

A Dagger module.

# `t`

```elixir
@type t() :: %Dagger.Module{client: term(), query_builder: term()}
```

# `check`

```elixir
@spec check(t(), String.t()) :: Dagger.Check.t()
```

Return the check defined by the module with the given name. Must match to exactly one check.

> #### Experimental {: .warning}
>
> "This API is highly experimental and may be removed or replaced entirely."

# `checks`

```elixir
@spec checks(t(), [{:include, [String.t()]}]) :: Dagger.CheckGroup.t()
```

Return all checks defined by the module

> #### Experimental {: .warning}
>
> "This API is highly experimental and may be removed or replaced entirely."

# `dependencies`

```elixir
@spec dependencies(t()) :: {:ok, [t()]} | {:error, term()}
```

The dependencies of the module.

# `description`

```elixir
@spec description(t()) :: {:ok, String.t()} | {:error, term()}
```

The doc string of the module, if any

# `enums`

```elixir
@spec enums(t()) :: {:ok, [Dagger.TypeDef.t()]} | {:error, term()}
```

Enumerations served by this module.

# `generated_context_directory`

```elixir
@spec generated_context_directory(t()) :: Dagger.Directory.t()
```

The generated files and directories made on top of the module source's context directory.

# `id`

```elixir
@spec id(t()) :: {:ok, Dagger.ModuleID.t()} | {:error, term()}
```

A unique identifier for this Module.

# `interfaces`

```elixir
@spec interfaces(t()) :: {:ok, [Dagger.TypeDef.t()]} | {:error, term()}
```

Interfaces served by this module.

# `introspection_schema_json`

```elixir
@spec introspection_schema_json(t()) :: Dagger.File.t()
```

The introspection schema JSON file for this module.

This file represents the schema visible to the module's source code, including all core types and those from the dependencies.

Note: this is in the context of a module, so some core types may be hidden.

# `name`

```elixir
@spec name(t()) :: {:ok, String.t()} | {:error, term()}
```

The name of the module

# `objects`

```elixir
@spec objects(t()) :: {:ok, [Dagger.TypeDef.t()]} | {:error, term()}
```

Objects served by this module.

# `runtime`

```elixir
@spec runtime(t()) :: Dagger.Container.t()
```

The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile.

# `sdk`

```elixir
@spec sdk(t()) :: Dagger.SDKConfig.t() | nil
```

The SDK config used by this module.

# `serve`

```elixir
@spec serve(t(), [{:include_dependencies, boolean() | nil}]) :: :ok | {:error, term()}
```

Serve a module's API in the current session.

Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.

# `source`

```elixir
@spec source(t()) :: Dagger.ModuleSource.t() | nil
```

The source for the module.

# `sync`

```elixir
@spec sync(t()) :: {:ok, t()} | {:error, term()}
```

Forces evaluation of the module, including any loading into the engine and associated validation.

# `user_defaults`

```elixir
@spec user_defaults(t()) :: Dagger.EnvFile.t()
```

User-defined default values, loaded from local .env files.

# `with_description`

```elixir
@spec with_description(t(), String.t()) :: t()
```

Retrieves the module with the given description

# `with_enum`

```elixir
@spec with_enum(t(), Dagger.TypeDef.t()) :: t()
```

This module plus the given Enum type and associated values

# `with_interface`

```elixir
@spec with_interface(t(), Dagger.TypeDef.t()) :: t()
```

This module plus the given Interface type and associated functions

# `with_object`

```elixir
@spec with_object(t(), Dagger.TypeDef.t()) :: t()
```

This module plus the given Object type and associated functions.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
