-module(dagger@dsl@env). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]). -define(FILEPATH, "src/dagger/dsl/env.gleam"). -export([none/1, opt_include/2, env/0, check/2, checks/2, id/1, input/2, inputs/4, output/2, outputs/4, with_address_input/4, with_address_output/3, with_cache_volume_input/4, with_cache_volume_output/3, with_changeset_input/4, with_changeset_output/3, with_check_group_input/4, with_check_group_output/3, with_check_input/4, with_check_output/3, with_cloud_input/4, with_cloud_output/3, with_container_input/4, with_container_output/3, with_current_module/1, with_directory_input/4, with_directory_output/3, with_env_file_input/4, with_env_file_output/3, with_env_input/4, with_env_output/3, with_file_input/4, with_file_output/3, with_generator_group_input/4, with_generator_group_output/3, with_generator_input/4, with_generator_output/3, with_git_ref_input/4, with_git_ref_output/3, with_git_repository_input/4, with_git_repository_output/3, with_j_s_o_n_value_input/4, with_j_s_o_n_value_output/3, with_main_module/2, with_module_config_client_input/4, with_module_config_client_output/3, with_module_input/4, with_module_output/3, with_module_source_input/4, with_module_source_output/3, with_search_result_input/4, with_search_result_output/3, with_search_submatch_input/4, with_search_submatch_output/3, with_secret_input/4, with_secret_output/3, with_service_input/4, with_service_output/3, with_socket_input/4, with_socket_output/3, with_stat_input/4, with_stat_output/3, with_string_input/4, with_string_output/3, with_workspace/2, with_workspace_input/4, with_workspace_output/3, without_outputs/1, workspace/1]). -export_type([for_checks/0, opts/1]). -if(?OTP_RELEASE >= 27). -define(MODULEDOC(Str), -moduledoc(Str)). -define(DOC(Str), -doc(Str)). -else. -define(MODULEDOC(Str), -compile([])). -define(DOC(Str), -compile([])). -endif. -type for_checks() :: any(). -opaque opts(TZH) :: {opts, gleam@option:option(list(binary()))} | {gleam_phantom, TZH}. -file("src/dagger/dsl/env.gleam", 18). -spec defaults() -> opts(any()). defaults() -> {opts, none}. -file("src/dagger/dsl/env.gleam", 24). -spec none(opts(TZK)) -> opts(TZK). none(Opts) -> Opts. -file("src/dagger/dsl/env.gleam", 28). -spec opt_include(opts(for_checks()), list(binary())) -> opts(for_checks()). opt_include(Opts, Val) -> {opts, {some, Val}}. -file("src/dagger/dsl/env.gleam", 32). -spec env() -> dagger@dsl@types:env(). env() -> Field = {field, <<"currentEnv"/utf8>>, [], []}, {env, {pure, [Field]}}. -file("src/dagger/dsl/env.gleam", 38). ?DOC(" Return the check with the given name from the installed modules. Must match exactly one check.\n"). -spec check(dagger@dsl@types:env(), binary()) -> dagger@dsl@types:check(). check(Parent, Name) -> Field = {field, <<"check"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {check, New_op}. -file("src/dagger/dsl/env.gleam", 47). -spec encode_checks(opts(any())) -> list({binary(), dagger@types:value()}). encode_checks(Opts) -> gleam@list:filter_map([case erlang:element(2, Opts) of {some, Val} -> {ok, {<<"include"/utf8>>, {g_list, gleam@list:map(Val, fun(X) -> {g_string, X} end)}}}; none -> {error, nil} end], fun(X@1) -> X@1 end). -file("src/dagger/dsl/env.gleam", 57). ?DOC(" Return all checks defined by the installed modules\n"). -spec checks( dagger@dsl@types:env(), fun((opts(for_checks())) -> opts(for_checks())) ) -> dagger@dsl@types:check_group(). checks(Parent, With_fn) -> Opts = With_fn(defaults()), Field = {field, <<"checks"/utf8>>, encode_checks(Opts), []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {check_group, New_op}. -file("src/dagger/dsl/env.gleam", 68). ?DOC(" A unique identifier for this Env.\n"). -spec id(dagger@dsl@types:env()) -> dagger@dsl@types:env(). id(Parent) -> Field = {field, <<"id"/utf8>>, [], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 78). ?DOC(" Retrieves an input binding by name\n"). -spec input(dagger@dsl@types:env(), binary()) -> dagger@dsl@types:binding(). input(Parent, Name) -> Field = {field, <<"input"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {binding, New_op}. -file("src/dagger/dsl/env.gleam", 88). ?DOC(" Returns all input bindings provided to the environment\n"). -spec inputs( dagger@dsl@types:env(), fun((dagger@dsl@types:binding()) -> list(dagger@types:field())), dagger@types:client(), fun(({ok, list(dagger@dsl@types:binding())} | {error, dagger@types:query_error()}) -> TZY) ) -> TZY. inputs(Parent, Select, Client, Handler) -> Subfields = Select({binding, {pure, []}}), Field = {field, <<"inputs"/utf8>>, [], Subfields}, Op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> Full_query = lists:append(Q, [Field]), {fetch, Full_query, {decoder, fun gleam@dynamic@decode:decode_dynamic/1}, fun(Dyn) -> Path = dagger@types:make_path(Full_query), case gleam@dynamic@decode:run( Dyn, gleam@dynamic@decode:at( Path, gleam@dynamic@decode:list( {decoder, fun gleam@dynamic@decode:decode_dynamic/1} ) ) ) of {ok, Items} -> {pure, {ok, gleam@list:map( Items, fun(_) -> {binding, {pure, Full_query}} end )}}; {error, _} -> {pure, {error, {decoding_error, <<"inputs"/utf8>>}}} end end} end ) end, Handler(dagger@interpreter:run(Op, Client)). -file("src/dagger/dsl/env.gleam", 110). ?DOC(" Retrieves an output binding by name\n"). -spec output(dagger@dsl@types:env(), binary()) -> dagger@dsl@types:binding(). output(Parent, Name) -> Field = {field, <<"output"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {binding, New_op}. -file("src/dagger/dsl/env.gleam", 120). ?DOC(" Returns all declared output bindings for the environment\n"). -spec outputs( dagger@dsl@types:env(), fun((dagger@dsl@types:binding()) -> list(dagger@types:field())), dagger@types:client(), fun(({ok, list(dagger@dsl@types:binding())} | {error, dagger@types:query_error()}) -> UAC) ) -> UAC. outputs(Parent, Select, Client, Handler) -> Subfields = Select({binding, {pure, []}}), Field = {field, <<"outputs"/utf8>>, [], Subfields}, Op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> Full_query = lists:append(Q, [Field]), {fetch, Full_query, {decoder, fun gleam@dynamic@decode:decode_dynamic/1}, fun(Dyn) -> Path = dagger@types:make_path(Full_query), case gleam@dynamic@decode:run( Dyn, gleam@dynamic@decode:at( Path, gleam@dynamic@decode:list( {decoder, fun gleam@dynamic@decode:decode_dynamic/1} ) ) ) of {ok, Items} -> {pure, {ok, gleam@list:map( Items, fun(_) -> {binding, {pure, Full_query}} end )}}; {error, _} -> {pure, {error, {decoding_error, <<"outputs"/utf8>>}}} end end} end ) end, Handler(dagger@interpreter:run(Op, Client)). -file("src/dagger/dsl/env.gleam", 142). ?DOC(" Create or update a binding of type Address in the environment\n"). -spec with_address_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:address(), binary() ) -> dagger@dsl@types:env(). with_address_input(Parent, Name, Value, Description) -> Field = {field, <<"withAddressInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 152). ?DOC(" Declare a desired Address output to be assigned in the environment\n"). -spec with_address_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_address_output(Parent, Name, Description) -> Field = {field, <<"withAddressOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 162). ?DOC(" Create or update a binding of type CacheVolume in the environment\n"). -spec with_cache_volume_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:cache_volume(), binary() ) -> dagger@dsl@types:env(). with_cache_volume_input(Parent, Name, Value, Description) -> Field = {field, <<"withCacheVolumeInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 172). ?DOC(" Declare a desired CacheVolume output to be assigned in the environment\n"). -spec with_cache_volume_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_cache_volume_output(Parent, Name, Description) -> Field = {field, <<"withCacheVolumeOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 182). ?DOC(" Create or update a binding of type Changeset in the environment\n"). -spec with_changeset_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:changeset(), binary() ) -> dagger@dsl@types:env(). with_changeset_input(Parent, Name, Value, Description) -> Field = {field, <<"withChangesetInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 192). ?DOC(" Declare a desired Changeset output to be assigned in the environment\n"). -spec with_changeset_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_changeset_output(Parent, Name, Description) -> Field = {field, <<"withChangesetOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 202). ?DOC(" Create or update a binding of type CheckGroup in the environment\n"). -spec with_check_group_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:check_group(), binary() ) -> dagger@dsl@types:env(). with_check_group_input(Parent, Name, Value, Description) -> Field = {field, <<"withCheckGroupInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 212). ?DOC(" Declare a desired CheckGroup output to be assigned in the environment\n"). -spec with_check_group_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_check_group_output(Parent, Name, Description) -> Field = {field, <<"withCheckGroupOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 222). ?DOC(" Create or update a binding of type Check in the environment\n"). -spec with_check_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:check(), binary() ) -> dagger@dsl@types:env(). with_check_input(Parent, Name, Value, Description) -> Field = {field, <<"withCheckInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 232). ?DOC(" Declare a desired Check output to be assigned in the environment\n"). -spec with_check_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_check_output(Parent, Name, Description) -> Field = {field, <<"withCheckOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 242). ?DOC(" Create or update a binding of type Cloud in the environment\n"). -spec with_cloud_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:cloud(), binary() ) -> dagger@dsl@types:env(). with_cloud_input(Parent, Name, Value, Description) -> Field = {field, <<"withCloudInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 252). ?DOC(" Declare a desired Cloud output to be assigned in the environment\n"). -spec with_cloud_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_cloud_output(Parent, Name, Description) -> Field = {field, <<"withCloudOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 262). ?DOC(" Create or update a binding of type Container in the environment\n"). -spec with_container_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:container(), binary() ) -> dagger@dsl@types:env(). with_container_input(Parent, Name, Value, Description) -> Field = {field, <<"withContainerInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 272). ?DOC(" Declare a desired Container output to be assigned in the environment\n"). -spec with_container_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_container_output(Parent, Name, Description) -> Field = {field, <<"withContainerOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 283). ?DOC( " Installs the current module into the environment, exposing its functions to the model\n" " Contextual path arguments will be populated using the environment's workspace.\n" ). -spec with_current_module(dagger@dsl@types:env()) -> dagger@dsl@types:env(). with_current_module(Parent) -> Field = {field, <<"withCurrentModule"/utf8>>, [], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 293). ?DOC(" Create or update a binding of type Directory in the environment\n"). -spec with_directory_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:directory(), binary() ) -> dagger@dsl@types:env(). with_directory_input(Parent, Name, Value, Description) -> Field = {field, <<"withDirectoryInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 303). ?DOC(" Declare a desired Directory output to be assigned in the environment\n"). -spec with_directory_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_directory_output(Parent, Name, Description) -> Field = {field, <<"withDirectoryOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 313). ?DOC(" Create or update a binding of type EnvFile in the environment\n"). -spec with_env_file_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:env_file(), binary() ) -> dagger@dsl@types:env(). with_env_file_input(Parent, Name, Value, Description) -> Field = {field, <<"withEnvFileInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 323). ?DOC(" Declare a desired EnvFile output to be assigned in the environment\n"). -spec with_env_file_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_env_file_output(Parent, Name, Description) -> Field = {field, <<"withEnvFileOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 333). ?DOC(" Create or update a binding of type Env in the environment\n"). -spec with_env_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:env(), binary() ) -> dagger@dsl@types:env(). with_env_input(Parent, Name, Value, Description) -> Field = {field, <<"withEnvInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 343). ?DOC(" Declare a desired Env output to be assigned in the environment\n"). -spec with_env_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_env_output(Parent, Name, Description) -> Field = {field, <<"withEnvOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 353). ?DOC(" Create or update a binding of type File in the environment\n"). -spec with_file_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:file(), binary() ) -> dagger@dsl@types:env(). with_file_input(Parent, Name, Value, Description) -> Field = {field, <<"withFileInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 363). ?DOC(" Declare a desired File output to be assigned in the environment\n"). -spec with_file_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_file_output(Parent, Name, Description) -> Field = {field, <<"withFileOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 373). ?DOC(" Create or update a binding of type GeneratorGroup in the environment\n"). -spec with_generator_group_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:generator_group(), binary() ) -> dagger@dsl@types:env(). with_generator_group_input(Parent, Name, Value, Description) -> Field = {field, <<"withGeneratorGroupInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 383). ?DOC(" Declare a desired GeneratorGroup output to be assigned in the environment\n"). -spec with_generator_group_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_generator_group_output(Parent, Name, Description) -> Field = {field, <<"withGeneratorGroupOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 393). ?DOC(" Create or update a binding of type Generator in the environment\n"). -spec with_generator_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:generator(), binary() ) -> dagger@dsl@types:env(). with_generator_input(Parent, Name, Value, Description) -> Field = {field, <<"withGeneratorInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 403). ?DOC(" Declare a desired Generator output to be assigned in the environment\n"). -spec with_generator_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_generator_output(Parent, Name, Description) -> Field = {field, <<"withGeneratorOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 413). ?DOC(" Create or update a binding of type GitRef in the environment\n"). -spec with_git_ref_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:git_ref(), binary() ) -> dagger@dsl@types:env(). with_git_ref_input(Parent, Name, Value, Description) -> Field = {field, <<"withGitRefInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 423). ?DOC(" Declare a desired GitRef output to be assigned in the environment\n"). -spec with_git_ref_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_git_ref_output(Parent, Name, Description) -> Field = {field, <<"withGitRefOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 433). ?DOC(" Create or update a binding of type GitRepository in the environment\n"). -spec with_git_repository_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:git_repository(), binary() ) -> dagger@dsl@types:env(). with_git_repository_input(Parent, Name, Value, Description) -> Field = {field, <<"withGitRepositoryInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 443). ?DOC(" Declare a desired GitRepository output to be assigned in the environment\n"). -spec with_git_repository_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_git_repository_output(Parent, Name, Description) -> Field = {field, <<"withGitRepositoryOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 453). ?DOC(" Create or update a binding of type JSONValue in the environment\n"). -spec with_j_s_o_n_value_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:j_s_o_n_value(), binary() ) -> dagger@dsl@types:env(). with_j_s_o_n_value_input(Parent, Name, Value, Description) -> Field = {field, <<"withJSONValueInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 463). ?DOC(" Declare a desired JSONValue output to be assigned in the environment\n"). -spec with_j_s_o_n_value_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_j_s_o_n_value_output(Parent, Name, Description) -> Field = {field, <<"withJSONValueOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 474). ?DOC( " Sets the main module for this environment (the project being worked on)\n" " Contextual path arguments will be populated using the environment's workspace.\n" ). -spec with_main_module(dagger@dsl@types:env(), dagger@dsl@types:module_()) -> dagger@dsl@types:env(). with_main_module(Parent, Module) -> Field = {field, <<"withMainModule"/utf8>>, [{<<"module"/utf8>>, {g_deferred, erlang:element(2, Module)}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 484). ?DOC(" Create or update a binding of type ModuleConfigClient in the environment\n"). -spec with_module_config_client_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:module_config_client(), binary() ) -> dagger@dsl@types:env(). with_module_config_client_input(Parent, Name, Value, Description) -> Field = {field, <<"withModuleConfigClientInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 494). ?DOC(" Declare a desired ModuleConfigClient output to be assigned in the environment\n"). -spec with_module_config_client_output( dagger@dsl@types:env(), binary(), binary() ) -> dagger@dsl@types:env(). with_module_config_client_output(Parent, Name, Description) -> Field = {field, <<"withModuleConfigClientOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 504). ?DOC(" Create or update a binding of type Module in the environment\n"). -spec with_module_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:module_(), binary() ) -> dagger@dsl@types:env(). with_module_input(Parent, Name, Value, Description) -> Field = {field, <<"withModuleInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 514). ?DOC(" Declare a desired Module output to be assigned in the environment\n"). -spec with_module_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_module_output(Parent, Name, Description) -> Field = {field, <<"withModuleOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 524). ?DOC(" Create or update a binding of type ModuleSource in the environment\n"). -spec with_module_source_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:module_source(), binary() ) -> dagger@dsl@types:env(). with_module_source_input(Parent, Name, Value, Description) -> Field = {field, <<"withModuleSourceInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 534). ?DOC(" Declare a desired ModuleSource output to be assigned in the environment\n"). -spec with_module_source_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_module_source_output(Parent, Name, Description) -> Field = {field, <<"withModuleSourceOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 544). ?DOC(" Create or update a binding of type SearchResult in the environment\n"). -spec with_search_result_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:search_result(), binary() ) -> dagger@dsl@types:env(). with_search_result_input(Parent, Name, Value, Description) -> Field = {field, <<"withSearchResultInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 554). ?DOC(" Declare a desired SearchResult output to be assigned in the environment\n"). -spec with_search_result_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_search_result_output(Parent, Name, Description) -> Field = {field, <<"withSearchResultOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 564). ?DOC(" Create or update a binding of type SearchSubmatch in the environment\n"). -spec with_search_submatch_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:search_submatch(), binary() ) -> dagger@dsl@types:env(). with_search_submatch_input(Parent, Name, Value, Description) -> Field = {field, <<"withSearchSubmatchInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 574). ?DOC(" Declare a desired SearchSubmatch output to be assigned in the environment\n"). -spec with_search_submatch_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_search_submatch_output(Parent, Name, Description) -> Field = {field, <<"withSearchSubmatchOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 584). ?DOC(" Create or update a binding of type Secret in the environment\n"). -spec with_secret_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:secret(), binary() ) -> dagger@dsl@types:env(). with_secret_input(Parent, Name, Value, Description) -> Field = {field, <<"withSecretInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 594). ?DOC(" Declare a desired Secret output to be assigned in the environment\n"). -spec with_secret_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_secret_output(Parent, Name, Description) -> Field = {field, <<"withSecretOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 604). ?DOC(" Create or update a binding of type Service in the environment\n"). -spec with_service_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:service(), binary() ) -> dagger@dsl@types:env(). with_service_input(Parent, Name, Value, Description) -> Field = {field, <<"withServiceInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 614). ?DOC(" Declare a desired Service output to be assigned in the environment\n"). -spec with_service_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_service_output(Parent, Name, Description) -> Field = {field, <<"withServiceOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 624). ?DOC(" Create or update a binding of type Socket in the environment\n"). -spec with_socket_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:socket(), binary() ) -> dagger@dsl@types:env(). with_socket_input(Parent, Name, Value, Description) -> Field = {field, <<"withSocketInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 634). ?DOC(" Declare a desired Socket output to be assigned in the environment\n"). -spec with_socket_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_socket_output(Parent, Name, Description) -> Field = {field, <<"withSocketOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 644). ?DOC(" Create or update a binding of type Stat in the environment\n"). -spec with_stat_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:stat(), binary() ) -> dagger@dsl@types:env(). with_stat_input(Parent, Name, Value, Description) -> Field = {field, <<"withStatInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 654). ?DOC(" Declare a desired Stat output to be assigned in the environment\n"). -spec with_stat_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_stat_output(Parent, Name, Description) -> Field = {field, <<"withStatOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 664). ?DOC(" Provides a string input binding to the environment\n"). -spec with_string_input(dagger@dsl@types:env(), binary(), binary(), binary()) -> dagger@dsl@types:env(). with_string_input(Parent, Name, Value, Description) -> Field = {field, <<"withStringInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_string, Value}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 674). ?DOC(" Declares a desired string output binding\n"). -spec with_string_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_string_output(Parent, Name, Description) -> Field = {field, <<"withStringOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 684). ?DOC(" Returns a new environment with the provided workspace\n"). -spec with_workspace(dagger@dsl@types:env(), dagger@dsl@types:directory()) -> dagger@dsl@types:env(). with_workspace(Parent, Workspace) -> Field = {field, <<"withWorkspace"/utf8>>, [{<<"workspace"/utf8>>, {g_deferred, erlang:element(2, Workspace)}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 694). ?DOC(" Create or update a binding of type Workspace in the environment\n"). -spec with_workspace_input( dagger@dsl@types:env(), binary(), dagger@dsl@types:workspace(), binary() ) -> dagger@dsl@types:env(). with_workspace_input(Parent, Name, Value, Description) -> Field = {field, <<"withWorkspaceInput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"value"/utf8>>, {g_deferred, erlang:element(2, Value)}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 704). ?DOC(" Declare a desired Workspace output to be assigned in the environment\n"). -spec with_workspace_output(dagger@dsl@types:env(), binary(), binary()) -> dagger@dsl@types:env(). with_workspace_output(Parent, Name, Description) -> Field = {field, <<"withWorkspaceOutput"/utf8>>, [{<<"name"/utf8>>, {g_string, Name}}, {<<"description"/utf8>>, {g_string, Description}}], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 714). ?DOC(" Returns a new environment without any outputs\n"). -spec without_outputs(dagger@dsl@types:env()) -> dagger@dsl@types:env(). without_outputs(Parent) -> Field = {field, <<"withoutOutputs"/utf8>>, [], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {env, New_op}. -file("src/dagger/dsl/env.gleam", 724). -spec workspace(dagger@dsl@types:env()) -> dagger@dsl@types:directory(). workspace(Parent) -> Field = {field, <<"workspace"/utf8>>, [], []}, New_op = begin dagger@types:bind( erlang:element(2, Parent), fun(Q) -> {pure, lists:append(Q, [Field])} end ) end, {directory, New_op}.