Current section

Files

Jump to
dagger lib dagger gen function_arg.ex
Raw

lib/dagger/gen/function_arg.ex

# This file generated by `dagger_codegen`. Please DO NOT EDIT.
defmodule Dagger.FunctionArg do
@moduledoc """
An argument accepted by a function.
This is a specification for an argument at function definition time, not an argument passed at function call time.
"""
use Dagger.Core.QueryBuilder
@derive Dagger.ID
defstruct [:selection, :client]
@type t() :: %__MODULE__{}
@doc "A default value to use for this argument when not explicitly set by the caller, if any."
@spec default_value(t()) :: {:ok, Dagger.JSON.t()} | {:error, term()}
def default_value(%__MODULE__{} = function_arg) do
selection =
function_arg.selection |> select("defaultValue")
execute(selection, function_arg.client)
end
@doc "A doc string for the argument, if any."
@spec description(t()) :: {:ok, String.t()} | {:error, term()}
def description(%__MODULE__{} = function_arg) do
selection =
function_arg.selection |> select("description")
execute(selection, function_arg.client)
end
@doc "A unique identifier for this FunctionArg."
@spec id(t()) :: {:ok, Dagger.FunctionArgID.t()} | {:error, term()}
def id(%__MODULE__{} = function_arg) do
selection =
function_arg.selection |> select("id")
execute(selection, function_arg.client)
end
@doc "The name of the argument in lowerCamelCase format."
@spec name(t()) :: {:ok, String.t()} | {:error, term()}
def name(%__MODULE__{} = function_arg) do
selection =
function_arg.selection |> select("name")
execute(selection, function_arg.client)
end
@doc "The type of the argument."
@spec type_def(t()) :: Dagger.TypeDef.t()
def type_def(%__MODULE__{} = function_arg) do
selection =
function_arg.selection |> select("typeDef")
%Dagger.TypeDef{
selection: selection,
client: function_arg.client
}
end
end