# This file generated by `mix dagger.gen`. Please DO NOT EDIT.
defmodule Dagger.ListTypeDef do
  @moduledoc "A definition of a list type in a Module."
  use Dagger.QueryBuilder
  @type t() :: %__MODULE__{}
  defstruct [:selection, :client]

  (
    @doc ""
    @spec element_type_def(t()) :: Dagger.TypeDef.t()
    def element_type_def(%__MODULE__{} = list_type_def) do
      selection = select(list_type_def.selection, "elementTypeDef")
      %Dagger.TypeDef{selection: selection, client: list_type_def.client}
    end
  )

  (
    @doc "A unique identifier for this ListTypeDef."
    @spec id(t()) :: {:ok, Dagger.ListTypeDefID.t()} | {:error, term()}
    def id(%__MODULE__{} = list_type_def) do
      selection = select(list_type_def.selection, "id")
      execute(selection, list_type_def.client)
    end
  )
end
