-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, 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, without_outputs/1, workspace/1]). -export_type([opts/0]). -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 opts() :: {opts, gleam@option:option(list(binary()))}. -file("src/dagger/dsl/env.gleam", 16). -spec defaults() -> opts(). defaults() -> {opts, none}. -file("src/dagger/dsl/env.gleam", 22). -spec none(opts()) -> opts(). none(Opts) -> Opts. -file("src/dagger/dsl/env.gleam", 26). -spec include(opts(), list(binary())) -> opts(). include(Opts, Val) -> {opts, {some, Val}}. -file("src/dagger/dsl/env.gleam", 30). -spec env() -> dagger@dsl@types:env(). env() -> Field = {field, <<"currentEnv"/utf8>>, [], []}, {env, {pure, [Field]}}. -file("src/dagger/dsl/env.gleam", 36). ?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", 45). -spec encode_checks(opts()) -> 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", 55). ?DOC(" Return all checks defined by the installed modules\n"). -spec checks(dagger@dsl@types:env(), fun((opts()) -> opts())) -> 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", 66). ?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", 76). ?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", 86). ?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()}) -> OMU) ) -> OMU. 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", 108). ?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", 118). ?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()}) -> OMY) ) -> OMY. 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", 140). ?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", 150). ?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", 160). ?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", 170). ?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", 180). ?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", 190). ?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", 200). ?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", 210). ?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", 220). ?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", 230). ?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", 240). ?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", 250). ?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", 260). ?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", 270). ?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", 281). ?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", 291). ?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", 301). ?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", 311). ?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", 321). ?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", 331). ?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", 341). ?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", 351). ?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", 361). ?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", 371). ?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", 381). ?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", 391). ?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", 401). ?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", 411). ?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", 421). ?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", 431). ?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", 441). ?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", 451). ?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", 461). ?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", 472). ?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", 482). ?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", 492). ?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", 502). ?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", 512). ?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", 522). ?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", 532). ?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", 542). ?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", 552). ?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", 562). ?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", 572). ?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", 582). ?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", 592). ?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", 602). ?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", 612). ?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", 622). ?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", 632). ?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", 642). ?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", 652). ?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", 662). ?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", 672). ?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", 682). ?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", 692). ?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", 702). -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}.