Skip to main content

dagger_sdk/
gen.rs

1#![allow(clippy::needless_lifetimes)]
2
3use crate::core::cli_session::DaggerSessionProc;
4use crate::core::graphql_client::DynGraphQLClient;
5use crate::errors::DaggerError;
6use crate::id::IntoID;
7use crate::loadable::Loadable;
8use crate::querybuilder::Selection;
9use derive_builder::Builder;
10use serde::{Deserialize, Serialize};
11use std::sync::Arc;
12
13pub type AddressId = Id;
14pub type BindingId = Id;
15pub type CacheVolumeId = Id;
16pub type ChangesetId = Id;
17pub type CheckGroupId = Id;
18pub type CheckId = Id;
19pub type ClientFilesyncMirrorId = Id;
20pub type CloudId = Id;
21pub type ContainerId = Id;
22pub type CurrentModuleId = Id;
23pub type DiffStatId = Id;
24pub type DirectoryId = Id;
25pub type EngineCacheEntryId = Id;
26pub type EngineCacheEntrySetId = Id;
27pub type EngineCacheId = Id;
28pub type EngineId = Id;
29pub type EnumTypeDefId = Id;
30pub type EnumValueTypeDefId = Id;
31pub type EnvFileId = Id;
32pub type EnvId = Id;
33pub type EnvVariableId = Id;
34pub type ErrorId = Id;
35pub type ErrorValueId = Id;
36pub type ExportableId = Id;
37pub type FieldTypeDefId = Id;
38pub type FileId = Id;
39pub type FunctionArgId = Id;
40pub type FunctionCallArgValueId = Id;
41pub type FunctionCallId = Id;
42pub type FunctionId = Id;
43pub type GeneratedCodeId = Id;
44pub type GeneratorGroupId = Id;
45pub type GeneratorId = Id;
46pub type GitRefId = Id;
47pub type GitRepositoryId = Id;
48pub type HttpStateId = Id;
49pub type HealthcheckConfigId = Id;
50pub type HostId = Id;
51#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
52pub struct Id(pub String);
53impl From<&str> for Id {
54    fn from(value: &str) -> Self {
55        Self(value.to_string())
56    }
57}
58impl From<String> for Id {
59    fn from(value: String) -> Self {
60        Self(value)
61    }
62}
63impl IntoID<Id> for Id {
64    fn into_id(
65        self,
66    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
67        Box::pin(async move { Ok::<Id, DaggerError>(self) })
68    }
69}
70impl Id {
71    fn quote(&self) -> String {
72        format!("\"{}\"", self.0.clone())
73    }
74}
75pub type InputTypeDefId = Id;
76pub type InterfaceTypeDefId = Id;
77#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
78pub struct Json(pub String);
79impl From<&str> for Json {
80    fn from(value: &str) -> Self {
81        Self(value.to_string())
82    }
83}
84impl From<String> for Json {
85    fn from(value: String) -> Self {
86        Self(value)
87    }
88}
89impl Json {
90    fn quote(&self) -> String {
91        format!("\"{}\"", self.0.clone())
92    }
93}
94pub type JsonValueId = Id;
95pub type Llmid = Id;
96pub type LlmTokenUsageId = Id;
97pub type LabelId = Id;
98pub type ListTypeDefId = Id;
99pub type ModuleConfigClientId = Id;
100pub type ModuleId = Id;
101pub type ModuleSourceId = Id;
102pub type ObjectTypeDefId = Id;
103#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
104pub struct Platform(pub String);
105impl From<&str> for Platform {
106    fn from(value: &str) -> Self {
107        Self(value.to_string())
108    }
109}
110impl From<String> for Platform {
111    fn from(value: String) -> Self {
112        Self(value)
113    }
114}
115impl Platform {
116    fn quote(&self) -> String {
117        format!("\"{}\"", self.0.clone())
118    }
119}
120pub type PortId = Id;
121pub type RemoteGitMirrorId = Id;
122pub type SdkConfigId = Id;
123pub type ScalarTypeDefId = Id;
124pub type SearchResultId = Id;
125pub type SearchSubmatchId = Id;
126pub type SecretId = Id;
127pub type ServiceId = Id;
128pub type SocketId = Id;
129pub type SourceMapId = Id;
130pub type StatId = Id;
131pub type SyncerId = Id;
132pub type TerminalId = Id;
133pub type TypeDefId = Id;
134pub type UpGroupId = Id;
135pub type UpId = Id;
136#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
137pub struct Void(pub String);
138impl From<&str> for Void {
139    fn from(value: &str) -> Self {
140        Self(value.to_string())
141    }
142}
143impl From<String> for Void {
144    fn from(value: String) -> Self {
145        Self(value)
146    }
147}
148impl Void {
149    fn quote(&self) -> String {
150        format!("\"{}\"", self.0.clone())
151    }
152}
153pub type WorkspaceId = Id;
154#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
155pub struct BuildArg {
156    pub name: String,
157    pub value: String,
158}
159#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
160pub struct PipelineLabel {
161    pub name: String,
162    pub value: String,
163}
164#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
165pub struct PortForward {
166    pub backend: isize,
167    pub frontend: isize,
168    pub protocol: NetworkProtocol,
169}
170/// An object that can be exported to the host.
171/// Calling export writes the object to a path on the host filesystem and returns the path that was written.
172pub trait Exportable {
173    fn export(
174        &self,
175        path: impl Into<String>,
176    ) -> impl core::future::Future<Output = Result<String, DaggerError>> + Send;
177    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send;
178}
179#[derive(Clone)]
180pub struct ExportableClient {
181    pub proc: Option<Arc<DaggerSessionProc>>,
182    pub selection: Selection,
183    pub graphql_client: DynGraphQLClient,
184}
185impl IntoID<Id> for ExportableClient {
186    fn into_id(
187        self,
188    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
189        Box::pin(async move { self.id().await })
190    }
191}
192impl ExportableClient {
193    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
194        let mut query = self.selection.select("export");
195        query = query.arg("path", path.into());
196        query.execute(self.graphql_client.clone()).await
197    }
198    pub async fn id(&self) -> Result<Id, DaggerError> {
199        let query = self.selection.select("id");
200        query.execute(self.graphql_client.clone()).await
201    }
202}
203impl Loadable for ExportableClient {
204    fn graphql_type() -> &'static str {
205        "Exportable"
206    }
207    fn from_query(
208        proc: Option<Arc<DaggerSessionProc>>,
209        selection: Selection,
210        graphql_client: DynGraphQLClient,
211    ) -> Self {
212        Self {
213            proc,
214            selection,
215            graphql_client,
216        }
217    }
218}
219impl Exportable for ExportableClient {
220    fn export(
221        &self,
222        path: impl Into<String>,
223    ) -> impl core::future::Future<Output = Result<String, DaggerError>> + Send {
224        let mut query = self.selection.select("export");
225        query = query.arg("path", path.into());
226        let graphql_client = self.graphql_client.clone();
227        async move { query.execute(graphql_client).await }
228    }
229    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
230        let query = self.selection.select("id");
231        let graphql_client = self.graphql_client.clone();
232        async move { query.execute(graphql_client).await }
233    }
234}
235/// An object with a globally unique ID.
236pub trait Node {
237    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send;
238}
239#[derive(Clone)]
240pub struct NodeClient {
241    pub proc: Option<Arc<DaggerSessionProc>>,
242    pub selection: Selection,
243    pub graphql_client: DynGraphQLClient,
244}
245impl IntoID<Id> for NodeClient {
246    fn into_id(
247        self,
248    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
249        Box::pin(async move { self.id().await })
250    }
251}
252impl NodeClient {
253    pub async fn id(&self) -> Result<Id, DaggerError> {
254        let query = self.selection.select("id");
255        query.execute(self.graphql_client.clone()).await
256    }
257}
258impl Loadable for NodeClient {
259    fn graphql_type() -> &'static str {
260        "Node"
261    }
262    fn from_query(
263        proc: Option<Arc<DaggerSessionProc>>,
264        selection: Selection,
265        graphql_client: DynGraphQLClient,
266    ) -> Self {
267        Self {
268            proc,
269            selection,
270            graphql_client,
271        }
272    }
273}
274impl Node for NodeClient {
275    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
276        let query = self.selection.select("id");
277        let graphql_client = self.graphql_client.clone();
278        async move { query.execute(graphql_client).await }
279    }
280}
281/// An object that can be force-evaluated.
282/// Calling sync ensures that the object's entire dependency DAG has been evaluated, returning the object's ID once complete.
283pub trait Syncer {
284    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send;
285    fn sync(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send;
286}
287#[derive(Clone)]
288pub struct SyncerClient {
289    pub proc: Option<Arc<DaggerSessionProc>>,
290    pub selection: Selection,
291    pub graphql_client: DynGraphQLClient,
292}
293impl IntoID<Id> for SyncerClient {
294    fn into_id(
295        self,
296    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
297        Box::pin(async move { self.id().await })
298    }
299}
300impl SyncerClient {
301    pub async fn id(&self) -> Result<Id, DaggerError> {
302        let query = self.selection.select("id");
303        query.execute(self.graphql_client.clone()).await
304    }
305    pub async fn sync(&self) -> Result<Id, DaggerError> {
306        let query = self.selection.select("sync");
307        query.execute(self.graphql_client.clone()).await
308    }
309}
310impl Loadable for SyncerClient {
311    fn graphql_type() -> &'static str {
312        "Syncer"
313    }
314    fn from_query(
315        proc: Option<Arc<DaggerSessionProc>>,
316        selection: Selection,
317        graphql_client: DynGraphQLClient,
318    ) -> Self {
319        Self {
320            proc,
321            selection,
322            graphql_client,
323        }
324    }
325}
326impl Syncer for SyncerClient {
327    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
328        let query = self.selection.select("id");
329        let graphql_client = self.graphql_client.clone();
330        async move { query.execute(graphql_client).await }
331    }
332    fn sync(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
333        let query = self.selection.select("sync");
334        let graphql_client = self.graphql_client.clone();
335        async move { query.execute(graphql_client).await }
336    }
337}
338#[derive(Clone)]
339pub struct Address {
340    pub proc: Option<Arc<DaggerSessionProc>>,
341    pub selection: Selection,
342    pub graphql_client: DynGraphQLClient,
343}
344#[derive(Builder, Debug, PartialEq)]
345pub struct AddressDirectoryOpts<'a> {
346    #[builder(setter(into, strip_option), default)]
347    pub exclude: Option<Vec<&'a str>>,
348    #[builder(setter(into, strip_option), default)]
349    pub gitignore: Option<bool>,
350    #[builder(setter(into, strip_option), default)]
351    pub include: Option<Vec<&'a str>>,
352    #[builder(setter(into, strip_option), default)]
353    pub no_cache: Option<bool>,
354}
355#[derive(Builder, Debug, PartialEq)]
356pub struct AddressFileOpts<'a> {
357    #[builder(setter(into, strip_option), default)]
358    pub exclude: Option<Vec<&'a str>>,
359    #[builder(setter(into, strip_option), default)]
360    pub gitignore: Option<bool>,
361    #[builder(setter(into, strip_option), default)]
362    pub include: Option<Vec<&'a str>>,
363    #[builder(setter(into, strip_option), default)]
364    pub no_cache: Option<bool>,
365}
366impl IntoID<Id> for Address {
367    fn into_id(
368        self,
369    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
370        Box::pin(async move { self.id().await })
371    }
372}
373impl Loadable for Address {
374    fn graphql_type() -> &'static str {
375        "Address"
376    }
377    fn from_query(
378        proc: Option<Arc<DaggerSessionProc>>,
379        selection: Selection,
380        graphql_client: DynGraphQLClient,
381    ) -> Self {
382        Self {
383            proc,
384            selection,
385            graphql_client,
386        }
387    }
388}
389impl Address {
390    /// Load a container from the address.
391    pub fn container(&self) -> Container {
392        let query = self.selection.select("container");
393        Container {
394            proc: self.proc.clone(),
395            selection: query,
396            graphql_client: self.graphql_client.clone(),
397        }
398    }
399    /// Load a directory from the address.
400    ///
401    /// # Arguments
402    ///
403    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
404    pub fn directory(&self) -> Directory {
405        let query = self.selection.select("directory");
406        Directory {
407            proc: self.proc.clone(),
408            selection: query,
409            graphql_client: self.graphql_client.clone(),
410        }
411    }
412    /// Load a directory from the address.
413    ///
414    /// # Arguments
415    ///
416    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
417    pub fn directory_opts<'a>(&self, opts: AddressDirectoryOpts<'a>) -> Directory {
418        let mut query = self.selection.select("directory");
419        if let Some(exclude) = opts.exclude {
420            query = query.arg("exclude", exclude);
421        }
422        if let Some(include) = opts.include {
423            query = query.arg("include", include);
424        }
425        if let Some(gitignore) = opts.gitignore {
426            query = query.arg("gitignore", gitignore);
427        }
428        if let Some(no_cache) = opts.no_cache {
429            query = query.arg("noCache", no_cache);
430        }
431        Directory {
432            proc: self.proc.clone(),
433            selection: query,
434            graphql_client: self.graphql_client.clone(),
435        }
436    }
437    /// Load a file from the address.
438    ///
439    /// # Arguments
440    ///
441    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
442    pub fn file(&self) -> File {
443        let query = self.selection.select("file");
444        File {
445            proc: self.proc.clone(),
446            selection: query,
447            graphql_client: self.graphql_client.clone(),
448        }
449    }
450    /// Load a file from the address.
451    ///
452    /// # Arguments
453    ///
454    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
455    pub fn file_opts<'a>(&self, opts: AddressFileOpts<'a>) -> File {
456        let mut query = self.selection.select("file");
457        if let Some(exclude) = opts.exclude {
458            query = query.arg("exclude", exclude);
459        }
460        if let Some(include) = opts.include {
461            query = query.arg("include", include);
462        }
463        if let Some(gitignore) = opts.gitignore {
464            query = query.arg("gitignore", gitignore);
465        }
466        if let Some(no_cache) = opts.no_cache {
467            query = query.arg("noCache", no_cache);
468        }
469        File {
470            proc: self.proc.clone(),
471            selection: query,
472            graphql_client: self.graphql_client.clone(),
473        }
474    }
475    /// Load a git ref (branch, tag or commit) from the address.
476    pub fn git_ref(&self) -> GitRef {
477        let query = self.selection.select("gitRef");
478        GitRef {
479            proc: self.proc.clone(),
480            selection: query,
481            graphql_client: self.graphql_client.clone(),
482        }
483    }
484    /// Load a git repository from the address.
485    pub fn git_repository(&self) -> GitRepository {
486        let query = self.selection.select("gitRepository");
487        GitRepository {
488            proc: self.proc.clone(),
489            selection: query,
490            graphql_client: self.graphql_client.clone(),
491        }
492    }
493    /// A unique identifier for this Address.
494    pub async fn id(&self) -> Result<Id, DaggerError> {
495        let query = self.selection.select("id");
496        query.execute(self.graphql_client.clone()).await
497    }
498    /// Load a secret from the address.
499    pub fn secret(&self) -> Secret {
500        let query = self.selection.select("secret");
501        Secret {
502            proc: self.proc.clone(),
503            selection: query,
504            graphql_client: self.graphql_client.clone(),
505        }
506    }
507    /// Load a service from the address.
508    pub fn service(&self) -> Service {
509        let query = self.selection.select("service");
510        Service {
511            proc: self.proc.clone(),
512            selection: query,
513            graphql_client: self.graphql_client.clone(),
514        }
515    }
516    /// Load a local socket from the address.
517    pub fn socket(&self) -> Socket {
518        let query = self.selection.select("socket");
519        Socket {
520            proc: self.proc.clone(),
521            selection: query,
522            graphql_client: self.graphql_client.clone(),
523        }
524    }
525    /// The address value
526    pub async fn value(&self) -> Result<String, DaggerError> {
527        let query = self.selection.select("value");
528        query.execute(self.graphql_client.clone()).await
529    }
530}
531impl Node for Address {
532    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
533        let query = self.selection.select("id");
534        let graphql_client = self.graphql_client.clone();
535        async move { query.execute(graphql_client).await }
536    }
537}
538#[derive(Clone)]
539pub struct Binding {
540    pub proc: Option<Arc<DaggerSessionProc>>,
541    pub selection: Selection,
542    pub graphql_client: DynGraphQLClient,
543}
544impl IntoID<Id> for Binding {
545    fn into_id(
546        self,
547    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
548        Box::pin(async move { self.id().await })
549    }
550}
551impl Loadable for Binding {
552    fn graphql_type() -> &'static str {
553        "Binding"
554    }
555    fn from_query(
556        proc: Option<Arc<DaggerSessionProc>>,
557        selection: Selection,
558        graphql_client: DynGraphQLClient,
559    ) -> Self {
560        Self {
561            proc,
562            selection,
563            graphql_client,
564        }
565    }
566}
567impl Binding {
568    /// Retrieve the binding value, as type Address
569    pub fn as_address(&self) -> Address {
570        let query = self.selection.select("asAddress");
571        Address {
572            proc: self.proc.clone(),
573            selection: query,
574            graphql_client: self.graphql_client.clone(),
575        }
576    }
577    /// Retrieve the binding value, as type CacheVolume
578    pub fn as_cache_volume(&self) -> CacheVolume {
579        let query = self.selection.select("asCacheVolume");
580        CacheVolume {
581            proc: self.proc.clone(),
582            selection: query,
583            graphql_client: self.graphql_client.clone(),
584        }
585    }
586    /// Retrieve the binding value, as type Changeset
587    pub fn as_changeset(&self) -> Changeset {
588        let query = self.selection.select("asChangeset");
589        Changeset {
590            proc: self.proc.clone(),
591            selection: query,
592            graphql_client: self.graphql_client.clone(),
593        }
594    }
595    /// Retrieve the binding value, as type Check
596    pub fn as_check(&self) -> Check {
597        let query = self.selection.select("asCheck");
598        Check {
599            proc: self.proc.clone(),
600            selection: query,
601            graphql_client: self.graphql_client.clone(),
602        }
603    }
604    /// Retrieve the binding value, as type CheckGroup
605    pub fn as_check_group(&self) -> CheckGroup {
606        let query = self.selection.select("asCheckGroup");
607        CheckGroup {
608            proc: self.proc.clone(),
609            selection: query,
610            graphql_client: self.graphql_client.clone(),
611        }
612    }
613    /// Retrieve the binding value, as type Cloud
614    pub fn as_cloud(&self) -> Cloud {
615        let query = self.selection.select("asCloud");
616        Cloud {
617            proc: self.proc.clone(),
618            selection: query,
619            graphql_client: self.graphql_client.clone(),
620        }
621    }
622    /// Retrieve the binding value, as type Container
623    pub fn as_container(&self) -> Container {
624        let query = self.selection.select("asContainer");
625        Container {
626            proc: self.proc.clone(),
627            selection: query,
628            graphql_client: self.graphql_client.clone(),
629        }
630    }
631    /// Retrieve the binding value, as type DiffStat
632    pub fn as_diff_stat(&self) -> DiffStat {
633        let query = self.selection.select("asDiffStat");
634        DiffStat {
635            proc: self.proc.clone(),
636            selection: query,
637            graphql_client: self.graphql_client.clone(),
638        }
639    }
640    /// Retrieve the binding value, as type Directory
641    pub fn as_directory(&self) -> Directory {
642        let query = self.selection.select("asDirectory");
643        Directory {
644            proc: self.proc.clone(),
645            selection: query,
646            graphql_client: self.graphql_client.clone(),
647        }
648    }
649    /// Retrieve the binding value, as type Env
650    pub fn as_env(&self) -> Env {
651        let query = self.selection.select("asEnv");
652        Env {
653            proc: self.proc.clone(),
654            selection: query,
655            graphql_client: self.graphql_client.clone(),
656        }
657    }
658    /// Retrieve the binding value, as type EnvFile
659    pub fn as_env_file(&self) -> EnvFile {
660        let query = self.selection.select("asEnvFile");
661        EnvFile {
662            proc: self.proc.clone(),
663            selection: query,
664            graphql_client: self.graphql_client.clone(),
665        }
666    }
667    /// Retrieve the binding value, as type File
668    pub fn as_file(&self) -> File {
669        let query = self.selection.select("asFile");
670        File {
671            proc: self.proc.clone(),
672            selection: query,
673            graphql_client: self.graphql_client.clone(),
674        }
675    }
676    /// Retrieve the binding value, as type Generator
677    pub fn as_generator(&self) -> Generator {
678        let query = self.selection.select("asGenerator");
679        Generator {
680            proc: self.proc.clone(),
681            selection: query,
682            graphql_client: self.graphql_client.clone(),
683        }
684    }
685    /// Retrieve the binding value, as type GeneratorGroup
686    pub fn as_generator_group(&self) -> GeneratorGroup {
687        let query = self.selection.select("asGeneratorGroup");
688        GeneratorGroup {
689            proc: self.proc.clone(),
690            selection: query,
691            graphql_client: self.graphql_client.clone(),
692        }
693    }
694    /// Retrieve the binding value, as type GitRef
695    pub fn as_git_ref(&self) -> GitRef {
696        let query = self.selection.select("asGitRef");
697        GitRef {
698            proc: self.proc.clone(),
699            selection: query,
700            graphql_client: self.graphql_client.clone(),
701        }
702    }
703    /// Retrieve the binding value, as type GitRepository
704    pub fn as_git_repository(&self) -> GitRepository {
705        let query = self.selection.select("asGitRepository");
706        GitRepository {
707            proc: self.proc.clone(),
708            selection: query,
709            graphql_client: self.graphql_client.clone(),
710        }
711    }
712    /// Retrieve the binding value, as type HTTPState
713    pub fn as_http_state(&self) -> HttpState {
714        let query = self.selection.select("asHTTPState");
715        HttpState {
716            proc: self.proc.clone(),
717            selection: query,
718            graphql_client: self.graphql_client.clone(),
719        }
720    }
721    /// Retrieve the binding value, as type JSONValue
722    pub fn as_json_value(&self) -> JsonValue {
723        let query = self.selection.select("asJSONValue");
724        JsonValue {
725            proc: self.proc.clone(),
726            selection: query,
727            graphql_client: self.graphql_client.clone(),
728        }
729    }
730    /// Retrieve the binding value, as type Module
731    pub fn as_module(&self) -> Module {
732        let query = self.selection.select("asModule");
733        Module {
734            proc: self.proc.clone(),
735            selection: query,
736            graphql_client: self.graphql_client.clone(),
737        }
738    }
739    /// Retrieve the binding value, as type ModuleConfigClient
740    pub fn as_module_config_client(&self) -> ModuleConfigClient {
741        let query = self.selection.select("asModuleConfigClient");
742        ModuleConfigClient {
743            proc: self.proc.clone(),
744            selection: query,
745            graphql_client: self.graphql_client.clone(),
746        }
747    }
748    /// Retrieve the binding value, as type ModuleSource
749    pub fn as_module_source(&self) -> ModuleSource {
750        let query = self.selection.select("asModuleSource");
751        ModuleSource {
752            proc: self.proc.clone(),
753            selection: query,
754            graphql_client: self.graphql_client.clone(),
755        }
756    }
757    /// Retrieve the binding value, as type SearchResult
758    pub fn as_search_result(&self) -> SearchResult {
759        let query = self.selection.select("asSearchResult");
760        SearchResult {
761            proc: self.proc.clone(),
762            selection: query,
763            graphql_client: self.graphql_client.clone(),
764        }
765    }
766    /// Retrieve the binding value, as type SearchSubmatch
767    pub fn as_search_submatch(&self) -> SearchSubmatch {
768        let query = self.selection.select("asSearchSubmatch");
769        SearchSubmatch {
770            proc: self.proc.clone(),
771            selection: query,
772            graphql_client: self.graphql_client.clone(),
773        }
774    }
775    /// Retrieve the binding value, as type Secret
776    pub fn as_secret(&self) -> Secret {
777        let query = self.selection.select("asSecret");
778        Secret {
779            proc: self.proc.clone(),
780            selection: query,
781            graphql_client: self.graphql_client.clone(),
782        }
783    }
784    /// Retrieve the binding value, as type Service
785    pub fn as_service(&self) -> Service {
786        let query = self.selection.select("asService");
787        Service {
788            proc: self.proc.clone(),
789            selection: query,
790            graphql_client: self.graphql_client.clone(),
791        }
792    }
793    /// Retrieve the binding value, as type Socket
794    pub fn as_socket(&self) -> Socket {
795        let query = self.selection.select("asSocket");
796        Socket {
797            proc: self.proc.clone(),
798            selection: query,
799            graphql_client: self.graphql_client.clone(),
800        }
801    }
802    /// Retrieve the binding value, as type Stat
803    pub fn as_stat(&self) -> Stat {
804        let query = self.selection.select("asStat");
805        Stat {
806            proc: self.proc.clone(),
807            selection: query,
808            graphql_client: self.graphql_client.clone(),
809        }
810    }
811    /// Returns the binding's string value
812    pub async fn as_string(&self) -> Result<String, DaggerError> {
813        let query = self.selection.select("asString");
814        query.execute(self.graphql_client.clone()).await
815    }
816    /// Retrieve the binding value, as type Up
817    pub fn as_up(&self) -> Up {
818        let query = self.selection.select("asUp");
819        Up {
820            proc: self.proc.clone(),
821            selection: query,
822            graphql_client: self.graphql_client.clone(),
823        }
824    }
825    /// Retrieve the binding value, as type UpGroup
826    pub fn as_up_group(&self) -> UpGroup {
827        let query = self.selection.select("asUpGroup");
828        UpGroup {
829            proc: self.proc.clone(),
830            selection: query,
831            graphql_client: self.graphql_client.clone(),
832        }
833    }
834    /// Retrieve the binding value, as type Workspace
835    pub fn as_workspace(&self) -> Workspace {
836        let query = self.selection.select("asWorkspace");
837        Workspace {
838            proc: self.proc.clone(),
839            selection: query,
840            graphql_client: self.graphql_client.clone(),
841        }
842    }
843    /// Returns the digest of the binding value
844    pub async fn digest(&self) -> Result<String, DaggerError> {
845        let query = self.selection.select("digest");
846        query.execute(self.graphql_client.clone()).await
847    }
848    /// A unique identifier for this Binding.
849    pub async fn id(&self) -> Result<Id, DaggerError> {
850        let query = self.selection.select("id");
851        query.execute(self.graphql_client.clone()).await
852    }
853    /// Returns true if the binding is null
854    pub async fn is_null(&self) -> Result<bool, DaggerError> {
855        let query = self.selection.select("isNull");
856        query.execute(self.graphql_client.clone()).await
857    }
858    /// Returns the binding name
859    pub async fn name(&self) -> Result<String, DaggerError> {
860        let query = self.selection.select("name");
861        query.execute(self.graphql_client.clone()).await
862    }
863    /// Returns the binding type
864    pub async fn type_name(&self) -> Result<String, DaggerError> {
865        let query = self.selection.select("typeName");
866        query.execute(self.graphql_client.clone()).await
867    }
868}
869impl Node for Binding {
870    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
871        let query = self.selection.select("id");
872        let graphql_client = self.graphql_client.clone();
873        async move { query.execute(graphql_client).await }
874    }
875}
876#[derive(Clone)]
877pub struct CacheVolume {
878    pub proc: Option<Arc<DaggerSessionProc>>,
879    pub selection: Selection,
880    pub graphql_client: DynGraphQLClient,
881}
882impl IntoID<Id> for CacheVolume {
883    fn into_id(
884        self,
885    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
886        Box::pin(async move { self.id().await })
887    }
888}
889impl Loadable for CacheVolume {
890    fn graphql_type() -> &'static str {
891        "CacheVolume"
892    }
893    fn from_query(
894        proc: Option<Arc<DaggerSessionProc>>,
895        selection: Selection,
896        graphql_client: DynGraphQLClient,
897    ) -> Self {
898        Self {
899            proc,
900            selection,
901            graphql_client,
902        }
903    }
904}
905impl CacheVolume {
906    /// A unique identifier for this CacheVolume.
907    pub async fn id(&self) -> Result<Id, DaggerError> {
908        let query = self.selection.select("id");
909        query.execute(self.graphql_client.clone()).await
910    }
911}
912impl Node for CacheVolume {
913    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
914        let query = self.selection.select("id");
915        let graphql_client = self.graphql_client.clone();
916        async move { query.execute(graphql_client).await }
917    }
918}
919#[derive(Clone)]
920pub struct Changeset {
921    pub proc: Option<Arc<DaggerSessionProc>>,
922    pub selection: Selection,
923    pub graphql_client: DynGraphQLClient,
924}
925#[derive(Builder, Debug, PartialEq)]
926pub struct ChangesetWithChangesetOpts {
927    /// What to do on a merge conflict
928    #[builder(setter(into, strip_option), default)]
929    pub on_conflict: Option<ChangesetMergeConflict>,
930}
931#[derive(Builder, Debug, PartialEq)]
932pub struct ChangesetWithChangesetsOpts {
933    /// What to do on a merge conflict
934    #[builder(setter(into, strip_option), default)]
935    pub on_conflict: Option<ChangesetsMergeConflict>,
936}
937impl IntoID<Id> for Changeset {
938    fn into_id(
939        self,
940    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
941        Box::pin(async move { self.id().await })
942    }
943}
944impl Loadable for Changeset {
945    fn graphql_type() -> &'static str {
946        "Changeset"
947    }
948    fn from_query(
949        proc: Option<Arc<DaggerSessionProc>>,
950        selection: Selection,
951        graphql_client: DynGraphQLClient,
952    ) -> Self {
953        Self {
954            proc,
955            selection,
956            graphql_client,
957        }
958    }
959}
960impl Changeset {
961    /// Files and directories that were added in the newer directory.
962    pub async fn added_paths(&self) -> Result<Vec<String>, DaggerError> {
963        let query = self.selection.select("addedPaths");
964        query.execute(self.graphql_client.clone()).await
965    }
966    /// The newer/upper snapshot.
967    pub fn after(&self) -> Directory {
968        let query = self.selection.select("after");
969        Directory {
970            proc: self.proc.clone(),
971            selection: query,
972            graphql_client: self.graphql_client.clone(),
973        }
974    }
975    /// Return a Git-compatible patch of the changes
976    pub fn as_patch(&self) -> File {
977        let query = self.selection.select("asPatch");
978        File {
979            proc: self.proc.clone(),
980            selection: query,
981            graphql_client: self.graphql_client.clone(),
982        }
983    }
984    /// The older/lower snapshot to compare against.
985    pub fn before(&self) -> Directory {
986        let query = self.selection.select("before");
987        Directory {
988            proc: self.proc.clone(),
989            selection: query,
990            graphql_client: self.graphql_client.clone(),
991        }
992    }
993    /// Structured per-path diff statistics (kind and line counts) for this changeset.
994    pub async fn diff_stats(&self) -> Result<Vec<DiffStat>, DaggerError> {
995        let query = self.selection.select("diffStats");
996        let query = query.select("id");
997        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
998        Ok(ids
999            .into_iter()
1000            .map(|id| DiffStat {
1001                proc: self.proc.clone(),
1002                selection: crate::querybuilder::query()
1003                    .select("node")
1004                    .arg("id", &id.0)
1005                    .inline_fragment("DiffStat"),
1006                graphql_client: self.graphql_client.clone(),
1007            })
1008            .collect())
1009    }
1010    /// Applies the diff represented by this changeset to a path on the host.
1011    ///
1012    /// # Arguments
1013    ///
1014    /// * `path` - Location of the copied directory (e.g., "logs/").
1015    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
1016        let mut query = self.selection.select("export");
1017        query = query.arg("path", path.into());
1018        query.execute(self.graphql_client.clone()).await
1019    }
1020    /// A unique identifier for this Changeset.
1021    pub async fn id(&self) -> Result<Id, DaggerError> {
1022        let query = self.selection.select("id");
1023        query.execute(self.graphql_client.clone()).await
1024    }
1025    /// Returns true if the changeset is empty (i.e. there are no changes).
1026    pub async fn is_empty(&self) -> Result<bool, DaggerError> {
1027        let query = self.selection.select("isEmpty");
1028        query.execute(self.graphql_client.clone()).await
1029    }
1030    /// Return a snapshot containing only the created and modified files
1031    pub fn layer(&self) -> Directory {
1032        let query = self.selection.select("layer");
1033        Directory {
1034            proc: self.proc.clone(),
1035            selection: query,
1036            graphql_client: self.graphql_client.clone(),
1037        }
1038    }
1039    /// Files and directories that existed before and were updated in the newer directory.
1040    pub async fn modified_paths(&self) -> Result<Vec<String>, DaggerError> {
1041        let query = self.selection.select("modifiedPaths");
1042        query.execute(self.graphql_client.clone()).await
1043    }
1044    /// Files and directories that were removed. Directories are indicated by a trailing slash, and their child paths are not included.
1045    pub async fn removed_paths(&self) -> Result<Vec<String>, DaggerError> {
1046        let query = self.selection.select("removedPaths");
1047        query.execute(self.graphql_client.clone()).await
1048    }
1049    /// Force evaluation in the engine.
1050    pub async fn sync(&self) -> Result<Changeset, DaggerError> {
1051        let query = self.selection.select("sync");
1052        let id: Id = query.execute(self.graphql_client.clone()).await?;
1053        Ok(Changeset {
1054            proc: self.proc.clone(),
1055            selection: query
1056                .root()
1057                .select("node")
1058                .arg("id", &id.0)
1059                .inline_fragment("Changeset"),
1060            graphql_client: self.graphql_client.clone(),
1061        })
1062    }
1063    /// Add changes to an existing changeset
1064    /// By default the operation will fail in case of conflicts, for instance a file modified in both changesets. The behavior can be adjusted using onConflict argument
1065    ///
1066    /// # Arguments
1067    ///
1068    /// * `changes` - Changes to merge into the actual changeset
1069    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
1070    pub fn with_changeset(&self, changes: impl IntoID<Id>) -> Changeset {
1071        let mut query = self.selection.select("withChangeset");
1072        query = query.arg_lazy(
1073            "changes",
1074            Box::new(move || {
1075                let changes = changes.clone();
1076                Box::pin(async move { changes.into_id().await.unwrap().quote() })
1077            }),
1078        );
1079        Changeset {
1080            proc: self.proc.clone(),
1081            selection: query,
1082            graphql_client: self.graphql_client.clone(),
1083        }
1084    }
1085    /// Add changes to an existing changeset
1086    /// By default the operation will fail in case of conflicts, for instance a file modified in both changesets. The behavior can be adjusted using onConflict argument
1087    ///
1088    /// # Arguments
1089    ///
1090    /// * `changes` - Changes to merge into the actual changeset
1091    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
1092    pub fn with_changeset_opts(
1093        &self,
1094        changes: impl IntoID<Id>,
1095        opts: ChangesetWithChangesetOpts,
1096    ) -> Changeset {
1097        let mut query = self.selection.select("withChangeset");
1098        query = query.arg_lazy(
1099            "changes",
1100            Box::new(move || {
1101                let changes = changes.clone();
1102                Box::pin(async move { changes.into_id().await.unwrap().quote() })
1103            }),
1104        );
1105        if let Some(on_conflict) = opts.on_conflict {
1106            query = query.arg("onConflict", on_conflict);
1107        }
1108        Changeset {
1109            proc: self.proc.clone(),
1110            selection: query,
1111            graphql_client: self.graphql_client.clone(),
1112        }
1113    }
1114    /// Add changes from multiple changesets using git octopus merge strategy
1115    /// This is more efficient than chaining multiple withChangeset calls when merging many changesets.
1116    /// Only FAIL and FAIL_EARLY conflict strategies are supported (octopus merge cannot use -X ours/theirs).
1117    ///
1118    /// # Arguments
1119    ///
1120    /// * `changes` - List of changesets to merge into the actual changeset
1121    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
1122    pub fn with_changesets(&self, changes: Vec<Id>) -> Changeset {
1123        let mut query = self.selection.select("withChangesets");
1124        query = query.arg("changes", changes);
1125        Changeset {
1126            proc: self.proc.clone(),
1127            selection: query,
1128            graphql_client: self.graphql_client.clone(),
1129        }
1130    }
1131    /// Add changes from multiple changesets using git octopus merge strategy
1132    /// This is more efficient than chaining multiple withChangeset calls when merging many changesets.
1133    /// Only FAIL and FAIL_EARLY conflict strategies are supported (octopus merge cannot use -X ours/theirs).
1134    ///
1135    /// # Arguments
1136    ///
1137    /// * `changes` - List of changesets to merge into the actual changeset
1138    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
1139    pub fn with_changesets_opts(
1140        &self,
1141        changes: Vec<Id>,
1142        opts: ChangesetWithChangesetsOpts,
1143    ) -> Changeset {
1144        let mut query = self.selection.select("withChangesets");
1145        query = query.arg("changes", changes);
1146        if let Some(on_conflict) = opts.on_conflict {
1147            query = query.arg("onConflict", on_conflict);
1148        }
1149        Changeset {
1150            proc: self.proc.clone(),
1151            selection: query,
1152            graphql_client: self.graphql_client.clone(),
1153        }
1154    }
1155}
1156impl Exportable for Changeset {
1157    fn export(
1158        &self,
1159        path: impl Into<String>,
1160    ) -> impl core::future::Future<Output = Result<String, DaggerError>> + Send {
1161        let mut query = self.selection.select("export");
1162        query = query.arg("path", path.into());
1163        let graphql_client = self.graphql_client.clone();
1164        async move { query.execute(graphql_client).await }
1165    }
1166    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
1167        let query = self.selection.select("id");
1168        let graphql_client = self.graphql_client.clone();
1169        async move { query.execute(graphql_client).await }
1170    }
1171}
1172impl Node for Changeset {
1173    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
1174        let query = self.selection.select("id");
1175        let graphql_client = self.graphql_client.clone();
1176        async move { query.execute(graphql_client).await }
1177    }
1178}
1179impl Syncer for Changeset {
1180    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
1181        let query = self.selection.select("id");
1182        let graphql_client = self.graphql_client.clone();
1183        async move { query.execute(graphql_client).await }
1184    }
1185    fn sync(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
1186        let query = self.selection.select("sync");
1187        let graphql_client = self.graphql_client.clone();
1188        async move { query.execute(graphql_client).await }
1189    }
1190}
1191#[derive(Clone)]
1192pub struct Check {
1193    pub proc: Option<Arc<DaggerSessionProc>>,
1194    pub selection: Selection,
1195    pub graphql_client: DynGraphQLClient,
1196}
1197impl IntoID<Id> for Check {
1198    fn into_id(
1199        self,
1200    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
1201        Box::pin(async move { self.id().await })
1202    }
1203}
1204impl Loadable for Check {
1205    fn graphql_type() -> &'static str {
1206        "Check"
1207    }
1208    fn from_query(
1209        proc: Option<Arc<DaggerSessionProc>>,
1210        selection: Selection,
1211        graphql_client: DynGraphQLClient,
1212    ) -> Self {
1213        Self {
1214            proc,
1215            selection,
1216            graphql_client,
1217        }
1218    }
1219}
1220impl Check {
1221    /// The type of check: 'check' for annotated checks, 'generate' for generate-as-checks
1222    pub async fn check_type(&self) -> Result<String, DaggerError> {
1223        let query = self.selection.select("checkType");
1224        query.execute(self.graphql_client.clone()).await
1225    }
1226    /// Whether the check completed
1227    pub async fn completed(&self) -> Result<bool, DaggerError> {
1228        let query = self.selection.select("completed");
1229        query.execute(self.graphql_client.clone()).await
1230    }
1231    /// The description of the check
1232    pub async fn description(&self) -> Result<String, DaggerError> {
1233        let query = self.selection.select("description");
1234        query.execute(self.graphql_client.clone()).await
1235    }
1236    /// If the check failed, this is the error
1237    pub fn error(&self) -> Error {
1238        let query = self.selection.select("error");
1239        Error {
1240            proc: self.proc.clone(),
1241            selection: query,
1242            graphql_client: self.graphql_client.clone(),
1243        }
1244    }
1245    /// A unique identifier for this Check.
1246    pub async fn id(&self) -> Result<Id, DaggerError> {
1247        let query = self.selection.select("id");
1248        query.execute(self.graphql_client.clone()).await
1249    }
1250    /// Return the fully qualified name of the check
1251    pub async fn name(&self) -> Result<String, DaggerError> {
1252        let query = self.selection.select("name");
1253        query.execute(self.graphql_client.clone()).await
1254    }
1255    /// The original module in which the check has been defined
1256    pub fn original_module(&self) -> Module {
1257        let query = self.selection.select("originalModule");
1258        Module {
1259            proc: self.proc.clone(),
1260            selection: query,
1261            graphql_client: self.graphql_client.clone(),
1262        }
1263    }
1264    /// Whether the check passed
1265    pub async fn passed(&self) -> Result<bool, DaggerError> {
1266        let query = self.selection.select("passed");
1267        query.execute(self.graphql_client.clone()).await
1268    }
1269    /// The path of the check within its module
1270    pub async fn path(&self) -> Result<Vec<String>, DaggerError> {
1271        let query = self.selection.select("path");
1272        query.execute(self.graphql_client.clone()).await
1273    }
1274    /// An emoji representing the result of the check
1275    pub async fn result_emoji(&self) -> Result<String, DaggerError> {
1276        let query = self.selection.select("resultEmoji");
1277        query.execute(self.graphql_client.clone()).await
1278    }
1279    /// Execute the check
1280    pub fn run(&self) -> Check {
1281        let query = self.selection.select("run");
1282        Check {
1283            proc: self.proc.clone(),
1284            selection: query,
1285            graphql_client: self.graphql_client.clone(),
1286        }
1287    }
1288}
1289impl Node for Check {
1290    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
1291        let query = self.selection.select("id");
1292        let graphql_client = self.graphql_client.clone();
1293        async move { query.execute(graphql_client).await }
1294    }
1295}
1296#[derive(Clone)]
1297pub struct CheckGroup {
1298    pub proc: Option<Arc<DaggerSessionProc>>,
1299    pub selection: Selection,
1300    pub graphql_client: DynGraphQLClient,
1301}
1302#[derive(Builder, Debug, PartialEq)]
1303pub struct CheckGroupRunOpts {
1304    /// If true, stop running checks as soon as any check fails.
1305    #[builder(setter(into, strip_option), default)]
1306    pub fail_fast: Option<bool>,
1307}
1308impl IntoID<Id> for CheckGroup {
1309    fn into_id(
1310        self,
1311    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
1312        Box::pin(async move { self.id().await })
1313    }
1314}
1315impl Loadable for CheckGroup {
1316    fn graphql_type() -> &'static str {
1317        "CheckGroup"
1318    }
1319    fn from_query(
1320        proc: Option<Arc<DaggerSessionProc>>,
1321        selection: Selection,
1322        graphql_client: DynGraphQLClient,
1323    ) -> Self {
1324        Self {
1325            proc,
1326            selection,
1327            graphql_client,
1328        }
1329    }
1330}
1331impl CheckGroup {
1332    /// A unique identifier for this CheckGroup.
1333    pub async fn id(&self) -> Result<Id, DaggerError> {
1334        let query = self.selection.select("id");
1335        query.execute(self.graphql_client.clone()).await
1336    }
1337    /// Return a list of individual checks and their details
1338    pub async fn list(&self) -> Result<Vec<Check>, DaggerError> {
1339        let query = self.selection.select("list");
1340        let query = query.select("id");
1341        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
1342        Ok(ids
1343            .into_iter()
1344            .map(|id| Check {
1345                proc: self.proc.clone(),
1346                selection: crate::querybuilder::query()
1347                    .select("node")
1348                    .arg("id", &id.0)
1349                    .inline_fragment("Check"),
1350                graphql_client: self.graphql_client.clone(),
1351            })
1352            .collect())
1353    }
1354    /// Generate a markdown report
1355    pub fn report(&self) -> File {
1356        let query = self.selection.select("report");
1357        File {
1358            proc: self.proc.clone(),
1359            selection: query,
1360            graphql_client: self.graphql_client.clone(),
1361        }
1362    }
1363    /// Execute all selected checks
1364    ///
1365    /// # Arguments
1366    ///
1367    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
1368    pub fn run(&self) -> CheckGroup {
1369        let query = self.selection.select("run");
1370        CheckGroup {
1371            proc: self.proc.clone(),
1372            selection: query,
1373            graphql_client: self.graphql_client.clone(),
1374        }
1375    }
1376    /// Execute all selected checks
1377    ///
1378    /// # Arguments
1379    ///
1380    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
1381    pub fn run_opts(&self, opts: CheckGroupRunOpts) -> CheckGroup {
1382        let mut query = self.selection.select("run");
1383        if let Some(fail_fast) = opts.fail_fast {
1384            query = query.arg("failFast", fail_fast);
1385        }
1386        CheckGroup {
1387            proc: self.proc.clone(),
1388            selection: query,
1389            graphql_client: self.graphql_client.clone(),
1390        }
1391    }
1392}
1393impl Node for CheckGroup {
1394    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
1395        let query = self.selection.select("id");
1396        let graphql_client = self.graphql_client.clone();
1397        async move { query.execute(graphql_client).await }
1398    }
1399}
1400#[derive(Clone)]
1401pub struct ClientFilesyncMirror {
1402    pub proc: Option<Arc<DaggerSessionProc>>,
1403    pub selection: Selection,
1404    pub graphql_client: DynGraphQLClient,
1405}
1406impl IntoID<Id> for ClientFilesyncMirror {
1407    fn into_id(
1408        self,
1409    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
1410        Box::pin(async move { self.id().await })
1411    }
1412}
1413impl Loadable for ClientFilesyncMirror {
1414    fn graphql_type() -> &'static str {
1415        "ClientFilesyncMirror"
1416    }
1417    fn from_query(
1418        proc: Option<Arc<DaggerSessionProc>>,
1419        selection: Selection,
1420        graphql_client: DynGraphQLClient,
1421    ) -> Self {
1422        Self {
1423            proc,
1424            selection,
1425            graphql_client,
1426        }
1427    }
1428}
1429impl ClientFilesyncMirror {
1430    /// A unique identifier for this ClientFilesyncMirror.
1431    pub async fn id(&self) -> Result<Id, DaggerError> {
1432        let query = self.selection.select("id");
1433        query.execute(self.graphql_client.clone()).await
1434    }
1435}
1436impl Node for ClientFilesyncMirror {
1437    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
1438        let query = self.selection.select("id");
1439        let graphql_client = self.graphql_client.clone();
1440        async move { query.execute(graphql_client).await }
1441    }
1442}
1443#[derive(Clone)]
1444pub struct Cloud {
1445    pub proc: Option<Arc<DaggerSessionProc>>,
1446    pub selection: Selection,
1447    pub graphql_client: DynGraphQLClient,
1448}
1449impl IntoID<Id> for Cloud {
1450    fn into_id(
1451        self,
1452    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
1453        Box::pin(async move { self.id().await })
1454    }
1455}
1456impl Loadable for Cloud {
1457    fn graphql_type() -> &'static str {
1458        "Cloud"
1459    }
1460    fn from_query(
1461        proc: Option<Arc<DaggerSessionProc>>,
1462        selection: Selection,
1463        graphql_client: DynGraphQLClient,
1464    ) -> Self {
1465        Self {
1466            proc,
1467            selection,
1468            graphql_client,
1469        }
1470    }
1471}
1472impl Cloud {
1473    /// A unique identifier for this Cloud.
1474    pub async fn id(&self) -> Result<Id, DaggerError> {
1475        let query = self.selection.select("id");
1476        query.execute(self.graphql_client.clone()).await
1477    }
1478    /// The trace URL for the current session
1479    pub async fn trace_url(&self) -> Result<String, DaggerError> {
1480        let query = self.selection.select("traceURL");
1481        query.execute(self.graphql_client.clone()).await
1482    }
1483}
1484impl Node for Cloud {
1485    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
1486        let query = self.selection.select("id");
1487        let graphql_client = self.graphql_client.clone();
1488        async move { query.execute(graphql_client).await }
1489    }
1490}
1491#[derive(Clone)]
1492pub struct Container {
1493    pub proc: Option<Arc<DaggerSessionProc>>,
1494    pub selection: Selection,
1495    pub graphql_client: DynGraphQLClient,
1496}
1497#[derive(Builder, Debug, PartialEq)]
1498pub struct ContainerAsServiceOpts<'a> {
1499    /// Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).
1500    /// If empty, the container's default command is used.
1501    #[builder(setter(into, strip_option), default)]
1502    pub args: Option<Vec<&'a str>>,
1503    /// Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1504    #[builder(setter(into, strip_option), default)]
1505    pub expand: Option<bool>,
1506    /// Provides Dagger access to the executed command.
1507    #[builder(setter(into, strip_option), default)]
1508    pub experimental_privileged_nesting: Option<bool>,
1509    /// Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands.
1510    #[builder(setter(into, strip_option), default)]
1511    pub insecure_root_capabilities: Option<bool>,
1512    /// If set, skip the automatic init process injected into containers by default.
1513    /// This should only be used if the user requires that their exec process be the pid 1 process in the container. Otherwise it may result in unexpected behavior.
1514    #[builder(setter(into, strip_option), default)]
1515    pub no_init: Option<bool>,
1516    /// If the container has an entrypoint, prepend it to the args.
1517    #[builder(setter(into, strip_option), default)]
1518    pub use_entrypoint: Option<bool>,
1519}
1520#[derive(Builder, Debug, PartialEq)]
1521pub struct ContainerAsTarballOpts {
1522    /// Force each layer of the image to use the specified compression algorithm.
1523    /// If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip.
1524    #[builder(setter(into, strip_option), default)]
1525    pub forced_compression: Option<ImageLayerCompression>,
1526    /// Use the specified media types for the image's layers.
1527    /// Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
1528    #[builder(setter(into, strip_option), default)]
1529    pub media_types: Option<ImageMediaTypes>,
1530    /// Identifiers for other platform specific containers.
1531    /// Used for multi-platform images.
1532    #[builder(setter(into, strip_option), default)]
1533    pub platform_variants: Option<Vec<Id>>,
1534}
1535#[derive(Builder, Debug, PartialEq)]
1536pub struct ContainerDirectoryOpts {
1537    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1538    #[builder(setter(into, strip_option), default)]
1539    pub expand: Option<bool>,
1540}
1541#[derive(Builder, Debug, PartialEq)]
1542pub struct ContainerExistsOpts {
1543    /// If specified, do not follow symlinks.
1544    #[builder(setter(into, strip_option), default)]
1545    pub do_not_follow_symlinks: Option<bool>,
1546    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1547    #[builder(setter(into, strip_option), default)]
1548    pub expand: Option<bool>,
1549    /// If specified, also validate the type of file (e.g. "REGULAR_TYPE", "DIRECTORY_TYPE", or "SYMLINK_TYPE").
1550    #[builder(setter(into, strip_option), default)]
1551    pub expected_type: Option<ExistsType>,
1552}
1553#[derive(Builder, Debug, PartialEq)]
1554pub struct ContainerExportOpts {
1555    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1556    #[builder(setter(into, strip_option), default)]
1557    pub expand: Option<bool>,
1558    /// Force each layer of the exported image to use the specified compression algorithm.
1559    /// If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip.
1560    #[builder(setter(into, strip_option), default)]
1561    pub forced_compression: Option<ImageLayerCompression>,
1562    /// Use the specified media types for the exported image's layers.
1563    /// Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
1564    #[builder(setter(into, strip_option), default)]
1565    pub media_types: Option<ImageMediaTypes>,
1566    /// Identifiers for other platform specific containers.
1567    /// Used for multi-platform image.
1568    #[builder(setter(into, strip_option), default)]
1569    pub platform_variants: Option<Vec<Id>>,
1570}
1571#[derive(Builder, Debug, PartialEq)]
1572pub struct ContainerExportImageOpts {
1573    /// Force each layer of the exported image to use the specified compression algorithm.
1574    /// If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip.
1575    #[builder(setter(into, strip_option), default)]
1576    pub forced_compression: Option<ImageLayerCompression>,
1577    /// Use the specified media types for the exported image's layers.
1578    /// Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
1579    #[builder(setter(into, strip_option), default)]
1580    pub media_types: Option<ImageMediaTypes>,
1581    /// Identifiers for other platform specific containers.
1582    /// Used for multi-platform image.
1583    #[builder(setter(into, strip_option), default)]
1584    pub platform_variants: Option<Vec<Id>>,
1585}
1586#[derive(Builder, Debug, PartialEq)]
1587pub struct ContainerFileOpts {
1588    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
1589    #[builder(setter(into, strip_option), default)]
1590    pub expand: Option<bool>,
1591}
1592#[derive(Builder, Debug, PartialEq)]
1593pub struct ContainerFromOpts {
1594    /// Service to use as the registry endpoint for the image address.
1595    /// The service will be started only for this pull.
1596    #[builder(setter(into, strip_option), default)]
1597    pub registry_service: Option<Id>,
1598}
1599#[derive(Builder, Debug, PartialEq)]
1600pub struct ContainerImportOpts<'a> {
1601    /// Identifies the tag to import from the archive, if the archive bundles multiple tags.
1602    #[builder(setter(into, strip_option), default)]
1603    pub tag: Option<&'a str>,
1604}
1605#[derive(Builder, Debug, PartialEq)]
1606pub struct ContainerPublishOpts {
1607    /// Force each layer of the published image to use the specified compression algorithm.
1608    /// If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip.
1609    #[builder(setter(into, strip_option), default)]
1610    pub forced_compression: Option<ImageLayerCompression>,
1611    /// Use the specified media types for the published image's layers.
1612    /// Defaults to "OCI", which is compatible with most recent registries, but "Docker" may be needed for older registries without OCI support.
1613    #[builder(setter(into, strip_option), default)]
1614    pub media_types: Option<ImageMediaTypes>,
1615    /// Identifiers for other platform specific containers.
1616    /// Used for multi-platform image.
1617    #[builder(setter(into, strip_option), default)]
1618    pub platform_variants: Option<Vec<Id>>,
1619    /// Service to use as the registry endpoint for the image address.
1620    /// The service will be started only for this push.
1621    #[builder(setter(into, strip_option), default)]
1622    pub registry_service: Option<Id>,
1623}
1624#[derive(Builder, Debug, PartialEq)]
1625pub struct ContainerStatOpts {
1626    /// If specified, do not follow symlinks.
1627    #[builder(setter(into, strip_option), default)]
1628    pub do_not_follow_symlinks: Option<bool>,
1629}
1630#[derive(Builder, Debug, PartialEq)]
1631pub struct ContainerTerminalOpts<'a> {
1632    /// If set, override the container's default terminal command and invoke these command arguments instead.
1633    #[builder(setter(into, strip_option), default)]
1634    pub cmd: Option<Vec<&'a str>>,
1635    /// Provides Dagger access to the executed command.
1636    #[builder(setter(into, strip_option), default)]
1637    pub experimental_privileged_nesting: Option<bool>,
1638    /// Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands.
1639    #[builder(setter(into, strip_option), default)]
1640    pub insecure_root_capabilities: Option<bool>,
1641}
1642#[derive(Builder, Debug, PartialEq)]
1643pub struct ContainerUpOpts<'a> {
1644    /// Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).
1645    /// If empty, the container's default command is used.
1646    #[builder(setter(into, strip_option), default)]
1647    pub args: Option<Vec<&'a str>>,
1648    /// Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1649    #[builder(setter(into, strip_option), default)]
1650    pub expand: Option<bool>,
1651    /// Provides Dagger access to the executed command.
1652    #[builder(setter(into, strip_option), default)]
1653    pub experimental_privileged_nesting: Option<bool>,
1654    /// Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands.
1655    #[builder(setter(into, strip_option), default)]
1656    pub insecure_root_capabilities: Option<bool>,
1657    /// If set, skip the automatic init process injected into containers by default.
1658    /// This should only be used if the user requires that their exec process be the pid 1 process in the container. Otherwise it may result in unexpected behavior.
1659    #[builder(setter(into, strip_option), default)]
1660    pub no_init: Option<bool>,
1661    /// List of frontend/backend port mappings to forward.
1662    /// Frontend is the port accepting traffic on the host, backend is the service port.
1663    #[builder(setter(into, strip_option), default)]
1664    pub ports: Option<Vec<PortForward>>,
1665    /// Bind each tunnel port to a random port on the host.
1666    #[builder(setter(into, strip_option), default)]
1667    pub random: Option<bool>,
1668    /// If the container has an entrypoint, prepend it to the args.
1669    #[builder(setter(into, strip_option), default)]
1670    pub use_entrypoint: Option<bool>,
1671}
1672#[derive(Builder, Debug, PartialEq)]
1673pub struct ContainerWithDefaultTerminalCmdOpts {
1674    /// Provides Dagger access to the executed command.
1675    #[builder(setter(into, strip_option), default)]
1676    pub experimental_privileged_nesting: Option<bool>,
1677    /// Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands.
1678    #[builder(setter(into, strip_option), default)]
1679    pub insecure_root_capabilities: Option<bool>,
1680}
1681#[derive(Builder, Debug, PartialEq)]
1682pub struct ContainerWithDirectoryOpts<'a> {
1683    /// Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]).
1684    #[builder(setter(into, strip_option), default)]
1685    pub exclude: Option<Vec<&'a str>>,
1686    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1687    #[builder(setter(into, strip_option), default)]
1688    pub expand: Option<bool>,
1689    /// Apply .gitignore rules when writing the directory.
1690    #[builder(setter(into, strip_option), default)]
1691    pub gitignore: Option<bool>,
1692    /// Patterns to include in the written directory (e.g. ["*.go", "go.mod", "go.sum"]).
1693    #[builder(setter(into, strip_option), default)]
1694    pub include: Option<Vec<&'a str>>,
1695    /// A user:group to set for the directory and its contents.
1696    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1697    /// If the group is omitted, it defaults to the same as the user.
1698    #[builder(setter(into, strip_option), default)]
1699    pub owner: Option<&'a str>,
1700    #[builder(setter(into, strip_option), default)]
1701    pub permissions: Option<isize>,
1702}
1703#[derive(Builder, Debug, PartialEq)]
1704pub struct ContainerWithDockerHealthcheckOpts<'a> {
1705    /// Interval between running healthcheck. Example: "30s"
1706    #[builder(setter(into, strip_option), default)]
1707    pub interval: Option<&'a str>,
1708    /// The maximum number of consecutive failures before the container is marked as unhealthy. Example: "3"
1709    #[builder(setter(into, strip_option), default)]
1710    pub retries: Option<isize>,
1711    /// When true, command must be a single element, which is run using the container's shell
1712    #[builder(setter(into, strip_option), default)]
1713    pub shell: Option<bool>,
1714    /// StartInterval configures the duration between checks during the startup phase. Example: "5s"
1715    #[builder(setter(into, strip_option), default)]
1716    pub start_interval: Option<&'a str>,
1717    /// StartPeriod allows for failures during this initial startup period which do not count towards maximum number of retries. Example: "0s"
1718    #[builder(setter(into, strip_option), default)]
1719    pub start_period: Option<&'a str>,
1720    /// Healthcheck timeout. Example: "3s"
1721    #[builder(setter(into, strip_option), default)]
1722    pub timeout: Option<&'a str>,
1723}
1724#[derive(Builder, Debug, PartialEq)]
1725pub struct ContainerWithEntrypointOpts {
1726    /// Don't reset the default arguments when setting the entrypoint. By default it is reset, since entrypoint and default args are often tightly coupled.
1727    #[builder(setter(into, strip_option), default)]
1728    pub keep_default_args: Option<bool>,
1729}
1730#[derive(Builder, Debug, PartialEq)]
1731pub struct ContainerWithEnvVariableOpts {
1732    /// Replace "${VAR}" or "$VAR" in the value according to the current environment variables defined in the container (e.g. "/opt/bin:$PATH").
1733    #[builder(setter(into, strip_option), default)]
1734    pub expand: Option<bool>,
1735}
1736#[derive(Builder, Debug, PartialEq)]
1737pub struct ContainerWithExecOpts<'a> {
1738    /// Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1739    #[builder(setter(into, strip_option), default)]
1740    pub expand: Option<bool>,
1741    /// Exit codes this command is allowed to exit with without error
1742    #[builder(setter(into, strip_option), default)]
1743    pub expect: Option<ReturnType>,
1744    /// Provides Dagger access to the executed command.
1745    #[builder(setter(into, strip_option), default)]
1746    pub experimental_privileged_nesting: Option<bool>,
1747    /// Execute the command with all root capabilities. Like --privileged in Docker
1748    /// DANGER: this grants the command full access to the host system. Only use when 1) you trust the command being executed and 2) you specifically need this level of access.
1749    #[builder(setter(into, strip_option), default)]
1750    pub insecure_root_capabilities: Option<bool>,
1751    /// Skip the automatic init process injected into containers by default.
1752    /// Only use this if you specifically need the command to be pid 1 in the container. Otherwise it may result in unexpected behavior. If you're not sure, you don't need this.
1753    #[builder(setter(into, strip_option), default)]
1754    pub no_init: Option<bool>,
1755    /// Redirect the command's standard error to a file in the container. Example: "./stderr.txt"
1756    #[builder(setter(into, strip_option), default)]
1757    pub redirect_stderr: Option<&'a str>,
1758    /// Redirect the command's standard input from a file in the container. Example: "./stdin.txt"
1759    #[builder(setter(into, strip_option), default)]
1760    pub redirect_stdin: Option<&'a str>,
1761    /// Redirect the command's standard output to a file in the container. Example: "./stdout.txt"
1762    #[builder(setter(into, strip_option), default)]
1763    pub redirect_stdout: Option<&'a str>,
1764    /// Content to write to the command's standard input. Example: "Hello world")
1765    #[builder(setter(into, strip_option), default)]
1766    pub stdin: Option<&'a str>,
1767    /// Apply the OCI entrypoint, if present, by prepending it to the args. Ignored by default.
1768    #[builder(setter(into, strip_option), default)]
1769    pub use_entrypoint: Option<bool>,
1770}
1771#[derive(Builder, Debug, PartialEq)]
1772pub struct ContainerWithExposedPortOpts<'a> {
1773    /// Port description. Example: "payment API endpoint"
1774    #[builder(setter(into, strip_option), default)]
1775    pub description: Option<&'a str>,
1776    /// Skip the health check when run as a service.
1777    #[builder(setter(into, strip_option), default)]
1778    pub experimental_skip_healthcheck: Option<bool>,
1779    /// Network protocol. Example: "tcp"
1780    #[builder(setter(into, strip_option), default)]
1781    pub protocol: Option<NetworkProtocol>,
1782}
1783#[derive(Builder, Debug, PartialEq)]
1784pub struct ContainerWithFileOpts<'a> {
1785    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
1786    #[builder(setter(into, strip_option), default)]
1787    pub expand: Option<bool>,
1788    /// A user:group to set for the file.
1789    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1790    /// If the group is omitted, it defaults to the same as the user.
1791    #[builder(setter(into, strip_option), default)]
1792    pub owner: Option<&'a str>,
1793    /// Permissions of the new file. Example: 0600
1794    #[builder(setter(into, strip_option), default)]
1795    pub permissions: Option<isize>,
1796}
1797#[derive(Builder, Debug, PartialEq)]
1798pub struct ContainerWithFilesOpts<'a> {
1799    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
1800    #[builder(setter(into, strip_option), default)]
1801    pub expand: Option<bool>,
1802    /// A user:group to set for the files.
1803    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1804    /// If the group is omitted, it defaults to the same as the user.
1805    #[builder(setter(into, strip_option), default)]
1806    pub owner: Option<&'a str>,
1807    /// Permission given to the copied files (e.g., 0600).
1808    #[builder(setter(into, strip_option), default)]
1809    pub permissions: Option<isize>,
1810}
1811#[derive(Builder, Debug, PartialEq)]
1812pub struct ContainerWithMountedCacheOpts<'a> {
1813    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1814    #[builder(setter(into, strip_option), default)]
1815    pub expand: Option<bool>,
1816    /// A user:group to set for the mounted cache directory.
1817    /// Note that this changes the ownership of the specified mount along with the initial filesystem provided by source (if any). It does not have any effect if/when the cache has already been created.
1818    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1819    /// If the group is omitted, it defaults to the same as the user.
1820    #[builder(setter(into, strip_option), default)]
1821    pub owner: Option<&'a str>,
1822    /// Sharing mode of the cache volume.
1823    #[builder(setter(into, strip_option), default)]
1824    pub sharing: Option<CacheSharingMode>,
1825    /// Identifier of the directory to use as the cache volume's root.
1826    #[builder(setter(into, strip_option), default)]
1827    pub source: Option<Id>,
1828}
1829#[derive(Builder, Debug, PartialEq)]
1830pub struct ContainerWithMountedDirectoryOpts<'a> {
1831    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1832    #[builder(setter(into, strip_option), default)]
1833    pub expand: Option<bool>,
1834    /// A user:group to set for the mounted directory and its contents.
1835    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1836    /// If the group is omitted, it defaults to the same as the user.
1837    #[builder(setter(into, strip_option), default)]
1838    pub owner: Option<&'a str>,
1839    /// Mount the directory read-only.
1840    #[builder(setter(into, strip_option), default)]
1841    pub read_only: Option<bool>,
1842}
1843#[derive(Builder, Debug, PartialEq)]
1844pub struct ContainerWithMountedFileOpts<'a> {
1845    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
1846    #[builder(setter(into, strip_option), default)]
1847    pub expand: Option<bool>,
1848    /// A user or user:group to set for the mounted file.
1849    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1850    /// If the group is omitted, it defaults to the same as the user.
1851    #[builder(setter(into, strip_option), default)]
1852    pub owner: Option<&'a str>,
1853}
1854#[derive(Builder, Debug, PartialEq)]
1855pub struct ContainerWithMountedSecretOpts<'a> {
1856    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1857    #[builder(setter(into, strip_option), default)]
1858    pub expand: Option<bool>,
1859    /// Permission given to the mounted secret (e.g., 0600).
1860    /// This option requires an owner to be set to be active.
1861    #[builder(setter(into, strip_option), default)]
1862    pub mode: Option<isize>,
1863    /// A user:group to set for the mounted secret.
1864    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1865    /// If the group is omitted, it defaults to the same as the user.
1866    #[builder(setter(into, strip_option), default)]
1867    pub owner: Option<&'a str>,
1868}
1869#[derive(Builder, Debug, PartialEq)]
1870pub struct ContainerWithMountedTempOpts {
1871    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1872    #[builder(setter(into, strip_option), default)]
1873    pub expand: Option<bool>,
1874    /// Size of the temporary directory in bytes.
1875    #[builder(setter(into, strip_option), default)]
1876    pub size: Option<isize>,
1877}
1878#[derive(Builder, Debug, PartialEq)]
1879pub struct ContainerWithNewFileOpts<'a> {
1880    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
1881    #[builder(setter(into, strip_option), default)]
1882    pub expand: Option<bool>,
1883    /// A user:group to set for the file.
1884    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1885    /// If the group is omitted, it defaults to the same as the user.
1886    #[builder(setter(into, strip_option), default)]
1887    pub owner: Option<&'a str>,
1888    /// Permissions of the new file. Example: 0600
1889    #[builder(setter(into, strip_option), default)]
1890    pub permissions: Option<isize>,
1891}
1892#[derive(Builder, Debug, PartialEq)]
1893pub struct ContainerWithSymlinkOpts {
1894    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
1895    #[builder(setter(into, strip_option), default)]
1896    pub expand: Option<bool>,
1897}
1898#[derive(Builder, Debug, PartialEq)]
1899pub struct ContainerWithUnixSocketOpts<'a> {
1900    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1901    #[builder(setter(into, strip_option), default)]
1902    pub expand: Option<bool>,
1903    /// A user:group to set for the mounted socket.
1904    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1905    /// If the group is omitted, it defaults to the same as the user.
1906    #[builder(setter(into, strip_option), default)]
1907    pub owner: Option<&'a str>,
1908}
1909#[derive(Builder, Debug, PartialEq)]
1910pub struct ContainerWithWorkdirOpts {
1911    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1912    #[builder(setter(into, strip_option), default)]
1913    pub expand: Option<bool>,
1914}
1915#[derive(Builder, Debug, PartialEq)]
1916pub struct ContainerWithoutDirectoryOpts {
1917    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1918    #[builder(setter(into, strip_option), default)]
1919    pub expand: Option<bool>,
1920}
1921#[derive(Builder, Debug, PartialEq)]
1922pub struct ContainerWithoutEntrypointOpts {
1923    /// Don't remove the default arguments when unsetting the entrypoint.
1924    #[builder(setter(into, strip_option), default)]
1925    pub keep_default_args: Option<bool>,
1926}
1927#[derive(Builder, Debug, PartialEq)]
1928pub struct ContainerWithoutExposedPortOpts {
1929    /// Port protocol to unexpose
1930    #[builder(setter(into, strip_option), default)]
1931    pub protocol: Option<NetworkProtocol>,
1932}
1933#[derive(Builder, Debug, PartialEq)]
1934pub struct ContainerWithoutFileOpts {
1935    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
1936    #[builder(setter(into, strip_option), default)]
1937    pub expand: Option<bool>,
1938}
1939#[derive(Builder, Debug, PartialEq)]
1940pub struct ContainerWithoutFilesOpts {
1941    /// Replace "${VAR}" or "$VAR" in the value of paths according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
1942    #[builder(setter(into, strip_option), default)]
1943    pub expand: Option<bool>,
1944}
1945#[derive(Builder, Debug, PartialEq)]
1946pub struct ContainerWithoutMountOpts {
1947    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1948    #[builder(setter(into, strip_option), default)]
1949    pub expand: Option<bool>,
1950}
1951#[derive(Builder, Debug, PartialEq)]
1952pub struct ContainerWithoutUnixSocketOpts {
1953    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1954    #[builder(setter(into, strip_option), default)]
1955    pub expand: Option<bool>,
1956}
1957impl IntoID<Id> for Container {
1958    fn into_id(
1959        self,
1960    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
1961        Box::pin(async move { self.id().await })
1962    }
1963}
1964impl Loadable for Container {
1965    fn graphql_type() -> &'static str {
1966        "Container"
1967    }
1968    fn from_query(
1969        proc: Option<Arc<DaggerSessionProc>>,
1970        selection: Selection,
1971        graphql_client: DynGraphQLClient,
1972    ) -> Self {
1973        Self {
1974            proc,
1975            selection,
1976            graphql_client,
1977        }
1978    }
1979}
1980impl Container {
1981    /// Turn the container into a Service.
1982    /// Be sure to set any exposed ports before this conversion.
1983    ///
1984    /// # Arguments
1985    ///
1986    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
1987    pub fn as_service(&self) -> Service {
1988        let query = self.selection.select("asService");
1989        Service {
1990            proc: self.proc.clone(),
1991            selection: query,
1992            graphql_client: self.graphql_client.clone(),
1993        }
1994    }
1995    /// Turn the container into a Service.
1996    /// Be sure to set any exposed ports before this conversion.
1997    ///
1998    /// # Arguments
1999    ///
2000    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2001    pub fn as_service_opts<'a>(&self, opts: ContainerAsServiceOpts<'a>) -> Service {
2002        let mut query = self.selection.select("asService");
2003        if let Some(args) = opts.args {
2004            query = query.arg("args", args);
2005        }
2006        if let Some(use_entrypoint) = opts.use_entrypoint {
2007            query = query.arg("useEntrypoint", use_entrypoint);
2008        }
2009        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
2010            query = query.arg(
2011                "experimentalPrivilegedNesting",
2012                experimental_privileged_nesting,
2013            );
2014        }
2015        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
2016            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
2017        }
2018        if let Some(expand) = opts.expand {
2019            query = query.arg("expand", expand);
2020        }
2021        if let Some(no_init) = opts.no_init {
2022            query = query.arg("noInit", no_init);
2023        }
2024        Service {
2025            proc: self.proc.clone(),
2026            selection: query,
2027            graphql_client: self.graphql_client.clone(),
2028        }
2029    }
2030    /// Package the container state as an OCI image, and return it as a tar archive
2031    ///
2032    /// # Arguments
2033    ///
2034    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2035    pub fn as_tarball(&self) -> File {
2036        let query = self.selection.select("asTarball");
2037        File {
2038            proc: self.proc.clone(),
2039            selection: query,
2040            graphql_client: self.graphql_client.clone(),
2041        }
2042    }
2043    /// Package the container state as an OCI image, and return it as a tar archive
2044    ///
2045    /// # Arguments
2046    ///
2047    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2048    pub fn as_tarball_opts(&self, opts: ContainerAsTarballOpts) -> File {
2049        let mut query = self.selection.select("asTarball");
2050        if let Some(platform_variants) = opts.platform_variants {
2051            query = query.arg("platformVariants", platform_variants);
2052        }
2053        if let Some(forced_compression) = opts.forced_compression {
2054            query = query.arg("forcedCompression", forced_compression);
2055        }
2056        if let Some(media_types) = opts.media_types {
2057            query = query.arg("mediaTypes", media_types);
2058        }
2059        File {
2060            proc: self.proc.clone(),
2061            selection: query,
2062            graphql_client: self.graphql_client.clone(),
2063        }
2064    }
2065    /// The combined buffered standard output and standard error stream of the last executed command
2066    /// Returns an error if no command was executed
2067    pub async fn combined_output(&self) -> Result<String, DaggerError> {
2068        let query = self.selection.select("combinedOutput");
2069        query.execute(self.graphql_client.clone()).await
2070    }
2071    /// Return the container's default arguments.
2072    pub async fn default_args(&self) -> Result<Vec<String>, DaggerError> {
2073        let query = self.selection.select("defaultArgs");
2074        query.execute(self.graphql_client.clone()).await
2075    }
2076    /// Retrieve a directory from the container's root filesystem
2077    /// Mounts are included.
2078    ///
2079    /// # Arguments
2080    ///
2081    /// * `path` - The path of the directory to retrieve (e.g., "./src").
2082    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2083    pub fn directory(&self, path: impl Into<String>) -> Directory {
2084        let mut query = self.selection.select("directory");
2085        query = query.arg("path", path.into());
2086        Directory {
2087            proc: self.proc.clone(),
2088            selection: query,
2089            graphql_client: self.graphql_client.clone(),
2090        }
2091    }
2092    /// Retrieve a directory from the container's root filesystem
2093    /// Mounts are included.
2094    ///
2095    /// # Arguments
2096    ///
2097    /// * `path` - The path of the directory to retrieve (e.g., "./src").
2098    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2099    pub fn directory_opts(
2100        &self,
2101        path: impl Into<String>,
2102        opts: ContainerDirectoryOpts,
2103    ) -> Directory {
2104        let mut query = self.selection.select("directory");
2105        query = query.arg("path", path.into());
2106        if let Some(expand) = opts.expand {
2107            query = query.arg("expand", expand);
2108        }
2109        Directory {
2110            proc: self.proc.clone(),
2111            selection: query,
2112            graphql_client: self.graphql_client.clone(),
2113        }
2114    }
2115    /// Retrieves this container's configured docker healthcheck.
2116    pub fn docker_healthcheck(&self) -> HealthcheckConfig {
2117        let query = self.selection.select("dockerHealthcheck");
2118        HealthcheckConfig {
2119            proc: self.proc.clone(),
2120            selection: query,
2121            graphql_client: self.graphql_client.clone(),
2122        }
2123    }
2124    /// Return the container's OCI entrypoint.
2125    pub async fn entrypoint(&self) -> Result<Vec<String>, DaggerError> {
2126        let query = self.selection.select("entrypoint");
2127        query.execute(self.graphql_client.clone()).await
2128    }
2129    /// Retrieves the value of the specified persistent environment variable.
2130    ///
2131    /// # Arguments
2132    ///
2133    /// * `name` - The name of the environment variable to retrieve (e.g., "PATH").
2134    pub async fn env_variable(&self, name: impl Into<String>) -> Result<String, DaggerError> {
2135        let mut query = self.selection.select("envVariable");
2136        query = query.arg("name", name.into());
2137        query.execute(self.graphql_client.clone()).await
2138    }
2139    /// Retrieves the list of persistent environment variables configured on the container.
2140    pub async fn env_variables(&self) -> Result<Vec<EnvVariable>, DaggerError> {
2141        let query = self.selection.select("envVariables");
2142        let query = query.select("id");
2143        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
2144        Ok(ids
2145            .into_iter()
2146            .map(|id| EnvVariable {
2147                proc: self.proc.clone(),
2148                selection: crate::querybuilder::query()
2149                    .select("node")
2150                    .arg("id", &id.0)
2151                    .inline_fragment("EnvVariable"),
2152                graphql_client: self.graphql_client.clone(),
2153            })
2154            .collect())
2155    }
2156    /// check if a file or directory exists
2157    ///
2158    /// # Arguments
2159    ///
2160    /// * `path` - Path to check (e.g., "/file.txt").
2161    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2162    pub async fn exists(&self, path: impl Into<String>) -> Result<bool, DaggerError> {
2163        let mut query = self.selection.select("exists");
2164        query = query.arg("path", path.into());
2165        query.execute(self.graphql_client.clone()).await
2166    }
2167    /// check if a file or directory exists
2168    ///
2169    /// # Arguments
2170    ///
2171    /// * `path` - Path to check (e.g., "/file.txt").
2172    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2173    pub async fn exists_opts(
2174        &self,
2175        path: impl Into<String>,
2176        opts: ContainerExistsOpts,
2177    ) -> Result<bool, DaggerError> {
2178        let mut query = self.selection.select("exists");
2179        query = query.arg("path", path.into());
2180        if let Some(expected_type) = opts.expected_type {
2181            query = query.arg("expectedType", expected_type);
2182        }
2183        if let Some(do_not_follow_symlinks) = opts.do_not_follow_symlinks {
2184            query = query.arg("doNotFollowSymlinks", do_not_follow_symlinks);
2185        }
2186        if let Some(expand) = opts.expand {
2187            query = query.arg("expand", expand);
2188        }
2189        query.execute(self.graphql_client.clone()).await
2190    }
2191    /// The exit code of the last executed command
2192    /// Returns an error if no command was executed
2193    pub async fn exit_code(&self) -> Result<isize, DaggerError> {
2194        let query = self.selection.select("exitCode");
2195        query.execute(self.graphql_client.clone()).await
2196    }
2197    /// EXPERIMENTAL API! Subject to change/removal at any time.
2198    /// Configures all available GPUs on the host to be accessible to this container.
2199    /// This currently works for Nvidia devices only.
2200    pub fn experimental_with_all_gp_us(&self) -> Container {
2201        let query = self.selection.select("experimentalWithAllGPUs");
2202        Container {
2203            proc: self.proc.clone(),
2204            selection: query,
2205            graphql_client: self.graphql_client.clone(),
2206        }
2207    }
2208    /// EXPERIMENTAL API! Subject to change/removal at any time.
2209    /// Configures the provided list of devices to be accessible to this container.
2210    /// This currently works for Nvidia devices only.
2211    ///
2212    /// # Arguments
2213    ///
2214    /// * `devices` - List of devices to be accessible to this container.
2215    pub fn experimental_with_gpu(&self, devices: Vec<impl Into<String>>) -> Container {
2216        let mut query = self.selection.select("experimentalWithGPU");
2217        query = query.arg(
2218            "devices",
2219            devices
2220                .into_iter()
2221                .map(|i| i.into())
2222                .collect::<Vec<String>>(),
2223        );
2224        Container {
2225            proc: self.proc.clone(),
2226            selection: query,
2227            graphql_client: self.graphql_client.clone(),
2228        }
2229    }
2230    /// Writes the container as an OCI tarball to the destination file path on the host.
2231    /// It can also export platform variants.
2232    ///
2233    /// # Arguments
2234    ///
2235    /// * `path` - Host's destination path (e.g., "./tarball").
2236    ///
2237    /// Path can be relative to the engine's workdir or absolute.
2238    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2239    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
2240        let mut query = self.selection.select("export");
2241        query = query.arg("path", path.into());
2242        query.execute(self.graphql_client.clone()).await
2243    }
2244    /// Writes the container as an OCI tarball to the destination file path on the host.
2245    /// It can also export platform variants.
2246    ///
2247    /// # Arguments
2248    ///
2249    /// * `path` - Host's destination path (e.g., "./tarball").
2250    ///
2251    /// Path can be relative to the engine's workdir or absolute.
2252    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2253    pub async fn export_opts(
2254        &self,
2255        path: impl Into<String>,
2256        opts: ContainerExportOpts,
2257    ) -> Result<String, DaggerError> {
2258        let mut query = self.selection.select("export");
2259        query = query.arg("path", path.into());
2260        if let Some(platform_variants) = opts.platform_variants {
2261            query = query.arg("platformVariants", platform_variants);
2262        }
2263        if let Some(forced_compression) = opts.forced_compression {
2264            query = query.arg("forcedCompression", forced_compression);
2265        }
2266        if let Some(media_types) = opts.media_types {
2267            query = query.arg("mediaTypes", media_types);
2268        }
2269        if let Some(expand) = opts.expand {
2270            query = query.arg("expand", expand);
2271        }
2272        query.execute(self.graphql_client.clone()).await
2273    }
2274    /// Exports the container as an image to the host's container image store.
2275    ///
2276    /// # Arguments
2277    ///
2278    /// * `name` - Name of image to export to in the host's store
2279    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2280    pub async fn export_image(&self, name: impl Into<String>) -> Result<Void, DaggerError> {
2281        let mut query = self.selection.select("exportImage");
2282        query = query.arg("name", name.into());
2283        query.execute(self.graphql_client.clone()).await
2284    }
2285    /// Exports the container as an image to the host's container image store.
2286    ///
2287    /// # Arguments
2288    ///
2289    /// * `name` - Name of image to export to in the host's store
2290    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2291    pub async fn export_image_opts(
2292        &self,
2293        name: impl Into<String>,
2294        opts: ContainerExportImageOpts,
2295    ) -> Result<Void, DaggerError> {
2296        let mut query = self.selection.select("exportImage");
2297        query = query.arg("name", name.into());
2298        if let Some(platform_variants) = opts.platform_variants {
2299            query = query.arg("platformVariants", platform_variants);
2300        }
2301        if let Some(forced_compression) = opts.forced_compression {
2302            query = query.arg("forcedCompression", forced_compression);
2303        }
2304        if let Some(media_types) = opts.media_types {
2305            query = query.arg("mediaTypes", media_types);
2306        }
2307        query.execute(self.graphql_client.clone()).await
2308    }
2309    /// Retrieves the list of exposed ports.
2310    /// This includes ports already exposed by the image, even if not explicitly added with dagger.
2311    pub async fn exposed_ports(&self) -> Result<Vec<Port>, DaggerError> {
2312        let query = self.selection.select("exposedPorts");
2313        let query = query.select("id");
2314        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
2315        Ok(ids
2316            .into_iter()
2317            .map(|id| Port {
2318                proc: self.proc.clone(),
2319                selection: crate::querybuilder::query()
2320                    .select("node")
2321                    .arg("id", &id.0)
2322                    .inline_fragment("Port"),
2323                graphql_client: self.graphql_client.clone(),
2324            })
2325            .collect())
2326    }
2327    /// Retrieves a file at the given path.
2328    /// Mounts are included.
2329    ///
2330    /// # Arguments
2331    ///
2332    /// * `path` - The path of the file to retrieve (e.g., "./README.md").
2333    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2334    pub fn file(&self, path: impl Into<String>) -> File {
2335        let mut query = self.selection.select("file");
2336        query = query.arg("path", path.into());
2337        File {
2338            proc: self.proc.clone(),
2339            selection: query,
2340            graphql_client: self.graphql_client.clone(),
2341        }
2342    }
2343    /// Retrieves a file at the given path.
2344    /// Mounts are included.
2345    ///
2346    /// # Arguments
2347    ///
2348    /// * `path` - The path of the file to retrieve (e.g., "./README.md").
2349    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2350    pub fn file_opts(&self, path: impl Into<String>, opts: ContainerFileOpts) -> File {
2351        let mut query = self.selection.select("file");
2352        query = query.arg("path", path.into());
2353        if let Some(expand) = opts.expand {
2354            query = query.arg("expand", expand);
2355        }
2356        File {
2357            proc: self.proc.clone(),
2358            selection: query,
2359            graphql_client: self.graphql_client.clone(),
2360        }
2361    }
2362    /// Download a container image, and apply it to the container state. All previous state will be lost.
2363    ///
2364    /// # Arguments
2365    ///
2366    /// * `address` - Address of the container image to download, in standard OCI ref format. Example:"registry.dagger.io/engine:latest"
2367    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2368    pub fn from(&self, address: impl Into<String>) -> Container {
2369        let mut query = self.selection.select("from");
2370        query = query.arg("address", address.into());
2371        Container {
2372            proc: self.proc.clone(),
2373            selection: query,
2374            graphql_client: self.graphql_client.clone(),
2375        }
2376    }
2377    /// Download a container image, and apply it to the container state. All previous state will be lost.
2378    ///
2379    /// # Arguments
2380    ///
2381    /// * `address` - Address of the container image to download, in standard OCI ref format. Example:"registry.dagger.io/engine:latest"
2382    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2383    pub fn from_opts(&self, address: impl Into<String>, opts: ContainerFromOpts) -> Container {
2384        let mut query = self.selection.select("from");
2385        query = query.arg("address", address.into());
2386        if let Some(registry_service) = opts.registry_service {
2387            query = query.arg("registryService", registry_service);
2388        }
2389        Container {
2390            proc: self.proc.clone(),
2391            selection: query,
2392            graphql_client: self.graphql_client.clone(),
2393        }
2394    }
2395    /// A unique identifier for this Container.
2396    pub async fn id(&self) -> Result<Id, DaggerError> {
2397        let query = self.selection.select("id");
2398        query.execute(self.graphql_client.clone()).await
2399    }
2400    /// The unique image reference which can only be retrieved immediately after the 'Container.From' call.
2401    pub async fn image_ref(&self) -> Result<String, DaggerError> {
2402        let query = self.selection.select("imageRef");
2403        query.execute(self.graphql_client.clone()).await
2404    }
2405    /// Reads the container from an OCI tarball.
2406    ///
2407    /// # Arguments
2408    ///
2409    /// * `source` - File to read the container from.
2410    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2411    pub fn import(&self, source: impl IntoID<Id>) -> Container {
2412        let mut query = self.selection.select("import");
2413        query = query.arg_lazy(
2414            "source",
2415            Box::new(move || {
2416                let source = source.clone();
2417                Box::pin(async move { source.into_id().await.unwrap().quote() })
2418            }),
2419        );
2420        Container {
2421            proc: self.proc.clone(),
2422            selection: query,
2423            graphql_client: self.graphql_client.clone(),
2424        }
2425    }
2426    /// Reads the container from an OCI tarball.
2427    ///
2428    /// # Arguments
2429    ///
2430    /// * `source` - File to read the container from.
2431    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2432    pub fn import_opts<'a>(
2433        &self,
2434        source: impl IntoID<Id>,
2435        opts: ContainerImportOpts<'a>,
2436    ) -> Container {
2437        let mut query = self.selection.select("import");
2438        query = query.arg_lazy(
2439            "source",
2440            Box::new(move || {
2441                let source = source.clone();
2442                Box::pin(async move { source.into_id().await.unwrap().quote() })
2443            }),
2444        );
2445        if let Some(tag) = opts.tag {
2446            query = query.arg("tag", tag);
2447        }
2448        Container {
2449            proc: self.proc.clone(),
2450            selection: query,
2451            graphql_client: self.graphql_client.clone(),
2452        }
2453    }
2454    /// Retrieves the value of the specified label.
2455    ///
2456    /// # Arguments
2457    ///
2458    /// * `name` - The name of the label (e.g., "org.opencontainers.artifact.created").
2459    pub async fn label(&self, name: impl Into<String>) -> Result<String, DaggerError> {
2460        let mut query = self.selection.select("label");
2461        query = query.arg("name", name.into());
2462        query.execute(self.graphql_client.clone()).await
2463    }
2464    /// Retrieves the list of labels passed to container.
2465    pub async fn labels(&self) -> Result<Vec<Label>, DaggerError> {
2466        let query = self.selection.select("labels");
2467        let query = query.select("id");
2468        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
2469        Ok(ids
2470            .into_iter()
2471            .map(|id| Label {
2472                proc: self.proc.clone(),
2473                selection: crate::querybuilder::query()
2474                    .select("node")
2475                    .arg("id", &id.0)
2476                    .inline_fragment("Label"),
2477                graphql_client: self.graphql_client.clone(),
2478            })
2479            .collect())
2480    }
2481    /// Retrieves the list of paths where a directory is mounted.
2482    pub async fn mounts(&self) -> Result<Vec<String>, DaggerError> {
2483        let query = self.selection.select("mounts");
2484        query.execute(self.graphql_client.clone()).await
2485    }
2486    /// The platform this container executes and publishes as.
2487    pub async fn platform(&self) -> Result<Platform, DaggerError> {
2488        let query = self.selection.select("platform");
2489        query.execute(self.graphql_client.clone()).await
2490    }
2491    /// Package the container state as an OCI image, and publish it to a registry
2492    /// Returns the fully qualified address of the published image, with digest
2493    ///
2494    /// # Arguments
2495    ///
2496    /// * `address` - The OCI address to publish to
2497    ///
2498    /// Same format as "docker push". Example: "registry.example.com/user/repo:tag"
2499    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2500    pub async fn publish(&self, address: impl Into<String>) -> Result<String, DaggerError> {
2501        let mut query = self.selection.select("publish");
2502        query = query.arg("address", address.into());
2503        query.execute(self.graphql_client.clone()).await
2504    }
2505    /// Package the container state as an OCI image, and publish it to a registry
2506    /// Returns the fully qualified address of the published image, with digest
2507    ///
2508    /// # Arguments
2509    ///
2510    /// * `address` - The OCI address to publish to
2511    ///
2512    /// Same format as "docker push". Example: "registry.example.com/user/repo:tag"
2513    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2514    pub async fn publish_opts(
2515        &self,
2516        address: impl Into<String>,
2517        opts: ContainerPublishOpts,
2518    ) -> Result<String, DaggerError> {
2519        let mut query = self.selection.select("publish");
2520        query = query.arg("address", address.into());
2521        if let Some(platform_variants) = opts.platform_variants {
2522            query = query.arg("platformVariants", platform_variants);
2523        }
2524        if let Some(forced_compression) = opts.forced_compression {
2525            query = query.arg("forcedCompression", forced_compression);
2526        }
2527        if let Some(media_types) = opts.media_types {
2528            query = query.arg("mediaTypes", media_types);
2529        }
2530        if let Some(registry_service) = opts.registry_service {
2531            query = query.arg("registryService", registry_service);
2532        }
2533        query.execute(self.graphql_client.clone()).await
2534    }
2535    /// Return a snapshot of the container's root filesystem. The snapshot can be modified then written back using withRootfs. Use that method for filesystem modifications.
2536    pub fn rootfs(&self) -> Directory {
2537        let query = self.selection.select("rootfs");
2538        Directory {
2539            proc: self.proc.clone(),
2540            selection: query,
2541            graphql_client: self.graphql_client.clone(),
2542        }
2543    }
2544    /// Return file status
2545    ///
2546    /// # Arguments
2547    ///
2548    /// * `path` - Path to check (e.g., "/file.txt").
2549    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2550    pub fn stat(&self, path: impl Into<String>) -> Stat {
2551        let mut query = self.selection.select("stat");
2552        query = query.arg("path", path.into());
2553        Stat {
2554            proc: self.proc.clone(),
2555            selection: query,
2556            graphql_client: self.graphql_client.clone(),
2557        }
2558    }
2559    /// Return file status
2560    ///
2561    /// # Arguments
2562    ///
2563    /// * `path` - Path to check (e.g., "/file.txt").
2564    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2565    pub fn stat_opts(&self, path: impl Into<String>, opts: ContainerStatOpts) -> Stat {
2566        let mut query = self.selection.select("stat");
2567        query = query.arg("path", path.into());
2568        if let Some(do_not_follow_symlinks) = opts.do_not_follow_symlinks {
2569            query = query.arg("doNotFollowSymlinks", do_not_follow_symlinks);
2570        }
2571        Stat {
2572            proc: self.proc.clone(),
2573            selection: query,
2574            graphql_client: self.graphql_client.clone(),
2575        }
2576    }
2577    /// The buffered standard error stream of the last executed command
2578    /// Returns an error if no command was executed
2579    pub async fn stderr(&self) -> Result<String, DaggerError> {
2580        let query = self.selection.select("stderr");
2581        query.execute(self.graphql_client.clone()).await
2582    }
2583    /// The buffered standard output stream of the last executed command
2584    /// Returns an error if no command was executed
2585    pub async fn stdout(&self) -> Result<String, DaggerError> {
2586        let query = self.selection.select("stdout");
2587        query.execute(self.graphql_client.clone()).await
2588    }
2589    /// Forces evaluation of the pipeline in the engine.
2590    /// It doesn't run the default command if no exec has been set.
2591    pub async fn sync(&self) -> Result<Container, DaggerError> {
2592        let query = self.selection.select("sync");
2593        let id: Id = query.execute(self.graphql_client.clone()).await?;
2594        Ok(Container {
2595            proc: self.proc.clone(),
2596            selection: query
2597                .root()
2598                .select("node")
2599                .arg("id", &id.0)
2600                .inline_fragment("Container"),
2601            graphql_client: self.graphql_client.clone(),
2602        })
2603    }
2604    /// Opens an interactive terminal for this container using its configured default terminal command if not overridden by args (or sh as a fallback default).
2605    ///
2606    /// # Arguments
2607    ///
2608    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2609    pub fn terminal(&self) -> Container {
2610        let query = self.selection.select("terminal");
2611        Container {
2612            proc: self.proc.clone(),
2613            selection: query,
2614            graphql_client: self.graphql_client.clone(),
2615        }
2616    }
2617    /// Opens an interactive terminal for this container using its configured default terminal command if not overridden by args (or sh as a fallback default).
2618    ///
2619    /// # Arguments
2620    ///
2621    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2622    pub fn terminal_opts<'a>(&self, opts: ContainerTerminalOpts<'a>) -> Container {
2623        let mut query = self.selection.select("terminal");
2624        if let Some(cmd) = opts.cmd {
2625            query = query.arg("cmd", cmd);
2626        }
2627        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
2628            query = query.arg(
2629                "experimentalPrivilegedNesting",
2630                experimental_privileged_nesting,
2631            );
2632        }
2633        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
2634            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
2635        }
2636        Container {
2637            proc: self.proc.clone(),
2638            selection: query,
2639            graphql_client: self.graphql_client.clone(),
2640        }
2641    }
2642    /// Starts a Service and creates a tunnel that forwards traffic from the caller's network to that service.
2643    /// Be sure to set any exposed ports before calling this api.
2644    ///
2645    /// # Arguments
2646    ///
2647    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2648    pub async fn up(&self) -> Result<Void, DaggerError> {
2649        let query = self.selection.select("up");
2650        query.execute(self.graphql_client.clone()).await
2651    }
2652    /// Starts a Service and creates a tunnel that forwards traffic from the caller's network to that service.
2653    /// Be sure to set any exposed ports before calling this api.
2654    ///
2655    /// # Arguments
2656    ///
2657    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2658    pub async fn up_opts<'a>(&self, opts: ContainerUpOpts<'a>) -> Result<Void, DaggerError> {
2659        let mut query = self.selection.select("up");
2660        if let Some(random) = opts.random {
2661            query = query.arg("random", random);
2662        }
2663        if let Some(ports) = opts.ports {
2664            query = query.arg("ports", ports);
2665        }
2666        if let Some(args) = opts.args {
2667            query = query.arg("args", args);
2668        }
2669        if let Some(use_entrypoint) = opts.use_entrypoint {
2670            query = query.arg("useEntrypoint", use_entrypoint);
2671        }
2672        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
2673            query = query.arg(
2674                "experimentalPrivilegedNesting",
2675                experimental_privileged_nesting,
2676            );
2677        }
2678        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
2679            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
2680        }
2681        if let Some(expand) = opts.expand {
2682            query = query.arg("expand", expand);
2683        }
2684        if let Some(no_init) = opts.no_init {
2685            query = query.arg("noInit", no_init);
2686        }
2687        query.execute(self.graphql_client.clone()).await
2688    }
2689    /// Retrieves the user to be set for all commands.
2690    pub async fn user(&self) -> Result<String, DaggerError> {
2691        let query = self.selection.select("user");
2692        query.execute(self.graphql_client.clone()).await
2693    }
2694    /// Retrieves this container plus the given OCI annotation.
2695    ///
2696    /// # Arguments
2697    ///
2698    /// * `name` - The name of the annotation.
2699    /// * `value` - The value of the annotation.
2700    pub fn with_annotation(&self, name: impl Into<String>, value: impl Into<String>) -> Container {
2701        let mut query = self.selection.select("withAnnotation");
2702        query = query.arg("name", name.into());
2703        query = query.arg("value", value.into());
2704        Container {
2705            proc: self.proc.clone(),
2706            selection: query,
2707            graphql_client: self.graphql_client.clone(),
2708        }
2709    }
2710    /// Configures default arguments for future commands. Like CMD in Dockerfile.
2711    ///
2712    /// # Arguments
2713    ///
2714    /// * `args` - Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]).
2715    pub fn with_default_args(&self, args: Vec<impl Into<String>>) -> Container {
2716        let mut query = self.selection.select("withDefaultArgs");
2717        query = query.arg(
2718            "args",
2719            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
2720        );
2721        Container {
2722            proc: self.proc.clone(),
2723            selection: query,
2724            graphql_client: self.graphql_client.clone(),
2725        }
2726    }
2727    /// Set the default command to invoke for the container's terminal API.
2728    ///
2729    /// # Arguments
2730    ///
2731    /// * `args` - The args of the command.
2732    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2733    pub fn with_default_terminal_cmd(&self, args: Vec<impl Into<String>>) -> Container {
2734        let mut query = self.selection.select("withDefaultTerminalCmd");
2735        query = query.arg(
2736            "args",
2737            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
2738        );
2739        Container {
2740            proc: self.proc.clone(),
2741            selection: query,
2742            graphql_client: self.graphql_client.clone(),
2743        }
2744    }
2745    /// Set the default command to invoke for the container's terminal API.
2746    ///
2747    /// # Arguments
2748    ///
2749    /// * `args` - The args of the command.
2750    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2751    pub fn with_default_terminal_cmd_opts(
2752        &self,
2753        args: Vec<impl Into<String>>,
2754        opts: ContainerWithDefaultTerminalCmdOpts,
2755    ) -> Container {
2756        let mut query = self.selection.select("withDefaultTerminalCmd");
2757        query = query.arg(
2758            "args",
2759            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
2760        );
2761        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
2762            query = query.arg(
2763                "experimentalPrivilegedNesting",
2764                experimental_privileged_nesting,
2765            );
2766        }
2767        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
2768            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
2769        }
2770        Container {
2771            proc: self.proc.clone(),
2772            selection: query,
2773            graphql_client: self.graphql_client.clone(),
2774        }
2775    }
2776    /// Return a new container snapshot, with a directory added to its filesystem
2777    ///
2778    /// # Arguments
2779    ///
2780    /// * `path` - Location of the written directory (e.g., "/tmp/directory").
2781    /// * `source` - Identifier of the directory to write
2782    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2783    pub fn with_directory(&self, path: impl Into<String>, source: impl IntoID<Id>) -> Container {
2784        let mut query = self.selection.select("withDirectory");
2785        query = query.arg("path", path.into());
2786        query = query.arg_lazy(
2787            "source",
2788            Box::new(move || {
2789                let source = source.clone();
2790                Box::pin(async move { source.into_id().await.unwrap().quote() })
2791            }),
2792        );
2793        Container {
2794            proc: self.proc.clone(),
2795            selection: query,
2796            graphql_client: self.graphql_client.clone(),
2797        }
2798    }
2799    /// Return a new container snapshot, with a directory added to its filesystem
2800    ///
2801    /// # Arguments
2802    ///
2803    /// * `path` - Location of the written directory (e.g., "/tmp/directory").
2804    /// * `source` - Identifier of the directory to write
2805    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2806    pub fn with_directory_opts<'a>(
2807        &self,
2808        path: impl Into<String>,
2809        source: impl IntoID<Id>,
2810        opts: ContainerWithDirectoryOpts<'a>,
2811    ) -> Container {
2812        let mut query = self.selection.select("withDirectory");
2813        query = query.arg("path", path.into());
2814        query = query.arg_lazy(
2815            "source",
2816            Box::new(move || {
2817                let source = source.clone();
2818                Box::pin(async move { source.into_id().await.unwrap().quote() })
2819            }),
2820        );
2821        if let Some(exclude) = opts.exclude {
2822            query = query.arg("exclude", exclude);
2823        }
2824        if let Some(include) = opts.include {
2825            query = query.arg("include", include);
2826        }
2827        if let Some(gitignore) = opts.gitignore {
2828            query = query.arg("gitignore", gitignore);
2829        }
2830        if let Some(owner) = opts.owner {
2831            query = query.arg("owner", owner);
2832        }
2833        if let Some(expand) = opts.expand {
2834            query = query.arg("expand", expand);
2835        }
2836        if let Some(permissions) = opts.permissions {
2837            query = query.arg("permissions", permissions);
2838        }
2839        Container {
2840            proc: self.proc.clone(),
2841            selection: query,
2842            graphql_client: self.graphql_client.clone(),
2843        }
2844    }
2845    /// Retrieves this container with the specificed docker healtcheck command set.
2846    ///
2847    /// # Arguments
2848    ///
2849    /// * `args` - Healthcheck command to execute. Example: ["go", "run", "main.go"].
2850    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2851    pub fn with_docker_healthcheck(&self, args: Vec<impl Into<String>>) -> Container {
2852        let mut query = self.selection.select("withDockerHealthcheck");
2853        query = query.arg(
2854            "args",
2855            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
2856        );
2857        Container {
2858            proc: self.proc.clone(),
2859            selection: query,
2860            graphql_client: self.graphql_client.clone(),
2861        }
2862    }
2863    /// Retrieves this container with the specificed docker healtcheck command set.
2864    ///
2865    /// # Arguments
2866    ///
2867    /// * `args` - Healthcheck command to execute. Example: ["go", "run", "main.go"].
2868    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2869    pub fn with_docker_healthcheck_opts<'a>(
2870        &self,
2871        args: Vec<impl Into<String>>,
2872        opts: ContainerWithDockerHealthcheckOpts<'a>,
2873    ) -> Container {
2874        let mut query = self.selection.select("withDockerHealthcheck");
2875        query = query.arg(
2876            "args",
2877            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
2878        );
2879        if let Some(shell) = opts.shell {
2880            query = query.arg("shell", shell);
2881        }
2882        if let Some(interval) = opts.interval {
2883            query = query.arg("interval", interval);
2884        }
2885        if let Some(timeout) = opts.timeout {
2886            query = query.arg("timeout", timeout);
2887        }
2888        if let Some(start_period) = opts.start_period {
2889            query = query.arg("startPeriod", start_period);
2890        }
2891        if let Some(start_interval) = opts.start_interval {
2892            query = query.arg("startInterval", start_interval);
2893        }
2894        if let Some(retries) = opts.retries {
2895            query = query.arg("retries", retries);
2896        }
2897        Container {
2898            proc: self.proc.clone(),
2899            selection: query,
2900            graphql_client: self.graphql_client.clone(),
2901        }
2902    }
2903    /// Set an OCI-style entrypoint. It will be included in the container's OCI configuration. Note, withExec ignores the entrypoint by default.
2904    ///
2905    /// # Arguments
2906    ///
2907    /// * `args` - Arguments of the entrypoint. Example: ["go", "run"].
2908    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2909    pub fn with_entrypoint(&self, args: Vec<impl Into<String>>) -> Container {
2910        let mut query = self.selection.select("withEntrypoint");
2911        query = query.arg(
2912            "args",
2913            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
2914        );
2915        Container {
2916            proc: self.proc.clone(),
2917            selection: query,
2918            graphql_client: self.graphql_client.clone(),
2919        }
2920    }
2921    /// Set an OCI-style entrypoint. It will be included in the container's OCI configuration. Note, withExec ignores the entrypoint by default.
2922    ///
2923    /// # Arguments
2924    ///
2925    /// * `args` - Arguments of the entrypoint. Example: ["go", "run"].
2926    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2927    pub fn with_entrypoint_opts(
2928        &self,
2929        args: Vec<impl Into<String>>,
2930        opts: ContainerWithEntrypointOpts,
2931    ) -> Container {
2932        let mut query = self.selection.select("withEntrypoint");
2933        query = query.arg(
2934            "args",
2935            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
2936        );
2937        if let Some(keep_default_args) = opts.keep_default_args {
2938            query = query.arg("keepDefaultArgs", keep_default_args);
2939        }
2940        Container {
2941            proc: self.proc.clone(),
2942            selection: query,
2943            graphql_client: self.graphql_client.clone(),
2944        }
2945    }
2946    /// Export environment variables from an env-file to the container.
2947    ///
2948    /// # Arguments
2949    ///
2950    /// * `source` - Identifier of the envfile
2951    pub fn with_env_file_variables(&self, source: impl IntoID<Id>) -> Container {
2952        let mut query = self.selection.select("withEnvFileVariables");
2953        query = query.arg_lazy(
2954            "source",
2955            Box::new(move || {
2956                let source = source.clone();
2957                Box::pin(async move { source.into_id().await.unwrap().quote() })
2958            }),
2959        );
2960        Container {
2961            proc: self.proc.clone(),
2962            selection: query,
2963            graphql_client: self.graphql_client.clone(),
2964        }
2965    }
2966    /// Set a new environment variable in the container.
2967    ///
2968    /// # Arguments
2969    ///
2970    /// * `name` - Name of the environment variable (e.g., "HOST").
2971    /// * `value` - Value of the environment variable. (e.g., "localhost").
2972    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2973    pub fn with_env_variable(
2974        &self,
2975        name: impl Into<String>,
2976        value: impl Into<String>,
2977    ) -> Container {
2978        let mut query = self.selection.select("withEnvVariable");
2979        query = query.arg("name", name.into());
2980        query = query.arg("value", value.into());
2981        Container {
2982            proc: self.proc.clone(),
2983            selection: query,
2984            graphql_client: self.graphql_client.clone(),
2985        }
2986    }
2987    /// Set a new environment variable in the container.
2988    ///
2989    /// # Arguments
2990    ///
2991    /// * `name` - Name of the environment variable (e.g., "HOST").
2992    /// * `value` - Value of the environment variable. (e.g., "localhost").
2993    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2994    pub fn with_env_variable_opts(
2995        &self,
2996        name: impl Into<String>,
2997        value: impl Into<String>,
2998        opts: ContainerWithEnvVariableOpts,
2999    ) -> Container {
3000        let mut query = self.selection.select("withEnvVariable");
3001        query = query.arg("name", name.into());
3002        query = query.arg("value", value.into());
3003        if let Some(expand) = opts.expand {
3004            query = query.arg("expand", expand);
3005        }
3006        Container {
3007            proc: self.proc.clone(),
3008            selection: query,
3009            graphql_client: self.graphql_client.clone(),
3010        }
3011    }
3012    /// Raise an error.
3013    ///
3014    /// # Arguments
3015    ///
3016    /// * `err` - Message of the error to raise. If empty, the error will be ignored.
3017    pub fn with_error(&self, err: impl Into<String>) -> Container {
3018        let mut query = self.selection.select("withError");
3019        query = query.arg("err", err.into());
3020        Container {
3021            proc: self.proc.clone(),
3022            selection: query,
3023            graphql_client: self.graphql_client.clone(),
3024        }
3025    }
3026    /// Execute a command in the container, and return a new snapshot of the container state after execution.
3027    ///
3028    /// # Arguments
3029    ///
3030    /// * `args` - Command to execute. Must be valid exec() arguments, not a shell command. Example: ["go", "run", "main.go"].
3031    ///
3032    /// To run a shell command, execute the shell and pass the shell command as argument. Example: ["sh", "-c", "ls -l | grep foo"]
3033    ///
3034    /// Defaults to the container's default arguments (see "defaultArgs" and "withDefaultArgs").
3035    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3036    pub fn with_exec(&self, args: Vec<impl Into<String>>) -> Container {
3037        let mut query = self.selection.select("withExec");
3038        query = query.arg(
3039            "args",
3040            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3041        );
3042        Container {
3043            proc: self.proc.clone(),
3044            selection: query,
3045            graphql_client: self.graphql_client.clone(),
3046        }
3047    }
3048    /// Execute a command in the container, and return a new snapshot of the container state after execution.
3049    ///
3050    /// # Arguments
3051    ///
3052    /// * `args` - Command to execute. Must be valid exec() arguments, not a shell command. Example: ["go", "run", "main.go"].
3053    ///
3054    /// To run a shell command, execute the shell and pass the shell command as argument. Example: ["sh", "-c", "ls -l | grep foo"]
3055    ///
3056    /// Defaults to the container's default arguments (see "defaultArgs" and "withDefaultArgs").
3057    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3058    pub fn with_exec_opts<'a>(
3059        &self,
3060        args: Vec<impl Into<String>>,
3061        opts: ContainerWithExecOpts<'a>,
3062    ) -> Container {
3063        let mut query = self.selection.select("withExec");
3064        query = query.arg(
3065            "args",
3066            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3067        );
3068        if let Some(use_entrypoint) = opts.use_entrypoint {
3069            query = query.arg("useEntrypoint", use_entrypoint);
3070        }
3071        if let Some(stdin) = opts.stdin {
3072            query = query.arg("stdin", stdin);
3073        }
3074        if let Some(redirect_stdin) = opts.redirect_stdin {
3075            query = query.arg("redirectStdin", redirect_stdin);
3076        }
3077        if let Some(redirect_stdout) = opts.redirect_stdout {
3078            query = query.arg("redirectStdout", redirect_stdout);
3079        }
3080        if let Some(redirect_stderr) = opts.redirect_stderr {
3081            query = query.arg("redirectStderr", redirect_stderr);
3082        }
3083        if let Some(expect) = opts.expect {
3084            query = query.arg("expect", expect);
3085        }
3086        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
3087            query = query.arg(
3088                "experimentalPrivilegedNesting",
3089                experimental_privileged_nesting,
3090            );
3091        }
3092        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
3093            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
3094        }
3095        if let Some(expand) = opts.expand {
3096            query = query.arg("expand", expand);
3097        }
3098        if let Some(no_init) = opts.no_init {
3099            query = query.arg("noInit", no_init);
3100        }
3101        Container {
3102            proc: self.proc.clone(),
3103            selection: query,
3104            graphql_client: self.graphql_client.clone(),
3105        }
3106    }
3107    /// Expose a network port. Like EXPOSE in Dockerfile (but with healthcheck support)
3108    /// Exposed ports serve two purposes:
3109    /// - For health checks and introspection, when running services
3110    /// - For setting the EXPOSE OCI field when publishing the container
3111    ///
3112    /// # Arguments
3113    ///
3114    /// * `port` - Port number to expose. Example: 8080
3115    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3116    pub fn with_exposed_port(&self, port: isize) -> Container {
3117        let mut query = self.selection.select("withExposedPort");
3118        query = query.arg("port", port);
3119        Container {
3120            proc: self.proc.clone(),
3121            selection: query,
3122            graphql_client: self.graphql_client.clone(),
3123        }
3124    }
3125    /// Expose a network port. Like EXPOSE in Dockerfile (but with healthcheck support)
3126    /// Exposed ports serve two purposes:
3127    /// - For health checks and introspection, when running services
3128    /// - For setting the EXPOSE OCI field when publishing the container
3129    ///
3130    /// # Arguments
3131    ///
3132    /// * `port` - Port number to expose. Example: 8080
3133    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3134    pub fn with_exposed_port_opts<'a>(
3135        &self,
3136        port: isize,
3137        opts: ContainerWithExposedPortOpts<'a>,
3138    ) -> Container {
3139        let mut query = self.selection.select("withExposedPort");
3140        query = query.arg("port", port);
3141        if let Some(protocol) = opts.protocol {
3142            query = query.arg("protocol", protocol);
3143        }
3144        if let Some(description) = opts.description {
3145            query = query.arg("description", description);
3146        }
3147        if let Some(experimental_skip_healthcheck) = opts.experimental_skip_healthcheck {
3148            query = query.arg("experimentalSkipHealthcheck", experimental_skip_healthcheck);
3149        }
3150        Container {
3151            proc: self.proc.clone(),
3152            selection: query,
3153            graphql_client: self.graphql_client.clone(),
3154        }
3155    }
3156    /// Return a container snapshot with a file added
3157    ///
3158    /// # Arguments
3159    ///
3160    /// * `path` - Path of the new file. Example: "/path/to/new-file.txt"
3161    /// * `source` - File to add
3162    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3163    pub fn with_file(&self, path: impl Into<String>, source: impl IntoID<Id>) -> Container {
3164        let mut query = self.selection.select("withFile");
3165        query = query.arg("path", path.into());
3166        query = query.arg_lazy(
3167            "source",
3168            Box::new(move || {
3169                let source = source.clone();
3170                Box::pin(async move { source.into_id().await.unwrap().quote() })
3171            }),
3172        );
3173        Container {
3174            proc: self.proc.clone(),
3175            selection: query,
3176            graphql_client: self.graphql_client.clone(),
3177        }
3178    }
3179    /// Return a container snapshot with a file added
3180    ///
3181    /// # Arguments
3182    ///
3183    /// * `path` - Path of the new file. Example: "/path/to/new-file.txt"
3184    /// * `source` - File to add
3185    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3186    pub fn with_file_opts<'a>(
3187        &self,
3188        path: impl Into<String>,
3189        source: impl IntoID<Id>,
3190        opts: ContainerWithFileOpts<'a>,
3191    ) -> Container {
3192        let mut query = self.selection.select("withFile");
3193        query = query.arg("path", path.into());
3194        query = query.arg_lazy(
3195            "source",
3196            Box::new(move || {
3197                let source = source.clone();
3198                Box::pin(async move { source.into_id().await.unwrap().quote() })
3199            }),
3200        );
3201        if let Some(permissions) = opts.permissions {
3202            query = query.arg("permissions", permissions);
3203        }
3204        if let Some(owner) = opts.owner {
3205            query = query.arg("owner", owner);
3206        }
3207        if let Some(expand) = opts.expand {
3208            query = query.arg("expand", expand);
3209        }
3210        Container {
3211            proc: self.proc.clone(),
3212            selection: query,
3213            graphql_client: self.graphql_client.clone(),
3214        }
3215    }
3216    /// Retrieves this container plus the contents of the given files copied to the given path.
3217    ///
3218    /// # Arguments
3219    ///
3220    /// * `path` - Location where copied files should be placed (e.g., "/src").
3221    /// * `sources` - Identifiers of the files to copy.
3222    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3223    pub fn with_files(&self, path: impl Into<String>, sources: Vec<Id>) -> Container {
3224        let mut query = self.selection.select("withFiles");
3225        query = query.arg("path", path.into());
3226        query = query.arg("sources", sources);
3227        Container {
3228            proc: self.proc.clone(),
3229            selection: query,
3230            graphql_client: self.graphql_client.clone(),
3231        }
3232    }
3233    /// Retrieves this container plus the contents of the given files copied to the given path.
3234    ///
3235    /// # Arguments
3236    ///
3237    /// * `path` - Location where copied files should be placed (e.g., "/src").
3238    /// * `sources` - Identifiers of the files to copy.
3239    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3240    pub fn with_files_opts<'a>(
3241        &self,
3242        path: impl Into<String>,
3243        sources: Vec<Id>,
3244        opts: ContainerWithFilesOpts<'a>,
3245    ) -> Container {
3246        let mut query = self.selection.select("withFiles");
3247        query = query.arg("path", path.into());
3248        query = query.arg("sources", sources);
3249        if let Some(permissions) = opts.permissions {
3250            query = query.arg("permissions", permissions);
3251        }
3252        if let Some(owner) = opts.owner {
3253            query = query.arg("owner", owner);
3254        }
3255        if let Some(expand) = opts.expand {
3256            query = query.arg("expand", expand);
3257        }
3258        Container {
3259            proc: self.proc.clone(),
3260            selection: query,
3261            graphql_client: self.graphql_client.clone(),
3262        }
3263    }
3264    /// Retrieves this container plus the given label.
3265    ///
3266    /// # Arguments
3267    ///
3268    /// * `name` - The name of the label (e.g., "org.opencontainers.artifact.created").
3269    /// * `value` - The value of the label (e.g., "2023-01-01T00:00:00Z").
3270    pub fn with_label(&self, name: impl Into<String>, value: impl Into<String>) -> Container {
3271        let mut query = self.selection.select("withLabel");
3272        query = query.arg("name", name.into());
3273        query = query.arg("value", value.into());
3274        Container {
3275            proc: self.proc.clone(),
3276            selection: query,
3277            graphql_client: self.graphql_client.clone(),
3278        }
3279    }
3280    /// Retrieves this container plus a cache volume mounted at the given path.
3281    ///
3282    /// # Arguments
3283    ///
3284    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
3285    /// * `cache` - Identifier of the cache volume to mount.
3286    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3287    pub fn with_mounted_cache(&self, path: impl Into<String>, cache: impl IntoID<Id>) -> Container {
3288        let mut query = self.selection.select("withMountedCache");
3289        query = query.arg("path", path.into());
3290        query = query.arg_lazy(
3291            "cache",
3292            Box::new(move || {
3293                let cache = cache.clone();
3294                Box::pin(async move { cache.into_id().await.unwrap().quote() })
3295            }),
3296        );
3297        Container {
3298            proc: self.proc.clone(),
3299            selection: query,
3300            graphql_client: self.graphql_client.clone(),
3301        }
3302    }
3303    /// Retrieves this container plus a cache volume mounted at the given path.
3304    ///
3305    /// # Arguments
3306    ///
3307    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
3308    /// * `cache` - Identifier of the cache volume to mount.
3309    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3310    pub fn with_mounted_cache_opts<'a>(
3311        &self,
3312        path: impl Into<String>,
3313        cache: impl IntoID<Id>,
3314        opts: ContainerWithMountedCacheOpts<'a>,
3315    ) -> Container {
3316        let mut query = self.selection.select("withMountedCache");
3317        query = query.arg("path", path.into());
3318        query = query.arg_lazy(
3319            "cache",
3320            Box::new(move || {
3321                let cache = cache.clone();
3322                Box::pin(async move { cache.into_id().await.unwrap().quote() })
3323            }),
3324        );
3325        if let Some(source) = opts.source {
3326            query = query.arg("source", source);
3327        }
3328        if let Some(sharing) = opts.sharing {
3329            query = query.arg("sharing", sharing);
3330        }
3331        if let Some(owner) = opts.owner {
3332            query = query.arg("owner", owner);
3333        }
3334        if let Some(expand) = opts.expand {
3335            query = query.arg("expand", expand);
3336        }
3337        Container {
3338            proc: self.proc.clone(),
3339            selection: query,
3340            graphql_client: self.graphql_client.clone(),
3341        }
3342    }
3343    /// Retrieves this container plus a directory mounted at the given path.
3344    ///
3345    /// # Arguments
3346    ///
3347    /// * `path` - Location of the mounted directory (e.g., "/mnt/directory").
3348    /// * `source` - Identifier of the mounted directory.
3349    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3350    pub fn with_mounted_directory(
3351        &self,
3352        path: impl Into<String>,
3353        source: impl IntoID<Id>,
3354    ) -> Container {
3355        let mut query = self.selection.select("withMountedDirectory");
3356        query = query.arg("path", path.into());
3357        query = query.arg_lazy(
3358            "source",
3359            Box::new(move || {
3360                let source = source.clone();
3361                Box::pin(async move { source.into_id().await.unwrap().quote() })
3362            }),
3363        );
3364        Container {
3365            proc: self.proc.clone(),
3366            selection: query,
3367            graphql_client: self.graphql_client.clone(),
3368        }
3369    }
3370    /// Retrieves this container plus a directory mounted at the given path.
3371    ///
3372    /// # Arguments
3373    ///
3374    /// * `path` - Location of the mounted directory (e.g., "/mnt/directory").
3375    /// * `source` - Identifier of the mounted directory.
3376    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3377    pub fn with_mounted_directory_opts<'a>(
3378        &self,
3379        path: impl Into<String>,
3380        source: impl IntoID<Id>,
3381        opts: ContainerWithMountedDirectoryOpts<'a>,
3382    ) -> Container {
3383        let mut query = self.selection.select("withMountedDirectory");
3384        query = query.arg("path", path.into());
3385        query = query.arg_lazy(
3386            "source",
3387            Box::new(move || {
3388                let source = source.clone();
3389                Box::pin(async move { source.into_id().await.unwrap().quote() })
3390            }),
3391        );
3392        if let Some(owner) = opts.owner {
3393            query = query.arg("owner", owner);
3394        }
3395        if let Some(read_only) = opts.read_only {
3396            query = query.arg("readOnly", read_only);
3397        }
3398        if let Some(expand) = opts.expand {
3399            query = query.arg("expand", expand);
3400        }
3401        Container {
3402            proc: self.proc.clone(),
3403            selection: query,
3404            graphql_client: self.graphql_client.clone(),
3405        }
3406    }
3407    /// Retrieves this container plus a file mounted at the given path.
3408    ///
3409    /// # Arguments
3410    ///
3411    /// * `path` - Location of the mounted file (e.g., "/tmp/file.txt").
3412    /// * `source` - Identifier of the mounted file.
3413    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3414    pub fn with_mounted_file(&self, path: impl Into<String>, source: impl IntoID<Id>) -> Container {
3415        let mut query = self.selection.select("withMountedFile");
3416        query = query.arg("path", path.into());
3417        query = query.arg_lazy(
3418            "source",
3419            Box::new(move || {
3420                let source = source.clone();
3421                Box::pin(async move { source.into_id().await.unwrap().quote() })
3422            }),
3423        );
3424        Container {
3425            proc: self.proc.clone(),
3426            selection: query,
3427            graphql_client: self.graphql_client.clone(),
3428        }
3429    }
3430    /// Retrieves this container plus a file mounted at the given path.
3431    ///
3432    /// # Arguments
3433    ///
3434    /// * `path` - Location of the mounted file (e.g., "/tmp/file.txt").
3435    /// * `source` - Identifier of the mounted file.
3436    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3437    pub fn with_mounted_file_opts<'a>(
3438        &self,
3439        path: impl Into<String>,
3440        source: impl IntoID<Id>,
3441        opts: ContainerWithMountedFileOpts<'a>,
3442    ) -> Container {
3443        let mut query = self.selection.select("withMountedFile");
3444        query = query.arg("path", path.into());
3445        query = query.arg_lazy(
3446            "source",
3447            Box::new(move || {
3448                let source = source.clone();
3449                Box::pin(async move { source.into_id().await.unwrap().quote() })
3450            }),
3451        );
3452        if let Some(owner) = opts.owner {
3453            query = query.arg("owner", owner);
3454        }
3455        if let Some(expand) = opts.expand {
3456            query = query.arg("expand", expand);
3457        }
3458        Container {
3459            proc: self.proc.clone(),
3460            selection: query,
3461            graphql_client: self.graphql_client.clone(),
3462        }
3463    }
3464    /// Retrieves this container plus a secret mounted into a file at the given path.
3465    ///
3466    /// # Arguments
3467    ///
3468    /// * `path` - Location of the secret file (e.g., "/tmp/secret.txt").
3469    /// * `source` - Identifier of the secret to mount.
3470    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3471    pub fn with_mounted_secret(
3472        &self,
3473        path: impl Into<String>,
3474        source: impl IntoID<Id>,
3475    ) -> Container {
3476        let mut query = self.selection.select("withMountedSecret");
3477        query = query.arg("path", path.into());
3478        query = query.arg_lazy(
3479            "source",
3480            Box::new(move || {
3481                let source = source.clone();
3482                Box::pin(async move { source.into_id().await.unwrap().quote() })
3483            }),
3484        );
3485        Container {
3486            proc: self.proc.clone(),
3487            selection: query,
3488            graphql_client: self.graphql_client.clone(),
3489        }
3490    }
3491    /// Retrieves this container plus a secret mounted into a file at the given path.
3492    ///
3493    /// # Arguments
3494    ///
3495    /// * `path` - Location of the secret file (e.g., "/tmp/secret.txt").
3496    /// * `source` - Identifier of the secret to mount.
3497    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3498    pub fn with_mounted_secret_opts<'a>(
3499        &self,
3500        path: impl Into<String>,
3501        source: impl IntoID<Id>,
3502        opts: ContainerWithMountedSecretOpts<'a>,
3503    ) -> Container {
3504        let mut query = self.selection.select("withMountedSecret");
3505        query = query.arg("path", path.into());
3506        query = query.arg_lazy(
3507            "source",
3508            Box::new(move || {
3509                let source = source.clone();
3510                Box::pin(async move { source.into_id().await.unwrap().quote() })
3511            }),
3512        );
3513        if let Some(owner) = opts.owner {
3514            query = query.arg("owner", owner);
3515        }
3516        if let Some(mode) = opts.mode {
3517            query = query.arg("mode", mode);
3518        }
3519        if let Some(expand) = opts.expand {
3520            query = query.arg("expand", expand);
3521        }
3522        Container {
3523            proc: self.proc.clone(),
3524            selection: query,
3525            graphql_client: self.graphql_client.clone(),
3526        }
3527    }
3528    /// Retrieves this container plus a temporary directory mounted at the given path. Any writes will be ephemeral to a single withExec call; they will not be persisted to subsequent withExecs.
3529    ///
3530    /// # Arguments
3531    ///
3532    /// * `path` - Location of the temporary directory (e.g., "/tmp/temp_dir").
3533    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3534    pub fn with_mounted_temp(&self, path: impl Into<String>) -> Container {
3535        let mut query = self.selection.select("withMountedTemp");
3536        query = query.arg("path", path.into());
3537        Container {
3538            proc: self.proc.clone(),
3539            selection: query,
3540            graphql_client: self.graphql_client.clone(),
3541        }
3542    }
3543    /// Retrieves this container plus a temporary directory mounted at the given path. Any writes will be ephemeral to a single withExec call; they will not be persisted to subsequent withExecs.
3544    ///
3545    /// # Arguments
3546    ///
3547    /// * `path` - Location of the temporary directory (e.g., "/tmp/temp_dir").
3548    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3549    pub fn with_mounted_temp_opts(
3550        &self,
3551        path: impl Into<String>,
3552        opts: ContainerWithMountedTempOpts,
3553    ) -> Container {
3554        let mut query = self.selection.select("withMountedTemp");
3555        query = query.arg("path", path.into());
3556        if let Some(size) = opts.size {
3557            query = query.arg("size", size);
3558        }
3559        if let Some(expand) = opts.expand {
3560            query = query.arg("expand", expand);
3561        }
3562        Container {
3563            proc: self.proc.clone(),
3564            selection: query,
3565            graphql_client: self.graphql_client.clone(),
3566        }
3567    }
3568    /// Return a new container snapshot, with a file added to its filesystem with text content
3569    ///
3570    /// # Arguments
3571    ///
3572    /// * `path` - Path of the new file. May be relative or absolute. Example: "README.md" or "/etc/profile"
3573    /// * `contents` - Contents of the new file. Example: "Hello world!"
3574    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3575    pub fn with_new_file(&self, path: impl Into<String>, contents: impl Into<String>) -> Container {
3576        let mut query = self.selection.select("withNewFile");
3577        query = query.arg("path", path.into());
3578        query = query.arg("contents", contents.into());
3579        Container {
3580            proc: self.proc.clone(),
3581            selection: query,
3582            graphql_client: self.graphql_client.clone(),
3583        }
3584    }
3585    /// Return a new container snapshot, with a file added to its filesystem with text content
3586    ///
3587    /// # Arguments
3588    ///
3589    /// * `path` - Path of the new file. May be relative or absolute. Example: "README.md" or "/etc/profile"
3590    /// * `contents` - Contents of the new file. Example: "Hello world!"
3591    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3592    pub fn with_new_file_opts<'a>(
3593        &self,
3594        path: impl Into<String>,
3595        contents: impl Into<String>,
3596        opts: ContainerWithNewFileOpts<'a>,
3597    ) -> Container {
3598        let mut query = self.selection.select("withNewFile");
3599        query = query.arg("path", path.into());
3600        query = query.arg("contents", contents.into());
3601        if let Some(permissions) = opts.permissions {
3602            query = query.arg("permissions", permissions);
3603        }
3604        if let Some(owner) = opts.owner {
3605            query = query.arg("owner", owner);
3606        }
3607        if let Some(expand) = opts.expand {
3608            query = query.arg("expand", expand);
3609        }
3610        Container {
3611            proc: self.proc.clone(),
3612            selection: query,
3613            graphql_client: self.graphql_client.clone(),
3614        }
3615    }
3616    /// Attach credentials for future publishing to a registry. Use in combination with publish
3617    ///
3618    /// # Arguments
3619    ///
3620    /// * `address` - The image address that needs authentication. Same format as "docker push". Example: "registry.dagger.io/dagger:latest"
3621    /// * `username` - The username to authenticate with. Example: "alice"
3622    /// * `secret` - The API key, password or token to authenticate to this registry
3623    pub fn with_registry_auth(
3624        &self,
3625        address: impl Into<String>,
3626        username: impl Into<String>,
3627        secret: impl IntoID<Id>,
3628    ) -> Container {
3629        let mut query = self.selection.select("withRegistryAuth");
3630        query = query.arg("address", address.into());
3631        query = query.arg("username", username.into());
3632        query = query.arg_lazy(
3633            "secret",
3634            Box::new(move || {
3635                let secret = secret.clone();
3636                Box::pin(async move { secret.into_id().await.unwrap().quote() })
3637            }),
3638        );
3639        Container {
3640            proc: self.proc.clone(),
3641            selection: query,
3642            graphql_client: self.graphql_client.clone(),
3643        }
3644    }
3645    /// Change the container's root filesystem. The previous root filesystem will be lost.
3646    ///
3647    /// # Arguments
3648    ///
3649    /// * `directory` - The new root filesystem.
3650    pub fn with_rootfs(&self, directory: impl IntoID<Id>) -> Container {
3651        let mut query = self.selection.select("withRootfs");
3652        query = query.arg_lazy(
3653            "directory",
3654            Box::new(move || {
3655                let directory = directory.clone();
3656                Box::pin(async move { directory.into_id().await.unwrap().quote() })
3657            }),
3658        );
3659        Container {
3660            proc: self.proc.clone(),
3661            selection: query,
3662            graphql_client: self.graphql_client.clone(),
3663        }
3664    }
3665    /// Set a new environment variable, using a secret value
3666    ///
3667    /// # Arguments
3668    ///
3669    /// * `name` - Name of the secret variable (e.g., "API_SECRET").
3670    /// * `secret` - Identifier of the secret value.
3671    pub fn with_secret_variable(
3672        &self,
3673        name: impl Into<String>,
3674        secret: impl IntoID<Id>,
3675    ) -> Container {
3676        let mut query = self.selection.select("withSecretVariable");
3677        query = query.arg("name", name.into());
3678        query = query.arg_lazy(
3679            "secret",
3680            Box::new(move || {
3681                let secret = secret.clone();
3682                Box::pin(async move { secret.into_id().await.unwrap().quote() })
3683            }),
3684        );
3685        Container {
3686            proc: self.proc.clone(),
3687            selection: query,
3688            graphql_client: self.graphql_client.clone(),
3689        }
3690    }
3691    /// Establish a runtime dependency from a container to a network service.
3692    /// The service will be started automatically when needed and detached when it is no longer needed, executing the default command if none is set.
3693    /// The service will be reachable from the container via the provided hostname alias.
3694    /// The service dependency will also convey to any files or directories produced by the container.
3695    ///
3696    /// # Arguments
3697    ///
3698    /// * `alias` - Hostname that will resolve to the target service (only accessible from within this container)
3699    /// * `service` - The target service
3700    pub fn with_service_binding(
3701        &self,
3702        alias: impl Into<String>,
3703        service: impl IntoID<Id>,
3704    ) -> Container {
3705        let mut query = self.selection.select("withServiceBinding");
3706        query = query.arg("alias", alias.into());
3707        query = query.arg_lazy(
3708            "service",
3709            Box::new(move || {
3710                let service = service.clone();
3711                Box::pin(async move { service.into_id().await.unwrap().quote() })
3712            }),
3713        );
3714        Container {
3715            proc: self.proc.clone(),
3716            selection: query,
3717            graphql_client: self.graphql_client.clone(),
3718        }
3719    }
3720    /// Return a snapshot with a symlink
3721    ///
3722    /// # Arguments
3723    ///
3724    /// * `target` - Location of the file or directory to link to (e.g., "/existing/file").
3725    /// * `link_name` - Location where the symbolic link will be created (e.g., "/new-file-link").
3726    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3727    pub fn with_symlink(
3728        &self,
3729        target: impl Into<String>,
3730        link_name: impl Into<String>,
3731    ) -> Container {
3732        let mut query = self.selection.select("withSymlink");
3733        query = query.arg("target", target.into());
3734        query = query.arg("linkName", link_name.into());
3735        Container {
3736            proc: self.proc.clone(),
3737            selection: query,
3738            graphql_client: self.graphql_client.clone(),
3739        }
3740    }
3741    /// Return a snapshot with a symlink
3742    ///
3743    /// # Arguments
3744    ///
3745    /// * `target` - Location of the file or directory to link to (e.g., "/existing/file").
3746    /// * `link_name` - Location where the symbolic link will be created (e.g., "/new-file-link").
3747    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3748    pub fn with_symlink_opts(
3749        &self,
3750        target: impl Into<String>,
3751        link_name: impl Into<String>,
3752        opts: ContainerWithSymlinkOpts,
3753    ) -> Container {
3754        let mut query = self.selection.select("withSymlink");
3755        query = query.arg("target", target.into());
3756        query = query.arg("linkName", link_name.into());
3757        if let Some(expand) = opts.expand {
3758            query = query.arg("expand", expand);
3759        }
3760        Container {
3761            proc: self.proc.clone(),
3762            selection: query,
3763            graphql_client: self.graphql_client.clone(),
3764        }
3765    }
3766    /// Retrieves this container plus a socket forwarded to the given Unix socket path.
3767    ///
3768    /// # Arguments
3769    ///
3770    /// * `path` - Location of the forwarded Unix socket (e.g., "/tmp/socket").
3771    /// * `source` - Identifier of the socket to forward.
3772    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3773    pub fn with_unix_socket(&self, path: impl Into<String>, source: impl IntoID<Id>) -> Container {
3774        let mut query = self.selection.select("withUnixSocket");
3775        query = query.arg("path", path.into());
3776        query = query.arg_lazy(
3777            "source",
3778            Box::new(move || {
3779                let source = source.clone();
3780                Box::pin(async move { source.into_id().await.unwrap().quote() })
3781            }),
3782        );
3783        Container {
3784            proc: self.proc.clone(),
3785            selection: query,
3786            graphql_client: self.graphql_client.clone(),
3787        }
3788    }
3789    /// Retrieves this container plus a socket forwarded to the given Unix socket path.
3790    ///
3791    /// # Arguments
3792    ///
3793    /// * `path` - Location of the forwarded Unix socket (e.g., "/tmp/socket").
3794    /// * `source` - Identifier of the socket to forward.
3795    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3796    pub fn with_unix_socket_opts<'a>(
3797        &self,
3798        path: impl Into<String>,
3799        source: impl IntoID<Id>,
3800        opts: ContainerWithUnixSocketOpts<'a>,
3801    ) -> Container {
3802        let mut query = self.selection.select("withUnixSocket");
3803        query = query.arg("path", path.into());
3804        query = query.arg_lazy(
3805            "source",
3806            Box::new(move || {
3807                let source = source.clone();
3808                Box::pin(async move { source.into_id().await.unwrap().quote() })
3809            }),
3810        );
3811        if let Some(owner) = opts.owner {
3812            query = query.arg("owner", owner);
3813        }
3814        if let Some(expand) = opts.expand {
3815            query = query.arg("expand", expand);
3816        }
3817        Container {
3818            proc: self.proc.clone(),
3819            selection: query,
3820            graphql_client: self.graphql_client.clone(),
3821        }
3822    }
3823    /// Retrieves this container with a different command user.
3824    ///
3825    /// # Arguments
3826    ///
3827    /// * `name` - The user to set (e.g., "root").
3828    pub fn with_user(&self, name: impl Into<String>) -> Container {
3829        let mut query = self.selection.select("withUser");
3830        query = query.arg("name", name.into());
3831        Container {
3832            proc: self.proc.clone(),
3833            selection: query,
3834            graphql_client: self.graphql_client.clone(),
3835        }
3836    }
3837    /// Set a new non-secret environment variable for future execs without invalidating exec cache when only its value changes.
3838    /// This is an expert-only escape hatch. If a volatile value affects observable exec results, stale cached results may be reused.
3839    ///
3840    /// # Arguments
3841    ///
3842    /// * `name` - Name of the volatile variable (e.g., "CI_RUN_ID").
3843    /// * `value` - Value of the volatile variable.
3844    pub fn with_volatile_variable(
3845        &self,
3846        name: impl Into<String>,
3847        value: impl Into<String>,
3848    ) -> Container {
3849        let mut query = self.selection.select("withVolatileVariable");
3850        query = query.arg("name", name.into());
3851        query = query.arg("value", value.into());
3852        Container {
3853            proc: self.proc.clone(),
3854            selection: query,
3855            graphql_client: self.graphql_client.clone(),
3856        }
3857    }
3858    /// Change the container's working directory. Like WORKDIR in Dockerfile.
3859    ///
3860    /// # Arguments
3861    ///
3862    /// * `path` - The path to set as the working directory (e.g., "/app").
3863    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3864    pub fn with_workdir(&self, path: impl Into<String>) -> Container {
3865        let mut query = self.selection.select("withWorkdir");
3866        query = query.arg("path", path.into());
3867        Container {
3868            proc: self.proc.clone(),
3869            selection: query,
3870            graphql_client: self.graphql_client.clone(),
3871        }
3872    }
3873    /// Change the container's working directory. Like WORKDIR in Dockerfile.
3874    ///
3875    /// # Arguments
3876    ///
3877    /// * `path` - The path to set as the working directory (e.g., "/app").
3878    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3879    pub fn with_workdir_opts(
3880        &self,
3881        path: impl Into<String>,
3882        opts: ContainerWithWorkdirOpts,
3883    ) -> Container {
3884        let mut query = self.selection.select("withWorkdir");
3885        query = query.arg("path", path.into());
3886        if let Some(expand) = opts.expand {
3887            query = query.arg("expand", expand);
3888        }
3889        Container {
3890            proc: self.proc.clone(),
3891            selection: query,
3892            graphql_client: self.graphql_client.clone(),
3893        }
3894    }
3895    /// Retrieves this container minus the given OCI annotation.
3896    ///
3897    /// # Arguments
3898    ///
3899    /// * `name` - The name of the annotation.
3900    pub fn without_annotation(&self, name: impl Into<String>) -> Container {
3901        let mut query = self.selection.select("withoutAnnotation");
3902        query = query.arg("name", name.into());
3903        Container {
3904            proc: self.proc.clone(),
3905            selection: query,
3906            graphql_client: self.graphql_client.clone(),
3907        }
3908    }
3909    /// Remove the container's default arguments.
3910    pub fn without_default_args(&self) -> Container {
3911        let query = self.selection.select("withoutDefaultArgs");
3912        Container {
3913            proc: self.proc.clone(),
3914            selection: query,
3915            graphql_client: self.graphql_client.clone(),
3916        }
3917    }
3918    /// Return a new container snapshot, with a directory removed from its filesystem
3919    ///
3920    /// # Arguments
3921    ///
3922    /// * `path` - Location of the directory to remove (e.g., ".github/").
3923    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3924    pub fn without_directory(&self, path: impl Into<String>) -> Container {
3925        let mut query = self.selection.select("withoutDirectory");
3926        query = query.arg("path", path.into());
3927        Container {
3928            proc: self.proc.clone(),
3929            selection: query,
3930            graphql_client: self.graphql_client.clone(),
3931        }
3932    }
3933    /// Return a new container snapshot, with a directory removed from its filesystem
3934    ///
3935    /// # Arguments
3936    ///
3937    /// * `path` - Location of the directory to remove (e.g., ".github/").
3938    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3939    pub fn without_directory_opts(
3940        &self,
3941        path: impl Into<String>,
3942        opts: ContainerWithoutDirectoryOpts,
3943    ) -> Container {
3944        let mut query = self.selection.select("withoutDirectory");
3945        query = query.arg("path", path.into());
3946        if let Some(expand) = opts.expand {
3947            query = query.arg("expand", expand);
3948        }
3949        Container {
3950            proc: self.proc.clone(),
3951            selection: query,
3952            graphql_client: self.graphql_client.clone(),
3953        }
3954    }
3955    /// Retrieves this container without a configured docker healtcheck command.
3956    pub fn without_docker_healthcheck(&self) -> Container {
3957        let query = self.selection.select("withoutDockerHealthcheck");
3958        Container {
3959            proc: self.proc.clone(),
3960            selection: query,
3961            graphql_client: self.graphql_client.clone(),
3962        }
3963    }
3964    /// Reset the container's OCI entrypoint.
3965    ///
3966    /// # Arguments
3967    ///
3968    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3969    pub fn without_entrypoint(&self) -> Container {
3970        let query = self.selection.select("withoutEntrypoint");
3971        Container {
3972            proc: self.proc.clone(),
3973            selection: query,
3974            graphql_client: self.graphql_client.clone(),
3975        }
3976    }
3977    /// Reset the container's OCI entrypoint.
3978    ///
3979    /// # Arguments
3980    ///
3981    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3982    pub fn without_entrypoint_opts(&self, opts: ContainerWithoutEntrypointOpts) -> Container {
3983        let mut query = self.selection.select("withoutEntrypoint");
3984        if let Some(keep_default_args) = opts.keep_default_args {
3985            query = query.arg("keepDefaultArgs", keep_default_args);
3986        }
3987        Container {
3988            proc: self.proc.clone(),
3989            selection: query,
3990            graphql_client: self.graphql_client.clone(),
3991        }
3992    }
3993    /// Retrieves this container minus the given environment variable.
3994    ///
3995    /// # Arguments
3996    ///
3997    /// * `name` - The name of the environment variable (e.g., "HOST").
3998    pub fn without_env_variable(&self, name: impl Into<String>) -> Container {
3999        let mut query = self.selection.select("withoutEnvVariable");
4000        query = query.arg("name", name.into());
4001        Container {
4002            proc: self.proc.clone(),
4003            selection: query,
4004            graphql_client: self.graphql_client.clone(),
4005        }
4006    }
4007    /// Unexpose a previously exposed port.
4008    ///
4009    /// # Arguments
4010    ///
4011    /// * `port` - Port number to unexpose
4012    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4013    pub fn without_exposed_port(&self, port: isize) -> Container {
4014        let mut query = self.selection.select("withoutExposedPort");
4015        query = query.arg("port", port);
4016        Container {
4017            proc: self.proc.clone(),
4018            selection: query,
4019            graphql_client: self.graphql_client.clone(),
4020        }
4021    }
4022    /// Unexpose a previously exposed port.
4023    ///
4024    /// # Arguments
4025    ///
4026    /// * `port` - Port number to unexpose
4027    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4028    pub fn without_exposed_port_opts(
4029        &self,
4030        port: isize,
4031        opts: ContainerWithoutExposedPortOpts,
4032    ) -> Container {
4033        let mut query = self.selection.select("withoutExposedPort");
4034        query = query.arg("port", port);
4035        if let Some(protocol) = opts.protocol {
4036            query = query.arg("protocol", protocol);
4037        }
4038        Container {
4039            proc: self.proc.clone(),
4040            selection: query,
4041            graphql_client: self.graphql_client.clone(),
4042        }
4043    }
4044    /// Retrieves this container with the file at the given path removed.
4045    ///
4046    /// # Arguments
4047    ///
4048    /// * `path` - Location of the file to remove (e.g., "/file.txt").
4049    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4050    pub fn without_file(&self, path: impl Into<String>) -> Container {
4051        let mut query = self.selection.select("withoutFile");
4052        query = query.arg("path", path.into());
4053        Container {
4054            proc: self.proc.clone(),
4055            selection: query,
4056            graphql_client: self.graphql_client.clone(),
4057        }
4058    }
4059    /// Retrieves this container with the file at the given path removed.
4060    ///
4061    /// # Arguments
4062    ///
4063    /// * `path` - Location of the file to remove (e.g., "/file.txt").
4064    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4065    pub fn without_file_opts(
4066        &self,
4067        path: impl Into<String>,
4068        opts: ContainerWithoutFileOpts,
4069    ) -> Container {
4070        let mut query = self.selection.select("withoutFile");
4071        query = query.arg("path", path.into());
4072        if let Some(expand) = opts.expand {
4073            query = query.arg("expand", expand);
4074        }
4075        Container {
4076            proc: self.proc.clone(),
4077            selection: query,
4078            graphql_client: self.graphql_client.clone(),
4079        }
4080    }
4081    /// Return a new container spanshot with specified files removed
4082    ///
4083    /// # Arguments
4084    ///
4085    /// * `paths` - Paths of the files to remove. Example: ["foo.txt, "/root/.ssh/config"
4086    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4087    pub fn without_files(&self, paths: Vec<impl Into<String>>) -> Container {
4088        let mut query = self.selection.select("withoutFiles");
4089        query = query.arg(
4090            "paths",
4091            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
4092        );
4093        Container {
4094            proc: self.proc.clone(),
4095            selection: query,
4096            graphql_client: self.graphql_client.clone(),
4097        }
4098    }
4099    /// Return a new container spanshot with specified files removed
4100    ///
4101    /// # Arguments
4102    ///
4103    /// * `paths` - Paths of the files to remove. Example: ["foo.txt, "/root/.ssh/config"
4104    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4105    pub fn without_files_opts(
4106        &self,
4107        paths: Vec<impl Into<String>>,
4108        opts: ContainerWithoutFilesOpts,
4109    ) -> Container {
4110        let mut query = self.selection.select("withoutFiles");
4111        query = query.arg(
4112            "paths",
4113            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
4114        );
4115        if let Some(expand) = opts.expand {
4116            query = query.arg("expand", expand);
4117        }
4118        Container {
4119            proc: self.proc.clone(),
4120            selection: query,
4121            graphql_client: self.graphql_client.clone(),
4122        }
4123    }
4124    /// Retrieves this container minus the given environment label.
4125    ///
4126    /// # Arguments
4127    ///
4128    /// * `name` - The name of the label to remove (e.g., "org.opencontainers.artifact.created").
4129    pub fn without_label(&self, name: impl Into<String>) -> Container {
4130        let mut query = self.selection.select("withoutLabel");
4131        query = query.arg("name", name.into());
4132        Container {
4133            proc: self.proc.clone(),
4134            selection: query,
4135            graphql_client: self.graphql_client.clone(),
4136        }
4137    }
4138    /// Retrieves this container after unmounting everything at the given path.
4139    ///
4140    /// # Arguments
4141    ///
4142    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
4143    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4144    pub fn without_mount(&self, path: impl Into<String>) -> Container {
4145        let mut query = self.selection.select("withoutMount");
4146        query = query.arg("path", path.into());
4147        Container {
4148            proc: self.proc.clone(),
4149            selection: query,
4150            graphql_client: self.graphql_client.clone(),
4151        }
4152    }
4153    /// Retrieves this container after unmounting everything at the given path.
4154    ///
4155    /// # Arguments
4156    ///
4157    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
4158    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4159    pub fn without_mount_opts(
4160        &self,
4161        path: impl Into<String>,
4162        opts: ContainerWithoutMountOpts,
4163    ) -> Container {
4164        let mut query = self.selection.select("withoutMount");
4165        query = query.arg("path", path.into());
4166        if let Some(expand) = opts.expand {
4167            query = query.arg("expand", expand);
4168        }
4169        Container {
4170            proc: self.proc.clone(),
4171            selection: query,
4172            graphql_client: self.graphql_client.clone(),
4173        }
4174    }
4175    /// Retrieves this container without the registry authentication of a given address.
4176    ///
4177    /// # Arguments
4178    ///
4179    /// * `address` - Registry's address to remove the authentication from.
4180    ///
4181    /// Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
4182    pub fn without_registry_auth(&self, address: impl Into<String>) -> Container {
4183        let mut query = self.selection.select("withoutRegistryAuth");
4184        query = query.arg("address", address.into());
4185        Container {
4186            proc: self.proc.clone(),
4187            selection: query,
4188            graphql_client: self.graphql_client.clone(),
4189        }
4190    }
4191    /// Retrieves this container minus the given environment variable containing the secret.
4192    ///
4193    /// # Arguments
4194    ///
4195    /// * `name` - The name of the environment variable (e.g., "HOST").
4196    pub fn without_secret_variable(&self, name: impl Into<String>) -> Container {
4197        let mut query = self.selection.select("withoutSecretVariable");
4198        query = query.arg("name", name.into());
4199        Container {
4200            proc: self.proc.clone(),
4201            selection: query,
4202            graphql_client: self.graphql_client.clone(),
4203        }
4204    }
4205    /// Retrieves this container with a previously added Unix socket removed.
4206    ///
4207    /// # Arguments
4208    ///
4209    /// * `path` - Location of the socket to remove (e.g., "/tmp/socket").
4210    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4211    pub fn without_unix_socket(&self, path: impl Into<String>) -> Container {
4212        let mut query = self.selection.select("withoutUnixSocket");
4213        query = query.arg("path", path.into());
4214        Container {
4215            proc: self.proc.clone(),
4216            selection: query,
4217            graphql_client: self.graphql_client.clone(),
4218        }
4219    }
4220    /// Retrieves this container with a previously added Unix socket removed.
4221    ///
4222    /// # Arguments
4223    ///
4224    /// * `path` - Location of the socket to remove (e.g., "/tmp/socket").
4225    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4226    pub fn without_unix_socket_opts(
4227        &self,
4228        path: impl Into<String>,
4229        opts: ContainerWithoutUnixSocketOpts,
4230    ) -> Container {
4231        let mut query = self.selection.select("withoutUnixSocket");
4232        query = query.arg("path", path.into());
4233        if let Some(expand) = opts.expand {
4234            query = query.arg("expand", expand);
4235        }
4236        Container {
4237            proc: self.proc.clone(),
4238            selection: query,
4239            graphql_client: self.graphql_client.clone(),
4240        }
4241    }
4242    /// Retrieves this container with an unset command user.
4243    /// Should default to root.
4244    pub fn without_user(&self) -> Container {
4245        let query = self.selection.select("withoutUser");
4246        Container {
4247            proc: self.proc.clone(),
4248            selection: query,
4249            graphql_client: self.graphql_client.clone(),
4250        }
4251    }
4252    /// Retrieves this container minus the given volatile environment variable.
4253    ///
4254    /// # Arguments
4255    ///
4256    /// * `name` - The name of the volatile environment variable (e.g., "CI_RUN_ID").
4257    pub fn without_volatile_variable(&self, name: impl Into<String>) -> Container {
4258        let mut query = self.selection.select("withoutVolatileVariable");
4259        query = query.arg("name", name.into());
4260        Container {
4261            proc: self.proc.clone(),
4262            selection: query,
4263            graphql_client: self.graphql_client.clone(),
4264        }
4265    }
4266    /// Unset the container's working directory.
4267    /// Should default to "/".
4268    pub fn without_workdir(&self) -> Container {
4269        let query = self.selection.select("withoutWorkdir");
4270        Container {
4271            proc: self.proc.clone(),
4272            selection: query,
4273            graphql_client: self.graphql_client.clone(),
4274        }
4275    }
4276    /// Retrieves the working directory for all commands.
4277    pub async fn workdir(&self) -> Result<String, DaggerError> {
4278        let query = self.selection.select("workdir");
4279        query.execute(self.graphql_client.clone()).await
4280    }
4281}
4282impl Exportable for Container {
4283    fn export(
4284        &self,
4285        path: impl Into<String>,
4286    ) -> impl core::future::Future<Output = Result<String, DaggerError>> + Send {
4287        let mut query = self.selection.select("export");
4288        query = query.arg("path", path.into());
4289        let graphql_client = self.graphql_client.clone();
4290        async move { query.execute(graphql_client).await }
4291    }
4292    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
4293        let query = self.selection.select("id");
4294        let graphql_client = self.graphql_client.clone();
4295        async move { query.execute(graphql_client).await }
4296    }
4297}
4298impl Node for Container {
4299    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
4300        let query = self.selection.select("id");
4301        let graphql_client = self.graphql_client.clone();
4302        async move { query.execute(graphql_client).await }
4303    }
4304}
4305impl Syncer for Container {
4306    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
4307        let query = self.selection.select("id");
4308        let graphql_client = self.graphql_client.clone();
4309        async move { query.execute(graphql_client).await }
4310    }
4311    fn sync(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
4312        let query = self.selection.select("sync");
4313        let graphql_client = self.graphql_client.clone();
4314        async move { query.execute(graphql_client).await }
4315    }
4316}
4317#[derive(Clone)]
4318pub struct CurrentModule {
4319    pub proc: Option<Arc<DaggerSessionProc>>,
4320    pub selection: Selection,
4321    pub graphql_client: DynGraphQLClient,
4322}
4323#[derive(Builder, Debug, PartialEq)]
4324pub struct CurrentModuleGeneratorsOpts<'a> {
4325    /// Only include generators matching the specified patterns
4326    #[builder(setter(into, strip_option), default)]
4327    pub include: Option<Vec<&'a str>>,
4328}
4329#[derive(Builder, Debug, PartialEq)]
4330pub struct CurrentModuleWorkdirOpts<'a> {
4331    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
4332    #[builder(setter(into, strip_option), default)]
4333    pub exclude: Option<Vec<&'a str>>,
4334    /// Apply .gitignore filter rules inside the directory
4335    #[builder(setter(into, strip_option), default)]
4336    pub gitignore: Option<bool>,
4337    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
4338    #[builder(setter(into, strip_option), default)]
4339    pub include: Option<Vec<&'a str>>,
4340}
4341impl IntoID<Id> for CurrentModule {
4342    fn into_id(
4343        self,
4344    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
4345        Box::pin(async move { self.id().await })
4346    }
4347}
4348impl Loadable for CurrentModule {
4349    fn graphql_type() -> &'static str {
4350        "CurrentModule"
4351    }
4352    fn from_query(
4353        proc: Option<Arc<DaggerSessionProc>>,
4354        selection: Selection,
4355        graphql_client: DynGraphQLClient,
4356    ) -> Self {
4357        Self {
4358            proc,
4359            selection,
4360            graphql_client,
4361        }
4362    }
4363}
4364impl CurrentModule {
4365    /// The dependencies of the module.
4366    pub async fn dependencies(&self) -> Result<Vec<Module>, DaggerError> {
4367        let query = self.selection.select("dependencies");
4368        let query = query.select("id");
4369        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
4370        Ok(ids
4371            .into_iter()
4372            .map(|id| Module {
4373                proc: self.proc.clone(),
4374                selection: crate::querybuilder::query()
4375                    .select("node")
4376                    .arg("id", &id.0)
4377                    .inline_fragment("Module"),
4378                graphql_client: self.graphql_client.clone(),
4379            })
4380            .collect())
4381    }
4382    /// The generated files and directories made on top of the module source's context directory.
4383    pub fn generated_context_directory(&self) -> Directory {
4384        let query = self.selection.select("generatedContextDirectory");
4385        Directory {
4386            proc: self.proc.clone(),
4387            selection: query,
4388            graphql_client: self.graphql_client.clone(),
4389        }
4390    }
4391    /// Return all generators defined by the module
4392    ///
4393    /// # Arguments
4394    ///
4395    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4396    pub fn generators(&self) -> GeneratorGroup {
4397        let query = self.selection.select("generators");
4398        GeneratorGroup {
4399            proc: self.proc.clone(),
4400            selection: query,
4401            graphql_client: self.graphql_client.clone(),
4402        }
4403    }
4404    /// Return all generators defined by the module
4405    ///
4406    /// # Arguments
4407    ///
4408    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4409    pub fn generators_opts<'a>(&self, opts: CurrentModuleGeneratorsOpts<'a>) -> GeneratorGroup {
4410        let mut query = self.selection.select("generators");
4411        if let Some(include) = opts.include {
4412            query = query.arg("include", include);
4413        }
4414        GeneratorGroup {
4415            proc: self.proc.clone(),
4416            selection: query,
4417            graphql_client: self.graphql_client.clone(),
4418        }
4419    }
4420    /// A unique identifier for this CurrentModule.
4421    pub async fn id(&self) -> Result<Id, DaggerError> {
4422        let query = self.selection.select("id");
4423        query.execute(self.graphql_client.clone()).await
4424    }
4425    /// The name of the module being executed in
4426    pub async fn name(&self) -> Result<String, DaggerError> {
4427        let query = self.selection.select("name");
4428        query.execute(self.graphql_client.clone()).await
4429    }
4430    /// The directory containing the module's source code loaded into the engine (plus any generated code that may have been created).
4431    pub fn source(&self) -> Directory {
4432        let query = self.selection.select("source");
4433        Directory {
4434            proc: self.proc.clone(),
4435            selection: query,
4436            graphql_client: self.graphql_client.clone(),
4437        }
4438    }
4439    /// Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.
4440    ///
4441    /// # Arguments
4442    ///
4443    /// * `path` - Location of the directory to access (e.g., ".").
4444    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4445    pub fn workdir(&self, path: impl Into<String>) -> Directory {
4446        let mut query = self.selection.select("workdir");
4447        query = query.arg("path", path.into());
4448        Directory {
4449            proc: self.proc.clone(),
4450            selection: query,
4451            graphql_client: self.graphql_client.clone(),
4452        }
4453    }
4454    /// Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.
4455    ///
4456    /// # Arguments
4457    ///
4458    /// * `path` - Location of the directory to access (e.g., ".").
4459    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4460    pub fn workdir_opts<'a>(
4461        &self,
4462        path: impl Into<String>,
4463        opts: CurrentModuleWorkdirOpts<'a>,
4464    ) -> Directory {
4465        let mut query = self.selection.select("workdir");
4466        query = query.arg("path", path.into());
4467        if let Some(exclude) = opts.exclude {
4468            query = query.arg("exclude", exclude);
4469        }
4470        if let Some(include) = opts.include {
4471            query = query.arg("include", include);
4472        }
4473        if let Some(gitignore) = opts.gitignore {
4474            query = query.arg("gitignore", gitignore);
4475        }
4476        Directory {
4477            proc: self.proc.clone(),
4478            selection: query,
4479            graphql_client: self.graphql_client.clone(),
4480        }
4481    }
4482    /// Load a file from the module's scratch working directory, including any changes that may have been made to it during module function execution.Load a file from the module's scratch working directory, including any changes that may have been made to it during module function execution.
4483    ///
4484    /// # Arguments
4485    ///
4486    /// * `path` - Location of the file to retrieve (e.g., "README.md").
4487    pub fn workdir_file(&self, path: impl Into<String>) -> File {
4488        let mut query = self.selection.select("workdirFile");
4489        query = query.arg("path", path.into());
4490        File {
4491            proc: self.proc.clone(),
4492            selection: query,
4493            graphql_client: self.graphql_client.clone(),
4494        }
4495    }
4496}
4497impl Node for CurrentModule {
4498    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
4499        let query = self.selection.select("id");
4500        let graphql_client = self.graphql_client.clone();
4501        async move { query.execute(graphql_client).await }
4502    }
4503}
4504#[derive(Clone)]
4505pub struct DiffStat {
4506    pub proc: Option<Arc<DaggerSessionProc>>,
4507    pub selection: Selection,
4508    pub graphql_client: DynGraphQLClient,
4509}
4510impl IntoID<Id> for DiffStat {
4511    fn into_id(
4512        self,
4513    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
4514        Box::pin(async move { self.id().await })
4515    }
4516}
4517impl Loadable for DiffStat {
4518    fn graphql_type() -> &'static str {
4519        "DiffStat"
4520    }
4521    fn from_query(
4522        proc: Option<Arc<DaggerSessionProc>>,
4523        selection: Selection,
4524        graphql_client: DynGraphQLClient,
4525    ) -> Self {
4526        Self {
4527            proc,
4528            selection,
4529            graphql_client,
4530        }
4531    }
4532}
4533impl DiffStat {
4534    /// Number of added lines for this path.
4535    pub async fn added_lines(&self) -> Result<isize, DaggerError> {
4536        let query = self.selection.select("addedLines");
4537        query.execute(self.graphql_client.clone()).await
4538    }
4539    /// A unique identifier for this DiffStat.
4540    pub async fn id(&self) -> Result<Id, DaggerError> {
4541        let query = self.selection.select("id");
4542        query.execute(self.graphql_client.clone()).await
4543    }
4544    /// Type of change.
4545    pub async fn kind(&self) -> Result<DiffStatKind, DaggerError> {
4546        let query = self.selection.select("kind");
4547        query.execute(self.graphql_client.clone()).await
4548    }
4549    /// Previous path of the file, set only for renames.
4550    pub async fn old_path(&self) -> Result<String, DaggerError> {
4551        let query = self.selection.select("oldPath");
4552        query.execute(self.graphql_client.clone()).await
4553    }
4554    /// Path of the changed file or directory.
4555    pub async fn path(&self) -> Result<String, DaggerError> {
4556        let query = self.selection.select("path");
4557        query.execute(self.graphql_client.clone()).await
4558    }
4559    /// Number of removed lines for this path.
4560    pub async fn removed_lines(&self) -> Result<isize, DaggerError> {
4561        let query = self.selection.select("removedLines");
4562        query.execute(self.graphql_client.clone()).await
4563    }
4564}
4565impl Node for DiffStat {
4566    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
4567        let query = self.selection.select("id");
4568        let graphql_client = self.graphql_client.clone();
4569        async move { query.execute(graphql_client).await }
4570    }
4571}
4572#[derive(Clone)]
4573pub struct Directory {
4574    pub proc: Option<Arc<DaggerSessionProc>>,
4575    pub selection: Selection,
4576    pub graphql_client: DynGraphQLClient,
4577}
4578#[derive(Builder, Debug, PartialEq)]
4579pub struct DirectoryAsModuleOpts<'a> {
4580    /// An optional subpath of the directory which contains the module's configuration file.
4581    /// If not set, the module source code is loaded from the root of the directory.
4582    #[builder(setter(into, strip_option), default)]
4583    pub source_root_path: Option<&'a str>,
4584}
4585#[derive(Builder, Debug, PartialEq)]
4586pub struct DirectoryAsModuleSourceOpts<'a> {
4587    /// An optional subpath of the directory which contains the module's configuration file.
4588    /// If not set, the module source code is loaded from the root of the directory.
4589    #[builder(setter(into, strip_option), default)]
4590    pub source_root_path: Option<&'a str>,
4591}
4592#[derive(Builder, Debug, PartialEq)]
4593pub struct DirectoryDockerBuildOpts<'a> {
4594    /// Build arguments to use in the build.
4595    #[builder(setter(into, strip_option), default)]
4596    pub build_args: Option<Vec<BuildArg>>,
4597    /// Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
4598    #[builder(setter(into, strip_option), default)]
4599    pub dockerfile: Option<&'a str>,
4600    /// If set, skip the automatic init process injected into containers created by RUN statements.
4601    /// This should only be used if the user requires that their exec processes be the pid 1 process in the container. Otherwise it may result in unexpected behavior.
4602    #[builder(setter(into, strip_option), default)]
4603    pub no_init: Option<bool>,
4604    /// The platform to build.
4605    #[builder(setter(into, strip_option), default)]
4606    pub platform: Option<Platform>,
4607    /// Secrets to pass to the build.
4608    /// They will be mounted at /run/secrets/[secret-name].
4609    #[builder(setter(into, strip_option), default)]
4610    pub secrets: Option<Vec<Id>>,
4611    /// A socket to use for SSH authentication during the build
4612    /// (e.g., for Dockerfile RUN --mount=type=ssh instructions).
4613    /// Typically obtained via host.unixSocket() pointing to the SSH_AUTH_SOCK.
4614    #[builder(setter(into, strip_option), default)]
4615    pub ssh: Option<Id>,
4616    /// Target build stage to build.
4617    #[builder(setter(into, strip_option), default)]
4618    pub target: Option<&'a str>,
4619}
4620#[derive(Builder, Debug, PartialEq)]
4621pub struct DirectoryEntriesOpts<'a> {
4622    /// Location of the directory to look at (e.g., "/src").
4623    #[builder(setter(into, strip_option), default)]
4624    pub path: Option<&'a str>,
4625}
4626#[derive(Builder, Debug, PartialEq)]
4627pub struct DirectoryExistsOpts {
4628    /// If specified, do not follow symlinks.
4629    #[builder(setter(into, strip_option), default)]
4630    pub do_not_follow_symlinks: Option<bool>,
4631    /// If specified, also validate the type of file (e.g. "REGULAR_TYPE", "DIRECTORY_TYPE", or "SYMLINK_TYPE").
4632    #[builder(setter(into, strip_option), default)]
4633    pub expected_type: Option<ExistsType>,
4634}
4635#[derive(Builder, Debug, PartialEq)]
4636pub struct DirectoryExportOpts {
4637    /// If true, then the host directory will be wiped clean before exporting so that it exactly matches the directory being exported; this means it will delete any files on the host that aren't in the exported dir. If false (the default), the contents of the directory will be merged with any existing contents of the host directory, leaving any existing files on the host that aren't in the exported directory alone.
4638    #[builder(setter(into, strip_option), default)]
4639    pub wipe: Option<bool>,
4640}
4641#[derive(Builder, Debug, PartialEq)]
4642pub struct DirectoryFilterOpts<'a> {
4643    /// If set, paths matching one of these glob patterns is excluded from the new snapshot. Example: ["node_modules/", ".git*", ".env"]
4644    #[builder(setter(into, strip_option), default)]
4645    pub exclude: Option<Vec<&'a str>>,
4646    /// If set, apply .gitignore rules when filtering the directory.
4647    #[builder(setter(into, strip_option), default)]
4648    pub gitignore: Option<bool>,
4649    /// If set, only paths matching one of these glob patterns is included in the new snapshot. Example: (e.g., ["app/", "package.*"]).
4650    #[builder(setter(into, strip_option), default)]
4651    pub include: Option<Vec<&'a str>>,
4652}
4653#[derive(Builder, Debug, PartialEq)]
4654pub struct DirectorySearchOpts<'a> {
4655    /// Allow the . pattern to match newlines in multiline mode.
4656    #[builder(setter(into, strip_option), default)]
4657    pub dotall: Option<bool>,
4658    /// Only return matching files, not lines and content
4659    #[builder(setter(into, strip_option), default)]
4660    pub files_only: Option<bool>,
4661    /// Glob patterns to match (e.g., "*.md")
4662    #[builder(setter(into, strip_option), default)]
4663    pub globs: Option<Vec<&'a str>>,
4664    /// Enable case-insensitive matching.
4665    #[builder(setter(into, strip_option), default)]
4666    pub insensitive: Option<bool>,
4667    /// Limit the number of results to return
4668    #[builder(setter(into, strip_option), default)]
4669    pub limit: Option<isize>,
4670    /// Interpret the pattern as a literal string instead of a regular expression.
4671    #[builder(setter(into, strip_option), default)]
4672    pub literal: Option<bool>,
4673    /// Enable searching across multiple lines.
4674    #[builder(setter(into, strip_option), default)]
4675    pub multiline: Option<bool>,
4676    /// Directory or file paths to search
4677    #[builder(setter(into, strip_option), default)]
4678    pub paths: Option<Vec<&'a str>>,
4679    /// Skip hidden files (files starting with .).
4680    #[builder(setter(into, strip_option), default)]
4681    pub skip_hidden: Option<bool>,
4682    /// Honor .gitignore, .ignore, and .rgignore files.
4683    #[builder(setter(into, strip_option), default)]
4684    pub skip_ignored: Option<bool>,
4685}
4686#[derive(Builder, Debug, PartialEq)]
4687pub struct DirectoryStatOpts {
4688    /// If specified, do not follow symlinks.
4689    #[builder(setter(into, strip_option), default)]
4690    pub do_not_follow_symlinks: Option<bool>,
4691}
4692#[derive(Builder, Debug, PartialEq)]
4693pub struct DirectoryTerminalOpts<'a> {
4694    /// If set, override the container's default terminal command and invoke these command arguments instead.
4695    #[builder(setter(into, strip_option), default)]
4696    pub cmd: Option<Vec<&'a str>>,
4697    /// If set, override the default container used for the terminal.
4698    #[builder(setter(into, strip_option), default)]
4699    pub container: Option<Id>,
4700    /// Provides Dagger access to the executed command.
4701    #[builder(setter(into, strip_option), default)]
4702    pub experimental_privileged_nesting: Option<bool>,
4703    /// Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands.
4704    #[builder(setter(into, strip_option), default)]
4705    pub insecure_root_capabilities: Option<bool>,
4706}
4707#[derive(Builder, Debug, PartialEq)]
4708pub struct DirectoryWithDirectoryOpts<'a> {
4709    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
4710    #[builder(setter(into, strip_option), default)]
4711    pub exclude: Option<Vec<&'a str>>,
4712    /// Apply .gitignore filter rules inside the directory
4713    #[builder(setter(into, strip_option), default)]
4714    pub gitignore: Option<bool>,
4715    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
4716    #[builder(setter(into, strip_option), default)]
4717    pub include: Option<Vec<&'a str>>,
4718    /// A user:group to set for the copied directory and its contents.
4719    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
4720    /// If the group is omitted, it defaults to the same as the user.
4721    #[builder(setter(into, strip_option), default)]
4722    pub owner: Option<&'a str>,
4723    /// Permission given to the copied directory and contents (e.g., 0755).
4724    #[builder(setter(into, strip_option), default)]
4725    pub permissions: Option<isize>,
4726}
4727#[derive(Builder, Debug, PartialEq)]
4728pub struct DirectoryWithFileOpts<'a> {
4729    /// A user:group to set for the copied directory and its contents.
4730    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
4731    /// If the group is omitted, it defaults to the same as the user.
4732    #[builder(setter(into, strip_option), default)]
4733    pub owner: Option<&'a str>,
4734    /// Permission given to the copied file (e.g., 0600).
4735    #[builder(setter(into, strip_option), default)]
4736    pub permissions: Option<isize>,
4737}
4738#[derive(Builder, Debug, PartialEq)]
4739pub struct DirectoryWithFilesOpts {
4740    /// Permission given to the copied files (e.g., 0600).
4741    #[builder(setter(into, strip_option), default)]
4742    pub permissions: Option<isize>,
4743}
4744#[derive(Builder, Debug, PartialEq)]
4745pub struct DirectoryWithNewDirectoryOpts {
4746    /// Permission granted to the created directory (e.g., 0777).
4747    #[builder(setter(into, strip_option), default)]
4748    pub permissions: Option<isize>,
4749}
4750#[derive(Builder, Debug, PartialEq)]
4751pub struct DirectoryWithNewFileOpts {
4752    /// Permissions of the new file. Example: 0600
4753    #[builder(setter(into, strip_option), default)]
4754    pub permissions: Option<isize>,
4755}
4756impl IntoID<Id> for Directory {
4757    fn into_id(
4758        self,
4759    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
4760        Box::pin(async move { self.id().await })
4761    }
4762}
4763impl Loadable for Directory {
4764    fn graphql_type() -> &'static str {
4765        "Directory"
4766    }
4767    fn from_query(
4768        proc: Option<Arc<DaggerSessionProc>>,
4769        selection: Selection,
4770        graphql_client: DynGraphQLClient,
4771    ) -> Self {
4772        Self {
4773            proc,
4774            selection,
4775            graphql_client,
4776        }
4777    }
4778}
4779impl Directory {
4780    /// Converts this directory to a local git repository
4781    pub fn as_git(&self) -> GitRepository {
4782        let query = self.selection.select("asGit");
4783        GitRepository {
4784            proc: self.proc.clone(),
4785            selection: query,
4786            graphql_client: self.graphql_client.clone(),
4787        }
4788    }
4789    /// Load the directory as a Dagger module source
4790    ///
4791    /// # Arguments
4792    ///
4793    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4794    pub fn as_module(&self) -> Module {
4795        let query = self.selection.select("asModule");
4796        Module {
4797            proc: self.proc.clone(),
4798            selection: query,
4799            graphql_client: self.graphql_client.clone(),
4800        }
4801    }
4802    /// Load the directory as a Dagger module source
4803    ///
4804    /// # Arguments
4805    ///
4806    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4807    pub fn as_module_opts<'a>(&self, opts: DirectoryAsModuleOpts<'a>) -> Module {
4808        let mut query = self.selection.select("asModule");
4809        if let Some(source_root_path) = opts.source_root_path {
4810            query = query.arg("sourceRootPath", source_root_path);
4811        }
4812        Module {
4813            proc: self.proc.clone(),
4814            selection: query,
4815            graphql_client: self.graphql_client.clone(),
4816        }
4817    }
4818    /// Load the directory as a Dagger module source
4819    ///
4820    /// # Arguments
4821    ///
4822    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4823    pub fn as_module_source(&self) -> ModuleSource {
4824        let query = self.selection.select("asModuleSource");
4825        ModuleSource {
4826            proc: self.proc.clone(),
4827            selection: query,
4828            graphql_client: self.graphql_client.clone(),
4829        }
4830    }
4831    /// Load the directory as a Dagger module source
4832    ///
4833    /// # Arguments
4834    ///
4835    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4836    pub fn as_module_source_opts<'a>(&self, opts: DirectoryAsModuleSourceOpts<'a>) -> ModuleSource {
4837        let mut query = self.selection.select("asModuleSource");
4838        if let Some(source_root_path) = opts.source_root_path {
4839            query = query.arg("sourceRootPath", source_root_path);
4840        }
4841        ModuleSource {
4842            proc: self.proc.clone(),
4843            selection: query,
4844            graphql_client: self.graphql_client.clone(),
4845        }
4846    }
4847    /// Return the difference between this directory and another directory, typically an older snapshot.
4848    /// The difference is encoded as a changeset, which also tracks removed files, and can be applied to other directories.
4849    ///
4850    /// # Arguments
4851    ///
4852    /// * `from` - The base directory snapshot to compare against
4853    pub fn changes(&self, from: impl IntoID<Id>) -> Changeset {
4854        let mut query = self.selection.select("changes");
4855        query = query.arg_lazy(
4856            "from",
4857            Box::new(move || {
4858                let from = from.clone();
4859                Box::pin(async move { from.into_id().await.unwrap().quote() })
4860            }),
4861        );
4862        Changeset {
4863            proc: self.proc.clone(),
4864            selection: query,
4865            graphql_client: self.graphql_client.clone(),
4866        }
4867    }
4868    /// Change the owner of the directory contents recursively.
4869    ///
4870    /// # Arguments
4871    ///
4872    /// * `path` - Path of the directory to change ownership of (e.g., "/").
4873    /// * `owner` - A user:group to set for the mounted directory and its contents.
4874    ///
4875    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
4876    ///
4877    /// If the group is omitted, it defaults to the same as the user.
4878    pub fn chown(&self, path: impl Into<String>, owner: impl Into<String>) -> Directory {
4879        let mut query = self.selection.select("chown");
4880        query = query.arg("path", path.into());
4881        query = query.arg("owner", owner.into());
4882        Directory {
4883            proc: self.proc.clone(),
4884            selection: query,
4885            graphql_client: self.graphql_client.clone(),
4886        }
4887    }
4888    /// Return the difference between this directory and an another directory. The difference is encoded as a directory.
4889    ///
4890    /// # Arguments
4891    ///
4892    /// * `other` - The directory to compare against
4893    pub fn diff(&self, other: impl IntoID<Id>) -> Directory {
4894        let mut query = self.selection.select("diff");
4895        query = query.arg_lazy(
4896            "other",
4897            Box::new(move || {
4898                let other = other.clone();
4899                Box::pin(async move { other.into_id().await.unwrap().quote() })
4900            }),
4901        );
4902        Directory {
4903            proc: self.proc.clone(),
4904            selection: query,
4905            graphql_client: self.graphql_client.clone(),
4906        }
4907    }
4908    /// Return the directory's digest. The format of the digest is not guaranteed to be stable between releases of Dagger. It is guaranteed to be stable between invocations of the same Dagger engine.
4909    pub async fn digest(&self) -> Result<String, DaggerError> {
4910        let query = self.selection.select("digest");
4911        query.execute(self.graphql_client.clone()).await
4912    }
4913    /// Retrieves a directory at the given path.
4914    ///
4915    /// # Arguments
4916    ///
4917    /// * `path` - Location of the directory to retrieve. Example: "/src"
4918    pub fn directory(&self, path: impl Into<String>) -> Directory {
4919        let mut query = self.selection.select("directory");
4920        query = query.arg("path", path.into());
4921        Directory {
4922            proc: self.proc.clone(),
4923            selection: query,
4924            graphql_client: self.graphql_client.clone(),
4925        }
4926    }
4927    /// Use Dockerfile compatibility to build a container from this directory. Only use this function for Dockerfile compatibility. Otherwise use the native Container type directly, it is feature-complete and supports all Dockerfile features.
4928    ///
4929    /// # Arguments
4930    ///
4931    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4932    pub fn docker_build(&self) -> Container {
4933        let query = self.selection.select("dockerBuild");
4934        Container {
4935            proc: self.proc.clone(),
4936            selection: query,
4937            graphql_client: self.graphql_client.clone(),
4938        }
4939    }
4940    /// Use Dockerfile compatibility to build a container from this directory. Only use this function for Dockerfile compatibility. Otherwise use the native Container type directly, it is feature-complete and supports all Dockerfile features.
4941    ///
4942    /// # Arguments
4943    ///
4944    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4945    pub fn docker_build_opts<'a>(&self, opts: DirectoryDockerBuildOpts<'a>) -> Container {
4946        let mut query = self.selection.select("dockerBuild");
4947        if let Some(dockerfile) = opts.dockerfile {
4948            query = query.arg("dockerfile", dockerfile);
4949        }
4950        if let Some(platform) = opts.platform {
4951            query = query.arg("platform", platform);
4952        }
4953        if let Some(build_args) = opts.build_args {
4954            query = query.arg("buildArgs", build_args);
4955        }
4956        if let Some(target) = opts.target {
4957            query = query.arg("target", target);
4958        }
4959        if let Some(secrets) = opts.secrets {
4960            query = query.arg("secrets", secrets);
4961        }
4962        if let Some(no_init) = opts.no_init {
4963            query = query.arg("noInit", no_init);
4964        }
4965        if let Some(ssh) = opts.ssh {
4966            query = query.arg("ssh", ssh);
4967        }
4968        Container {
4969            proc: self.proc.clone(),
4970            selection: query,
4971            graphql_client: self.graphql_client.clone(),
4972        }
4973    }
4974    /// Returns a list of files and directories at the given path.
4975    ///
4976    /// # Arguments
4977    ///
4978    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4979    pub async fn entries(&self) -> Result<Vec<String>, DaggerError> {
4980        let query = self.selection.select("entries");
4981        query.execute(self.graphql_client.clone()).await
4982    }
4983    /// Returns a list of files and directories at the given path.
4984    ///
4985    /// # Arguments
4986    ///
4987    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4988    pub async fn entries_opts<'a>(
4989        &self,
4990        opts: DirectoryEntriesOpts<'a>,
4991    ) -> Result<Vec<String>, DaggerError> {
4992        let mut query = self.selection.select("entries");
4993        if let Some(path) = opts.path {
4994            query = query.arg("path", path);
4995        }
4996        query.execute(self.graphql_client.clone()).await
4997    }
4998    /// check if a file or directory exists
4999    ///
5000    /// # Arguments
5001    ///
5002    /// * `path` - Path to check (e.g., "/file.txt").
5003    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5004    pub async fn exists(&self, path: impl Into<String>) -> Result<bool, DaggerError> {
5005        let mut query = self.selection.select("exists");
5006        query = query.arg("path", path.into());
5007        query.execute(self.graphql_client.clone()).await
5008    }
5009    /// check if a file or directory exists
5010    ///
5011    /// # Arguments
5012    ///
5013    /// * `path` - Path to check (e.g., "/file.txt").
5014    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5015    pub async fn exists_opts(
5016        &self,
5017        path: impl Into<String>,
5018        opts: DirectoryExistsOpts,
5019    ) -> Result<bool, DaggerError> {
5020        let mut query = self.selection.select("exists");
5021        query = query.arg("path", path.into());
5022        if let Some(expected_type) = opts.expected_type {
5023            query = query.arg("expectedType", expected_type);
5024        }
5025        if let Some(do_not_follow_symlinks) = opts.do_not_follow_symlinks {
5026            query = query.arg("doNotFollowSymlinks", do_not_follow_symlinks);
5027        }
5028        query.execute(self.graphql_client.clone()).await
5029    }
5030    /// Writes the contents of the directory to a path on the host.
5031    ///
5032    /// # Arguments
5033    ///
5034    /// * `path` - Location of the copied directory (e.g., "logs/").
5035    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5036    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
5037        let mut query = self.selection.select("export");
5038        query = query.arg("path", path.into());
5039        query.execute(self.graphql_client.clone()).await
5040    }
5041    /// Writes the contents of the directory to a path on the host.
5042    ///
5043    /// # Arguments
5044    ///
5045    /// * `path` - Location of the copied directory (e.g., "logs/").
5046    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5047    pub async fn export_opts(
5048        &self,
5049        path: impl Into<String>,
5050        opts: DirectoryExportOpts,
5051    ) -> Result<String, DaggerError> {
5052        let mut query = self.selection.select("export");
5053        query = query.arg("path", path.into());
5054        if let Some(wipe) = opts.wipe {
5055            query = query.arg("wipe", wipe);
5056        }
5057        query.execute(self.graphql_client.clone()).await
5058    }
5059    /// Retrieve a file at the given path.
5060    ///
5061    /// # Arguments
5062    ///
5063    /// * `path` - Location of the file to retrieve (e.g., "README.md").
5064    pub fn file(&self, path: impl Into<String>) -> File {
5065        let mut query = self.selection.select("file");
5066        query = query.arg("path", path.into());
5067        File {
5068            proc: self.proc.clone(),
5069            selection: query,
5070            graphql_client: self.graphql_client.clone(),
5071        }
5072    }
5073    /// Return a snapshot with some paths included or excluded
5074    ///
5075    /// # Arguments
5076    ///
5077    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5078    pub fn filter(&self) -> Directory {
5079        let query = self.selection.select("filter");
5080        Directory {
5081            proc: self.proc.clone(),
5082            selection: query,
5083            graphql_client: self.graphql_client.clone(),
5084        }
5085    }
5086    /// Return a snapshot with some paths included or excluded
5087    ///
5088    /// # Arguments
5089    ///
5090    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5091    pub fn filter_opts<'a>(&self, opts: DirectoryFilterOpts<'a>) -> Directory {
5092        let mut query = self.selection.select("filter");
5093        if let Some(exclude) = opts.exclude {
5094            query = query.arg("exclude", exclude);
5095        }
5096        if let Some(include) = opts.include {
5097            query = query.arg("include", include);
5098        }
5099        if let Some(gitignore) = opts.gitignore {
5100            query = query.arg("gitignore", gitignore);
5101        }
5102        Directory {
5103            proc: self.proc.clone(),
5104            selection: query,
5105            graphql_client: self.graphql_client.clone(),
5106        }
5107    }
5108    /// Search up the directory tree for a file or directory, and return its path. If no match, return null
5109    ///
5110    /// # Arguments
5111    ///
5112    /// * `name` - The name of the file or directory to search for
5113    /// * `start` - The path to start the search from
5114    pub async fn find_up(
5115        &self,
5116        name: impl Into<String>,
5117        start: impl Into<String>,
5118    ) -> Result<String, DaggerError> {
5119        let mut query = self.selection.select("findUp");
5120        query = query.arg("name", name.into());
5121        query = query.arg("start", start.into());
5122        query.execute(self.graphql_client.clone()).await
5123    }
5124    /// Returns a list of files and directories that matche the given pattern.
5125    ///
5126    /// # Arguments
5127    ///
5128    /// * `pattern` - Pattern to match (e.g., "*.md").
5129    pub async fn glob(&self, pattern: impl Into<String>) -> Result<Vec<String>, DaggerError> {
5130        let mut query = self.selection.select("glob");
5131        query = query.arg("pattern", pattern.into());
5132        query.execute(self.graphql_client.clone()).await
5133    }
5134    /// A unique identifier for this Directory.
5135    pub async fn id(&self) -> Result<Id, DaggerError> {
5136        let query = self.selection.select("id");
5137        query.execute(self.graphql_client.clone()).await
5138    }
5139    /// Returns the name of the directory.
5140    pub async fn name(&self) -> Result<String, DaggerError> {
5141        let query = self.selection.select("name");
5142        query.execute(self.graphql_client.clone()).await
5143    }
5144    /// Searches for content matching the given regular expression or literal string.
5145    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
5146    ///
5147    /// # Arguments
5148    ///
5149    /// * `pattern` - The text to match.
5150    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5151    pub async fn search(
5152        &self,
5153        pattern: impl Into<String>,
5154    ) -> Result<Vec<SearchResult>, DaggerError> {
5155        let mut query = self.selection.select("search");
5156        query = query.arg("pattern", pattern.into());
5157        let query = query.select("id");
5158        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
5159        Ok(ids
5160            .into_iter()
5161            .map(|id| SearchResult {
5162                proc: self.proc.clone(),
5163                selection: crate::querybuilder::query()
5164                    .select("node")
5165                    .arg("id", &id.0)
5166                    .inline_fragment("SearchResult"),
5167                graphql_client: self.graphql_client.clone(),
5168            })
5169            .collect())
5170    }
5171    /// Searches for content matching the given regular expression or literal string.
5172    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
5173    ///
5174    /// # Arguments
5175    ///
5176    /// * `pattern` - The text to match.
5177    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5178    pub async fn search_opts<'a>(
5179        &self,
5180        pattern: impl Into<String>,
5181        opts: DirectorySearchOpts<'a>,
5182    ) -> Result<Vec<SearchResult>, DaggerError> {
5183        let mut query = self.selection.select("search");
5184        query = query.arg("pattern", pattern.into());
5185        if let Some(paths) = opts.paths {
5186            query = query.arg("paths", paths);
5187        }
5188        if let Some(globs) = opts.globs {
5189            query = query.arg("globs", globs);
5190        }
5191        if let Some(literal) = opts.literal {
5192            query = query.arg("literal", literal);
5193        }
5194        if let Some(multiline) = opts.multiline {
5195            query = query.arg("multiline", multiline);
5196        }
5197        if let Some(dotall) = opts.dotall {
5198            query = query.arg("dotall", dotall);
5199        }
5200        if let Some(insensitive) = opts.insensitive {
5201            query = query.arg("insensitive", insensitive);
5202        }
5203        if let Some(skip_ignored) = opts.skip_ignored {
5204            query = query.arg("skipIgnored", skip_ignored);
5205        }
5206        if let Some(skip_hidden) = opts.skip_hidden {
5207            query = query.arg("skipHidden", skip_hidden);
5208        }
5209        if let Some(files_only) = opts.files_only {
5210            query = query.arg("filesOnly", files_only);
5211        }
5212        if let Some(limit) = opts.limit {
5213            query = query.arg("limit", limit);
5214        }
5215        let query = query.select("id");
5216        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
5217        Ok(ids
5218            .into_iter()
5219            .map(|id| SearchResult {
5220                proc: self.proc.clone(),
5221                selection: crate::querybuilder::query()
5222                    .select("node")
5223                    .arg("id", &id.0)
5224                    .inline_fragment("SearchResult"),
5225                graphql_client: self.graphql_client.clone(),
5226            })
5227            .collect())
5228    }
5229    /// Return file status
5230    ///
5231    /// # Arguments
5232    ///
5233    /// * `path` - Path to stat (e.g., "/file.txt").
5234    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5235    pub fn stat(&self, path: impl Into<String>) -> Stat {
5236        let mut query = self.selection.select("stat");
5237        query = query.arg("path", path.into());
5238        Stat {
5239            proc: self.proc.clone(),
5240            selection: query,
5241            graphql_client: self.graphql_client.clone(),
5242        }
5243    }
5244    /// Return file status
5245    ///
5246    /// # Arguments
5247    ///
5248    /// * `path` - Path to stat (e.g., "/file.txt").
5249    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5250    pub fn stat_opts(&self, path: impl Into<String>, opts: DirectoryStatOpts) -> Stat {
5251        let mut query = self.selection.select("stat");
5252        query = query.arg("path", path.into());
5253        if let Some(do_not_follow_symlinks) = opts.do_not_follow_symlinks {
5254            query = query.arg("doNotFollowSymlinks", do_not_follow_symlinks);
5255        }
5256        Stat {
5257            proc: self.proc.clone(),
5258            selection: query,
5259            graphql_client: self.graphql_client.clone(),
5260        }
5261    }
5262    /// Force evaluation in the engine.
5263    pub async fn sync(&self) -> Result<Directory, DaggerError> {
5264        let query = self.selection.select("sync");
5265        let id: Id = query.execute(self.graphql_client.clone()).await?;
5266        Ok(Directory {
5267            proc: self.proc.clone(),
5268            selection: query
5269                .root()
5270                .select("node")
5271                .arg("id", &id.0)
5272                .inline_fragment("Directory"),
5273            graphql_client: self.graphql_client.clone(),
5274        })
5275    }
5276    /// Opens an interactive terminal in new container with this directory mounted inside.
5277    ///
5278    /// # Arguments
5279    ///
5280    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5281    pub fn terminal(&self) -> Directory {
5282        let query = self.selection.select("terminal");
5283        Directory {
5284            proc: self.proc.clone(),
5285            selection: query,
5286            graphql_client: self.graphql_client.clone(),
5287        }
5288    }
5289    /// Opens an interactive terminal in new container with this directory mounted inside.
5290    ///
5291    /// # Arguments
5292    ///
5293    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5294    pub fn terminal_opts<'a>(&self, opts: DirectoryTerminalOpts<'a>) -> Directory {
5295        let mut query = self.selection.select("terminal");
5296        if let Some(container) = opts.container {
5297            query = query.arg("container", container);
5298        }
5299        if let Some(cmd) = opts.cmd {
5300            query = query.arg("cmd", cmd);
5301        }
5302        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
5303            query = query.arg(
5304                "experimentalPrivilegedNesting",
5305                experimental_privileged_nesting,
5306            );
5307        }
5308        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
5309            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
5310        }
5311        Directory {
5312            proc: self.proc.clone(),
5313            selection: query,
5314            graphql_client: self.graphql_client.clone(),
5315        }
5316    }
5317    /// Return a directory with changes from another directory applied to it.
5318    ///
5319    /// # Arguments
5320    ///
5321    /// * `changes` - Changes to apply to the directory
5322    pub fn with_changes(&self, changes: impl IntoID<Id>) -> Directory {
5323        let mut query = self.selection.select("withChanges");
5324        query = query.arg_lazy(
5325            "changes",
5326            Box::new(move || {
5327                let changes = changes.clone();
5328                Box::pin(async move { changes.into_id().await.unwrap().quote() })
5329            }),
5330        );
5331        Directory {
5332            proc: self.proc.clone(),
5333            selection: query,
5334            graphql_client: self.graphql_client.clone(),
5335        }
5336    }
5337    /// Return a snapshot with a directory added
5338    ///
5339    /// # Arguments
5340    ///
5341    /// * `path` - Location of the written directory (e.g., "/src/").
5342    /// * `source` - Identifier of the directory to copy.
5343    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5344    pub fn with_directory(&self, path: impl Into<String>, source: impl IntoID<Id>) -> Directory {
5345        let mut query = self.selection.select("withDirectory");
5346        query = query.arg("path", path.into());
5347        query = query.arg_lazy(
5348            "source",
5349            Box::new(move || {
5350                let source = source.clone();
5351                Box::pin(async move { source.into_id().await.unwrap().quote() })
5352            }),
5353        );
5354        Directory {
5355            proc: self.proc.clone(),
5356            selection: query,
5357            graphql_client: self.graphql_client.clone(),
5358        }
5359    }
5360    /// Return a snapshot with a directory added
5361    ///
5362    /// # Arguments
5363    ///
5364    /// * `path` - Location of the written directory (e.g., "/src/").
5365    /// * `source` - Identifier of the directory to copy.
5366    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5367    pub fn with_directory_opts<'a>(
5368        &self,
5369        path: impl Into<String>,
5370        source: impl IntoID<Id>,
5371        opts: DirectoryWithDirectoryOpts<'a>,
5372    ) -> Directory {
5373        let mut query = self.selection.select("withDirectory");
5374        query = query.arg("path", path.into());
5375        query = query.arg_lazy(
5376            "source",
5377            Box::new(move || {
5378                let source = source.clone();
5379                Box::pin(async move { source.into_id().await.unwrap().quote() })
5380            }),
5381        );
5382        if let Some(exclude) = opts.exclude {
5383            query = query.arg("exclude", exclude);
5384        }
5385        if let Some(include) = opts.include {
5386            query = query.arg("include", include);
5387        }
5388        if let Some(gitignore) = opts.gitignore {
5389            query = query.arg("gitignore", gitignore);
5390        }
5391        if let Some(owner) = opts.owner {
5392            query = query.arg("owner", owner);
5393        }
5394        if let Some(permissions) = opts.permissions {
5395            query = query.arg("permissions", permissions);
5396        }
5397        Directory {
5398            proc: self.proc.clone(),
5399            selection: query,
5400            graphql_client: self.graphql_client.clone(),
5401        }
5402    }
5403    /// Raise an error.
5404    ///
5405    /// # Arguments
5406    ///
5407    /// * `err` - Message of the error to raise. If empty, the error will be ignored.
5408    pub fn with_error(&self, err: impl Into<String>) -> Directory {
5409        let mut query = self.selection.select("withError");
5410        query = query.arg("err", err.into());
5411        Directory {
5412            proc: self.proc.clone(),
5413            selection: query,
5414            graphql_client: self.graphql_client.clone(),
5415        }
5416    }
5417    /// Retrieves this directory plus the contents of the given file copied to the given path.
5418    ///
5419    /// # Arguments
5420    ///
5421    /// * `path` - Location of the copied file (e.g., "/file.txt").
5422    /// * `source` - Identifier of the file to copy.
5423    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5424    pub fn with_file(&self, path: impl Into<String>, source: impl IntoID<Id>) -> Directory {
5425        let mut query = self.selection.select("withFile");
5426        query = query.arg("path", path.into());
5427        query = query.arg_lazy(
5428            "source",
5429            Box::new(move || {
5430                let source = source.clone();
5431                Box::pin(async move { source.into_id().await.unwrap().quote() })
5432            }),
5433        );
5434        Directory {
5435            proc: self.proc.clone(),
5436            selection: query,
5437            graphql_client: self.graphql_client.clone(),
5438        }
5439    }
5440    /// Retrieves this directory plus the contents of the given file copied to the given path.
5441    ///
5442    /// # Arguments
5443    ///
5444    /// * `path` - Location of the copied file (e.g., "/file.txt").
5445    /// * `source` - Identifier of the file to copy.
5446    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5447    pub fn with_file_opts<'a>(
5448        &self,
5449        path: impl Into<String>,
5450        source: impl IntoID<Id>,
5451        opts: DirectoryWithFileOpts<'a>,
5452    ) -> Directory {
5453        let mut query = self.selection.select("withFile");
5454        query = query.arg("path", path.into());
5455        query = query.arg_lazy(
5456            "source",
5457            Box::new(move || {
5458                let source = source.clone();
5459                Box::pin(async move { source.into_id().await.unwrap().quote() })
5460            }),
5461        );
5462        if let Some(permissions) = opts.permissions {
5463            query = query.arg("permissions", permissions);
5464        }
5465        if let Some(owner) = opts.owner {
5466            query = query.arg("owner", owner);
5467        }
5468        Directory {
5469            proc: self.proc.clone(),
5470            selection: query,
5471            graphql_client: self.graphql_client.clone(),
5472        }
5473    }
5474    /// Retrieves this directory plus the contents of the given files copied to the given path.
5475    ///
5476    /// # Arguments
5477    ///
5478    /// * `path` - Location where copied files should be placed (e.g., "/src").
5479    /// * `sources` - Identifiers of the files to copy.
5480    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5481    pub fn with_files(&self, path: impl Into<String>, sources: Vec<Id>) -> Directory {
5482        let mut query = self.selection.select("withFiles");
5483        query = query.arg("path", path.into());
5484        query = query.arg("sources", sources);
5485        Directory {
5486            proc: self.proc.clone(),
5487            selection: query,
5488            graphql_client: self.graphql_client.clone(),
5489        }
5490    }
5491    /// Retrieves this directory plus the contents of the given files copied to the given path.
5492    ///
5493    /// # Arguments
5494    ///
5495    /// * `path` - Location where copied files should be placed (e.g., "/src").
5496    /// * `sources` - Identifiers of the files to copy.
5497    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5498    pub fn with_files_opts(
5499        &self,
5500        path: impl Into<String>,
5501        sources: Vec<Id>,
5502        opts: DirectoryWithFilesOpts,
5503    ) -> Directory {
5504        let mut query = self.selection.select("withFiles");
5505        query = query.arg("path", path.into());
5506        query = query.arg("sources", sources);
5507        if let Some(permissions) = opts.permissions {
5508            query = query.arg("permissions", permissions);
5509        }
5510        Directory {
5511            proc: self.proc.clone(),
5512            selection: query,
5513            graphql_client: self.graphql_client.clone(),
5514        }
5515    }
5516    /// Retrieves this directory plus a new directory created at the given path.
5517    ///
5518    /// # Arguments
5519    ///
5520    /// * `path` - Location of the directory created (e.g., "/logs").
5521    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5522    pub fn with_new_directory(&self, path: impl Into<String>) -> Directory {
5523        let mut query = self.selection.select("withNewDirectory");
5524        query = query.arg("path", path.into());
5525        Directory {
5526            proc: self.proc.clone(),
5527            selection: query,
5528            graphql_client: self.graphql_client.clone(),
5529        }
5530    }
5531    /// Retrieves this directory plus a new directory created at the given path.
5532    ///
5533    /// # Arguments
5534    ///
5535    /// * `path` - Location of the directory created (e.g., "/logs").
5536    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5537    pub fn with_new_directory_opts(
5538        &self,
5539        path: impl Into<String>,
5540        opts: DirectoryWithNewDirectoryOpts,
5541    ) -> Directory {
5542        let mut query = self.selection.select("withNewDirectory");
5543        query = query.arg("path", path.into());
5544        if let Some(permissions) = opts.permissions {
5545            query = query.arg("permissions", permissions);
5546        }
5547        Directory {
5548            proc: self.proc.clone(),
5549            selection: query,
5550            graphql_client: self.graphql_client.clone(),
5551        }
5552    }
5553    /// Return a snapshot with a new file added
5554    ///
5555    /// # Arguments
5556    ///
5557    /// * `path` - Path of the new file. Example: "foo/bar.txt"
5558    /// * `contents` - Contents of the new file. Example: "Hello world!"
5559    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5560    pub fn with_new_file(&self, path: impl Into<String>, contents: impl Into<String>) -> Directory {
5561        let mut query = self.selection.select("withNewFile");
5562        query = query.arg("path", path.into());
5563        query = query.arg("contents", contents.into());
5564        Directory {
5565            proc: self.proc.clone(),
5566            selection: query,
5567            graphql_client: self.graphql_client.clone(),
5568        }
5569    }
5570    /// Return a snapshot with a new file added
5571    ///
5572    /// # Arguments
5573    ///
5574    /// * `path` - Path of the new file. Example: "foo/bar.txt"
5575    /// * `contents` - Contents of the new file. Example: "Hello world!"
5576    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5577    pub fn with_new_file_opts(
5578        &self,
5579        path: impl Into<String>,
5580        contents: impl Into<String>,
5581        opts: DirectoryWithNewFileOpts,
5582    ) -> Directory {
5583        let mut query = self.selection.select("withNewFile");
5584        query = query.arg("path", path.into());
5585        query = query.arg("contents", contents.into());
5586        if let Some(permissions) = opts.permissions {
5587            query = query.arg("permissions", permissions);
5588        }
5589        Directory {
5590            proc: self.proc.clone(),
5591            selection: query,
5592            graphql_client: self.graphql_client.clone(),
5593        }
5594    }
5595    /// Retrieves this directory with the given Git-compatible patch applied.
5596    ///
5597    /// # Arguments
5598    ///
5599    /// * `patch` - Patch to apply (e.g., "diff --git a/file.txt b/file.txt\nindex 1234567..abcdef8 100644\n--- a/file.txt\n+++ b/file.txt\n@@ -1,1 +1,1 @@\n-Hello\n+World\n").
5600    pub fn with_patch(&self, patch: impl Into<String>) -> Directory {
5601        let mut query = self.selection.select("withPatch");
5602        query = query.arg("patch", patch.into());
5603        Directory {
5604            proc: self.proc.clone(),
5605            selection: query,
5606            graphql_client: self.graphql_client.clone(),
5607        }
5608    }
5609    /// Retrieves this directory with the given Git-compatible patch file applied.
5610    ///
5611    /// # Arguments
5612    ///
5613    /// * `patch` - File containing the patch to apply
5614    pub fn with_patch_file(&self, patch: impl IntoID<Id>) -> Directory {
5615        let mut query = self.selection.select("withPatchFile");
5616        query = query.arg_lazy(
5617            "patch",
5618            Box::new(move || {
5619                let patch = patch.clone();
5620                Box::pin(async move { patch.into_id().await.unwrap().quote() })
5621            }),
5622        );
5623        Directory {
5624            proc: self.proc.clone(),
5625            selection: query,
5626            graphql_client: self.graphql_client.clone(),
5627        }
5628    }
5629    /// Return a snapshot with a symlink
5630    ///
5631    /// # Arguments
5632    ///
5633    /// * `target` - Location of the file or directory to link to (e.g., "/existing/file").
5634    /// * `link_name` - Location where the symbolic link will be created (e.g., "/new-file-link").
5635    pub fn with_symlink(
5636        &self,
5637        target: impl Into<String>,
5638        link_name: impl Into<String>,
5639    ) -> Directory {
5640        let mut query = self.selection.select("withSymlink");
5641        query = query.arg("target", target.into());
5642        query = query.arg("linkName", link_name.into());
5643        Directory {
5644            proc: self.proc.clone(),
5645            selection: query,
5646            graphql_client: self.graphql_client.clone(),
5647        }
5648    }
5649    /// Retrieves this directory with all file/dir timestamps set to the given time.
5650    ///
5651    /// # Arguments
5652    ///
5653    /// * `timestamp` - Timestamp to set dir/files in.
5654    ///
5655    /// Formatted in seconds following Unix epoch (e.g., 1672531199).
5656    pub fn with_timestamps(&self, timestamp: isize) -> Directory {
5657        let mut query = self.selection.select("withTimestamps");
5658        query = query.arg("timestamp", timestamp);
5659        Directory {
5660            proc: self.proc.clone(),
5661            selection: query,
5662            graphql_client: self.graphql_client.clone(),
5663        }
5664    }
5665    /// Return a snapshot with a subdirectory removed
5666    ///
5667    /// # Arguments
5668    ///
5669    /// * `path` - Path of the subdirectory to remove. Example: ".github/workflows"
5670    pub fn without_directory(&self, path: impl Into<String>) -> Directory {
5671        let mut query = self.selection.select("withoutDirectory");
5672        query = query.arg("path", path.into());
5673        Directory {
5674            proc: self.proc.clone(),
5675            selection: query,
5676            graphql_client: self.graphql_client.clone(),
5677        }
5678    }
5679    /// Return a snapshot with a file removed
5680    ///
5681    /// # Arguments
5682    ///
5683    /// * `path` - Path of the file to remove (e.g., "/file.txt").
5684    pub fn without_file(&self, path: impl Into<String>) -> Directory {
5685        let mut query = self.selection.select("withoutFile");
5686        query = query.arg("path", path.into());
5687        Directory {
5688            proc: self.proc.clone(),
5689            selection: query,
5690            graphql_client: self.graphql_client.clone(),
5691        }
5692    }
5693    /// Return a snapshot with files removed
5694    ///
5695    /// # Arguments
5696    ///
5697    /// * `paths` - Paths of the files to remove (e.g., ["/file.txt"]).
5698    pub fn without_files(&self, paths: Vec<impl Into<String>>) -> Directory {
5699        let mut query = self.selection.select("withoutFiles");
5700        query = query.arg(
5701            "paths",
5702            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
5703        );
5704        Directory {
5705            proc: self.proc.clone(),
5706            selection: query,
5707            graphql_client: self.graphql_client.clone(),
5708        }
5709    }
5710}
5711impl Exportable for Directory {
5712    fn export(
5713        &self,
5714        path: impl Into<String>,
5715    ) -> impl core::future::Future<Output = Result<String, DaggerError>> + Send {
5716        let mut query = self.selection.select("export");
5717        query = query.arg("path", path.into());
5718        let graphql_client = self.graphql_client.clone();
5719        async move { query.execute(graphql_client).await }
5720    }
5721    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
5722        let query = self.selection.select("id");
5723        let graphql_client = self.graphql_client.clone();
5724        async move { query.execute(graphql_client).await }
5725    }
5726}
5727impl Node for Directory {
5728    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
5729        let query = self.selection.select("id");
5730        let graphql_client = self.graphql_client.clone();
5731        async move { query.execute(graphql_client).await }
5732    }
5733}
5734impl Syncer for Directory {
5735    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
5736        let query = self.selection.select("id");
5737        let graphql_client = self.graphql_client.clone();
5738        async move { query.execute(graphql_client).await }
5739    }
5740    fn sync(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
5741        let query = self.selection.select("sync");
5742        let graphql_client = self.graphql_client.clone();
5743        async move { query.execute(graphql_client).await }
5744    }
5745}
5746#[derive(Clone)]
5747pub struct Engine {
5748    pub proc: Option<Arc<DaggerSessionProc>>,
5749    pub selection: Selection,
5750    pub graphql_client: DynGraphQLClient,
5751}
5752impl IntoID<Id> for Engine {
5753    fn into_id(
5754        self,
5755    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
5756        Box::pin(async move { self.id().await })
5757    }
5758}
5759impl Loadable for Engine {
5760    fn graphql_type() -> &'static str {
5761        "Engine"
5762    }
5763    fn from_query(
5764        proc: Option<Arc<DaggerSessionProc>>,
5765        selection: Selection,
5766        graphql_client: DynGraphQLClient,
5767    ) -> Self {
5768        Self {
5769            proc,
5770            selection,
5771            graphql_client,
5772        }
5773    }
5774}
5775impl Engine {
5776    /// The list of connected client IDs
5777    pub async fn clients(&self) -> Result<Vec<String>, DaggerError> {
5778        let query = self.selection.select("clients");
5779        query.execute(self.graphql_client.clone()).await
5780    }
5781    /// A unique identifier for this Engine.
5782    pub async fn id(&self) -> Result<Id, DaggerError> {
5783        let query = self.selection.select("id");
5784        query.execute(self.graphql_client.clone()).await
5785    }
5786    /// The local engine cache state tracked by dagql
5787    pub fn local_cache(&self) -> EngineCache {
5788        let query = self.selection.select("localCache");
5789        EngineCache {
5790            proc: self.proc.clone(),
5791            selection: query,
5792            graphql_client: self.graphql_client.clone(),
5793        }
5794    }
5795    /// The name of the engine instance.
5796    pub async fn name(&self) -> Result<String, DaggerError> {
5797        let query = self.selection.select("name");
5798        query.execute(self.graphql_client.clone()).await
5799    }
5800}
5801impl Node for Engine {
5802    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
5803        let query = self.selection.select("id");
5804        let graphql_client = self.graphql_client.clone();
5805        async move { query.execute(graphql_client).await }
5806    }
5807}
5808#[derive(Clone)]
5809pub struct EngineCache {
5810    pub proc: Option<Arc<DaggerSessionProc>>,
5811    pub selection: Selection,
5812    pub graphql_client: DynGraphQLClient,
5813}
5814#[derive(Builder, Debug, PartialEq)]
5815pub struct EngineCacheEntrySetOpts<'a> {
5816    #[builder(setter(into, strip_option), default)]
5817    pub key: Option<&'a str>,
5818}
5819#[derive(Builder, Debug, PartialEq)]
5820pub struct EngineCachePruneOpts<'a> {
5821    /// Override the maximum disk space to keep before pruning (e.g. "200GB" or "80%").
5822    #[builder(setter(into, strip_option), default)]
5823    pub max_used_space: Option<&'a str>,
5824    /// Override the minimum free disk space target during pruning (e.g. "20GB" or "20%").
5825    #[builder(setter(into, strip_option), default)]
5826    pub min_free_space: Option<&'a str>,
5827    /// Override the minimum disk space to retain during pruning (e.g. "500GB" or "10%").
5828    #[builder(setter(into, strip_option), default)]
5829    pub reserved_space: Option<&'a str>,
5830    /// Override the target disk space to keep after pruning (e.g. "200GB" or "50%").
5831    #[builder(setter(into, strip_option), default)]
5832    pub target_space: Option<&'a str>,
5833    /// Use the engine-wide default pruning policy if true, otherwise prune the whole cache of any releasable entries.
5834    #[builder(setter(into, strip_option), default)]
5835    pub use_default_policy: Option<bool>,
5836}
5837impl IntoID<Id> for EngineCache {
5838    fn into_id(
5839        self,
5840    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
5841        Box::pin(async move { self.id().await })
5842    }
5843}
5844impl Loadable for EngineCache {
5845    fn graphql_type() -> &'static str {
5846        "EngineCache"
5847    }
5848    fn from_query(
5849        proc: Option<Arc<DaggerSessionProc>>,
5850        selection: Selection,
5851        graphql_client: DynGraphQLClient,
5852    ) -> Self {
5853        Self {
5854            proc,
5855            selection,
5856            graphql_client,
5857        }
5858    }
5859}
5860impl EngineCache {
5861    /// The current set of entries in the cache
5862    ///
5863    /// # Arguments
5864    ///
5865    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5866    pub fn entry_set(&self) -> EngineCacheEntrySet {
5867        let query = self.selection.select("entrySet");
5868        EngineCacheEntrySet {
5869            proc: self.proc.clone(),
5870            selection: query,
5871            graphql_client: self.graphql_client.clone(),
5872        }
5873    }
5874    /// The current set of entries in the cache
5875    ///
5876    /// # Arguments
5877    ///
5878    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5879    pub fn entry_set_opts<'a>(&self, opts: EngineCacheEntrySetOpts<'a>) -> EngineCacheEntrySet {
5880        let mut query = self.selection.select("entrySet");
5881        if let Some(key) = opts.key {
5882            query = query.arg("key", key);
5883        }
5884        EngineCacheEntrySet {
5885            proc: self.proc.clone(),
5886            selection: query,
5887            graphql_client: self.graphql_client.clone(),
5888        }
5889    }
5890    /// A unique identifier for this EngineCache.
5891    pub async fn id(&self) -> Result<Id, DaggerError> {
5892        let query = self.selection.select("id");
5893        query.execute(self.graphql_client.clone()).await
5894    }
5895    /// The maximum bytes to keep in the cache without pruning.
5896    pub async fn max_used_space(&self) -> Result<isize, DaggerError> {
5897        let query = self.selection.select("maxUsedSpace");
5898        query.execute(self.graphql_client.clone()).await
5899    }
5900    /// The target amount of free disk space the garbage collector will attempt to leave.
5901    pub async fn min_free_space(&self) -> Result<isize, DaggerError> {
5902        let query = self.selection.select("minFreeSpace");
5903        query.execute(self.graphql_client.clone()).await
5904    }
5905    /// Prune the cache of releaseable entries
5906    ///
5907    /// # Arguments
5908    ///
5909    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5910    pub async fn prune(&self) -> Result<Void, DaggerError> {
5911        let query = self.selection.select("prune");
5912        query.execute(self.graphql_client.clone()).await
5913    }
5914    /// Prune the cache of releaseable entries
5915    ///
5916    /// # Arguments
5917    ///
5918    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5919    pub async fn prune_opts<'a>(
5920        &self,
5921        opts: EngineCachePruneOpts<'a>,
5922    ) -> Result<Void, DaggerError> {
5923        let mut query = self.selection.select("prune");
5924        if let Some(use_default_policy) = opts.use_default_policy {
5925            query = query.arg("useDefaultPolicy", use_default_policy);
5926        }
5927        if let Some(max_used_space) = opts.max_used_space {
5928            query = query.arg("maxUsedSpace", max_used_space);
5929        }
5930        if let Some(reserved_space) = opts.reserved_space {
5931            query = query.arg("reservedSpace", reserved_space);
5932        }
5933        if let Some(min_free_space) = opts.min_free_space {
5934            query = query.arg("minFreeSpace", min_free_space);
5935        }
5936        if let Some(target_space) = opts.target_space {
5937            query = query.arg("targetSpace", target_space);
5938        }
5939        query.execute(self.graphql_client.clone()).await
5940    }
5941    /// The minimum amount of disk space this policy is guaranteed to retain.
5942    pub async fn reserved_space(&self) -> Result<isize, DaggerError> {
5943        let query = self.selection.select("reservedSpace");
5944        query.execute(self.graphql_client.clone()).await
5945    }
5946    /// The target number of bytes to keep when pruning.
5947    pub async fn target_space(&self) -> Result<isize, DaggerError> {
5948        let query = self.selection.select("targetSpace");
5949        query.execute(self.graphql_client.clone()).await
5950    }
5951}
5952impl Node for EngineCache {
5953    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
5954        let query = self.selection.select("id");
5955        let graphql_client = self.graphql_client.clone();
5956        async move { query.execute(graphql_client).await }
5957    }
5958}
5959#[derive(Clone)]
5960pub struct EngineCacheEntry {
5961    pub proc: Option<Arc<DaggerSessionProc>>,
5962    pub selection: Selection,
5963    pub graphql_client: DynGraphQLClient,
5964}
5965impl IntoID<Id> for EngineCacheEntry {
5966    fn into_id(
5967        self,
5968    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
5969        Box::pin(async move { self.id().await })
5970    }
5971}
5972impl Loadable for EngineCacheEntry {
5973    fn graphql_type() -> &'static str {
5974        "EngineCacheEntry"
5975    }
5976    fn from_query(
5977        proc: Option<Arc<DaggerSessionProc>>,
5978        selection: Selection,
5979        graphql_client: DynGraphQLClient,
5980    ) -> Self {
5981        Self {
5982            proc,
5983            selection,
5984            graphql_client,
5985        }
5986    }
5987}
5988impl EngineCacheEntry {
5989    /// Whether the cache entry is actively being used.
5990    pub async fn actively_used(&self) -> Result<bool, DaggerError> {
5991        let query = self.selection.select("activelyUsed");
5992        query.execute(self.graphql_client.clone()).await
5993    }
5994    /// The time the cache entry was created, in Unix nanoseconds.
5995    pub async fn created_time_unix_nano(&self) -> Result<isize, DaggerError> {
5996        let query = self.selection.select("createdTimeUnixNano");
5997        query.execute(self.graphql_client.clone()).await
5998    }
5999    /// The DagQL call that produced this cache entry.
6000    pub async fn dagql_call(&self) -> Result<String, DaggerError> {
6001        let query = self.selection.select("dagqlCall");
6002        query.execute(self.graphql_client.clone()).await
6003    }
6004    /// The description of the cache entry.
6005    pub async fn description(&self) -> Result<String, DaggerError> {
6006        let query = self.selection.select("description");
6007        query.execute(self.graphql_client.clone()).await
6008    }
6009    /// The disk space used by the cache entry.
6010    pub async fn disk_space_bytes(&self) -> Result<isize, DaggerError> {
6011        let query = self.selection.select("diskSpaceBytes");
6012        query.execute(self.graphql_client.clone()).await
6013    }
6014    /// A unique identifier for this EngineCacheEntry.
6015    pub async fn id(&self) -> Result<Id, DaggerError> {
6016        let query = self.selection.select("id");
6017        query.execute(self.graphql_client.clone()).await
6018    }
6019    /// The most recent time the cache entry was used, in Unix nanoseconds.
6020    pub async fn most_recent_use_time_unix_nano(&self) -> Result<isize, DaggerError> {
6021        let query = self.selection.select("mostRecentUseTimeUnixNano");
6022        query.execute(self.graphql_client.clone()).await
6023    }
6024    /// The type of the cache record (e.g. regular, internal, frontend, source.local, source.git.checkout, exec.cachemount).
6025    pub async fn record_type(&self) -> Result<String, DaggerError> {
6026        let query = self.selection.select("recordType");
6027        query.execute(self.graphql_client.clone()).await
6028    }
6029    /// The storage record types represented by this cache entry.
6030    pub async fn record_types(&self) -> Result<Vec<String>, DaggerError> {
6031        let query = self.selection.select("recordTypes");
6032        query.execute(self.graphql_client.clone()).await
6033    }
6034}
6035impl Node for EngineCacheEntry {
6036    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
6037        let query = self.selection.select("id");
6038        let graphql_client = self.graphql_client.clone();
6039        async move { query.execute(graphql_client).await }
6040    }
6041}
6042#[derive(Clone)]
6043pub struct EngineCacheEntrySet {
6044    pub proc: Option<Arc<DaggerSessionProc>>,
6045    pub selection: Selection,
6046    pub graphql_client: DynGraphQLClient,
6047}
6048impl IntoID<Id> for EngineCacheEntrySet {
6049    fn into_id(
6050        self,
6051    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
6052        Box::pin(async move { self.id().await })
6053    }
6054}
6055impl Loadable for EngineCacheEntrySet {
6056    fn graphql_type() -> &'static str {
6057        "EngineCacheEntrySet"
6058    }
6059    fn from_query(
6060        proc: Option<Arc<DaggerSessionProc>>,
6061        selection: Selection,
6062        graphql_client: DynGraphQLClient,
6063    ) -> Self {
6064        Self {
6065            proc,
6066            selection,
6067            graphql_client,
6068        }
6069    }
6070}
6071impl EngineCacheEntrySet {
6072    /// The total disk space used by the cache entries in this set.
6073    pub async fn disk_space_bytes(&self) -> Result<isize, DaggerError> {
6074        let query = self.selection.select("diskSpaceBytes");
6075        query.execute(self.graphql_client.clone()).await
6076    }
6077    /// The list of individual cache entries in the set
6078    pub async fn entries(&self) -> Result<Vec<EngineCacheEntry>, DaggerError> {
6079        let query = self.selection.select("entries");
6080        let query = query.select("id");
6081        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
6082        Ok(ids
6083            .into_iter()
6084            .map(|id| EngineCacheEntry {
6085                proc: self.proc.clone(),
6086                selection: crate::querybuilder::query()
6087                    .select("node")
6088                    .arg("id", &id.0)
6089                    .inline_fragment("EngineCacheEntry"),
6090                graphql_client: self.graphql_client.clone(),
6091            })
6092            .collect())
6093    }
6094    /// The number of cache entries in this set.
6095    pub async fn entry_count(&self) -> Result<isize, DaggerError> {
6096        let query = self.selection.select("entryCount");
6097        query.execute(self.graphql_client.clone()).await
6098    }
6099    /// A unique identifier for this EngineCacheEntrySet.
6100    pub async fn id(&self) -> Result<Id, DaggerError> {
6101        let query = self.selection.select("id");
6102        query.execute(self.graphql_client.clone()).await
6103    }
6104}
6105impl Node for EngineCacheEntrySet {
6106    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
6107        let query = self.selection.select("id");
6108        let graphql_client = self.graphql_client.clone();
6109        async move { query.execute(graphql_client).await }
6110    }
6111}
6112#[derive(Clone)]
6113pub struct EnumTypeDef {
6114    pub proc: Option<Arc<DaggerSessionProc>>,
6115    pub selection: Selection,
6116    pub graphql_client: DynGraphQLClient,
6117}
6118impl IntoID<Id> for EnumTypeDef {
6119    fn into_id(
6120        self,
6121    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
6122        Box::pin(async move { self.id().await })
6123    }
6124}
6125impl Loadable for EnumTypeDef {
6126    fn graphql_type() -> &'static str {
6127        "EnumTypeDef"
6128    }
6129    fn from_query(
6130        proc: Option<Arc<DaggerSessionProc>>,
6131        selection: Selection,
6132        graphql_client: DynGraphQLClient,
6133    ) -> Self {
6134        Self {
6135            proc,
6136            selection,
6137            graphql_client,
6138        }
6139    }
6140}
6141impl EnumTypeDef {
6142    /// A doc string for the enum, if any.
6143    pub async fn description(&self) -> Result<String, DaggerError> {
6144        let query = self.selection.select("description");
6145        query.execute(self.graphql_client.clone()).await
6146    }
6147    /// A unique identifier for this EnumTypeDef.
6148    pub async fn id(&self) -> Result<Id, DaggerError> {
6149        let query = self.selection.select("id");
6150        query.execute(self.graphql_client.clone()).await
6151    }
6152    /// The members of the enum.
6153    pub async fn members(&self) -> Result<Vec<EnumValueTypeDef>, DaggerError> {
6154        let query = self.selection.select("members");
6155        let query = query.select("id");
6156        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
6157        Ok(ids
6158            .into_iter()
6159            .map(|id| EnumValueTypeDef {
6160                proc: self.proc.clone(),
6161                selection: crate::querybuilder::query()
6162                    .select("node")
6163                    .arg("id", &id.0)
6164                    .inline_fragment("EnumValueTypeDef"),
6165                graphql_client: self.graphql_client.clone(),
6166            })
6167            .collect())
6168    }
6169    /// The name of the enum.
6170    pub async fn name(&self) -> Result<String, DaggerError> {
6171        let query = self.selection.select("name");
6172        query.execute(self.graphql_client.clone()).await
6173    }
6174    /// The location of this enum declaration.
6175    pub fn source_map(&self) -> SourceMap {
6176        let query = self.selection.select("sourceMap");
6177        SourceMap {
6178            proc: self.proc.clone(),
6179            selection: query,
6180            graphql_client: self.graphql_client.clone(),
6181        }
6182    }
6183    /// If this EnumTypeDef is associated with a Module, the name of the module. Unset otherwise.
6184    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
6185        let query = self.selection.select("sourceModuleName");
6186        query.execute(self.graphql_client.clone()).await
6187    }
6188    /// The members of the enum.
6189    pub async fn values(&self) -> Result<Vec<EnumValueTypeDef>, DaggerError> {
6190        let query = self.selection.select("values");
6191        let query = query.select("id");
6192        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
6193        Ok(ids
6194            .into_iter()
6195            .map(|id| EnumValueTypeDef {
6196                proc: self.proc.clone(),
6197                selection: crate::querybuilder::query()
6198                    .select("node")
6199                    .arg("id", &id.0)
6200                    .inline_fragment("EnumValueTypeDef"),
6201                graphql_client: self.graphql_client.clone(),
6202            })
6203            .collect())
6204    }
6205}
6206impl Node for EnumTypeDef {
6207    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
6208        let query = self.selection.select("id");
6209        let graphql_client = self.graphql_client.clone();
6210        async move { query.execute(graphql_client).await }
6211    }
6212}
6213#[derive(Clone)]
6214pub struct EnumValueTypeDef {
6215    pub proc: Option<Arc<DaggerSessionProc>>,
6216    pub selection: Selection,
6217    pub graphql_client: DynGraphQLClient,
6218}
6219impl IntoID<Id> for EnumValueTypeDef {
6220    fn into_id(
6221        self,
6222    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
6223        Box::pin(async move { self.id().await })
6224    }
6225}
6226impl Loadable for EnumValueTypeDef {
6227    fn graphql_type() -> &'static str {
6228        "EnumValueTypeDef"
6229    }
6230    fn from_query(
6231        proc: Option<Arc<DaggerSessionProc>>,
6232        selection: Selection,
6233        graphql_client: DynGraphQLClient,
6234    ) -> Self {
6235        Self {
6236            proc,
6237            selection,
6238            graphql_client,
6239        }
6240    }
6241}
6242impl EnumValueTypeDef {
6243    /// The reason this enum member is deprecated, if any.
6244    pub async fn deprecated(&self) -> Result<String, DaggerError> {
6245        let query = self.selection.select("deprecated");
6246        query.execute(self.graphql_client.clone()).await
6247    }
6248    /// A doc string for the enum member, if any.
6249    pub async fn description(&self) -> Result<String, DaggerError> {
6250        let query = self.selection.select("description");
6251        query.execute(self.graphql_client.clone()).await
6252    }
6253    /// A unique identifier for this EnumValueTypeDef.
6254    pub async fn id(&self) -> Result<Id, DaggerError> {
6255        let query = self.selection.select("id");
6256        query.execute(self.graphql_client.clone()).await
6257    }
6258    /// The name of the enum member.
6259    pub async fn name(&self) -> Result<String, DaggerError> {
6260        let query = self.selection.select("name");
6261        query.execute(self.graphql_client.clone()).await
6262    }
6263    /// The location of this enum member declaration.
6264    pub fn source_map(&self) -> SourceMap {
6265        let query = self.selection.select("sourceMap");
6266        SourceMap {
6267            proc: self.proc.clone(),
6268            selection: query,
6269            graphql_client: self.graphql_client.clone(),
6270        }
6271    }
6272    /// The value of the enum member
6273    pub async fn value(&self) -> Result<String, DaggerError> {
6274        let query = self.selection.select("value");
6275        query.execute(self.graphql_client.clone()).await
6276    }
6277}
6278impl Node for EnumValueTypeDef {
6279    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
6280        let query = self.selection.select("id");
6281        let graphql_client = self.graphql_client.clone();
6282        async move { query.execute(graphql_client).await }
6283    }
6284}
6285#[derive(Clone)]
6286pub struct Env {
6287    pub proc: Option<Arc<DaggerSessionProc>>,
6288    pub selection: Selection,
6289    pub graphql_client: DynGraphQLClient,
6290}
6291#[derive(Builder, Debug, PartialEq)]
6292pub struct EnvChecksOpts<'a> {
6293    /// Only include checks matching the specified patterns
6294    #[builder(setter(into, strip_option), default)]
6295    pub include: Option<Vec<&'a str>>,
6296    /// When true, only return annotated check functions; exclude generate-as-checks
6297    #[builder(setter(into, strip_option), default)]
6298    pub no_generate: Option<bool>,
6299}
6300#[derive(Builder, Debug, PartialEq)]
6301pub struct EnvServicesOpts<'a> {
6302    /// Only include services matching the specified patterns
6303    #[builder(setter(into, strip_option), default)]
6304    pub include: Option<Vec<&'a str>>,
6305}
6306impl IntoID<Id> for Env {
6307    fn into_id(
6308        self,
6309    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
6310        Box::pin(async move { self.id().await })
6311    }
6312}
6313impl Loadable for Env {
6314    fn graphql_type() -> &'static str {
6315        "Env"
6316    }
6317    fn from_query(
6318        proc: Option<Arc<DaggerSessionProc>>,
6319        selection: Selection,
6320        graphql_client: DynGraphQLClient,
6321    ) -> Self {
6322        Self {
6323            proc,
6324            selection,
6325            graphql_client,
6326        }
6327    }
6328}
6329impl Env {
6330    /// Return the check with the given name from the installed modules. Must match exactly one check.
6331    ///
6332    /// # Arguments
6333    ///
6334    /// * `name` - The name of the check to retrieve
6335    pub fn check(&self, name: impl Into<String>) -> Check {
6336        let mut query = self.selection.select("check");
6337        query = query.arg("name", name.into());
6338        Check {
6339            proc: self.proc.clone(),
6340            selection: query,
6341            graphql_client: self.graphql_client.clone(),
6342        }
6343    }
6344    /// Return all checks defined by the installed modules
6345    ///
6346    /// # Arguments
6347    ///
6348    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6349    pub fn checks(&self) -> CheckGroup {
6350        let query = self.selection.select("checks");
6351        CheckGroup {
6352            proc: self.proc.clone(),
6353            selection: query,
6354            graphql_client: self.graphql_client.clone(),
6355        }
6356    }
6357    /// Return all checks defined by the installed modules
6358    ///
6359    /// # Arguments
6360    ///
6361    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6362    pub fn checks_opts<'a>(&self, opts: EnvChecksOpts<'a>) -> CheckGroup {
6363        let mut query = self.selection.select("checks");
6364        if let Some(include) = opts.include {
6365            query = query.arg("include", include);
6366        }
6367        if let Some(no_generate) = opts.no_generate {
6368            query = query.arg("noGenerate", no_generate);
6369        }
6370        CheckGroup {
6371            proc: self.proc.clone(),
6372            selection: query,
6373            graphql_client: self.graphql_client.clone(),
6374        }
6375    }
6376    /// A unique identifier for this Env.
6377    pub async fn id(&self) -> Result<Id, DaggerError> {
6378        let query = self.selection.select("id");
6379        query.execute(self.graphql_client.clone()).await
6380    }
6381    /// Retrieves an input binding by name
6382    pub fn input(&self, name: impl Into<String>) -> Binding {
6383        let mut query = self.selection.select("input");
6384        query = query.arg("name", name.into());
6385        Binding {
6386            proc: self.proc.clone(),
6387            selection: query,
6388            graphql_client: self.graphql_client.clone(),
6389        }
6390    }
6391    /// Returns all input bindings provided to the environment
6392    pub async fn inputs(&self) -> Result<Vec<Binding>, DaggerError> {
6393        let query = self.selection.select("inputs");
6394        let query = query.select("id");
6395        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
6396        Ok(ids
6397            .into_iter()
6398            .map(|id| Binding {
6399                proc: self.proc.clone(),
6400                selection: crate::querybuilder::query()
6401                    .select("node")
6402                    .arg("id", &id.0)
6403                    .inline_fragment("Binding"),
6404                graphql_client: self.graphql_client.clone(),
6405            })
6406            .collect())
6407    }
6408    /// Retrieves an output binding by name
6409    pub fn output(&self, name: impl Into<String>) -> Binding {
6410        let mut query = self.selection.select("output");
6411        query = query.arg("name", name.into());
6412        Binding {
6413            proc: self.proc.clone(),
6414            selection: query,
6415            graphql_client: self.graphql_client.clone(),
6416        }
6417    }
6418    /// Returns all declared output bindings for the environment
6419    pub async fn outputs(&self) -> Result<Vec<Binding>, DaggerError> {
6420        let query = self.selection.select("outputs");
6421        let query = query.select("id");
6422        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
6423        Ok(ids
6424            .into_iter()
6425            .map(|id| Binding {
6426                proc: self.proc.clone(),
6427                selection: crate::querybuilder::query()
6428                    .select("node")
6429                    .arg("id", &id.0)
6430                    .inline_fragment("Binding"),
6431                graphql_client: self.graphql_client.clone(),
6432            })
6433            .collect())
6434    }
6435    /// Return all services defined by the installed modules
6436    ///
6437    /// # Arguments
6438    ///
6439    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6440    pub fn services(&self) -> UpGroup {
6441        let query = self.selection.select("services");
6442        UpGroup {
6443            proc: self.proc.clone(),
6444            selection: query,
6445            graphql_client: self.graphql_client.clone(),
6446        }
6447    }
6448    /// Return all services defined by the installed modules
6449    ///
6450    /// # Arguments
6451    ///
6452    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6453    pub fn services_opts<'a>(&self, opts: EnvServicesOpts<'a>) -> UpGroup {
6454        let mut query = self.selection.select("services");
6455        if let Some(include) = opts.include {
6456            query = query.arg("include", include);
6457        }
6458        UpGroup {
6459            proc: self.proc.clone(),
6460            selection: query,
6461            graphql_client: self.graphql_client.clone(),
6462        }
6463    }
6464    /// Create or update a binding of type Address in the environment
6465    ///
6466    /// # Arguments
6467    ///
6468    /// * `name` - The name of the binding
6469    /// * `value` - The Address value to assign to the binding
6470    /// * `description` - The purpose of the input
6471    pub fn with_address_input(
6472        &self,
6473        name: impl Into<String>,
6474        value: impl IntoID<Id>,
6475        description: impl Into<String>,
6476    ) -> Env {
6477        let mut query = self.selection.select("withAddressInput");
6478        query = query.arg("name", name.into());
6479        query = query.arg_lazy(
6480            "value",
6481            Box::new(move || {
6482                let value = value.clone();
6483                Box::pin(async move { value.into_id().await.unwrap().quote() })
6484            }),
6485        );
6486        query = query.arg("description", description.into());
6487        Env {
6488            proc: self.proc.clone(),
6489            selection: query,
6490            graphql_client: self.graphql_client.clone(),
6491        }
6492    }
6493    /// Declare a desired Address output to be assigned in the environment
6494    ///
6495    /// # Arguments
6496    ///
6497    /// * `name` - The name of the binding
6498    /// * `description` - A description of the desired value of the binding
6499    pub fn with_address_output(
6500        &self,
6501        name: impl Into<String>,
6502        description: impl Into<String>,
6503    ) -> Env {
6504        let mut query = self.selection.select("withAddressOutput");
6505        query = query.arg("name", name.into());
6506        query = query.arg("description", description.into());
6507        Env {
6508            proc: self.proc.clone(),
6509            selection: query,
6510            graphql_client: self.graphql_client.clone(),
6511        }
6512    }
6513    /// Create or update a binding of type CacheVolume in the environment
6514    ///
6515    /// # Arguments
6516    ///
6517    /// * `name` - The name of the binding
6518    /// * `value` - The CacheVolume value to assign to the binding
6519    /// * `description` - The purpose of the input
6520    pub fn with_cache_volume_input(
6521        &self,
6522        name: impl Into<String>,
6523        value: impl IntoID<Id>,
6524        description: impl Into<String>,
6525    ) -> Env {
6526        let mut query = self.selection.select("withCacheVolumeInput");
6527        query = query.arg("name", name.into());
6528        query = query.arg_lazy(
6529            "value",
6530            Box::new(move || {
6531                let value = value.clone();
6532                Box::pin(async move { value.into_id().await.unwrap().quote() })
6533            }),
6534        );
6535        query = query.arg("description", description.into());
6536        Env {
6537            proc: self.proc.clone(),
6538            selection: query,
6539            graphql_client: self.graphql_client.clone(),
6540        }
6541    }
6542    /// Declare a desired CacheVolume output to be assigned in the environment
6543    ///
6544    /// # Arguments
6545    ///
6546    /// * `name` - The name of the binding
6547    /// * `description` - A description of the desired value of the binding
6548    pub fn with_cache_volume_output(
6549        &self,
6550        name: impl Into<String>,
6551        description: impl Into<String>,
6552    ) -> Env {
6553        let mut query = self.selection.select("withCacheVolumeOutput");
6554        query = query.arg("name", name.into());
6555        query = query.arg("description", description.into());
6556        Env {
6557            proc: self.proc.clone(),
6558            selection: query,
6559            graphql_client: self.graphql_client.clone(),
6560        }
6561    }
6562    /// Create or update a binding of type Changeset in the environment
6563    ///
6564    /// # Arguments
6565    ///
6566    /// * `name` - The name of the binding
6567    /// * `value` - The Changeset value to assign to the binding
6568    /// * `description` - The purpose of the input
6569    pub fn with_changeset_input(
6570        &self,
6571        name: impl Into<String>,
6572        value: impl IntoID<Id>,
6573        description: impl Into<String>,
6574    ) -> Env {
6575        let mut query = self.selection.select("withChangesetInput");
6576        query = query.arg("name", name.into());
6577        query = query.arg_lazy(
6578            "value",
6579            Box::new(move || {
6580                let value = value.clone();
6581                Box::pin(async move { value.into_id().await.unwrap().quote() })
6582            }),
6583        );
6584        query = query.arg("description", description.into());
6585        Env {
6586            proc: self.proc.clone(),
6587            selection: query,
6588            graphql_client: self.graphql_client.clone(),
6589        }
6590    }
6591    /// Declare a desired Changeset output to be assigned in the environment
6592    ///
6593    /// # Arguments
6594    ///
6595    /// * `name` - The name of the binding
6596    /// * `description` - A description of the desired value of the binding
6597    pub fn with_changeset_output(
6598        &self,
6599        name: impl Into<String>,
6600        description: impl Into<String>,
6601    ) -> Env {
6602        let mut query = self.selection.select("withChangesetOutput");
6603        query = query.arg("name", name.into());
6604        query = query.arg("description", description.into());
6605        Env {
6606            proc: self.proc.clone(),
6607            selection: query,
6608            graphql_client: self.graphql_client.clone(),
6609        }
6610    }
6611    /// Create or update a binding of type CheckGroup in the environment
6612    ///
6613    /// # Arguments
6614    ///
6615    /// * `name` - The name of the binding
6616    /// * `value` - The CheckGroup value to assign to the binding
6617    /// * `description` - The purpose of the input
6618    pub fn with_check_group_input(
6619        &self,
6620        name: impl Into<String>,
6621        value: impl IntoID<Id>,
6622        description: impl Into<String>,
6623    ) -> Env {
6624        let mut query = self.selection.select("withCheckGroupInput");
6625        query = query.arg("name", name.into());
6626        query = query.arg_lazy(
6627            "value",
6628            Box::new(move || {
6629                let value = value.clone();
6630                Box::pin(async move { value.into_id().await.unwrap().quote() })
6631            }),
6632        );
6633        query = query.arg("description", description.into());
6634        Env {
6635            proc: self.proc.clone(),
6636            selection: query,
6637            graphql_client: self.graphql_client.clone(),
6638        }
6639    }
6640    /// Declare a desired CheckGroup output to be assigned in the environment
6641    ///
6642    /// # Arguments
6643    ///
6644    /// * `name` - The name of the binding
6645    /// * `description` - A description of the desired value of the binding
6646    pub fn with_check_group_output(
6647        &self,
6648        name: impl Into<String>,
6649        description: impl Into<String>,
6650    ) -> Env {
6651        let mut query = self.selection.select("withCheckGroupOutput");
6652        query = query.arg("name", name.into());
6653        query = query.arg("description", description.into());
6654        Env {
6655            proc: self.proc.clone(),
6656            selection: query,
6657            graphql_client: self.graphql_client.clone(),
6658        }
6659    }
6660    /// Create or update a binding of type Check in the environment
6661    ///
6662    /// # Arguments
6663    ///
6664    /// * `name` - The name of the binding
6665    /// * `value` - The Check value to assign to the binding
6666    /// * `description` - The purpose of the input
6667    pub fn with_check_input(
6668        &self,
6669        name: impl Into<String>,
6670        value: impl IntoID<Id>,
6671        description: impl Into<String>,
6672    ) -> Env {
6673        let mut query = self.selection.select("withCheckInput");
6674        query = query.arg("name", name.into());
6675        query = query.arg_lazy(
6676            "value",
6677            Box::new(move || {
6678                let value = value.clone();
6679                Box::pin(async move { value.into_id().await.unwrap().quote() })
6680            }),
6681        );
6682        query = query.arg("description", description.into());
6683        Env {
6684            proc: self.proc.clone(),
6685            selection: query,
6686            graphql_client: self.graphql_client.clone(),
6687        }
6688    }
6689    /// Declare a desired Check output to be assigned in the environment
6690    ///
6691    /// # Arguments
6692    ///
6693    /// * `name` - The name of the binding
6694    /// * `description` - A description of the desired value of the binding
6695    pub fn with_check_output(
6696        &self,
6697        name: impl Into<String>,
6698        description: impl Into<String>,
6699    ) -> Env {
6700        let mut query = self.selection.select("withCheckOutput");
6701        query = query.arg("name", name.into());
6702        query = query.arg("description", description.into());
6703        Env {
6704            proc: self.proc.clone(),
6705            selection: query,
6706            graphql_client: self.graphql_client.clone(),
6707        }
6708    }
6709    /// Create or update a binding of type Cloud in the environment
6710    ///
6711    /// # Arguments
6712    ///
6713    /// * `name` - The name of the binding
6714    /// * `value` - The Cloud value to assign to the binding
6715    /// * `description` - The purpose of the input
6716    pub fn with_cloud_input(
6717        &self,
6718        name: impl Into<String>,
6719        value: impl IntoID<Id>,
6720        description: impl Into<String>,
6721    ) -> Env {
6722        let mut query = self.selection.select("withCloudInput");
6723        query = query.arg("name", name.into());
6724        query = query.arg_lazy(
6725            "value",
6726            Box::new(move || {
6727                let value = value.clone();
6728                Box::pin(async move { value.into_id().await.unwrap().quote() })
6729            }),
6730        );
6731        query = query.arg("description", description.into());
6732        Env {
6733            proc: self.proc.clone(),
6734            selection: query,
6735            graphql_client: self.graphql_client.clone(),
6736        }
6737    }
6738    /// Declare a desired Cloud output to be assigned in the environment
6739    ///
6740    /// # Arguments
6741    ///
6742    /// * `name` - The name of the binding
6743    /// * `description` - A description of the desired value of the binding
6744    pub fn with_cloud_output(
6745        &self,
6746        name: impl Into<String>,
6747        description: impl Into<String>,
6748    ) -> Env {
6749        let mut query = self.selection.select("withCloudOutput");
6750        query = query.arg("name", name.into());
6751        query = query.arg("description", description.into());
6752        Env {
6753            proc: self.proc.clone(),
6754            selection: query,
6755            graphql_client: self.graphql_client.clone(),
6756        }
6757    }
6758    /// Create or update a binding of type Container in the environment
6759    ///
6760    /// # Arguments
6761    ///
6762    /// * `name` - The name of the binding
6763    /// * `value` - The Container value to assign to the binding
6764    /// * `description` - The purpose of the input
6765    pub fn with_container_input(
6766        &self,
6767        name: impl Into<String>,
6768        value: impl IntoID<Id>,
6769        description: impl Into<String>,
6770    ) -> Env {
6771        let mut query = self.selection.select("withContainerInput");
6772        query = query.arg("name", name.into());
6773        query = query.arg_lazy(
6774            "value",
6775            Box::new(move || {
6776                let value = value.clone();
6777                Box::pin(async move { value.into_id().await.unwrap().quote() })
6778            }),
6779        );
6780        query = query.arg("description", description.into());
6781        Env {
6782            proc: self.proc.clone(),
6783            selection: query,
6784            graphql_client: self.graphql_client.clone(),
6785        }
6786    }
6787    /// Declare a desired Container output to be assigned in the environment
6788    ///
6789    /// # Arguments
6790    ///
6791    /// * `name` - The name of the binding
6792    /// * `description` - A description of the desired value of the binding
6793    pub fn with_container_output(
6794        &self,
6795        name: impl Into<String>,
6796        description: impl Into<String>,
6797    ) -> Env {
6798        let mut query = self.selection.select("withContainerOutput");
6799        query = query.arg("name", name.into());
6800        query = query.arg("description", description.into());
6801        Env {
6802            proc: self.proc.clone(),
6803            selection: query,
6804            graphql_client: self.graphql_client.clone(),
6805        }
6806    }
6807    /// Installs the current module into the environment, exposing its functions to the model
6808    /// Contextual path arguments will be populated using the environment's workspace.
6809    pub fn with_current_module(&self) -> Env {
6810        let query = self.selection.select("withCurrentModule");
6811        Env {
6812            proc: self.proc.clone(),
6813            selection: query,
6814            graphql_client: self.graphql_client.clone(),
6815        }
6816    }
6817    /// Create or update a binding of type DiffStat in the environment
6818    ///
6819    /// # Arguments
6820    ///
6821    /// * `name` - The name of the binding
6822    /// * `value` - The DiffStat value to assign to the binding
6823    /// * `description` - The purpose of the input
6824    pub fn with_diff_stat_input(
6825        &self,
6826        name: impl Into<String>,
6827        value: impl IntoID<Id>,
6828        description: impl Into<String>,
6829    ) -> Env {
6830        let mut query = self.selection.select("withDiffStatInput");
6831        query = query.arg("name", name.into());
6832        query = query.arg_lazy(
6833            "value",
6834            Box::new(move || {
6835                let value = value.clone();
6836                Box::pin(async move { value.into_id().await.unwrap().quote() })
6837            }),
6838        );
6839        query = query.arg("description", description.into());
6840        Env {
6841            proc: self.proc.clone(),
6842            selection: query,
6843            graphql_client: self.graphql_client.clone(),
6844        }
6845    }
6846    /// Declare a desired DiffStat output to be assigned in the environment
6847    ///
6848    /// # Arguments
6849    ///
6850    /// * `name` - The name of the binding
6851    /// * `description` - A description of the desired value of the binding
6852    pub fn with_diff_stat_output(
6853        &self,
6854        name: impl Into<String>,
6855        description: impl Into<String>,
6856    ) -> Env {
6857        let mut query = self.selection.select("withDiffStatOutput");
6858        query = query.arg("name", name.into());
6859        query = query.arg("description", description.into());
6860        Env {
6861            proc: self.proc.clone(),
6862            selection: query,
6863            graphql_client: self.graphql_client.clone(),
6864        }
6865    }
6866    /// Create or update a binding of type Directory in the environment
6867    ///
6868    /// # Arguments
6869    ///
6870    /// * `name` - The name of the binding
6871    /// * `value` - The Directory value to assign to the binding
6872    /// * `description` - The purpose of the input
6873    pub fn with_directory_input(
6874        &self,
6875        name: impl Into<String>,
6876        value: impl IntoID<Id>,
6877        description: impl Into<String>,
6878    ) -> Env {
6879        let mut query = self.selection.select("withDirectoryInput");
6880        query = query.arg("name", name.into());
6881        query = query.arg_lazy(
6882            "value",
6883            Box::new(move || {
6884                let value = value.clone();
6885                Box::pin(async move { value.into_id().await.unwrap().quote() })
6886            }),
6887        );
6888        query = query.arg("description", description.into());
6889        Env {
6890            proc: self.proc.clone(),
6891            selection: query,
6892            graphql_client: self.graphql_client.clone(),
6893        }
6894    }
6895    /// Declare a desired Directory output to be assigned in the environment
6896    ///
6897    /// # Arguments
6898    ///
6899    /// * `name` - The name of the binding
6900    /// * `description` - A description of the desired value of the binding
6901    pub fn with_directory_output(
6902        &self,
6903        name: impl Into<String>,
6904        description: impl Into<String>,
6905    ) -> Env {
6906        let mut query = self.selection.select("withDirectoryOutput");
6907        query = query.arg("name", name.into());
6908        query = query.arg("description", description.into());
6909        Env {
6910            proc: self.proc.clone(),
6911            selection: query,
6912            graphql_client: self.graphql_client.clone(),
6913        }
6914    }
6915    /// Create or update a binding of type EnvFile in the environment
6916    ///
6917    /// # Arguments
6918    ///
6919    /// * `name` - The name of the binding
6920    /// * `value` - The EnvFile value to assign to the binding
6921    /// * `description` - The purpose of the input
6922    pub fn with_env_file_input(
6923        &self,
6924        name: impl Into<String>,
6925        value: impl IntoID<Id>,
6926        description: impl Into<String>,
6927    ) -> Env {
6928        let mut query = self.selection.select("withEnvFileInput");
6929        query = query.arg("name", name.into());
6930        query = query.arg_lazy(
6931            "value",
6932            Box::new(move || {
6933                let value = value.clone();
6934                Box::pin(async move { value.into_id().await.unwrap().quote() })
6935            }),
6936        );
6937        query = query.arg("description", description.into());
6938        Env {
6939            proc: self.proc.clone(),
6940            selection: query,
6941            graphql_client: self.graphql_client.clone(),
6942        }
6943    }
6944    /// Declare a desired EnvFile output to be assigned in the environment
6945    ///
6946    /// # Arguments
6947    ///
6948    /// * `name` - The name of the binding
6949    /// * `description` - A description of the desired value of the binding
6950    pub fn with_env_file_output(
6951        &self,
6952        name: impl Into<String>,
6953        description: impl Into<String>,
6954    ) -> Env {
6955        let mut query = self.selection.select("withEnvFileOutput");
6956        query = query.arg("name", name.into());
6957        query = query.arg("description", description.into());
6958        Env {
6959            proc: self.proc.clone(),
6960            selection: query,
6961            graphql_client: self.graphql_client.clone(),
6962        }
6963    }
6964    /// Create or update a binding of type Env in the environment
6965    ///
6966    /// # Arguments
6967    ///
6968    /// * `name` - The name of the binding
6969    /// * `value` - The Env value to assign to the binding
6970    /// * `description` - The purpose of the input
6971    pub fn with_env_input(
6972        &self,
6973        name: impl Into<String>,
6974        value: impl IntoID<Id>,
6975        description: impl Into<String>,
6976    ) -> Env {
6977        let mut query = self.selection.select("withEnvInput");
6978        query = query.arg("name", name.into());
6979        query = query.arg_lazy(
6980            "value",
6981            Box::new(move || {
6982                let value = value.clone();
6983                Box::pin(async move { value.into_id().await.unwrap().quote() })
6984            }),
6985        );
6986        query = query.arg("description", description.into());
6987        Env {
6988            proc: self.proc.clone(),
6989            selection: query,
6990            graphql_client: self.graphql_client.clone(),
6991        }
6992    }
6993    /// Declare a desired Env output to be assigned in the environment
6994    ///
6995    /// # Arguments
6996    ///
6997    /// * `name` - The name of the binding
6998    /// * `description` - A description of the desired value of the binding
6999    pub fn with_env_output(&self, name: impl Into<String>, description: impl Into<String>) -> Env {
7000        let mut query = self.selection.select("withEnvOutput");
7001        query = query.arg("name", name.into());
7002        query = query.arg("description", description.into());
7003        Env {
7004            proc: self.proc.clone(),
7005            selection: query,
7006            graphql_client: self.graphql_client.clone(),
7007        }
7008    }
7009    /// Create or update a binding of type File in the environment
7010    ///
7011    /// # Arguments
7012    ///
7013    /// * `name` - The name of the binding
7014    /// * `value` - The File value to assign to the binding
7015    /// * `description` - The purpose of the input
7016    pub fn with_file_input(
7017        &self,
7018        name: impl Into<String>,
7019        value: impl IntoID<Id>,
7020        description: impl Into<String>,
7021    ) -> Env {
7022        let mut query = self.selection.select("withFileInput");
7023        query = query.arg("name", name.into());
7024        query = query.arg_lazy(
7025            "value",
7026            Box::new(move || {
7027                let value = value.clone();
7028                Box::pin(async move { value.into_id().await.unwrap().quote() })
7029            }),
7030        );
7031        query = query.arg("description", description.into());
7032        Env {
7033            proc: self.proc.clone(),
7034            selection: query,
7035            graphql_client: self.graphql_client.clone(),
7036        }
7037    }
7038    /// Declare a desired File output to be assigned in the environment
7039    ///
7040    /// # Arguments
7041    ///
7042    /// * `name` - The name of the binding
7043    /// * `description` - A description of the desired value of the binding
7044    pub fn with_file_output(&self, name: impl Into<String>, description: impl Into<String>) -> Env {
7045        let mut query = self.selection.select("withFileOutput");
7046        query = query.arg("name", name.into());
7047        query = query.arg("description", description.into());
7048        Env {
7049            proc: self.proc.clone(),
7050            selection: query,
7051            graphql_client: self.graphql_client.clone(),
7052        }
7053    }
7054    /// Create or update a binding of type GeneratorGroup in the environment
7055    ///
7056    /// # Arguments
7057    ///
7058    /// * `name` - The name of the binding
7059    /// * `value` - The GeneratorGroup value to assign to the binding
7060    /// * `description` - The purpose of the input
7061    pub fn with_generator_group_input(
7062        &self,
7063        name: impl Into<String>,
7064        value: impl IntoID<Id>,
7065        description: impl Into<String>,
7066    ) -> Env {
7067        let mut query = self.selection.select("withGeneratorGroupInput");
7068        query = query.arg("name", name.into());
7069        query = query.arg_lazy(
7070            "value",
7071            Box::new(move || {
7072                let value = value.clone();
7073                Box::pin(async move { value.into_id().await.unwrap().quote() })
7074            }),
7075        );
7076        query = query.arg("description", description.into());
7077        Env {
7078            proc: self.proc.clone(),
7079            selection: query,
7080            graphql_client: self.graphql_client.clone(),
7081        }
7082    }
7083    /// Declare a desired GeneratorGroup output to be assigned in the environment
7084    ///
7085    /// # Arguments
7086    ///
7087    /// * `name` - The name of the binding
7088    /// * `description` - A description of the desired value of the binding
7089    pub fn with_generator_group_output(
7090        &self,
7091        name: impl Into<String>,
7092        description: impl Into<String>,
7093    ) -> Env {
7094        let mut query = self.selection.select("withGeneratorGroupOutput");
7095        query = query.arg("name", name.into());
7096        query = query.arg("description", description.into());
7097        Env {
7098            proc: self.proc.clone(),
7099            selection: query,
7100            graphql_client: self.graphql_client.clone(),
7101        }
7102    }
7103    /// Create or update a binding of type Generator in the environment
7104    ///
7105    /// # Arguments
7106    ///
7107    /// * `name` - The name of the binding
7108    /// * `value` - The Generator value to assign to the binding
7109    /// * `description` - The purpose of the input
7110    pub fn with_generator_input(
7111        &self,
7112        name: impl Into<String>,
7113        value: impl IntoID<Id>,
7114        description: impl Into<String>,
7115    ) -> Env {
7116        let mut query = self.selection.select("withGeneratorInput");
7117        query = query.arg("name", name.into());
7118        query = query.arg_lazy(
7119            "value",
7120            Box::new(move || {
7121                let value = value.clone();
7122                Box::pin(async move { value.into_id().await.unwrap().quote() })
7123            }),
7124        );
7125        query = query.arg("description", description.into());
7126        Env {
7127            proc: self.proc.clone(),
7128            selection: query,
7129            graphql_client: self.graphql_client.clone(),
7130        }
7131    }
7132    /// Declare a desired Generator output to be assigned in the environment
7133    ///
7134    /// # Arguments
7135    ///
7136    /// * `name` - The name of the binding
7137    /// * `description` - A description of the desired value of the binding
7138    pub fn with_generator_output(
7139        &self,
7140        name: impl Into<String>,
7141        description: impl Into<String>,
7142    ) -> Env {
7143        let mut query = self.selection.select("withGeneratorOutput");
7144        query = query.arg("name", name.into());
7145        query = query.arg("description", description.into());
7146        Env {
7147            proc: self.proc.clone(),
7148            selection: query,
7149            graphql_client: self.graphql_client.clone(),
7150        }
7151    }
7152    /// Create or update a binding of type GitRef in the environment
7153    ///
7154    /// # Arguments
7155    ///
7156    /// * `name` - The name of the binding
7157    /// * `value` - The GitRef value to assign to the binding
7158    /// * `description` - The purpose of the input
7159    pub fn with_git_ref_input(
7160        &self,
7161        name: impl Into<String>,
7162        value: impl IntoID<Id>,
7163        description: impl Into<String>,
7164    ) -> Env {
7165        let mut query = self.selection.select("withGitRefInput");
7166        query = query.arg("name", name.into());
7167        query = query.arg_lazy(
7168            "value",
7169            Box::new(move || {
7170                let value = value.clone();
7171                Box::pin(async move { value.into_id().await.unwrap().quote() })
7172            }),
7173        );
7174        query = query.arg("description", description.into());
7175        Env {
7176            proc: self.proc.clone(),
7177            selection: query,
7178            graphql_client: self.graphql_client.clone(),
7179        }
7180    }
7181    /// Declare a desired GitRef output to be assigned in the environment
7182    ///
7183    /// # Arguments
7184    ///
7185    /// * `name` - The name of the binding
7186    /// * `description` - A description of the desired value of the binding
7187    pub fn with_git_ref_output(
7188        &self,
7189        name: impl Into<String>,
7190        description: impl Into<String>,
7191    ) -> Env {
7192        let mut query = self.selection.select("withGitRefOutput");
7193        query = query.arg("name", name.into());
7194        query = query.arg("description", description.into());
7195        Env {
7196            proc: self.proc.clone(),
7197            selection: query,
7198            graphql_client: self.graphql_client.clone(),
7199        }
7200    }
7201    /// Create or update a binding of type GitRepository in the environment
7202    ///
7203    /// # Arguments
7204    ///
7205    /// * `name` - The name of the binding
7206    /// * `value` - The GitRepository value to assign to the binding
7207    /// * `description` - The purpose of the input
7208    pub fn with_git_repository_input(
7209        &self,
7210        name: impl Into<String>,
7211        value: impl IntoID<Id>,
7212        description: impl Into<String>,
7213    ) -> Env {
7214        let mut query = self.selection.select("withGitRepositoryInput");
7215        query = query.arg("name", name.into());
7216        query = query.arg_lazy(
7217            "value",
7218            Box::new(move || {
7219                let value = value.clone();
7220                Box::pin(async move { value.into_id().await.unwrap().quote() })
7221            }),
7222        );
7223        query = query.arg("description", description.into());
7224        Env {
7225            proc: self.proc.clone(),
7226            selection: query,
7227            graphql_client: self.graphql_client.clone(),
7228        }
7229    }
7230    /// Declare a desired GitRepository output to be assigned in the environment
7231    ///
7232    /// # Arguments
7233    ///
7234    /// * `name` - The name of the binding
7235    /// * `description` - A description of the desired value of the binding
7236    pub fn with_git_repository_output(
7237        &self,
7238        name: impl Into<String>,
7239        description: impl Into<String>,
7240    ) -> Env {
7241        let mut query = self.selection.select("withGitRepositoryOutput");
7242        query = query.arg("name", name.into());
7243        query = query.arg("description", description.into());
7244        Env {
7245            proc: self.proc.clone(),
7246            selection: query,
7247            graphql_client: self.graphql_client.clone(),
7248        }
7249    }
7250    /// Create or update a binding of type HTTPState in the environment
7251    ///
7252    /// # Arguments
7253    ///
7254    /// * `name` - The name of the binding
7255    /// * `value` - The HTTPState value to assign to the binding
7256    /// * `description` - The purpose of the input
7257    pub fn with_http_state_input(
7258        &self,
7259        name: impl Into<String>,
7260        value: impl IntoID<Id>,
7261        description: impl Into<String>,
7262    ) -> Env {
7263        let mut query = self.selection.select("withHTTPStateInput");
7264        query = query.arg("name", name.into());
7265        query = query.arg_lazy(
7266            "value",
7267            Box::new(move || {
7268                let value = value.clone();
7269                Box::pin(async move { value.into_id().await.unwrap().quote() })
7270            }),
7271        );
7272        query = query.arg("description", description.into());
7273        Env {
7274            proc: self.proc.clone(),
7275            selection: query,
7276            graphql_client: self.graphql_client.clone(),
7277        }
7278    }
7279    /// Declare a desired HTTPState output to be assigned in the environment
7280    ///
7281    /// # Arguments
7282    ///
7283    /// * `name` - The name of the binding
7284    /// * `description` - A description of the desired value of the binding
7285    pub fn with_http_state_output(
7286        &self,
7287        name: impl Into<String>,
7288        description: impl Into<String>,
7289    ) -> Env {
7290        let mut query = self.selection.select("withHTTPStateOutput");
7291        query = query.arg("name", name.into());
7292        query = query.arg("description", description.into());
7293        Env {
7294            proc: self.proc.clone(),
7295            selection: query,
7296            graphql_client: self.graphql_client.clone(),
7297        }
7298    }
7299    /// Create or update a binding of type JSONValue in the environment
7300    ///
7301    /// # Arguments
7302    ///
7303    /// * `name` - The name of the binding
7304    /// * `value` - The JSONValue value to assign to the binding
7305    /// * `description` - The purpose of the input
7306    pub fn with_json_value_input(
7307        &self,
7308        name: impl Into<String>,
7309        value: impl IntoID<Id>,
7310        description: impl Into<String>,
7311    ) -> Env {
7312        let mut query = self.selection.select("withJSONValueInput");
7313        query = query.arg("name", name.into());
7314        query = query.arg_lazy(
7315            "value",
7316            Box::new(move || {
7317                let value = value.clone();
7318                Box::pin(async move { value.into_id().await.unwrap().quote() })
7319            }),
7320        );
7321        query = query.arg("description", description.into());
7322        Env {
7323            proc: self.proc.clone(),
7324            selection: query,
7325            graphql_client: self.graphql_client.clone(),
7326        }
7327    }
7328    /// Declare a desired JSONValue output to be assigned in the environment
7329    ///
7330    /// # Arguments
7331    ///
7332    /// * `name` - The name of the binding
7333    /// * `description` - A description of the desired value of the binding
7334    pub fn with_json_value_output(
7335        &self,
7336        name: impl Into<String>,
7337        description: impl Into<String>,
7338    ) -> Env {
7339        let mut query = self.selection.select("withJSONValueOutput");
7340        query = query.arg("name", name.into());
7341        query = query.arg("description", description.into());
7342        Env {
7343            proc: self.proc.clone(),
7344            selection: query,
7345            graphql_client: self.graphql_client.clone(),
7346        }
7347    }
7348    /// Sets the main module for this environment (the project being worked on)
7349    /// Contextual path arguments will be populated using the environment's workspace.
7350    pub fn with_main_module(&self, module: impl IntoID<Id>) -> Env {
7351        let mut query = self.selection.select("withMainModule");
7352        query = query.arg_lazy(
7353            "module",
7354            Box::new(move || {
7355                let module = module.clone();
7356                Box::pin(async move { module.into_id().await.unwrap().quote() })
7357            }),
7358        );
7359        Env {
7360            proc: self.proc.clone(),
7361            selection: query,
7362            graphql_client: self.graphql_client.clone(),
7363        }
7364    }
7365    /// Installs a module into the environment, exposing its functions to the model
7366    /// Contextual path arguments will be populated using the environment's workspace.
7367    pub fn with_module(&self, module: impl IntoID<Id>) -> Env {
7368        let mut query = self.selection.select("withModule");
7369        query = query.arg_lazy(
7370            "module",
7371            Box::new(move || {
7372                let module = module.clone();
7373                Box::pin(async move { module.into_id().await.unwrap().quote() })
7374            }),
7375        );
7376        Env {
7377            proc: self.proc.clone(),
7378            selection: query,
7379            graphql_client: self.graphql_client.clone(),
7380        }
7381    }
7382    /// Create or update a binding of type ModuleConfigClient in the environment
7383    ///
7384    /// # Arguments
7385    ///
7386    /// * `name` - The name of the binding
7387    /// * `value` - The ModuleConfigClient value to assign to the binding
7388    /// * `description` - The purpose of the input
7389    pub fn with_module_config_client_input(
7390        &self,
7391        name: impl Into<String>,
7392        value: impl IntoID<Id>,
7393        description: impl Into<String>,
7394    ) -> Env {
7395        let mut query = self.selection.select("withModuleConfigClientInput");
7396        query = query.arg("name", name.into());
7397        query = query.arg_lazy(
7398            "value",
7399            Box::new(move || {
7400                let value = value.clone();
7401                Box::pin(async move { value.into_id().await.unwrap().quote() })
7402            }),
7403        );
7404        query = query.arg("description", description.into());
7405        Env {
7406            proc: self.proc.clone(),
7407            selection: query,
7408            graphql_client: self.graphql_client.clone(),
7409        }
7410    }
7411    /// Declare a desired ModuleConfigClient output to be assigned in the environment
7412    ///
7413    /// # Arguments
7414    ///
7415    /// * `name` - The name of the binding
7416    /// * `description` - A description of the desired value of the binding
7417    pub fn with_module_config_client_output(
7418        &self,
7419        name: impl Into<String>,
7420        description: impl Into<String>,
7421    ) -> Env {
7422        let mut query = self.selection.select("withModuleConfigClientOutput");
7423        query = query.arg("name", name.into());
7424        query = query.arg("description", description.into());
7425        Env {
7426            proc: self.proc.clone(),
7427            selection: query,
7428            graphql_client: self.graphql_client.clone(),
7429        }
7430    }
7431    /// Create or update a binding of type Module in the environment
7432    ///
7433    /// # Arguments
7434    ///
7435    /// * `name` - The name of the binding
7436    /// * `value` - The Module value to assign to the binding
7437    /// * `description` - The purpose of the input
7438    pub fn with_module_input(
7439        &self,
7440        name: impl Into<String>,
7441        value: impl IntoID<Id>,
7442        description: impl Into<String>,
7443    ) -> Env {
7444        let mut query = self.selection.select("withModuleInput");
7445        query = query.arg("name", name.into());
7446        query = query.arg_lazy(
7447            "value",
7448            Box::new(move || {
7449                let value = value.clone();
7450                Box::pin(async move { value.into_id().await.unwrap().quote() })
7451            }),
7452        );
7453        query = query.arg("description", description.into());
7454        Env {
7455            proc: self.proc.clone(),
7456            selection: query,
7457            graphql_client: self.graphql_client.clone(),
7458        }
7459    }
7460    /// Declare a desired Module output to be assigned in the environment
7461    ///
7462    /// # Arguments
7463    ///
7464    /// * `name` - The name of the binding
7465    /// * `description` - A description of the desired value of the binding
7466    pub fn with_module_output(
7467        &self,
7468        name: impl Into<String>,
7469        description: impl Into<String>,
7470    ) -> Env {
7471        let mut query = self.selection.select("withModuleOutput");
7472        query = query.arg("name", name.into());
7473        query = query.arg("description", description.into());
7474        Env {
7475            proc: self.proc.clone(),
7476            selection: query,
7477            graphql_client: self.graphql_client.clone(),
7478        }
7479    }
7480    /// Create or update a binding of type ModuleSource in the environment
7481    ///
7482    /// # Arguments
7483    ///
7484    /// * `name` - The name of the binding
7485    /// * `value` - The ModuleSource value to assign to the binding
7486    /// * `description` - The purpose of the input
7487    pub fn with_module_source_input(
7488        &self,
7489        name: impl Into<String>,
7490        value: impl IntoID<Id>,
7491        description: impl Into<String>,
7492    ) -> Env {
7493        let mut query = self.selection.select("withModuleSourceInput");
7494        query = query.arg("name", name.into());
7495        query = query.arg_lazy(
7496            "value",
7497            Box::new(move || {
7498                let value = value.clone();
7499                Box::pin(async move { value.into_id().await.unwrap().quote() })
7500            }),
7501        );
7502        query = query.arg("description", description.into());
7503        Env {
7504            proc: self.proc.clone(),
7505            selection: query,
7506            graphql_client: self.graphql_client.clone(),
7507        }
7508    }
7509    /// Declare a desired ModuleSource output to be assigned in the environment
7510    ///
7511    /// # Arguments
7512    ///
7513    /// * `name` - The name of the binding
7514    /// * `description` - A description of the desired value of the binding
7515    pub fn with_module_source_output(
7516        &self,
7517        name: impl Into<String>,
7518        description: impl Into<String>,
7519    ) -> Env {
7520        let mut query = self.selection.select("withModuleSourceOutput");
7521        query = query.arg("name", name.into());
7522        query = query.arg("description", description.into());
7523        Env {
7524            proc: self.proc.clone(),
7525            selection: query,
7526            graphql_client: self.graphql_client.clone(),
7527        }
7528    }
7529    /// Create or update a binding of type SearchResult in the environment
7530    ///
7531    /// # Arguments
7532    ///
7533    /// * `name` - The name of the binding
7534    /// * `value` - The SearchResult value to assign to the binding
7535    /// * `description` - The purpose of the input
7536    pub fn with_search_result_input(
7537        &self,
7538        name: impl Into<String>,
7539        value: impl IntoID<Id>,
7540        description: impl Into<String>,
7541    ) -> Env {
7542        let mut query = self.selection.select("withSearchResultInput");
7543        query = query.arg("name", name.into());
7544        query = query.arg_lazy(
7545            "value",
7546            Box::new(move || {
7547                let value = value.clone();
7548                Box::pin(async move { value.into_id().await.unwrap().quote() })
7549            }),
7550        );
7551        query = query.arg("description", description.into());
7552        Env {
7553            proc: self.proc.clone(),
7554            selection: query,
7555            graphql_client: self.graphql_client.clone(),
7556        }
7557    }
7558    /// Declare a desired SearchResult output to be assigned in the environment
7559    ///
7560    /// # Arguments
7561    ///
7562    /// * `name` - The name of the binding
7563    /// * `description` - A description of the desired value of the binding
7564    pub fn with_search_result_output(
7565        &self,
7566        name: impl Into<String>,
7567        description: impl Into<String>,
7568    ) -> Env {
7569        let mut query = self.selection.select("withSearchResultOutput");
7570        query = query.arg("name", name.into());
7571        query = query.arg("description", description.into());
7572        Env {
7573            proc: self.proc.clone(),
7574            selection: query,
7575            graphql_client: self.graphql_client.clone(),
7576        }
7577    }
7578    /// Create or update a binding of type SearchSubmatch in the environment
7579    ///
7580    /// # Arguments
7581    ///
7582    /// * `name` - The name of the binding
7583    /// * `value` - The SearchSubmatch value to assign to the binding
7584    /// * `description` - The purpose of the input
7585    pub fn with_search_submatch_input(
7586        &self,
7587        name: impl Into<String>,
7588        value: impl IntoID<Id>,
7589        description: impl Into<String>,
7590    ) -> Env {
7591        let mut query = self.selection.select("withSearchSubmatchInput");
7592        query = query.arg("name", name.into());
7593        query = query.arg_lazy(
7594            "value",
7595            Box::new(move || {
7596                let value = value.clone();
7597                Box::pin(async move { value.into_id().await.unwrap().quote() })
7598            }),
7599        );
7600        query = query.arg("description", description.into());
7601        Env {
7602            proc: self.proc.clone(),
7603            selection: query,
7604            graphql_client: self.graphql_client.clone(),
7605        }
7606    }
7607    /// Declare a desired SearchSubmatch output to be assigned in the environment
7608    ///
7609    /// # Arguments
7610    ///
7611    /// * `name` - The name of the binding
7612    /// * `description` - A description of the desired value of the binding
7613    pub fn with_search_submatch_output(
7614        &self,
7615        name: impl Into<String>,
7616        description: impl Into<String>,
7617    ) -> Env {
7618        let mut query = self.selection.select("withSearchSubmatchOutput");
7619        query = query.arg("name", name.into());
7620        query = query.arg("description", description.into());
7621        Env {
7622            proc: self.proc.clone(),
7623            selection: query,
7624            graphql_client: self.graphql_client.clone(),
7625        }
7626    }
7627    /// Create or update a binding of type Secret in the environment
7628    ///
7629    /// # Arguments
7630    ///
7631    /// * `name` - The name of the binding
7632    /// * `value` - The Secret value to assign to the binding
7633    /// * `description` - The purpose of the input
7634    pub fn with_secret_input(
7635        &self,
7636        name: impl Into<String>,
7637        value: impl IntoID<Id>,
7638        description: impl Into<String>,
7639    ) -> Env {
7640        let mut query = self.selection.select("withSecretInput");
7641        query = query.arg("name", name.into());
7642        query = query.arg_lazy(
7643            "value",
7644            Box::new(move || {
7645                let value = value.clone();
7646                Box::pin(async move { value.into_id().await.unwrap().quote() })
7647            }),
7648        );
7649        query = query.arg("description", description.into());
7650        Env {
7651            proc: self.proc.clone(),
7652            selection: query,
7653            graphql_client: self.graphql_client.clone(),
7654        }
7655    }
7656    /// Declare a desired Secret output to be assigned in the environment
7657    ///
7658    /// # Arguments
7659    ///
7660    /// * `name` - The name of the binding
7661    /// * `description` - A description of the desired value of the binding
7662    pub fn with_secret_output(
7663        &self,
7664        name: impl Into<String>,
7665        description: impl Into<String>,
7666    ) -> Env {
7667        let mut query = self.selection.select("withSecretOutput");
7668        query = query.arg("name", name.into());
7669        query = query.arg("description", description.into());
7670        Env {
7671            proc: self.proc.clone(),
7672            selection: query,
7673            graphql_client: self.graphql_client.clone(),
7674        }
7675    }
7676    /// Create or update a binding of type Service in the environment
7677    ///
7678    /// # Arguments
7679    ///
7680    /// * `name` - The name of the binding
7681    /// * `value` - The Service value to assign to the binding
7682    /// * `description` - The purpose of the input
7683    pub fn with_service_input(
7684        &self,
7685        name: impl Into<String>,
7686        value: impl IntoID<Id>,
7687        description: impl Into<String>,
7688    ) -> Env {
7689        let mut query = self.selection.select("withServiceInput");
7690        query = query.arg("name", name.into());
7691        query = query.arg_lazy(
7692            "value",
7693            Box::new(move || {
7694                let value = value.clone();
7695                Box::pin(async move { value.into_id().await.unwrap().quote() })
7696            }),
7697        );
7698        query = query.arg("description", description.into());
7699        Env {
7700            proc: self.proc.clone(),
7701            selection: query,
7702            graphql_client: self.graphql_client.clone(),
7703        }
7704    }
7705    /// Declare a desired Service output to be assigned in the environment
7706    ///
7707    /// # Arguments
7708    ///
7709    /// * `name` - The name of the binding
7710    /// * `description` - A description of the desired value of the binding
7711    pub fn with_service_output(
7712        &self,
7713        name: impl Into<String>,
7714        description: impl Into<String>,
7715    ) -> Env {
7716        let mut query = self.selection.select("withServiceOutput");
7717        query = query.arg("name", name.into());
7718        query = query.arg("description", description.into());
7719        Env {
7720            proc: self.proc.clone(),
7721            selection: query,
7722            graphql_client: self.graphql_client.clone(),
7723        }
7724    }
7725    /// Create or update a binding of type Socket in the environment
7726    ///
7727    /// # Arguments
7728    ///
7729    /// * `name` - The name of the binding
7730    /// * `value` - The Socket value to assign to the binding
7731    /// * `description` - The purpose of the input
7732    pub fn with_socket_input(
7733        &self,
7734        name: impl Into<String>,
7735        value: impl IntoID<Id>,
7736        description: impl Into<String>,
7737    ) -> Env {
7738        let mut query = self.selection.select("withSocketInput");
7739        query = query.arg("name", name.into());
7740        query = query.arg_lazy(
7741            "value",
7742            Box::new(move || {
7743                let value = value.clone();
7744                Box::pin(async move { value.into_id().await.unwrap().quote() })
7745            }),
7746        );
7747        query = query.arg("description", description.into());
7748        Env {
7749            proc: self.proc.clone(),
7750            selection: query,
7751            graphql_client: self.graphql_client.clone(),
7752        }
7753    }
7754    /// Declare a desired Socket output to be assigned in the environment
7755    ///
7756    /// # Arguments
7757    ///
7758    /// * `name` - The name of the binding
7759    /// * `description` - A description of the desired value of the binding
7760    pub fn with_socket_output(
7761        &self,
7762        name: impl Into<String>,
7763        description: impl Into<String>,
7764    ) -> Env {
7765        let mut query = self.selection.select("withSocketOutput");
7766        query = query.arg("name", name.into());
7767        query = query.arg("description", description.into());
7768        Env {
7769            proc: self.proc.clone(),
7770            selection: query,
7771            graphql_client: self.graphql_client.clone(),
7772        }
7773    }
7774    /// Create or update a binding of type Stat in the environment
7775    ///
7776    /// # Arguments
7777    ///
7778    /// * `name` - The name of the binding
7779    /// * `value` - The Stat value to assign to the binding
7780    /// * `description` - The purpose of the input
7781    pub fn with_stat_input(
7782        &self,
7783        name: impl Into<String>,
7784        value: impl IntoID<Id>,
7785        description: impl Into<String>,
7786    ) -> Env {
7787        let mut query = self.selection.select("withStatInput");
7788        query = query.arg("name", name.into());
7789        query = query.arg_lazy(
7790            "value",
7791            Box::new(move || {
7792                let value = value.clone();
7793                Box::pin(async move { value.into_id().await.unwrap().quote() })
7794            }),
7795        );
7796        query = query.arg("description", description.into());
7797        Env {
7798            proc: self.proc.clone(),
7799            selection: query,
7800            graphql_client: self.graphql_client.clone(),
7801        }
7802    }
7803    /// Declare a desired Stat output to be assigned in the environment
7804    ///
7805    /// # Arguments
7806    ///
7807    /// * `name` - The name of the binding
7808    /// * `description` - A description of the desired value of the binding
7809    pub fn with_stat_output(&self, name: impl Into<String>, description: impl Into<String>) -> Env {
7810        let mut query = self.selection.select("withStatOutput");
7811        query = query.arg("name", name.into());
7812        query = query.arg("description", description.into());
7813        Env {
7814            proc: self.proc.clone(),
7815            selection: query,
7816            graphql_client: self.graphql_client.clone(),
7817        }
7818    }
7819    /// Provides a string input binding to the environment
7820    ///
7821    /// # Arguments
7822    ///
7823    /// * `name` - The name of the binding
7824    /// * `value` - The string value to assign to the binding
7825    /// * `description` - The description of the input
7826    pub fn with_string_input(
7827        &self,
7828        name: impl Into<String>,
7829        value: impl Into<String>,
7830        description: impl Into<String>,
7831    ) -> Env {
7832        let mut query = self.selection.select("withStringInput");
7833        query = query.arg("name", name.into());
7834        query = query.arg("value", value.into());
7835        query = query.arg("description", description.into());
7836        Env {
7837            proc: self.proc.clone(),
7838            selection: query,
7839            graphql_client: self.graphql_client.clone(),
7840        }
7841    }
7842    /// Declares a desired string output binding
7843    ///
7844    /// # Arguments
7845    ///
7846    /// * `name` - The name of the binding
7847    /// * `description` - The description of the output
7848    pub fn with_string_output(
7849        &self,
7850        name: impl Into<String>,
7851        description: impl Into<String>,
7852    ) -> Env {
7853        let mut query = self.selection.select("withStringOutput");
7854        query = query.arg("name", name.into());
7855        query = query.arg("description", description.into());
7856        Env {
7857            proc: self.proc.clone(),
7858            selection: query,
7859            graphql_client: self.graphql_client.clone(),
7860        }
7861    }
7862    /// Create or update a binding of type UpGroup in the environment
7863    ///
7864    /// # Arguments
7865    ///
7866    /// * `name` - The name of the binding
7867    /// * `value` - The UpGroup value to assign to the binding
7868    /// * `description` - The purpose of the input
7869    pub fn with_up_group_input(
7870        &self,
7871        name: impl Into<String>,
7872        value: impl IntoID<Id>,
7873        description: impl Into<String>,
7874    ) -> Env {
7875        let mut query = self.selection.select("withUpGroupInput");
7876        query = query.arg("name", name.into());
7877        query = query.arg_lazy(
7878            "value",
7879            Box::new(move || {
7880                let value = value.clone();
7881                Box::pin(async move { value.into_id().await.unwrap().quote() })
7882            }),
7883        );
7884        query = query.arg("description", description.into());
7885        Env {
7886            proc: self.proc.clone(),
7887            selection: query,
7888            graphql_client: self.graphql_client.clone(),
7889        }
7890    }
7891    /// Declare a desired UpGroup output to be assigned in the environment
7892    ///
7893    /// # Arguments
7894    ///
7895    /// * `name` - The name of the binding
7896    /// * `description` - A description of the desired value of the binding
7897    pub fn with_up_group_output(
7898        &self,
7899        name: impl Into<String>,
7900        description: impl Into<String>,
7901    ) -> Env {
7902        let mut query = self.selection.select("withUpGroupOutput");
7903        query = query.arg("name", name.into());
7904        query = query.arg("description", description.into());
7905        Env {
7906            proc: self.proc.clone(),
7907            selection: query,
7908            graphql_client: self.graphql_client.clone(),
7909        }
7910    }
7911    /// Create or update a binding of type Up in the environment
7912    ///
7913    /// # Arguments
7914    ///
7915    /// * `name` - The name of the binding
7916    /// * `value` - The Up value to assign to the binding
7917    /// * `description` - The purpose of the input
7918    pub fn with_up_input(
7919        &self,
7920        name: impl Into<String>,
7921        value: impl IntoID<Id>,
7922        description: impl Into<String>,
7923    ) -> Env {
7924        let mut query = self.selection.select("withUpInput");
7925        query = query.arg("name", name.into());
7926        query = query.arg_lazy(
7927            "value",
7928            Box::new(move || {
7929                let value = value.clone();
7930                Box::pin(async move { value.into_id().await.unwrap().quote() })
7931            }),
7932        );
7933        query = query.arg("description", description.into());
7934        Env {
7935            proc: self.proc.clone(),
7936            selection: query,
7937            graphql_client: self.graphql_client.clone(),
7938        }
7939    }
7940    /// Declare a desired Up output to be assigned in the environment
7941    ///
7942    /// # Arguments
7943    ///
7944    /// * `name` - The name of the binding
7945    /// * `description` - A description of the desired value of the binding
7946    pub fn with_up_output(&self, name: impl Into<String>, description: impl Into<String>) -> Env {
7947        let mut query = self.selection.select("withUpOutput");
7948        query = query.arg("name", name.into());
7949        query = query.arg("description", description.into());
7950        Env {
7951            proc: self.proc.clone(),
7952            selection: query,
7953            graphql_client: self.graphql_client.clone(),
7954        }
7955    }
7956    /// Returns a new environment with the provided workspace
7957    ///
7958    /// # Arguments
7959    ///
7960    /// * `workspace` - The directory to set as the host filesystem
7961    pub fn with_workspace(&self, workspace: impl IntoID<Id>) -> Env {
7962        let mut query = self.selection.select("withWorkspace");
7963        query = query.arg_lazy(
7964            "workspace",
7965            Box::new(move || {
7966                let workspace = workspace.clone();
7967                Box::pin(async move { workspace.into_id().await.unwrap().quote() })
7968            }),
7969        );
7970        Env {
7971            proc: self.proc.clone(),
7972            selection: query,
7973            graphql_client: self.graphql_client.clone(),
7974        }
7975    }
7976    /// Create or update a binding of type Workspace in the environment
7977    ///
7978    /// # Arguments
7979    ///
7980    /// * `name` - The name of the binding
7981    /// * `value` - The Workspace value to assign to the binding
7982    /// * `description` - The purpose of the input
7983    pub fn with_workspace_input(
7984        &self,
7985        name: impl Into<String>,
7986        value: impl IntoID<Id>,
7987        description: impl Into<String>,
7988    ) -> Env {
7989        let mut query = self.selection.select("withWorkspaceInput");
7990        query = query.arg("name", name.into());
7991        query = query.arg_lazy(
7992            "value",
7993            Box::new(move || {
7994                let value = value.clone();
7995                Box::pin(async move { value.into_id().await.unwrap().quote() })
7996            }),
7997        );
7998        query = query.arg("description", description.into());
7999        Env {
8000            proc: self.proc.clone(),
8001            selection: query,
8002            graphql_client: self.graphql_client.clone(),
8003        }
8004    }
8005    /// Declare a desired Workspace output to be assigned in the environment
8006    ///
8007    /// # Arguments
8008    ///
8009    /// * `name` - The name of the binding
8010    /// * `description` - A description of the desired value of the binding
8011    pub fn with_workspace_output(
8012        &self,
8013        name: impl Into<String>,
8014        description: impl Into<String>,
8015    ) -> Env {
8016        let mut query = self.selection.select("withWorkspaceOutput");
8017        query = query.arg("name", name.into());
8018        query = query.arg("description", description.into());
8019        Env {
8020            proc: self.proc.clone(),
8021            selection: query,
8022            graphql_client: self.graphql_client.clone(),
8023        }
8024    }
8025    /// Returns a new environment without any outputs
8026    pub fn without_outputs(&self) -> Env {
8027        let query = self.selection.select("withoutOutputs");
8028        Env {
8029            proc: self.proc.clone(),
8030            selection: query,
8031            graphql_client: self.graphql_client.clone(),
8032        }
8033    }
8034    pub fn workspace(&self) -> Directory {
8035        let query = self.selection.select("workspace");
8036        Directory {
8037            proc: self.proc.clone(),
8038            selection: query,
8039            graphql_client: self.graphql_client.clone(),
8040        }
8041    }
8042}
8043impl Node for Env {
8044    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
8045        let query = self.selection.select("id");
8046        let graphql_client = self.graphql_client.clone();
8047        async move { query.execute(graphql_client).await }
8048    }
8049}
8050#[derive(Clone)]
8051pub struct EnvFile {
8052    pub proc: Option<Arc<DaggerSessionProc>>,
8053    pub selection: Selection,
8054    pub graphql_client: DynGraphQLClient,
8055}
8056#[derive(Builder, Debug, PartialEq)]
8057pub struct EnvFileGetOpts {
8058    /// Return the value exactly as written to the file. No quote removal or variable expansion
8059    #[builder(setter(into, strip_option), default)]
8060    pub raw: Option<bool>,
8061}
8062#[derive(Builder, Debug, PartialEq)]
8063pub struct EnvFileVariablesOpts {
8064    /// Return values exactly as written to the file. No quote removal or variable expansion
8065    #[builder(setter(into, strip_option), default)]
8066    pub raw: Option<bool>,
8067}
8068impl IntoID<Id> for EnvFile {
8069    fn into_id(
8070        self,
8071    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
8072        Box::pin(async move { self.id().await })
8073    }
8074}
8075impl Loadable for EnvFile {
8076    fn graphql_type() -> &'static str {
8077        "EnvFile"
8078    }
8079    fn from_query(
8080        proc: Option<Arc<DaggerSessionProc>>,
8081        selection: Selection,
8082        graphql_client: DynGraphQLClient,
8083    ) -> Self {
8084        Self {
8085            proc,
8086            selection,
8087            graphql_client,
8088        }
8089    }
8090}
8091impl EnvFile {
8092    /// Return as a file
8093    pub fn as_file(&self) -> File {
8094        let query = self.selection.select("asFile");
8095        File {
8096            proc: self.proc.clone(),
8097            selection: query,
8098            graphql_client: self.graphql_client.clone(),
8099        }
8100    }
8101    /// Check if a variable exists
8102    ///
8103    /// # Arguments
8104    ///
8105    /// * `name` - Variable name
8106    pub async fn exists(&self, name: impl Into<String>) -> Result<bool, DaggerError> {
8107        let mut query = self.selection.select("exists");
8108        query = query.arg("name", name.into());
8109        query.execute(self.graphql_client.clone()).await
8110    }
8111    /// Lookup a variable (last occurrence wins) and return its value, or an empty string
8112    ///
8113    /// # Arguments
8114    ///
8115    /// * `name` - Variable name
8116    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8117    pub async fn get(&self, name: impl Into<String>) -> Result<String, DaggerError> {
8118        let mut query = self.selection.select("get");
8119        query = query.arg("name", name.into());
8120        query.execute(self.graphql_client.clone()).await
8121    }
8122    /// Lookup a variable (last occurrence wins) and return its value, or an empty string
8123    ///
8124    /// # Arguments
8125    ///
8126    /// * `name` - Variable name
8127    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8128    pub async fn get_opts(
8129        &self,
8130        name: impl Into<String>,
8131        opts: EnvFileGetOpts,
8132    ) -> Result<String, DaggerError> {
8133        let mut query = self.selection.select("get");
8134        query = query.arg("name", name.into());
8135        if let Some(raw) = opts.raw {
8136            query = query.arg("raw", raw);
8137        }
8138        query.execute(self.graphql_client.clone()).await
8139    }
8140    /// A unique identifier for this EnvFile.
8141    pub async fn id(&self) -> Result<Id, DaggerError> {
8142        let query = self.selection.select("id");
8143        query.execute(self.graphql_client.clone()).await
8144    }
8145    /// Filters variables by prefix and removes the pref from keys. Variables without the prefix are excluded. For example, with the prefix "MY_APP_" and variables: MY_APP_TOKEN=topsecret MY_APP_NAME=hello FOO=bar the resulting environment will contain: TOKEN=topsecret NAME=hello
8146    ///
8147    /// # Arguments
8148    ///
8149    /// * `prefix` - The prefix to filter by
8150    pub fn namespace(&self, prefix: impl Into<String>) -> EnvFile {
8151        let mut query = self.selection.select("namespace");
8152        query = query.arg("prefix", prefix.into());
8153        EnvFile {
8154            proc: self.proc.clone(),
8155            selection: query,
8156            graphql_client: self.graphql_client.clone(),
8157        }
8158    }
8159    /// Return all variables
8160    ///
8161    /// # Arguments
8162    ///
8163    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8164    pub async fn variables(&self) -> Result<Vec<EnvVariable>, DaggerError> {
8165        let query = self.selection.select("variables");
8166        let query = query.select("id");
8167        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
8168        Ok(ids
8169            .into_iter()
8170            .map(|id| EnvVariable {
8171                proc: self.proc.clone(),
8172                selection: crate::querybuilder::query()
8173                    .select("node")
8174                    .arg("id", &id.0)
8175                    .inline_fragment("EnvVariable"),
8176                graphql_client: self.graphql_client.clone(),
8177            })
8178            .collect())
8179    }
8180    /// Return all variables
8181    ///
8182    /// # Arguments
8183    ///
8184    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8185    pub async fn variables_opts(
8186        &self,
8187        opts: EnvFileVariablesOpts,
8188    ) -> Result<Vec<EnvVariable>, DaggerError> {
8189        let mut query = self.selection.select("variables");
8190        if let Some(raw) = opts.raw {
8191            query = query.arg("raw", raw);
8192        }
8193        let query = query.select("id");
8194        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
8195        Ok(ids
8196            .into_iter()
8197            .map(|id| EnvVariable {
8198                proc: self.proc.clone(),
8199                selection: crate::querybuilder::query()
8200                    .select("node")
8201                    .arg("id", &id.0)
8202                    .inline_fragment("EnvVariable"),
8203                graphql_client: self.graphql_client.clone(),
8204            })
8205            .collect())
8206    }
8207    /// Add a variable
8208    ///
8209    /// # Arguments
8210    ///
8211    /// * `name` - Variable name
8212    /// * `value` - Variable value
8213    pub fn with_variable(&self, name: impl Into<String>, value: impl Into<String>) -> EnvFile {
8214        let mut query = self.selection.select("withVariable");
8215        query = query.arg("name", name.into());
8216        query = query.arg("value", value.into());
8217        EnvFile {
8218            proc: self.proc.clone(),
8219            selection: query,
8220            graphql_client: self.graphql_client.clone(),
8221        }
8222    }
8223    /// Remove all occurrences of the named variable
8224    ///
8225    /// # Arguments
8226    ///
8227    /// * `name` - Variable name
8228    pub fn without_variable(&self, name: impl Into<String>) -> EnvFile {
8229        let mut query = self.selection.select("withoutVariable");
8230        query = query.arg("name", name.into());
8231        EnvFile {
8232            proc: self.proc.clone(),
8233            selection: query,
8234            graphql_client: self.graphql_client.clone(),
8235        }
8236    }
8237}
8238impl Node for EnvFile {
8239    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
8240        let query = self.selection.select("id");
8241        let graphql_client = self.graphql_client.clone();
8242        async move { query.execute(graphql_client).await }
8243    }
8244}
8245#[derive(Clone)]
8246pub struct EnvVariable {
8247    pub proc: Option<Arc<DaggerSessionProc>>,
8248    pub selection: Selection,
8249    pub graphql_client: DynGraphQLClient,
8250}
8251impl IntoID<Id> for EnvVariable {
8252    fn into_id(
8253        self,
8254    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
8255        Box::pin(async move { self.id().await })
8256    }
8257}
8258impl Loadable for EnvVariable {
8259    fn graphql_type() -> &'static str {
8260        "EnvVariable"
8261    }
8262    fn from_query(
8263        proc: Option<Arc<DaggerSessionProc>>,
8264        selection: Selection,
8265        graphql_client: DynGraphQLClient,
8266    ) -> Self {
8267        Self {
8268            proc,
8269            selection,
8270            graphql_client,
8271        }
8272    }
8273}
8274impl EnvVariable {
8275    /// A unique identifier for this EnvVariable.
8276    pub async fn id(&self) -> Result<Id, DaggerError> {
8277        let query = self.selection.select("id");
8278        query.execute(self.graphql_client.clone()).await
8279    }
8280    /// The environment variable name.
8281    pub async fn name(&self) -> Result<String, DaggerError> {
8282        let query = self.selection.select("name");
8283        query.execute(self.graphql_client.clone()).await
8284    }
8285    /// The environment variable value.
8286    pub async fn value(&self) -> Result<String, DaggerError> {
8287        let query = self.selection.select("value");
8288        query.execute(self.graphql_client.clone()).await
8289    }
8290}
8291impl Node for EnvVariable {
8292    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
8293        let query = self.selection.select("id");
8294        let graphql_client = self.graphql_client.clone();
8295        async move { query.execute(graphql_client).await }
8296    }
8297}
8298#[derive(Clone)]
8299pub struct Error {
8300    pub proc: Option<Arc<DaggerSessionProc>>,
8301    pub selection: Selection,
8302    pub graphql_client: DynGraphQLClient,
8303}
8304impl IntoID<Id> for Error {
8305    fn into_id(
8306        self,
8307    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
8308        Box::pin(async move { self.id().await })
8309    }
8310}
8311impl Loadable for Error {
8312    fn graphql_type() -> &'static str {
8313        "Error"
8314    }
8315    fn from_query(
8316        proc: Option<Arc<DaggerSessionProc>>,
8317        selection: Selection,
8318        graphql_client: DynGraphQLClient,
8319    ) -> Self {
8320        Self {
8321            proc,
8322            selection,
8323            graphql_client,
8324        }
8325    }
8326}
8327impl Error {
8328    /// A unique identifier for this Error.
8329    pub async fn id(&self) -> Result<Id, DaggerError> {
8330        let query = self.selection.select("id");
8331        query.execute(self.graphql_client.clone()).await
8332    }
8333    /// A description of the error.
8334    pub async fn message(&self) -> Result<String, DaggerError> {
8335        let query = self.selection.select("message");
8336        query.execute(self.graphql_client.clone()).await
8337    }
8338    /// The extensions of the error.
8339    pub async fn values(&self) -> Result<Vec<ErrorValue>, DaggerError> {
8340        let query = self.selection.select("values");
8341        let query = query.select("id");
8342        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
8343        Ok(ids
8344            .into_iter()
8345            .map(|id| ErrorValue {
8346                proc: self.proc.clone(),
8347                selection: crate::querybuilder::query()
8348                    .select("node")
8349                    .arg("id", &id.0)
8350                    .inline_fragment("ErrorValue"),
8351                graphql_client: self.graphql_client.clone(),
8352            })
8353            .collect())
8354    }
8355    /// Add a value to the error.
8356    ///
8357    /// # Arguments
8358    ///
8359    /// * `name` - The name of the value.
8360    /// * `value` - The value to store on the error.
8361    pub fn with_value(&self, name: impl Into<String>, value: Json) -> Error {
8362        let mut query = self.selection.select("withValue");
8363        query = query.arg("name", name.into());
8364        query = query.arg("value", value);
8365        Error {
8366            proc: self.proc.clone(),
8367            selection: query,
8368            graphql_client: self.graphql_client.clone(),
8369        }
8370    }
8371}
8372impl Node for Error {
8373    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
8374        let query = self.selection.select("id");
8375        let graphql_client = self.graphql_client.clone();
8376        async move { query.execute(graphql_client).await }
8377    }
8378}
8379#[derive(Clone)]
8380pub struct ErrorValue {
8381    pub proc: Option<Arc<DaggerSessionProc>>,
8382    pub selection: Selection,
8383    pub graphql_client: DynGraphQLClient,
8384}
8385impl IntoID<Id> for ErrorValue {
8386    fn into_id(
8387        self,
8388    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
8389        Box::pin(async move { self.id().await })
8390    }
8391}
8392impl Loadable for ErrorValue {
8393    fn graphql_type() -> &'static str {
8394        "ErrorValue"
8395    }
8396    fn from_query(
8397        proc: Option<Arc<DaggerSessionProc>>,
8398        selection: Selection,
8399        graphql_client: DynGraphQLClient,
8400    ) -> Self {
8401        Self {
8402            proc,
8403            selection,
8404            graphql_client,
8405        }
8406    }
8407}
8408impl ErrorValue {
8409    /// A unique identifier for this ErrorValue.
8410    pub async fn id(&self) -> Result<Id, DaggerError> {
8411        let query = self.selection.select("id");
8412        query.execute(self.graphql_client.clone()).await
8413    }
8414    /// The name of the value.
8415    pub async fn name(&self) -> Result<String, DaggerError> {
8416        let query = self.selection.select("name");
8417        query.execute(self.graphql_client.clone()).await
8418    }
8419    /// The value.
8420    pub async fn value(&self) -> Result<Json, DaggerError> {
8421        let query = self.selection.select("value");
8422        query.execute(self.graphql_client.clone()).await
8423    }
8424}
8425impl Node for ErrorValue {
8426    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
8427        let query = self.selection.select("id");
8428        let graphql_client = self.graphql_client.clone();
8429        async move { query.execute(graphql_client).await }
8430    }
8431}
8432#[derive(Clone)]
8433pub struct FieldTypeDef {
8434    pub proc: Option<Arc<DaggerSessionProc>>,
8435    pub selection: Selection,
8436    pub graphql_client: DynGraphQLClient,
8437}
8438impl IntoID<Id> for FieldTypeDef {
8439    fn into_id(
8440        self,
8441    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
8442        Box::pin(async move { self.id().await })
8443    }
8444}
8445impl Loadable for FieldTypeDef {
8446    fn graphql_type() -> &'static str {
8447        "FieldTypeDef"
8448    }
8449    fn from_query(
8450        proc: Option<Arc<DaggerSessionProc>>,
8451        selection: Selection,
8452        graphql_client: DynGraphQLClient,
8453    ) -> Self {
8454        Self {
8455            proc,
8456            selection,
8457            graphql_client,
8458        }
8459    }
8460}
8461impl FieldTypeDef {
8462    /// The reason this enum member is deprecated, if any.
8463    pub async fn deprecated(&self) -> Result<String, DaggerError> {
8464        let query = self.selection.select("deprecated");
8465        query.execute(self.graphql_client.clone()).await
8466    }
8467    /// A doc string for the field, if any.
8468    pub async fn description(&self) -> Result<String, DaggerError> {
8469        let query = self.selection.select("description");
8470        query.execute(self.graphql_client.clone()).await
8471    }
8472    /// A unique identifier for this FieldTypeDef.
8473    pub async fn id(&self) -> Result<Id, DaggerError> {
8474        let query = self.selection.select("id");
8475        query.execute(self.graphql_client.clone()).await
8476    }
8477    /// The name of the field in lowerCamelCase format.
8478    pub async fn name(&self) -> Result<String, DaggerError> {
8479        let query = self.selection.select("name");
8480        query.execute(self.graphql_client.clone()).await
8481    }
8482    /// The location of this field declaration.
8483    pub fn source_map(&self) -> SourceMap {
8484        let query = self.selection.select("sourceMap");
8485        SourceMap {
8486            proc: self.proc.clone(),
8487            selection: query,
8488            graphql_client: self.graphql_client.clone(),
8489        }
8490    }
8491    /// The type of the field.
8492    pub fn type_def(&self) -> TypeDef {
8493        let query = self.selection.select("typeDef");
8494        TypeDef {
8495            proc: self.proc.clone(),
8496            selection: query,
8497            graphql_client: self.graphql_client.clone(),
8498        }
8499    }
8500}
8501impl Node for FieldTypeDef {
8502    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
8503        let query = self.selection.select("id");
8504        let graphql_client = self.graphql_client.clone();
8505        async move { query.execute(graphql_client).await }
8506    }
8507}
8508#[derive(Clone)]
8509pub struct File {
8510    pub proc: Option<Arc<DaggerSessionProc>>,
8511    pub selection: Selection,
8512    pub graphql_client: DynGraphQLClient,
8513}
8514#[derive(Builder, Debug, PartialEq)]
8515pub struct FileAsEnvFileOpts {
8516    /// Replace "${VAR}" or "$VAR" with the value of other vars
8517    #[builder(setter(into, strip_option), default)]
8518    pub expand: Option<bool>,
8519}
8520#[derive(Builder, Debug, PartialEq)]
8521pub struct FileContentsOpts {
8522    /// Maximum number of lines to read
8523    #[builder(setter(into, strip_option), default)]
8524    pub limit_lines: Option<isize>,
8525    /// Start reading after this line
8526    #[builder(setter(into, strip_option), default)]
8527    pub offset_lines: Option<isize>,
8528}
8529#[derive(Builder, Debug, PartialEq)]
8530pub struct FileDigestOpts {
8531    /// If true, exclude metadata from the digest.
8532    #[builder(setter(into, strip_option), default)]
8533    pub exclude_metadata: Option<bool>,
8534}
8535#[derive(Builder, Debug, PartialEq)]
8536pub struct FileExportOpts {
8537    /// If allowParentDirPath is true, the path argument can be a directory path, in which case the file will be created in that directory.
8538    #[builder(setter(into, strip_option), default)]
8539    pub allow_parent_dir_path: Option<bool>,
8540}
8541#[derive(Builder, Debug, PartialEq)]
8542pub struct FileSearchOpts<'a> {
8543    /// Allow the . pattern to match newlines in multiline mode.
8544    #[builder(setter(into, strip_option), default)]
8545    pub dotall: Option<bool>,
8546    /// Only return matching files, not lines and content
8547    #[builder(setter(into, strip_option), default)]
8548    pub files_only: Option<bool>,
8549    #[builder(setter(into, strip_option), default)]
8550    pub globs: Option<Vec<&'a str>>,
8551    /// Enable case-insensitive matching.
8552    #[builder(setter(into, strip_option), default)]
8553    pub insensitive: Option<bool>,
8554    /// Limit the number of results to return
8555    #[builder(setter(into, strip_option), default)]
8556    pub limit: Option<isize>,
8557    /// Interpret the pattern as a literal string instead of a regular expression.
8558    #[builder(setter(into, strip_option), default)]
8559    pub literal: Option<bool>,
8560    /// Enable searching across multiple lines.
8561    #[builder(setter(into, strip_option), default)]
8562    pub multiline: Option<bool>,
8563    #[builder(setter(into, strip_option), default)]
8564    pub paths: Option<Vec<&'a str>>,
8565    /// Skip hidden files (files starting with .).
8566    #[builder(setter(into, strip_option), default)]
8567    pub skip_hidden: Option<bool>,
8568    /// Honor .gitignore, .ignore, and .rgignore files.
8569    #[builder(setter(into, strip_option), default)]
8570    pub skip_ignored: Option<bool>,
8571}
8572#[derive(Builder, Debug, PartialEq)]
8573pub struct FileWithReplacedOpts {
8574    /// Replace all occurrences of the pattern.
8575    #[builder(setter(into, strip_option), default)]
8576    pub all: Option<bool>,
8577    /// Replace the first match starting from the specified line.
8578    #[builder(setter(into, strip_option), default)]
8579    pub first_from: Option<isize>,
8580}
8581impl IntoID<Id> for File {
8582    fn into_id(
8583        self,
8584    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
8585        Box::pin(async move { self.id().await })
8586    }
8587}
8588impl Loadable for File {
8589    fn graphql_type() -> &'static str {
8590        "File"
8591    }
8592    fn from_query(
8593        proc: Option<Arc<DaggerSessionProc>>,
8594        selection: Selection,
8595        graphql_client: DynGraphQLClient,
8596    ) -> Self {
8597        Self {
8598            proc,
8599            selection,
8600            graphql_client,
8601        }
8602    }
8603}
8604impl File {
8605    /// Parse as an env file
8606    ///
8607    /// # Arguments
8608    ///
8609    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8610    pub fn as_env_file(&self) -> EnvFile {
8611        let query = self.selection.select("asEnvFile");
8612        EnvFile {
8613            proc: self.proc.clone(),
8614            selection: query,
8615            graphql_client: self.graphql_client.clone(),
8616        }
8617    }
8618    /// Parse as an env file
8619    ///
8620    /// # Arguments
8621    ///
8622    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8623    pub fn as_env_file_opts(&self, opts: FileAsEnvFileOpts) -> EnvFile {
8624        let mut query = self.selection.select("asEnvFile");
8625        if let Some(expand) = opts.expand {
8626            query = query.arg("expand", expand);
8627        }
8628        EnvFile {
8629            proc: self.proc.clone(),
8630            selection: query,
8631            graphql_client: self.graphql_client.clone(),
8632        }
8633    }
8634    /// Parse the file contents as JSON.
8635    pub fn as_json(&self) -> JsonValue {
8636        let query = self.selection.select("asJSON");
8637        JsonValue {
8638            proc: self.proc.clone(),
8639            selection: query,
8640            graphql_client: self.graphql_client.clone(),
8641        }
8642    }
8643    /// Change the owner of the file recursively.
8644    ///
8645    /// # Arguments
8646    ///
8647    /// * `owner` - A user:group to set for the file.
8648    ///
8649    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
8650    ///
8651    /// If the group is omitted, it defaults to the same as the user.
8652    pub fn chown(&self, owner: impl Into<String>) -> File {
8653        let mut query = self.selection.select("chown");
8654        query = query.arg("owner", owner.into());
8655        File {
8656            proc: self.proc.clone(),
8657            selection: query,
8658            graphql_client: self.graphql_client.clone(),
8659        }
8660    }
8661    /// Retrieves the contents of the file.
8662    ///
8663    /// # Arguments
8664    ///
8665    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8666    pub async fn contents(&self) -> Result<String, DaggerError> {
8667        let query = self.selection.select("contents");
8668        query.execute(self.graphql_client.clone()).await
8669    }
8670    /// Retrieves the contents of the file.
8671    ///
8672    /// # Arguments
8673    ///
8674    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8675    pub async fn contents_opts(&self, opts: FileContentsOpts) -> Result<String, DaggerError> {
8676        let mut query = self.selection.select("contents");
8677        if let Some(offset_lines) = opts.offset_lines {
8678            query = query.arg("offsetLines", offset_lines);
8679        }
8680        if let Some(limit_lines) = opts.limit_lines {
8681            query = query.arg("limitLines", limit_lines);
8682        }
8683        query.execute(self.graphql_client.clone()).await
8684    }
8685    /// Return the file's digest. The format of the digest is not guaranteed to be stable between releases of Dagger. It is guaranteed to be stable between invocations of the same Dagger engine.
8686    ///
8687    /// # Arguments
8688    ///
8689    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8690    pub async fn digest(&self) -> Result<String, DaggerError> {
8691        let query = self.selection.select("digest");
8692        query.execute(self.graphql_client.clone()).await
8693    }
8694    /// Return the file's digest. The format of the digest is not guaranteed to be stable between releases of Dagger. It is guaranteed to be stable between invocations of the same Dagger engine.
8695    ///
8696    /// # Arguments
8697    ///
8698    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8699    pub async fn digest_opts(&self, opts: FileDigestOpts) -> Result<String, DaggerError> {
8700        let mut query = self.selection.select("digest");
8701        if let Some(exclude_metadata) = opts.exclude_metadata {
8702            query = query.arg("excludeMetadata", exclude_metadata);
8703        }
8704        query.execute(self.graphql_client.clone()).await
8705    }
8706    /// Writes the file to a file path on the host.
8707    ///
8708    /// # Arguments
8709    ///
8710    /// * `path` - Location of the written directory (e.g., "output.txt").
8711    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8712    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
8713        let mut query = self.selection.select("export");
8714        query = query.arg("path", path.into());
8715        query.execute(self.graphql_client.clone()).await
8716    }
8717    /// Writes the file to a file path on the host.
8718    ///
8719    /// # Arguments
8720    ///
8721    /// * `path` - Location of the written directory (e.g., "output.txt").
8722    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8723    pub async fn export_opts(
8724        &self,
8725        path: impl Into<String>,
8726        opts: FileExportOpts,
8727    ) -> Result<String, DaggerError> {
8728        let mut query = self.selection.select("export");
8729        query = query.arg("path", path.into());
8730        if let Some(allow_parent_dir_path) = opts.allow_parent_dir_path {
8731            query = query.arg("allowParentDirPath", allow_parent_dir_path);
8732        }
8733        query.execute(self.graphql_client.clone()).await
8734    }
8735    /// A unique identifier for this File.
8736    pub async fn id(&self) -> Result<Id, DaggerError> {
8737        let query = self.selection.select("id");
8738        query.execute(self.graphql_client.clone()).await
8739    }
8740    /// Retrieves the name of the file.
8741    pub async fn name(&self) -> Result<String, DaggerError> {
8742        let query = self.selection.select("name");
8743        query.execute(self.graphql_client.clone()).await
8744    }
8745    /// Searches for content matching the given regular expression or literal string.
8746    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
8747    ///
8748    /// # Arguments
8749    ///
8750    /// * `pattern` - The text to match.
8751    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8752    pub async fn search(
8753        &self,
8754        pattern: impl Into<String>,
8755    ) -> Result<Vec<SearchResult>, DaggerError> {
8756        let mut query = self.selection.select("search");
8757        query = query.arg("pattern", pattern.into());
8758        let query = query.select("id");
8759        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
8760        Ok(ids
8761            .into_iter()
8762            .map(|id| SearchResult {
8763                proc: self.proc.clone(),
8764                selection: crate::querybuilder::query()
8765                    .select("node")
8766                    .arg("id", &id.0)
8767                    .inline_fragment("SearchResult"),
8768                graphql_client: self.graphql_client.clone(),
8769            })
8770            .collect())
8771    }
8772    /// Searches for content matching the given regular expression or literal string.
8773    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
8774    ///
8775    /// # Arguments
8776    ///
8777    /// * `pattern` - The text to match.
8778    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8779    pub async fn search_opts<'a>(
8780        &self,
8781        pattern: impl Into<String>,
8782        opts: FileSearchOpts<'a>,
8783    ) -> Result<Vec<SearchResult>, DaggerError> {
8784        let mut query = self.selection.select("search");
8785        query = query.arg("pattern", pattern.into());
8786        if let Some(literal) = opts.literal {
8787            query = query.arg("literal", literal);
8788        }
8789        if let Some(multiline) = opts.multiline {
8790            query = query.arg("multiline", multiline);
8791        }
8792        if let Some(dotall) = opts.dotall {
8793            query = query.arg("dotall", dotall);
8794        }
8795        if let Some(insensitive) = opts.insensitive {
8796            query = query.arg("insensitive", insensitive);
8797        }
8798        if let Some(skip_ignored) = opts.skip_ignored {
8799            query = query.arg("skipIgnored", skip_ignored);
8800        }
8801        if let Some(skip_hidden) = opts.skip_hidden {
8802            query = query.arg("skipHidden", skip_hidden);
8803        }
8804        if let Some(files_only) = opts.files_only {
8805            query = query.arg("filesOnly", files_only);
8806        }
8807        if let Some(limit) = opts.limit {
8808            query = query.arg("limit", limit);
8809        }
8810        if let Some(paths) = opts.paths {
8811            query = query.arg("paths", paths);
8812        }
8813        if let Some(globs) = opts.globs {
8814            query = query.arg("globs", globs);
8815        }
8816        let query = query.select("id");
8817        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
8818        Ok(ids
8819            .into_iter()
8820            .map(|id| SearchResult {
8821                proc: self.proc.clone(),
8822                selection: crate::querybuilder::query()
8823                    .select("node")
8824                    .arg("id", &id.0)
8825                    .inline_fragment("SearchResult"),
8826                graphql_client: self.graphql_client.clone(),
8827            })
8828            .collect())
8829    }
8830    /// Retrieves the size of the file, in bytes.
8831    pub async fn size(&self) -> Result<isize, DaggerError> {
8832        let query = self.selection.select("size");
8833        query.execute(self.graphql_client.clone()).await
8834    }
8835    /// Return file status
8836    pub fn stat(&self) -> Stat {
8837        let query = self.selection.select("stat");
8838        Stat {
8839            proc: self.proc.clone(),
8840            selection: query,
8841            graphql_client: self.graphql_client.clone(),
8842        }
8843    }
8844    /// Force evaluation in the engine.
8845    pub async fn sync(&self) -> Result<File, DaggerError> {
8846        let query = self.selection.select("sync");
8847        let id: Id = query.execute(self.graphql_client.clone()).await?;
8848        Ok(File {
8849            proc: self.proc.clone(),
8850            selection: query
8851                .root()
8852                .select("node")
8853                .arg("id", &id.0)
8854                .inline_fragment("File"),
8855            graphql_client: self.graphql_client.clone(),
8856        })
8857    }
8858    /// Retrieves this file with its name set to the given name.
8859    ///
8860    /// # Arguments
8861    ///
8862    /// * `name` - Name to set file to.
8863    pub fn with_name(&self, name: impl Into<String>) -> File {
8864        let mut query = self.selection.select("withName");
8865        query = query.arg("name", name.into());
8866        File {
8867            proc: self.proc.clone(),
8868            selection: query,
8869            graphql_client: self.graphql_client.clone(),
8870        }
8871    }
8872    /// Retrieves the file with content replaced with the given text.
8873    /// If 'all' is true, all occurrences of the pattern will be replaced.
8874    /// If 'firstAfter' is specified, only the first match starting at the specified line will be replaced.
8875    /// If neither are specified, and there are multiple matches for the pattern, this will error.
8876    /// If there are no matches for the pattern, this will error.
8877    ///
8878    /// # Arguments
8879    ///
8880    /// * `search` - The text to match.
8881    /// * `replacement` - The text to match.
8882    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8883    pub fn with_replaced(&self, search: impl Into<String>, replacement: impl Into<String>) -> File {
8884        let mut query = self.selection.select("withReplaced");
8885        query = query.arg("search", search.into());
8886        query = query.arg("replacement", replacement.into());
8887        File {
8888            proc: self.proc.clone(),
8889            selection: query,
8890            graphql_client: self.graphql_client.clone(),
8891        }
8892    }
8893    /// Retrieves the file with content replaced with the given text.
8894    /// If 'all' is true, all occurrences of the pattern will be replaced.
8895    /// If 'firstAfter' is specified, only the first match starting at the specified line will be replaced.
8896    /// If neither are specified, and there are multiple matches for the pattern, this will error.
8897    /// If there are no matches for the pattern, this will error.
8898    ///
8899    /// # Arguments
8900    ///
8901    /// * `search` - The text to match.
8902    /// * `replacement` - The text to match.
8903    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8904    pub fn with_replaced_opts(
8905        &self,
8906        search: impl Into<String>,
8907        replacement: impl Into<String>,
8908        opts: FileWithReplacedOpts,
8909    ) -> File {
8910        let mut query = self.selection.select("withReplaced");
8911        query = query.arg("search", search.into());
8912        query = query.arg("replacement", replacement.into());
8913        if let Some(all) = opts.all {
8914            query = query.arg("all", all);
8915        }
8916        if let Some(first_from) = opts.first_from {
8917            query = query.arg("firstFrom", first_from);
8918        }
8919        File {
8920            proc: self.proc.clone(),
8921            selection: query,
8922            graphql_client: self.graphql_client.clone(),
8923        }
8924    }
8925    /// Retrieves this file with its created/modified timestamps set to the given time.
8926    ///
8927    /// # Arguments
8928    ///
8929    /// * `timestamp` - Timestamp to set dir/files in.
8930    ///
8931    /// Formatted in seconds following Unix epoch (e.g., 1672531199).
8932    pub fn with_timestamps(&self, timestamp: isize) -> File {
8933        let mut query = self.selection.select("withTimestamps");
8934        query = query.arg("timestamp", timestamp);
8935        File {
8936            proc: self.proc.clone(),
8937            selection: query,
8938            graphql_client: self.graphql_client.clone(),
8939        }
8940    }
8941}
8942impl Exportable for File {
8943    fn export(
8944        &self,
8945        path: impl Into<String>,
8946    ) -> impl core::future::Future<Output = Result<String, DaggerError>> + Send {
8947        let mut query = self.selection.select("export");
8948        query = query.arg("path", path.into());
8949        let graphql_client = self.graphql_client.clone();
8950        async move { query.execute(graphql_client).await }
8951    }
8952    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
8953        let query = self.selection.select("id");
8954        let graphql_client = self.graphql_client.clone();
8955        async move { query.execute(graphql_client).await }
8956    }
8957}
8958impl Node for File {
8959    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
8960        let query = self.selection.select("id");
8961        let graphql_client = self.graphql_client.clone();
8962        async move { query.execute(graphql_client).await }
8963    }
8964}
8965impl Syncer for File {
8966    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
8967        let query = self.selection.select("id");
8968        let graphql_client = self.graphql_client.clone();
8969        async move { query.execute(graphql_client).await }
8970    }
8971    fn sync(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
8972        let query = self.selection.select("sync");
8973        let graphql_client = self.graphql_client.clone();
8974        async move { query.execute(graphql_client).await }
8975    }
8976}
8977#[derive(Clone)]
8978pub struct Function {
8979    pub proc: Option<Arc<DaggerSessionProc>>,
8980    pub selection: Selection,
8981    pub graphql_client: DynGraphQLClient,
8982}
8983#[derive(Builder, Debug, PartialEq)]
8984pub struct FunctionWithArgOpts<'a> {
8985    #[builder(setter(into, strip_option), default)]
8986    pub default_address: Option<&'a str>,
8987    /// If the argument is a Directory or File type, default to load path from context directory, relative to root directory.
8988    #[builder(setter(into, strip_option), default)]
8989    pub default_path: Option<&'a str>,
8990    /// A default value to use for this argument if not explicitly set by the caller, if any
8991    #[builder(setter(into, strip_option), default)]
8992    pub default_value: Option<Json>,
8993    /// If deprecated, the reason or migration path.
8994    #[builder(setter(into, strip_option), default)]
8995    pub deprecated: Option<&'a str>,
8996    /// A doc string for the argument, if any
8997    #[builder(setter(into, strip_option), default)]
8998    pub description: Option<&'a str>,
8999    /// Patterns to ignore when loading the contextual argument value.
9000    #[builder(setter(into, strip_option), default)]
9001    pub ignore: Option<Vec<&'a str>>,
9002    /// The source map for the argument definition.
9003    #[builder(setter(into, strip_option), default)]
9004    pub source_map: Option<Id>,
9005}
9006#[derive(Builder, Debug, PartialEq)]
9007pub struct FunctionWithCachePolicyOpts<'a> {
9008    /// The TTL for the cache policy, if applicable. Provided as a duration string, e.g. "5m", "1h30s".
9009    #[builder(setter(into, strip_option), default)]
9010    pub time_to_live: Option<&'a str>,
9011}
9012#[derive(Builder, Debug, PartialEq)]
9013pub struct FunctionWithDeprecatedOpts<'a> {
9014    /// Reason or migration path describing the deprecation.
9015    #[builder(setter(into, strip_option), default)]
9016    pub reason: Option<&'a str>,
9017}
9018impl IntoID<Id> for Function {
9019    fn into_id(
9020        self,
9021    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
9022        Box::pin(async move { self.id().await })
9023    }
9024}
9025impl Loadable for Function {
9026    fn graphql_type() -> &'static str {
9027        "Function"
9028    }
9029    fn from_query(
9030        proc: Option<Arc<DaggerSessionProc>>,
9031        selection: Selection,
9032        graphql_client: DynGraphQLClient,
9033    ) -> Self {
9034        Self {
9035            proc,
9036            selection,
9037            graphql_client,
9038        }
9039    }
9040}
9041impl Function {
9042    /// Arguments accepted by the function, if any.
9043    pub async fn args(&self) -> Result<Vec<FunctionArg>, DaggerError> {
9044        let query = self.selection.select("args");
9045        let query = query.select("id");
9046        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
9047        Ok(ids
9048            .into_iter()
9049            .map(|id| FunctionArg {
9050                proc: self.proc.clone(),
9051                selection: crate::querybuilder::query()
9052                    .select("node")
9053                    .arg("id", &id.0)
9054                    .inline_fragment("FunctionArg"),
9055                graphql_client: self.graphql_client.clone(),
9056            })
9057            .collect())
9058    }
9059    /// The reason this function is deprecated, if any.
9060    pub async fn deprecated(&self) -> Result<String, DaggerError> {
9061        let query = self.selection.select("deprecated");
9062        query.execute(self.graphql_client.clone()).await
9063    }
9064    /// A doc string for the function, if any.
9065    pub async fn description(&self) -> Result<String, DaggerError> {
9066        let query = self.selection.select("description");
9067        query.execute(self.graphql_client.clone()).await
9068    }
9069    /// A unique identifier for this Function.
9070    pub async fn id(&self) -> Result<Id, DaggerError> {
9071        let query = self.selection.select("id");
9072        query.execute(self.graphql_client.clone()).await
9073    }
9074    /// The name of the function.
9075    pub async fn name(&self) -> Result<String, DaggerError> {
9076        let query = self.selection.select("name");
9077        query.execute(self.graphql_client.clone()).await
9078    }
9079    /// The type returned by the function.
9080    pub fn return_type(&self) -> TypeDef {
9081        let query = self.selection.select("returnType");
9082        TypeDef {
9083            proc: self.proc.clone(),
9084            selection: query,
9085            graphql_client: self.graphql_client.clone(),
9086        }
9087    }
9088    /// The location of this function declaration.
9089    pub fn source_map(&self) -> SourceMap {
9090        let query = self.selection.select("sourceMap");
9091        SourceMap {
9092            proc: self.proc.clone(),
9093            selection: query,
9094            graphql_client: self.graphql_client.clone(),
9095        }
9096    }
9097    /// If this function is provided by a module, the name of the module. Unset otherwise.
9098    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
9099        let query = self.selection.select("sourceModuleName");
9100        query.execute(self.graphql_client.clone()).await
9101    }
9102    /// Returns the function with the provided argument
9103    ///
9104    /// # Arguments
9105    ///
9106    /// * `name` - The name of the argument
9107    /// * `type_def` - The type of the argument
9108    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9109    pub fn with_arg(&self, name: impl Into<String>, type_def: impl IntoID<Id>) -> Function {
9110        let mut query = self.selection.select("withArg");
9111        query = query.arg("name", name.into());
9112        query = query.arg_lazy(
9113            "typeDef",
9114            Box::new(move || {
9115                let type_def = type_def.clone();
9116                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
9117            }),
9118        );
9119        Function {
9120            proc: self.proc.clone(),
9121            selection: query,
9122            graphql_client: self.graphql_client.clone(),
9123        }
9124    }
9125    /// Returns the function with the provided argument
9126    ///
9127    /// # Arguments
9128    ///
9129    /// * `name` - The name of the argument
9130    /// * `type_def` - The type of the argument
9131    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9132    pub fn with_arg_opts<'a>(
9133        &self,
9134        name: impl Into<String>,
9135        type_def: impl IntoID<Id>,
9136        opts: FunctionWithArgOpts<'a>,
9137    ) -> Function {
9138        let mut query = self.selection.select("withArg");
9139        query = query.arg("name", name.into());
9140        query = query.arg_lazy(
9141            "typeDef",
9142            Box::new(move || {
9143                let type_def = type_def.clone();
9144                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
9145            }),
9146        );
9147        if let Some(description) = opts.description {
9148            query = query.arg("description", description);
9149        }
9150        if let Some(default_value) = opts.default_value {
9151            query = query.arg("defaultValue", default_value);
9152        }
9153        if let Some(default_path) = opts.default_path {
9154            query = query.arg("defaultPath", default_path);
9155        }
9156        if let Some(ignore) = opts.ignore {
9157            query = query.arg("ignore", ignore);
9158        }
9159        if let Some(source_map) = opts.source_map {
9160            query = query.arg("sourceMap", source_map);
9161        }
9162        if let Some(deprecated) = opts.deprecated {
9163            query = query.arg("deprecated", deprecated);
9164        }
9165        if let Some(default_address) = opts.default_address {
9166            query = query.arg("defaultAddress", default_address);
9167        }
9168        Function {
9169            proc: self.proc.clone(),
9170            selection: query,
9171            graphql_client: self.graphql_client.clone(),
9172        }
9173    }
9174    /// Returns the function updated to use the provided cache policy.
9175    ///
9176    /// # Arguments
9177    ///
9178    /// * `policy` - The cache policy to use.
9179    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9180    pub fn with_cache_policy(&self, policy: FunctionCachePolicy) -> Function {
9181        let mut query = self.selection.select("withCachePolicy");
9182        query = query.arg("policy", policy);
9183        Function {
9184            proc: self.proc.clone(),
9185            selection: query,
9186            graphql_client: self.graphql_client.clone(),
9187        }
9188    }
9189    /// Returns the function updated to use the provided cache policy.
9190    ///
9191    /// # Arguments
9192    ///
9193    /// * `policy` - The cache policy to use.
9194    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9195    pub fn with_cache_policy_opts<'a>(
9196        &self,
9197        policy: FunctionCachePolicy,
9198        opts: FunctionWithCachePolicyOpts<'a>,
9199    ) -> Function {
9200        let mut query = self.selection.select("withCachePolicy");
9201        query = query.arg("policy", policy);
9202        if let Some(time_to_live) = opts.time_to_live {
9203            query = query.arg("timeToLive", time_to_live);
9204        }
9205        Function {
9206            proc: self.proc.clone(),
9207            selection: query,
9208            graphql_client: self.graphql_client.clone(),
9209        }
9210    }
9211    /// Returns the function with a flag indicating it's a check.
9212    pub fn with_check(&self) -> Function {
9213        let query = self.selection.select("withCheck");
9214        Function {
9215            proc: self.proc.clone(),
9216            selection: query,
9217            graphql_client: self.graphql_client.clone(),
9218        }
9219    }
9220    /// Returns the function with the provided deprecation reason.
9221    ///
9222    /// # Arguments
9223    ///
9224    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9225    pub fn with_deprecated(&self) -> Function {
9226        let query = self.selection.select("withDeprecated");
9227        Function {
9228            proc: self.proc.clone(),
9229            selection: query,
9230            graphql_client: self.graphql_client.clone(),
9231        }
9232    }
9233    /// Returns the function with the provided deprecation reason.
9234    ///
9235    /// # Arguments
9236    ///
9237    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9238    pub fn with_deprecated_opts<'a>(&self, opts: FunctionWithDeprecatedOpts<'a>) -> Function {
9239        let mut query = self.selection.select("withDeprecated");
9240        if let Some(reason) = opts.reason {
9241            query = query.arg("reason", reason);
9242        }
9243        Function {
9244            proc: self.proc.clone(),
9245            selection: query,
9246            graphql_client: self.graphql_client.clone(),
9247        }
9248    }
9249    /// Returns the function with the given doc string.
9250    ///
9251    /// # Arguments
9252    ///
9253    /// * `description` - The doc string to set.
9254    pub fn with_description(&self, description: impl Into<String>) -> Function {
9255        let mut query = self.selection.select("withDescription");
9256        query = query.arg("description", description.into());
9257        Function {
9258            proc: self.proc.clone(),
9259            selection: query,
9260            graphql_client: self.graphql_client.clone(),
9261        }
9262    }
9263    /// Returns the function with a flag indicating it's a generator.
9264    pub fn with_generator(&self) -> Function {
9265        let query = self.selection.select("withGenerator");
9266        Function {
9267            proc: self.proc.clone(),
9268            selection: query,
9269            graphql_client: self.graphql_client.clone(),
9270        }
9271    }
9272    /// Returns the function with the given source map.
9273    ///
9274    /// # Arguments
9275    ///
9276    /// * `source_map` - The source map for the function definition.
9277    pub fn with_source_map(&self, source_map: impl IntoID<Id>) -> Function {
9278        let mut query = self.selection.select("withSourceMap");
9279        query = query.arg_lazy(
9280            "sourceMap",
9281            Box::new(move || {
9282                let source_map = source_map.clone();
9283                Box::pin(async move { source_map.into_id().await.unwrap().quote() })
9284            }),
9285        );
9286        Function {
9287            proc: self.proc.clone(),
9288            selection: query,
9289            graphql_client: self.graphql_client.clone(),
9290        }
9291    }
9292    /// Returns the function with a flag indicating it returns a service for dagger up.
9293    pub fn with_up(&self) -> Function {
9294        let query = self.selection.select("withUp");
9295        Function {
9296            proc: self.proc.clone(),
9297            selection: query,
9298            graphql_client: self.graphql_client.clone(),
9299        }
9300    }
9301}
9302impl Node for Function {
9303    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
9304        let query = self.selection.select("id");
9305        let graphql_client = self.graphql_client.clone();
9306        async move { query.execute(graphql_client).await }
9307    }
9308}
9309#[derive(Clone)]
9310pub struct FunctionArg {
9311    pub proc: Option<Arc<DaggerSessionProc>>,
9312    pub selection: Selection,
9313    pub graphql_client: DynGraphQLClient,
9314}
9315impl IntoID<Id> for FunctionArg {
9316    fn into_id(
9317        self,
9318    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
9319        Box::pin(async move { self.id().await })
9320    }
9321}
9322impl Loadable for FunctionArg {
9323    fn graphql_type() -> &'static str {
9324        "FunctionArg"
9325    }
9326    fn from_query(
9327        proc: Option<Arc<DaggerSessionProc>>,
9328        selection: Selection,
9329        graphql_client: DynGraphQLClient,
9330    ) -> Self {
9331        Self {
9332            proc,
9333            selection,
9334            graphql_client,
9335        }
9336    }
9337}
9338impl FunctionArg {
9339    /// Only applies to arguments of type Container. If the argument is not set, load it from the given address (e.g. alpine:latest)
9340    pub async fn default_address(&self) -> Result<String, DaggerError> {
9341        let query = self.selection.select("defaultAddress");
9342        query.execute(self.graphql_client.clone()).await
9343    }
9344    /// Only applies to arguments of type File or Directory. If the argument is not set, load it from the given path in the context directory
9345    pub async fn default_path(&self) -> Result<String, DaggerError> {
9346        let query = self.selection.select("defaultPath");
9347        query.execute(self.graphql_client.clone()).await
9348    }
9349    /// A default value to use for this argument when not explicitly set by the caller, if any.
9350    pub async fn default_value(&self) -> Result<Json, DaggerError> {
9351        let query = self.selection.select("defaultValue");
9352        query.execute(self.graphql_client.clone()).await
9353    }
9354    /// The reason this function is deprecated, if any.
9355    pub async fn deprecated(&self) -> Result<String, DaggerError> {
9356        let query = self.selection.select("deprecated");
9357        query.execute(self.graphql_client.clone()).await
9358    }
9359    /// A doc string for the argument, if any.
9360    pub async fn description(&self) -> Result<String, DaggerError> {
9361        let query = self.selection.select("description");
9362        query.execute(self.graphql_client.clone()).await
9363    }
9364    /// A unique identifier for this FunctionArg.
9365    pub async fn id(&self) -> Result<Id, DaggerError> {
9366        let query = self.selection.select("id");
9367        query.execute(self.graphql_client.clone()).await
9368    }
9369    /// Only applies to arguments of type Directory. The ignore patterns are applied to the input directory, and matching entries are filtered out, in a cache-efficient manner.
9370    pub async fn ignore(&self) -> Result<Vec<String>, DaggerError> {
9371        let query = self.selection.select("ignore");
9372        query.execute(self.graphql_client.clone()).await
9373    }
9374    /// The name of the argument in lowerCamelCase format.
9375    pub async fn name(&self) -> Result<String, DaggerError> {
9376        let query = self.selection.select("name");
9377        query.execute(self.graphql_client.clone()).await
9378    }
9379    /// The location of this arg declaration.
9380    pub fn source_map(&self) -> SourceMap {
9381        let query = self.selection.select("sourceMap");
9382        SourceMap {
9383            proc: self.proc.clone(),
9384            selection: query,
9385            graphql_client: self.graphql_client.clone(),
9386        }
9387    }
9388    /// The type of the argument.
9389    pub fn type_def(&self) -> TypeDef {
9390        let query = self.selection.select("typeDef");
9391        TypeDef {
9392            proc: self.proc.clone(),
9393            selection: query,
9394            graphql_client: self.graphql_client.clone(),
9395        }
9396    }
9397}
9398impl Node for FunctionArg {
9399    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
9400        let query = self.selection.select("id");
9401        let graphql_client = self.graphql_client.clone();
9402        async move { query.execute(graphql_client).await }
9403    }
9404}
9405#[derive(Clone)]
9406pub struct FunctionCall {
9407    pub proc: Option<Arc<DaggerSessionProc>>,
9408    pub selection: Selection,
9409    pub graphql_client: DynGraphQLClient,
9410}
9411impl IntoID<Id> for FunctionCall {
9412    fn into_id(
9413        self,
9414    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
9415        Box::pin(async move { self.id().await })
9416    }
9417}
9418impl Loadable for FunctionCall {
9419    fn graphql_type() -> &'static str {
9420        "FunctionCall"
9421    }
9422    fn from_query(
9423        proc: Option<Arc<DaggerSessionProc>>,
9424        selection: Selection,
9425        graphql_client: DynGraphQLClient,
9426    ) -> Self {
9427        Self {
9428            proc,
9429            selection,
9430            graphql_client,
9431        }
9432    }
9433}
9434impl FunctionCall {
9435    /// A unique identifier for this FunctionCall.
9436    pub async fn id(&self) -> Result<Id, DaggerError> {
9437        let query = self.selection.select("id");
9438        query.execute(self.graphql_client.clone()).await
9439    }
9440    /// The argument values the function is being invoked with.
9441    pub async fn input_args(&self) -> Result<Vec<FunctionCallArgValue>, DaggerError> {
9442        let query = self.selection.select("inputArgs");
9443        let query = query.select("id");
9444        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
9445        Ok(ids
9446            .into_iter()
9447            .map(|id| FunctionCallArgValue {
9448                proc: self.proc.clone(),
9449                selection: crate::querybuilder::query()
9450                    .select("node")
9451                    .arg("id", &id.0)
9452                    .inline_fragment("FunctionCallArgValue"),
9453                graphql_client: self.graphql_client.clone(),
9454            })
9455            .collect())
9456    }
9457    /// The name of the function being called.
9458    pub async fn name(&self) -> Result<String, DaggerError> {
9459        let query = self.selection.select("name");
9460        query.execute(self.graphql_client.clone()).await
9461    }
9462    /// The value of the parent object of the function being called. If the function is top-level to the module, this is always an empty object.
9463    pub async fn parent(&self) -> Result<Json, DaggerError> {
9464        let query = self.selection.select("parent");
9465        query.execute(self.graphql_client.clone()).await
9466    }
9467    /// The name of the parent object of the function being called. If the function is top-level to the module, this is the name of the module.
9468    pub async fn parent_name(&self) -> Result<String, DaggerError> {
9469        let query = self.selection.select("parentName");
9470        query.execute(self.graphql_client.clone()).await
9471    }
9472    /// Return an error from the function.
9473    ///
9474    /// # Arguments
9475    ///
9476    /// * `error` - The error to return.
9477    pub async fn return_error(&self, error: impl IntoID<Id>) -> Result<Void, DaggerError> {
9478        let mut query = self.selection.select("returnError");
9479        query = query.arg_lazy(
9480            "error",
9481            Box::new(move || {
9482                let error = error.clone();
9483                Box::pin(async move { error.into_id().await.unwrap().quote() })
9484            }),
9485        );
9486        query.execute(self.graphql_client.clone()).await
9487    }
9488    /// Set the return value of the function call to the provided value.
9489    ///
9490    /// # Arguments
9491    ///
9492    /// * `value` - JSON serialization of the return value.
9493    pub async fn return_value(&self, value: Json) -> Result<Void, DaggerError> {
9494        let mut query = self.selection.select("returnValue");
9495        query = query.arg("value", value);
9496        query.execute(self.graphql_client.clone()).await
9497    }
9498}
9499impl Node for FunctionCall {
9500    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
9501        let query = self.selection.select("id");
9502        let graphql_client = self.graphql_client.clone();
9503        async move { query.execute(graphql_client).await }
9504    }
9505}
9506#[derive(Clone)]
9507pub struct FunctionCallArgValue {
9508    pub proc: Option<Arc<DaggerSessionProc>>,
9509    pub selection: Selection,
9510    pub graphql_client: DynGraphQLClient,
9511}
9512impl IntoID<Id> for FunctionCallArgValue {
9513    fn into_id(
9514        self,
9515    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
9516        Box::pin(async move { self.id().await })
9517    }
9518}
9519impl Loadable for FunctionCallArgValue {
9520    fn graphql_type() -> &'static str {
9521        "FunctionCallArgValue"
9522    }
9523    fn from_query(
9524        proc: Option<Arc<DaggerSessionProc>>,
9525        selection: Selection,
9526        graphql_client: DynGraphQLClient,
9527    ) -> Self {
9528        Self {
9529            proc,
9530            selection,
9531            graphql_client,
9532        }
9533    }
9534}
9535impl FunctionCallArgValue {
9536    /// A unique identifier for this FunctionCallArgValue.
9537    pub async fn id(&self) -> Result<Id, DaggerError> {
9538        let query = self.selection.select("id");
9539        query.execute(self.graphql_client.clone()).await
9540    }
9541    /// The name of the argument.
9542    pub async fn name(&self) -> Result<String, DaggerError> {
9543        let query = self.selection.select("name");
9544        query.execute(self.graphql_client.clone()).await
9545    }
9546    /// The value of the argument represented as a JSON serialized string.
9547    pub async fn value(&self) -> Result<Json, DaggerError> {
9548        let query = self.selection.select("value");
9549        query.execute(self.graphql_client.clone()).await
9550    }
9551}
9552impl Node for FunctionCallArgValue {
9553    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
9554        let query = self.selection.select("id");
9555        let graphql_client = self.graphql_client.clone();
9556        async move { query.execute(graphql_client).await }
9557    }
9558}
9559#[derive(Clone)]
9560pub struct GeneratedCode {
9561    pub proc: Option<Arc<DaggerSessionProc>>,
9562    pub selection: Selection,
9563    pub graphql_client: DynGraphQLClient,
9564}
9565impl IntoID<Id> for GeneratedCode {
9566    fn into_id(
9567        self,
9568    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
9569        Box::pin(async move { self.id().await })
9570    }
9571}
9572impl Loadable for GeneratedCode {
9573    fn graphql_type() -> &'static str {
9574        "GeneratedCode"
9575    }
9576    fn from_query(
9577        proc: Option<Arc<DaggerSessionProc>>,
9578        selection: Selection,
9579        graphql_client: DynGraphQLClient,
9580    ) -> Self {
9581        Self {
9582            proc,
9583            selection,
9584            graphql_client,
9585        }
9586    }
9587}
9588impl GeneratedCode {
9589    /// The directory containing the generated code.
9590    pub fn code(&self) -> Directory {
9591        let query = self.selection.select("code");
9592        Directory {
9593            proc: self.proc.clone(),
9594            selection: query,
9595            graphql_client: self.graphql_client.clone(),
9596        }
9597    }
9598    /// A unique identifier for this GeneratedCode.
9599    pub async fn id(&self) -> Result<Id, DaggerError> {
9600        let query = self.selection.select("id");
9601        query.execute(self.graphql_client.clone()).await
9602    }
9603    /// List of paths to mark generated in version control (i.e. .gitattributes).
9604    pub async fn vcs_generated_paths(&self) -> Result<Vec<String>, DaggerError> {
9605        let query = self.selection.select("vcsGeneratedPaths");
9606        query.execute(self.graphql_client.clone()).await
9607    }
9608    /// List of paths to ignore in version control (i.e. .gitignore).
9609    pub async fn vcs_ignored_paths(&self) -> Result<Vec<String>, DaggerError> {
9610        let query = self.selection.select("vcsIgnoredPaths");
9611        query.execute(self.graphql_client.clone()).await
9612    }
9613    /// Set the list of paths to mark generated in version control.
9614    pub fn with_vcs_generated_paths(&self, paths: Vec<impl Into<String>>) -> GeneratedCode {
9615        let mut query = self.selection.select("withVCSGeneratedPaths");
9616        query = query.arg(
9617            "paths",
9618            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
9619        );
9620        GeneratedCode {
9621            proc: self.proc.clone(),
9622            selection: query,
9623            graphql_client: self.graphql_client.clone(),
9624        }
9625    }
9626    /// Set the list of paths to ignore in version control.
9627    pub fn with_vcs_ignored_paths(&self, paths: Vec<impl Into<String>>) -> GeneratedCode {
9628        let mut query = self.selection.select("withVCSIgnoredPaths");
9629        query = query.arg(
9630            "paths",
9631            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
9632        );
9633        GeneratedCode {
9634            proc: self.proc.clone(),
9635            selection: query,
9636            graphql_client: self.graphql_client.clone(),
9637        }
9638    }
9639}
9640impl Node for GeneratedCode {
9641    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
9642        let query = self.selection.select("id");
9643        let graphql_client = self.graphql_client.clone();
9644        async move { query.execute(graphql_client).await }
9645    }
9646}
9647#[derive(Clone)]
9648pub struct Generator {
9649    pub proc: Option<Arc<DaggerSessionProc>>,
9650    pub selection: Selection,
9651    pub graphql_client: DynGraphQLClient,
9652}
9653impl IntoID<Id> for Generator {
9654    fn into_id(
9655        self,
9656    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
9657        Box::pin(async move { self.id().await })
9658    }
9659}
9660impl Loadable for Generator {
9661    fn graphql_type() -> &'static str {
9662        "Generator"
9663    }
9664    fn from_query(
9665        proc: Option<Arc<DaggerSessionProc>>,
9666        selection: Selection,
9667        graphql_client: DynGraphQLClient,
9668    ) -> Self {
9669        Self {
9670            proc,
9671            selection,
9672            graphql_client,
9673        }
9674    }
9675}
9676impl Generator {
9677    /// The generated changeset from the last run
9678    pub fn changes(&self) -> Changeset {
9679        let query = self.selection.select("changes");
9680        Changeset {
9681            proc: self.proc.clone(),
9682            selection: query,
9683            graphql_client: self.graphql_client.clone(),
9684        }
9685    }
9686    /// Whether the generator complete
9687    pub async fn completed(&self) -> Result<bool, DaggerError> {
9688        let query = self.selection.select("completed");
9689        query.execute(self.graphql_client.clone()).await
9690    }
9691    /// Return the description of the generator
9692    pub async fn description(&self) -> Result<String, DaggerError> {
9693        let query = self.selection.select("description");
9694        query.execute(self.graphql_client.clone()).await
9695    }
9696    /// A unique identifier for this Generator.
9697    pub async fn id(&self) -> Result<Id, DaggerError> {
9698        let query = self.selection.select("id");
9699        query.execute(self.graphql_client.clone()).await
9700    }
9701    /// Whether changeset from the last generator run is empty or not
9702    pub async fn is_empty(&self) -> Result<bool, DaggerError> {
9703        let query = self.selection.select("isEmpty");
9704        query.execute(self.graphql_client.clone()).await
9705    }
9706    /// Return the fully qualified name of the generator
9707    pub async fn name(&self) -> Result<String, DaggerError> {
9708        let query = self.selection.select("name");
9709        query.execute(self.graphql_client.clone()).await
9710    }
9711    /// The original module in which the generator has been defined
9712    pub fn original_module(&self) -> Module {
9713        let query = self.selection.select("originalModule");
9714        Module {
9715            proc: self.proc.clone(),
9716            selection: query,
9717            graphql_client: self.graphql_client.clone(),
9718        }
9719    }
9720    /// The path of the generator within its module
9721    pub async fn path(&self) -> Result<Vec<String>, DaggerError> {
9722        let query = self.selection.select("path");
9723        query.execute(self.graphql_client.clone()).await
9724    }
9725    /// Execute the generator
9726    pub fn run(&self) -> Generator {
9727        let query = self.selection.select("run");
9728        Generator {
9729            proc: self.proc.clone(),
9730            selection: query,
9731            graphql_client: self.graphql_client.clone(),
9732        }
9733    }
9734}
9735impl Node for Generator {
9736    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
9737        let query = self.selection.select("id");
9738        let graphql_client = self.graphql_client.clone();
9739        async move { query.execute(graphql_client).await }
9740    }
9741}
9742#[derive(Clone)]
9743pub struct GeneratorGroup {
9744    pub proc: Option<Arc<DaggerSessionProc>>,
9745    pub selection: Selection,
9746    pub graphql_client: DynGraphQLClient,
9747}
9748#[derive(Builder, Debug, PartialEq)]
9749pub struct GeneratorGroupChangesOpts {
9750    /// Strategy to apply on conflicts between generators
9751    #[builder(setter(into, strip_option), default)]
9752    pub on_conflict: Option<ChangesetsMergeConflict>,
9753}
9754impl IntoID<Id> for GeneratorGroup {
9755    fn into_id(
9756        self,
9757    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
9758        Box::pin(async move { self.id().await })
9759    }
9760}
9761impl Loadable for GeneratorGroup {
9762    fn graphql_type() -> &'static str {
9763        "GeneratorGroup"
9764    }
9765    fn from_query(
9766        proc: Option<Arc<DaggerSessionProc>>,
9767        selection: Selection,
9768        graphql_client: DynGraphQLClient,
9769    ) -> Self {
9770        Self {
9771            proc,
9772            selection,
9773            graphql_client,
9774        }
9775    }
9776}
9777impl GeneratorGroup {
9778    /// The combined changes from the last run of the generators
9779    /// If any conflict occurs, for instance if the same file is modified by multiple generators, or if a file is both modified and deleted, an error is raised and the merge of the changesets will failed.
9780    /// Set 'continueOnConflicts' flag to force to merge the changes in a 'last write wins' strategy.
9781    ///
9782    /// # Arguments
9783    ///
9784    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9785    pub fn changes(&self) -> Changeset {
9786        let query = self.selection.select("changes");
9787        Changeset {
9788            proc: self.proc.clone(),
9789            selection: query,
9790            graphql_client: self.graphql_client.clone(),
9791        }
9792    }
9793    /// The combined changes from the last run of the generators
9794    /// If any conflict occurs, for instance if the same file is modified by multiple generators, or if a file is both modified and deleted, an error is raised and the merge of the changesets will failed.
9795    /// Set 'continueOnConflicts' flag to force to merge the changes in a 'last write wins' strategy.
9796    ///
9797    /// # Arguments
9798    ///
9799    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9800    pub fn changes_opts(&self, opts: GeneratorGroupChangesOpts) -> Changeset {
9801        let mut query = self.selection.select("changes");
9802        if let Some(on_conflict) = opts.on_conflict {
9803            query = query.arg("onConflict", on_conflict);
9804        }
9805        Changeset {
9806            proc: self.proc.clone(),
9807            selection: query,
9808            graphql_client: self.graphql_client.clone(),
9809        }
9810    }
9811    /// A unique identifier for this GeneratorGroup.
9812    pub async fn id(&self) -> Result<Id, DaggerError> {
9813        let query = self.selection.select("id");
9814        query.execute(self.graphql_client.clone()).await
9815    }
9816    /// Whether the generated changeset from the last run is empty or not
9817    pub async fn is_empty(&self) -> Result<bool, DaggerError> {
9818        let query = self.selection.select("isEmpty");
9819        query.execute(self.graphql_client.clone()).await
9820    }
9821    /// Return a list of individual generators and their details
9822    pub async fn list(&self) -> Result<Vec<Generator>, DaggerError> {
9823        let query = self.selection.select("list");
9824        let query = query.select("id");
9825        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
9826        Ok(ids
9827            .into_iter()
9828            .map(|id| Generator {
9829                proc: self.proc.clone(),
9830                selection: crate::querybuilder::query()
9831                    .select("node")
9832                    .arg("id", &id.0)
9833                    .inline_fragment("Generator"),
9834                graphql_client: self.graphql_client.clone(),
9835            })
9836            .collect())
9837    }
9838    /// Execute all selected generators
9839    pub fn run(&self) -> GeneratorGroup {
9840        let query = self.selection.select("run");
9841        GeneratorGroup {
9842            proc: self.proc.clone(),
9843            selection: query,
9844            graphql_client: self.graphql_client.clone(),
9845        }
9846    }
9847}
9848impl Node for GeneratorGroup {
9849    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
9850        let query = self.selection.select("id");
9851        let graphql_client = self.graphql_client.clone();
9852        async move { query.execute(graphql_client).await }
9853    }
9854}
9855#[derive(Clone)]
9856pub struct GitRef {
9857    pub proc: Option<Arc<DaggerSessionProc>>,
9858    pub selection: Selection,
9859    pub graphql_client: DynGraphQLClient,
9860}
9861#[derive(Builder, Debug, PartialEq)]
9862pub struct GitRefTreeOpts {
9863    /// The depth of the tree to fetch.
9864    #[builder(setter(into, strip_option), default)]
9865    pub depth: Option<isize>,
9866    /// Set to true to discard .git directory.
9867    #[builder(setter(into, strip_option), default)]
9868    pub discard_git_dir: Option<bool>,
9869    /// Set to true to populate tag refs in the local checkout .git.
9870    #[builder(setter(into, strip_option), default)]
9871    pub include_tags: Option<bool>,
9872}
9873impl IntoID<Id> for GitRef {
9874    fn into_id(
9875        self,
9876    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
9877        Box::pin(async move { self.id().await })
9878    }
9879}
9880impl Loadable for GitRef {
9881    fn graphql_type() -> &'static str {
9882        "GitRef"
9883    }
9884    fn from_query(
9885        proc: Option<Arc<DaggerSessionProc>>,
9886        selection: Selection,
9887        graphql_client: DynGraphQLClient,
9888    ) -> Self {
9889        Self {
9890            proc,
9891            selection,
9892            graphql_client,
9893        }
9894    }
9895}
9896impl GitRef {
9897    /// The resolved commit id at this ref.
9898    pub async fn commit(&self) -> Result<String, DaggerError> {
9899        let query = self.selection.select("commit");
9900        query.execute(self.graphql_client.clone()).await
9901    }
9902    /// Find the best common ancestor between this ref and another ref.
9903    ///
9904    /// # Arguments
9905    ///
9906    /// * `other` - The other ref to compare against.
9907    pub fn common_ancestor(&self, other: impl IntoID<Id>) -> GitRef {
9908        let mut query = self.selection.select("commonAncestor");
9909        query = query.arg_lazy(
9910            "other",
9911            Box::new(move || {
9912                let other = other.clone();
9913                Box::pin(async move { other.into_id().await.unwrap().quote() })
9914            }),
9915        );
9916        GitRef {
9917            proc: self.proc.clone(),
9918            selection: query,
9919            graphql_client: self.graphql_client.clone(),
9920        }
9921    }
9922    /// A unique identifier for this GitRef.
9923    pub async fn id(&self) -> Result<Id, DaggerError> {
9924        let query = self.selection.select("id");
9925        query.execute(self.graphql_client.clone()).await
9926    }
9927    /// The resolved ref name at this ref.
9928    pub async fn r#ref(&self) -> Result<String, DaggerError> {
9929        let query = self.selection.select("ref");
9930        query.execute(self.graphql_client.clone()).await
9931    }
9932    /// The filesystem tree at this ref.
9933    ///
9934    /// # Arguments
9935    ///
9936    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9937    pub fn tree(&self) -> Directory {
9938        let query = self.selection.select("tree");
9939        Directory {
9940            proc: self.proc.clone(),
9941            selection: query,
9942            graphql_client: self.graphql_client.clone(),
9943        }
9944    }
9945    /// The filesystem tree at this ref.
9946    ///
9947    /// # Arguments
9948    ///
9949    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9950    pub fn tree_opts(&self, opts: GitRefTreeOpts) -> Directory {
9951        let mut query = self.selection.select("tree");
9952        if let Some(discard_git_dir) = opts.discard_git_dir {
9953            query = query.arg("discardGitDir", discard_git_dir);
9954        }
9955        if let Some(depth) = opts.depth {
9956            query = query.arg("depth", depth);
9957        }
9958        if let Some(include_tags) = opts.include_tags {
9959            query = query.arg("includeTags", include_tags);
9960        }
9961        Directory {
9962            proc: self.proc.clone(),
9963            selection: query,
9964            graphql_client: self.graphql_client.clone(),
9965        }
9966    }
9967}
9968impl Node for GitRef {
9969    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
9970        let query = self.selection.select("id");
9971        let graphql_client = self.graphql_client.clone();
9972        async move { query.execute(graphql_client).await }
9973    }
9974}
9975#[derive(Clone)]
9976pub struct GitRepository {
9977    pub proc: Option<Arc<DaggerSessionProc>>,
9978    pub selection: Selection,
9979    pub graphql_client: DynGraphQLClient,
9980}
9981#[derive(Builder, Debug, PartialEq)]
9982pub struct GitRepositoryBranchesOpts<'a> {
9983    /// Glob patterns (e.g., "refs/tags/v*").
9984    #[builder(setter(into, strip_option), default)]
9985    pub patterns: Option<Vec<&'a str>>,
9986}
9987#[derive(Builder, Debug, PartialEq)]
9988pub struct GitRepositoryTagsOpts<'a> {
9989    /// Glob patterns (e.g., "refs/tags/v*").
9990    #[builder(setter(into, strip_option), default)]
9991    pub patterns: Option<Vec<&'a str>>,
9992}
9993impl IntoID<Id> for GitRepository {
9994    fn into_id(
9995        self,
9996    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
9997        Box::pin(async move { self.id().await })
9998    }
9999}
10000impl Loadable for GitRepository {
10001    fn graphql_type() -> &'static str {
10002        "GitRepository"
10003    }
10004    fn from_query(
10005        proc: Option<Arc<DaggerSessionProc>>,
10006        selection: Selection,
10007        graphql_client: DynGraphQLClient,
10008    ) -> Self {
10009        Self {
10010            proc,
10011            selection,
10012            graphql_client,
10013        }
10014    }
10015}
10016impl GitRepository {
10017    /// Returns details of a branch.
10018    ///
10019    /// # Arguments
10020    ///
10021    /// * `name` - Branch's name (e.g., "main").
10022    pub fn branch(&self, name: impl Into<String>) -> GitRef {
10023        let mut query = self.selection.select("branch");
10024        query = query.arg("name", name.into());
10025        GitRef {
10026            proc: self.proc.clone(),
10027            selection: query,
10028            graphql_client: self.graphql_client.clone(),
10029        }
10030    }
10031    /// branches that match any of the given glob patterns.
10032    ///
10033    /// # Arguments
10034    ///
10035    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10036    pub async fn branches(&self) -> Result<Vec<String>, DaggerError> {
10037        let query = self.selection.select("branches");
10038        query.execute(self.graphql_client.clone()).await
10039    }
10040    /// branches that match any of the given glob patterns.
10041    ///
10042    /// # Arguments
10043    ///
10044    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10045    pub async fn branches_opts<'a>(
10046        &self,
10047        opts: GitRepositoryBranchesOpts<'a>,
10048    ) -> Result<Vec<String>, DaggerError> {
10049        let mut query = self.selection.select("branches");
10050        if let Some(patterns) = opts.patterns {
10051            query = query.arg("patterns", patterns);
10052        }
10053        query.execute(self.graphql_client.clone()).await
10054    }
10055    /// Returns details of a commit.
10056    ///
10057    /// # Arguments
10058    ///
10059    /// * `id` - Identifier of the commit (e.g., "b6315d8f2810962c601af73f86831f6866ea798b").
10060    pub fn commit(&self, id: impl Into<String>) -> GitRef {
10061        let mut query = self.selection.select("commit");
10062        query = query.arg("id", id.into());
10063        GitRef {
10064            proc: self.proc.clone(),
10065            selection: query,
10066            graphql_client: self.graphql_client.clone(),
10067        }
10068    }
10069    /// Returns details for HEAD.
10070    pub fn head(&self) -> GitRef {
10071        let query = self.selection.select("head");
10072        GitRef {
10073            proc: self.proc.clone(),
10074            selection: query,
10075            graphql_client: self.graphql_client.clone(),
10076        }
10077    }
10078    /// A unique identifier for this GitRepository.
10079    pub async fn id(&self) -> Result<Id, DaggerError> {
10080        let query = self.selection.select("id");
10081        query.execute(self.graphql_client.clone()).await
10082    }
10083    /// Returns details for the latest semver tag.
10084    pub fn latest_version(&self) -> GitRef {
10085        let query = self.selection.select("latestVersion");
10086        GitRef {
10087            proc: self.proc.clone(),
10088            selection: query,
10089            graphql_client: self.graphql_client.clone(),
10090        }
10091    }
10092    /// Returns details of a ref.
10093    ///
10094    /// # Arguments
10095    ///
10096    /// * `name` - Ref's name (can be a commit identifier, a tag name, a branch name, or a fully-qualified ref).
10097    pub fn r#ref(&self, name: impl Into<String>) -> GitRef {
10098        let mut query = self.selection.select("ref");
10099        query = query.arg("name", name.into());
10100        GitRef {
10101            proc: self.proc.clone(),
10102            selection: query,
10103            graphql_client: self.graphql_client.clone(),
10104        }
10105    }
10106    /// Returns details of a tag.
10107    ///
10108    /// # Arguments
10109    ///
10110    /// * `name` - Tag's name (e.g., "v0.3.9").
10111    pub fn tag(&self, name: impl Into<String>) -> GitRef {
10112        let mut query = self.selection.select("tag");
10113        query = query.arg("name", name.into());
10114        GitRef {
10115            proc: self.proc.clone(),
10116            selection: query,
10117            graphql_client: self.graphql_client.clone(),
10118        }
10119    }
10120    /// tags that match any of the given glob patterns.
10121    ///
10122    /// # Arguments
10123    ///
10124    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10125    pub async fn tags(&self) -> Result<Vec<String>, DaggerError> {
10126        let query = self.selection.select("tags");
10127        query.execute(self.graphql_client.clone()).await
10128    }
10129    /// tags that match any of the given glob patterns.
10130    ///
10131    /// # Arguments
10132    ///
10133    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10134    pub async fn tags_opts<'a>(
10135        &self,
10136        opts: GitRepositoryTagsOpts<'a>,
10137    ) -> Result<Vec<String>, DaggerError> {
10138        let mut query = self.selection.select("tags");
10139        if let Some(patterns) = opts.patterns {
10140            query = query.arg("patterns", patterns);
10141        }
10142        query.execute(self.graphql_client.clone()).await
10143    }
10144    /// Returns the changeset of uncommitted changes in the git repository.
10145    pub fn uncommitted(&self) -> Changeset {
10146        let query = self.selection.select("uncommitted");
10147        Changeset {
10148            proc: self.proc.clone(),
10149            selection: query,
10150            graphql_client: self.graphql_client.clone(),
10151        }
10152    }
10153    /// The URL of the git repository.
10154    pub async fn url(&self) -> Result<String, DaggerError> {
10155        let query = self.selection.select("url");
10156        query.execute(self.graphql_client.clone()).await
10157    }
10158}
10159impl Node for GitRepository {
10160    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
10161        let query = self.selection.select("id");
10162        let graphql_client = self.graphql_client.clone();
10163        async move { query.execute(graphql_client).await }
10164    }
10165}
10166#[derive(Clone)]
10167pub struct HttpState {
10168    pub proc: Option<Arc<DaggerSessionProc>>,
10169    pub selection: Selection,
10170    pub graphql_client: DynGraphQLClient,
10171}
10172impl IntoID<Id> for HttpState {
10173    fn into_id(
10174        self,
10175    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
10176        Box::pin(async move { self.id().await })
10177    }
10178}
10179impl Loadable for HttpState {
10180    fn graphql_type() -> &'static str {
10181        "HTTPState"
10182    }
10183    fn from_query(
10184        proc: Option<Arc<DaggerSessionProc>>,
10185        selection: Selection,
10186        graphql_client: DynGraphQLClient,
10187    ) -> Self {
10188        Self {
10189            proc,
10190            selection,
10191            graphql_client,
10192        }
10193    }
10194}
10195impl HttpState {
10196    /// A unique identifier for this HTTPState.
10197    pub async fn id(&self) -> Result<Id, DaggerError> {
10198        let query = self.selection.select("id");
10199        query.execute(self.graphql_client.clone()).await
10200    }
10201}
10202impl Node for HttpState {
10203    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
10204        let query = self.selection.select("id");
10205        let graphql_client = self.graphql_client.clone();
10206        async move { query.execute(graphql_client).await }
10207    }
10208}
10209#[derive(Clone)]
10210pub struct HealthcheckConfig {
10211    pub proc: Option<Arc<DaggerSessionProc>>,
10212    pub selection: Selection,
10213    pub graphql_client: DynGraphQLClient,
10214}
10215impl IntoID<Id> for HealthcheckConfig {
10216    fn into_id(
10217        self,
10218    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
10219        Box::pin(async move { self.id().await })
10220    }
10221}
10222impl Loadable for HealthcheckConfig {
10223    fn graphql_type() -> &'static str {
10224        "HealthcheckConfig"
10225    }
10226    fn from_query(
10227        proc: Option<Arc<DaggerSessionProc>>,
10228        selection: Selection,
10229        graphql_client: DynGraphQLClient,
10230    ) -> Self {
10231        Self {
10232            proc,
10233            selection,
10234            graphql_client,
10235        }
10236    }
10237}
10238impl HealthcheckConfig {
10239    /// Healthcheck command arguments.
10240    pub async fn args(&self) -> Result<Vec<String>, DaggerError> {
10241        let query = self.selection.select("args");
10242        query.execute(self.graphql_client.clone()).await
10243    }
10244    /// A unique identifier for this HealthcheckConfig.
10245    pub async fn id(&self) -> Result<Id, DaggerError> {
10246        let query = self.selection.select("id");
10247        query.execute(self.graphql_client.clone()).await
10248    }
10249    /// Interval between running healthcheck. Example:30s
10250    pub async fn interval(&self) -> Result<String, DaggerError> {
10251        let query = self.selection.select("interval");
10252        query.execute(self.graphql_client.clone()).await
10253    }
10254    /// The maximum number of consecutive failures before the container is marked as unhealthy. Example:3
10255    pub async fn retries(&self) -> Result<isize, DaggerError> {
10256        let query = self.selection.select("retries");
10257        query.execute(self.graphql_client.clone()).await
10258    }
10259    /// Healthcheck command is a shell command.
10260    pub async fn shell(&self) -> Result<bool, DaggerError> {
10261        let query = self.selection.select("shell");
10262        query.execute(self.graphql_client.clone()).await
10263    }
10264    /// StartInterval configures the duration between checks during the startup phase. Example:5s
10265    pub async fn start_interval(&self) -> Result<String, DaggerError> {
10266        let query = self.selection.select("startInterval");
10267        query.execute(self.graphql_client.clone()).await
10268    }
10269    /// StartPeriod allows for failures during this initial startup period which do not count towards maximum number of retries. Example:0s
10270    pub async fn start_period(&self) -> Result<String, DaggerError> {
10271        let query = self.selection.select("startPeriod");
10272        query.execute(self.graphql_client.clone()).await
10273    }
10274    /// Healthcheck timeout. Example:3s
10275    pub async fn timeout(&self) -> Result<String, DaggerError> {
10276        let query = self.selection.select("timeout");
10277        query.execute(self.graphql_client.clone()).await
10278    }
10279}
10280impl Node for HealthcheckConfig {
10281    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
10282        let query = self.selection.select("id");
10283        let graphql_client = self.graphql_client.clone();
10284        async move { query.execute(graphql_client).await }
10285    }
10286}
10287#[derive(Clone)]
10288pub struct Host {
10289    pub proc: Option<Arc<DaggerSessionProc>>,
10290    pub selection: Selection,
10291    pub graphql_client: DynGraphQLClient,
10292}
10293#[derive(Builder, Debug, PartialEq)]
10294pub struct HostDirectoryOpts<'a> {
10295    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
10296    #[builder(setter(into, strip_option), default)]
10297    pub exclude: Option<Vec<&'a str>>,
10298    /// Apply .gitignore filter rules inside the directory
10299    #[builder(setter(into, strip_option), default)]
10300    pub gitignore: Option<bool>,
10301    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
10302    #[builder(setter(into, strip_option), default)]
10303    pub include: Option<Vec<&'a str>>,
10304    /// If true, the directory will always be reloaded from the host.
10305    #[builder(setter(into, strip_option), default)]
10306    pub no_cache: Option<bool>,
10307}
10308#[derive(Builder, Debug, PartialEq)]
10309pub struct HostFileOpts {
10310    /// If true, the file will always be reloaded from the host.
10311    #[builder(setter(into, strip_option), default)]
10312    pub no_cache: Option<bool>,
10313}
10314#[derive(Builder, Debug, PartialEq)]
10315pub struct HostFindUpOpts {
10316    #[builder(setter(into, strip_option), default)]
10317    pub no_cache: Option<bool>,
10318}
10319#[derive(Builder, Debug, PartialEq)]
10320pub struct HostServiceOpts<'a> {
10321    /// Upstream host to forward traffic to.
10322    #[builder(setter(into, strip_option), default)]
10323    pub host: Option<&'a str>,
10324}
10325#[derive(Builder, Debug, PartialEq)]
10326pub struct HostTunnelOpts {
10327    /// Map each service port to the same port on the host, as if the service were running natively.
10328    /// Note: enabling may result in port conflicts.
10329    #[builder(setter(into, strip_option), default)]
10330    pub native: Option<bool>,
10331    /// Configure explicit port forwarding rules for the tunnel.
10332    /// If a port's frontend is unspecified or 0, a random port will be chosen by the host.
10333    /// If no ports are given, all of the service's ports are forwarded. If native is true, each port maps to the same port on the host. If native is false, each port maps to a random port chosen by the host.
10334    /// If ports are given and native is true, the ports are additive.
10335    #[builder(setter(into, strip_option), default)]
10336    pub ports: Option<Vec<PortForward>>,
10337}
10338impl IntoID<Id> for Host {
10339    fn into_id(
10340        self,
10341    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
10342        Box::pin(async move { self.id().await })
10343    }
10344}
10345impl Loadable for Host {
10346    fn graphql_type() -> &'static str {
10347        "Host"
10348    }
10349    fn from_query(
10350        proc: Option<Arc<DaggerSessionProc>>,
10351        selection: Selection,
10352        graphql_client: DynGraphQLClient,
10353    ) -> Self {
10354        Self {
10355            proc,
10356            selection,
10357            graphql_client,
10358        }
10359    }
10360}
10361impl Host {
10362    /// Accesses a container image on the host.
10363    ///
10364    /// # Arguments
10365    ///
10366    /// * `name` - Name of the image to access.
10367    pub fn container_image(&self, name: impl Into<String>) -> Container {
10368        let mut query = self.selection.select("containerImage");
10369        query = query.arg("name", name.into());
10370        Container {
10371            proc: self.proc.clone(),
10372            selection: query,
10373            graphql_client: self.graphql_client.clone(),
10374        }
10375    }
10376    /// Accesses a directory on the host.
10377    ///
10378    /// # Arguments
10379    ///
10380    /// * `path` - Location of the directory to access (e.g., ".").
10381    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10382    pub fn directory(&self, path: impl Into<String>) -> Directory {
10383        let mut query = self.selection.select("directory");
10384        query = query.arg("path", path.into());
10385        Directory {
10386            proc: self.proc.clone(),
10387            selection: query,
10388            graphql_client: self.graphql_client.clone(),
10389        }
10390    }
10391    /// Accesses a directory on the host.
10392    ///
10393    /// # Arguments
10394    ///
10395    /// * `path` - Location of the directory to access (e.g., ".").
10396    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10397    pub fn directory_opts<'a>(
10398        &self,
10399        path: impl Into<String>,
10400        opts: HostDirectoryOpts<'a>,
10401    ) -> Directory {
10402        let mut query = self.selection.select("directory");
10403        query = query.arg("path", path.into());
10404        if let Some(exclude) = opts.exclude {
10405            query = query.arg("exclude", exclude);
10406        }
10407        if let Some(include) = opts.include {
10408            query = query.arg("include", include);
10409        }
10410        if let Some(no_cache) = opts.no_cache {
10411            query = query.arg("noCache", no_cache);
10412        }
10413        if let Some(gitignore) = opts.gitignore {
10414            query = query.arg("gitignore", gitignore);
10415        }
10416        Directory {
10417            proc: self.proc.clone(),
10418            selection: query,
10419            graphql_client: self.graphql_client.clone(),
10420        }
10421    }
10422    /// Accesses a file on the host.
10423    ///
10424    /// # Arguments
10425    ///
10426    /// * `path` - Location of the file to retrieve (e.g., "README.md").
10427    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10428    pub fn file(&self, path: impl Into<String>) -> File {
10429        let mut query = self.selection.select("file");
10430        query = query.arg("path", path.into());
10431        File {
10432            proc: self.proc.clone(),
10433            selection: query,
10434            graphql_client: self.graphql_client.clone(),
10435        }
10436    }
10437    /// Accesses a file on the host.
10438    ///
10439    /// # Arguments
10440    ///
10441    /// * `path` - Location of the file to retrieve (e.g., "README.md").
10442    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10443    pub fn file_opts(&self, path: impl Into<String>, opts: HostFileOpts) -> File {
10444        let mut query = self.selection.select("file");
10445        query = query.arg("path", path.into());
10446        if let Some(no_cache) = opts.no_cache {
10447            query = query.arg("noCache", no_cache);
10448        }
10449        File {
10450            proc: self.proc.clone(),
10451            selection: query,
10452            graphql_client: self.graphql_client.clone(),
10453        }
10454    }
10455    /// Search for a file or directory by walking up the tree from system workdir. Return its relative path. If no match, return null
10456    ///
10457    /// # Arguments
10458    ///
10459    /// * `name` - name of the file or directory to search for
10460    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10461    pub async fn find_up(&self, name: impl Into<String>) -> Result<String, DaggerError> {
10462        let mut query = self.selection.select("findUp");
10463        query = query.arg("name", name.into());
10464        query.execute(self.graphql_client.clone()).await
10465    }
10466    /// Search for a file or directory by walking up the tree from system workdir. Return its relative path. If no match, return null
10467    ///
10468    /// # Arguments
10469    ///
10470    /// * `name` - name of the file or directory to search for
10471    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10472    pub async fn find_up_opts(
10473        &self,
10474        name: impl Into<String>,
10475        opts: HostFindUpOpts,
10476    ) -> Result<String, DaggerError> {
10477        let mut query = self.selection.select("findUp");
10478        query = query.arg("name", name.into());
10479        if let Some(no_cache) = opts.no_cache {
10480            query = query.arg("noCache", no_cache);
10481        }
10482        query.execute(self.graphql_client.clone()).await
10483    }
10484    /// A unique identifier for this Host.
10485    pub async fn id(&self) -> Result<Id, DaggerError> {
10486        let query = self.selection.select("id");
10487        query.execute(self.graphql_client.clone()).await
10488    }
10489    /// Creates a service that forwards traffic to a specified address via the host.
10490    ///
10491    /// # Arguments
10492    ///
10493    /// * `ports` - Ports to expose via the service, forwarding through the host network.
10494    ///
10495    /// If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
10496    ///
10497    /// An empty set of ports is not valid; an error will be returned.
10498    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10499    pub fn service(&self, ports: Vec<PortForward>) -> Service {
10500        let mut query = self.selection.select("service");
10501        query = query.arg("ports", ports);
10502        Service {
10503            proc: self.proc.clone(),
10504            selection: query,
10505            graphql_client: self.graphql_client.clone(),
10506        }
10507    }
10508    /// Creates a service that forwards traffic to a specified address via the host.
10509    ///
10510    /// # Arguments
10511    ///
10512    /// * `ports` - Ports to expose via the service, forwarding through the host network.
10513    ///
10514    /// If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
10515    ///
10516    /// An empty set of ports is not valid; an error will be returned.
10517    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10518    pub fn service_opts<'a>(&self, ports: Vec<PortForward>, opts: HostServiceOpts<'a>) -> Service {
10519        let mut query = self.selection.select("service");
10520        query = query.arg("ports", ports);
10521        if let Some(host) = opts.host {
10522            query = query.arg("host", host);
10523        }
10524        Service {
10525            proc: self.proc.clone(),
10526            selection: query,
10527            graphql_client: self.graphql_client.clone(),
10528        }
10529    }
10530    /// Creates a tunnel that forwards traffic from the host to a service.
10531    ///
10532    /// # Arguments
10533    ///
10534    /// * `service` - Service to send traffic from the tunnel.
10535    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10536    pub fn tunnel(&self, service: impl IntoID<Id>) -> Service {
10537        let mut query = self.selection.select("tunnel");
10538        query = query.arg_lazy(
10539            "service",
10540            Box::new(move || {
10541                let service = service.clone();
10542                Box::pin(async move { service.into_id().await.unwrap().quote() })
10543            }),
10544        );
10545        Service {
10546            proc: self.proc.clone(),
10547            selection: query,
10548            graphql_client: self.graphql_client.clone(),
10549        }
10550    }
10551    /// Creates a tunnel that forwards traffic from the host to a service.
10552    ///
10553    /// # Arguments
10554    ///
10555    /// * `service` - Service to send traffic from the tunnel.
10556    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10557    pub fn tunnel_opts(&self, service: impl IntoID<Id>, opts: HostTunnelOpts) -> Service {
10558        let mut query = self.selection.select("tunnel");
10559        query = query.arg_lazy(
10560            "service",
10561            Box::new(move || {
10562                let service = service.clone();
10563                Box::pin(async move { service.into_id().await.unwrap().quote() })
10564            }),
10565        );
10566        if let Some(native) = opts.native {
10567            query = query.arg("native", native);
10568        }
10569        if let Some(ports) = opts.ports {
10570            query = query.arg("ports", ports);
10571        }
10572        Service {
10573            proc: self.proc.clone(),
10574            selection: query,
10575            graphql_client: self.graphql_client.clone(),
10576        }
10577    }
10578    /// Accesses a Unix socket on the host.
10579    ///
10580    /// # Arguments
10581    ///
10582    /// * `path` - Location of the Unix socket (e.g., "/var/run/docker.sock").
10583    pub fn unix_socket(&self, path: impl Into<String>) -> Socket {
10584        let mut query = self.selection.select("unixSocket");
10585        query = query.arg("path", path.into());
10586        Socket {
10587            proc: self.proc.clone(),
10588            selection: query,
10589            graphql_client: self.graphql_client.clone(),
10590        }
10591    }
10592}
10593impl Node for Host {
10594    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
10595        let query = self.selection.select("id");
10596        let graphql_client = self.graphql_client.clone();
10597        async move { query.execute(graphql_client).await }
10598    }
10599}
10600#[derive(Clone)]
10601pub struct InputTypeDef {
10602    pub proc: Option<Arc<DaggerSessionProc>>,
10603    pub selection: Selection,
10604    pub graphql_client: DynGraphQLClient,
10605}
10606impl IntoID<Id> for InputTypeDef {
10607    fn into_id(
10608        self,
10609    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
10610        Box::pin(async move { self.id().await })
10611    }
10612}
10613impl Loadable for InputTypeDef {
10614    fn graphql_type() -> &'static str {
10615        "InputTypeDef"
10616    }
10617    fn from_query(
10618        proc: Option<Arc<DaggerSessionProc>>,
10619        selection: Selection,
10620        graphql_client: DynGraphQLClient,
10621    ) -> Self {
10622        Self {
10623            proc,
10624            selection,
10625            graphql_client,
10626        }
10627    }
10628}
10629impl InputTypeDef {
10630    /// Static fields defined on this input object, if any.
10631    pub async fn fields(&self) -> Result<Vec<FieldTypeDef>, DaggerError> {
10632        let query = self.selection.select("fields");
10633        let query = query.select("id");
10634        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
10635        Ok(ids
10636            .into_iter()
10637            .map(|id| FieldTypeDef {
10638                proc: self.proc.clone(),
10639                selection: crate::querybuilder::query()
10640                    .select("node")
10641                    .arg("id", &id.0)
10642                    .inline_fragment("FieldTypeDef"),
10643                graphql_client: self.graphql_client.clone(),
10644            })
10645            .collect())
10646    }
10647    /// A unique identifier for this InputTypeDef.
10648    pub async fn id(&self) -> Result<Id, DaggerError> {
10649        let query = self.selection.select("id");
10650        query.execute(self.graphql_client.clone()).await
10651    }
10652    /// The name of the input object.
10653    pub async fn name(&self) -> Result<String, DaggerError> {
10654        let query = self.selection.select("name");
10655        query.execute(self.graphql_client.clone()).await
10656    }
10657}
10658impl Node for InputTypeDef {
10659    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
10660        let query = self.selection.select("id");
10661        let graphql_client = self.graphql_client.clone();
10662        async move { query.execute(graphql_client).await }
10663    }
10664}
10665#[derive(Clone)]
10666pub struct InterfaceTypeDef {
10667    pub proc: Option<Arc<DaggerSessionProc>>,
10668    pub selection: Selection,
10669    pub graphql_client: DynGraphQLClient,
10670}
10671impl IntoID<Id> for InterfaceTypeDef {
10672    fn into_id(
10673        self,
10674    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
10675        Box::pin(async move { self.id().await })
10676    }
10677}
10678impl Loadable for InterfaceTypeDef {
10679    fn graphql_type() -> &'static str {
10680        "InterfaceTypeDef"
10681    }
10682    fn from_query(
10683        proc: Option<Arc<DaggerSessionProc>>,
10684        selection: Selection,
10685        graphql_client: DynGraphQLClient,
10686    ) -> Self {
10687        Self {
10688            proc,
10689            selection,
10690            graphql_client,
10691        }
10692    }
10693}
10694impl InterfaceTypeDef {
10695    /// The doc string for the interface, if any.
10696    pub async fn description(&self) -> Result<String, DaggerError> {
10697        let query = self.selection.select("description");
10698        query.execute(self.graphql_client.clone()).await
10699    }
10700    /// Functions defined on this interface, if any.
10701    pub async fn functions(&self) -> Result<Vec<Function>, DaggerError> {
10702        let query = self.selection.select("functions");
10703        let query = query.select("id");
10704        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
10705        Ok(ids
10706            .into_iter()
10707            .map(|id| Function {
10708                proc: self.proc.clone(),
10709                selection: crate::querybuilder::query()
10710                    .select("node")
10711                    .arg("id", &id.0)
10712                    .inline_fragment("Function"),
10713                graphql_client: self.graphql_client.clone(),
10714            })
10715            .collect())
10716    }
10717    /// A unique identifier for this InterfaceTypeDef.
10718    pub async fn id(&self) -> Result<Id, DaggerError> {
10719        let query = self.selection.select("id");
10720        query.execute(self.graphql_client.clone()).await
10721    }
10722    /// The name of the interface.
10723    pub async fn name(&self) -> Result<String, DaggerError> {
10724        let query = self.selection.select("name");
10725        query.execute(self.graphql_client.clone()).await
10726    }
10727    /// The location of this interface declaration.
10728    pub fn source_map(&self) -> SourceMap {
10729        let query = self.selection.select("sourceMap");
10730        SourceMap {
10731            proc: self.proc.clone(),
10732            selection: query,
10733            graphql_client: self.graphql_client.clone(),
10734        }
10735    }
10736    /// If this InterfaceTypeDef is associated with a Module, the name of the module. Unset otherwise.
10737    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
10738        let query = self.selection.select("sourceModuleName");
10739        query.execute(self.graphql_client.clone()).await
10740    }
10741}
10742impl Node for InterfaceTypeDef {
10743    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
10744        let query = self.selection.select("id");
10745        let graphql_client = self.graphql_client.clone();
10746        async move { query.execute(graphql_client).await }
10747    }
10748}
10749#[derive(Clone)]
10750pub struct JsonValue {
10751    pub proc: Option<Arc<DaggerSessionProc>>,
10752    pub selection: Selection,
10753    pub graphql_client: DynGraphQLClient,
10754}
10755#[derive(Builder, Debug, PartialEq)]
10756pub struct JsonValueContentsOpts<'a> {
10757    /// Optional line prefix
10758    #[builder(setter(into, strip_option), default)]
10759    pub indent: Option<&'a str>,
10760    /// Pretty-print
10761    #[builder(setter(into, strip_option), default)]
10762    pub pretty: Option<bool>,
10763}
10764impl IntoID<Id> for JsonValue {
10765    fn into_id(
10766        self,
10767    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
10768        Box::pin(async move { self.id().await })
10769    }
10770}
10771impl Loadable for JsonValue {
10772    fn graphql_type() -> &'static str {
10773        "JSONValue"
10774    }
10775    fn from_query(
10776        proc: Option<Arc<DaggerSessionProc>>,
10777        selection: Selection,
10778        graphql_client: DynGraphQLClient,
10779    ) -> Self {
10780        Self {
10781            proc,
10782            selection,
10783            graphql_client,
10784        }
10785    }
10786}
10787impl JsonValue {
10788    /// Decode an array from json
10789    pub async fn as_array(&self) -> Result<Vec<JsonValue>, DaggerError> {
10790        let query = self.selection.select("asArray");
10791        let query = query.select("id");
10792        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
10793        Ok(ids
10794            .into_iter()
10795            .map(|id| JsonValue {
10796                proc: self.proc.clone(),
10797                selection: crate::querybuilder::query()
10798                    .select("node")
10799                    .arg("id", &id.0)
10800                    .inline_fragment("JSONValue"),
10801                graphql_client: self.graphql_client.clone(),
10802            })
10803            .collect())
10804    }
10805    /// Decode a boolean from json
10806    pub async fn as_boolean(&self) -> Result<bool, DaggerError> {
10807        let query = self.selection.select("asBoolean");
10808        query.execute(self.graphql_client.clone()).await
10809    }
10810    /// Decode an integer from json
10811    pub async fn as_integer(&self) -> Result<isize, DaggerError> {
10812        let query = self.selection.select("asInteger");
10813        query.execute(self.graphql_client.clone()).await
10814    }
10815    /// Decode a string from json
10816    pub async fn as_string(&self) -> Result<String, DaggerError> {
10817        let query = self.selection.select("asString");
10818        query.execute(self.graphql_client.clone()).await
10819    }
10820    /// Return the value encoded as json
10821    ///
10822    /// # Arguments
10823    ///
10824    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10825    pub async fn contents(&self) -> Result<Json, DaggerError> {
10826        let query = self.selection.select("contents");
10827        query.execute(self.graphql_client.clone()).await
10828    }
10829    /// Return the value encoded as json
10830    ///
10831    /// # Arguments
10832    ///
10833    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10834    pub async fn contents_opts<'a>(
10835        &self,
10836        opts: JsonValueContentsOpts<'a>,
10837    ) -> Result<Json, DaggerError> {
10838        let mut query = self.selection.select("contents");
10839        if let Some(pretty) = opts.pretty {
10840            query = query.arg("pretty", pretty);
10841        }
10842        if let Some(indent) = opts.indent {
10843            query = query.arg("indent", indent);
10844        }
10845        query.execute(self.graphql_client.clone()).await
10846    }
10847    /// Lookup the field at the given path, and return its value.
10848    ///
10849    /// # Arguments
10850    ///
10851    /// * `path` - Path of the field to lookup, encoded as an array of field names
10852    pub fn field(&self, path: Vec<impl Into<String>>) -> JsonValue {
10853        let mut query = self.selection.select("field");
10854        query = query.arg(
10855            "path",
10856            path.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
10857        );
10858        JsonValue {
10859            proc: self.proc.clone(),
10860            selection: query,
10861            graphql_client: self.graphql_client.clone(),
10862        }
10863    }
10864    /// List fields of the encoded object
10865    pub async fn fields(&self) -> Result<Vec<String>, DaggerError> {
10866        let query = self.selection.select("fields");
10867        query.execute(self.graphql_client.clone()).await
10868    }
10869    /// A unique identifier for this JSONValue.
10870    pub async fn id(&self) -> Result<Id, DaggerError> {
10871        let query = self.selection.select("id");
10872        query.execute(self.graphql_client.clone()).await
10873    }
10874    /// Encode a boolean to json
10875    ///
10876    /// # Arguments
10877    ///
10878    /// * `value` - New boolean value
10879    pub fn new_boolean(&self, value: bool) -> JsonValue {
10880        let mut query = self.selection.select("newBoolean");
10881        query = query.arg("value", value);
10882        JsonValue {
10883            proc: self.proc.clone(),
10884            selection: query,
10885            graphql_client: self.graphql_client.clone(),
10886        }
10887    }
10888    /// Encode an integer to json
10889    ///
10890    /// # Arguments
10891    ///
10892    /// * `value` - New integer value
10893    pub fn new_integer(&self, value: isize) -> JsonValue {
10894        let mut query = self.selection.select("newInteger");
10895        query = query.arg("value", value);
10896        JsonValue {
10897            proc: self.proc.clone(),
10898            selection: query,
10899            graphql_client: self.graphql_client.clone(),
10900        }
10901    }
10902    /// Encode a string to json
10903    ///
10904    /// # Arguments
10905    ///
10906    /// * `value` - New string value
10907    pub fn new_string(&self, value: impl Into<String>) -> JsonValue {
10908        let mut query = self.selection.select("newString");
10909        query = query.arg("value", value.into());
10910        JsonValue {
10911            proc: self.proc.clone(),
10912            selection: query,
10913            graphql_client: self.graphql_client.clone(),
10914        }
10915    }
10916    /// Return a new json value, decoded from the given content
10917    ///
10918    /// # Arguments
10919    ///
10920    /// * `contents` - New JSON-encoded contents
10921    pub fn with_contents(&self, contents: Json) -> JsonValue {
10922        let mut query = self.selection.select("withContents");
10923        query = query.arg("contents", contents);
10924        JsonValue {
10925            proc: self.proc.clone(),
10926            selection: query,
10927            graphql_client: self.graphql_client.clone(),
10928        }
10929    }
10930    /// Set a new field at the given path
10931    ///
10932    /// # Arguments
10933    ///
10934    /// * `path` - Path of the field to set, encoded as an array of field names
10935    /// * `value` - The new value of the field
10936    pub fn with_field(&self, path: Vec<impl Into<String>>, value: impl IntoID<Id>) -> JsonValue {
10937        let mut query = self.selection.select("withField");
10938        query = query.arg(
10939            "path",
10940            path.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
10941        );
10942        query = query.arg_lazy(
10943            "value",
10944            Box::new(move || {
10945                let value = value.clone();
10946                Box::pin(async move { value.into_id().await.unwrap().quote() })
10947            }),
10948        );
10949        JsonValue {
10950            proc: self.proc.clone(),
10951            selection: query,
10952            graphql_client: self.graphql_client.clone(),
10953        }
10954    }
10955}
10956impl Node for JsonValue {
10957    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
10958        let query = self.selection.select("id");
10959        let graphql_client = self.graphql_client.clone();
10960        async move { query.execute(graphql_client).await }
10961    }
10962}
10963#[derive(Clone)]
10964pub struct Llm {
10965    pub proc: Option<Arc<DaggerSessionProc>>,
10966    pub selection: Selection,
10967    pub graphql_client: DynGraphQLClient,
10968}
10969impl IntoID<Id> for Llm {
10970    fn into_id(
10971        self,
10972    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
10973        Box::pin(async move { self.id().await })
10974    }
10975}
10976impl Loadable for Llm {
10977    fn graphql_type() -> &'static str {
10978        "LLM"
10979    }
10980    fn from_query(
10981        proc: Option<Arc<DaggerSessionProc>>,
10982        selection: Selection,
10983        graphql_client: DynGraphQLClient,
10984    ) -> Self {
10985        Self {
10986            proc,
10987            selection,
10988            graphql_client,
10989        }
10990    }
10991}
10992impl Llm {
10993    /// create a branch in the LLM's history
10994    pub fn attempt(&self, number: isize) -> Llm {
10995        let mut query = self.selection.select("attempt");
10996        query = query.arg("number", number);
10997        Llm {
10998            proc: self.proc.clone(),
10999            selection: query,
11000            graphql_client: self.graphql_client.clone(),
11001        }
11002    }
11003    /// returns the type of the current state
11004    pub fn bind_result(&self, name: impl Into<String>) -> Binding {
11005        let mut query = self.selection.select("bindResult");
11006        query = query.arg("name", name.into());
11007        Binding {
11008            proc: self.proc.clone(),
11009            selection: query,
11010            graphql_client: self.graphql_client.clone(),
11011        }
11012    }
11013    /// return the LLM's current environment
11014    pub fn env(&self) -> Env {
11015        let query = self.selection.select("env");
11016        Env {
11017            proc: self.proc.clone(),
11018            selection: query,
11019            graphql_client: self.graphql_client.clone(),
11020        }
11021    }
11022    /// Indicates whether there are any queued prompts or tool results to send to the model
11023    pub async fn has_prompt(&self) -> Result<bool, DaggerError> {
11024        let query = self.selection.select("hasPrompt");
11025        query.execute(self.graphql_client.clone()).await
11026    }
11027    /// return the llm message history
11028    pub async fn history(&self) -> Result<Vec<String>, DaggerError> {
11029        let query = self.selection.select("history");
11030        query.execute(self.graphql_client.clone()).await
11031    }
11032    /// return the raw llm message history as json
11033    pub async fn history_json(&self) -> Result<Json, DaggerError> {
11034        let query = self.selection.select("historyJSON");
11035        query.execute(self.graphql_client.clone()).await
11036    }
11037    /// A unique identifier for this LLM.
11038    pub async fn id(&self) -> Result<Id, DaggerError> {
11039        let query = self.selection.select("id");
11040        query.execute(self.graphql_client.clone()).await
11041    }
11042    /// return the last llm reply from the history
11043    pub async fn last_reply(&self) -> Result<String, DaggerError> {
11044        let query = self.selection.select("lastReply");
11045        query.execute(self.graphql_client.clone()).await
11046    }
11047    /// Submit the queued prompt, evaluate any tool calls, queue their results, and keep going until the model ends its turn
11048    pub fn r#loop(&self) -> Llm {
11049        let query = self.selection.select("loop");
11050        Llm {
11051            proc: self.proc.clone(),
11052            selection: query,
11053            graphql_client: self.graphql_client.clone(),
11054        }
11055    }
11056    /// return the model used by the llm
11057    pub async fn model(&self) -> Result<String, DaggerError> {
11058        let query = self.selection.select("model");
11059        query.execute(self.graphql_client.clone()).await
11060    }
11061    /// return the provider used by the llm
11062    pub async fn provider(&self) -> Result<String, DaggerError> {
11063        let query = self.selection.select("provider");
11064        query.execute(self.graphql_client.clone()).await
11065    }
11066    /// Submit the queued prompt or tool call results, evaluate any tool calls, and queue their results
11067    pub async fn step(&self) -> Result<Llm, DaggerError> {
11068        let query = self.selection.select("step");
11069        let id: Id = query.execute(self.graphql_client.clone()).await?;
11070        Ok(Llm {
11071            proc: self.proc.clone(),
11072            selection: query
11073                .root()
11074                .select("node")
11075                .arg("id", &id.0)
11076                .inline_fragment("LLM"),
11077            graphql_client: self.graphql_client.clone(),
11078        })
11079    }
11080    /// synchronize LLM state
11081    pub async fn sync(&self) -> Result<Llm, DaggerError> {
11082        let query = self.selection.select("sync");
11083        let id: Id = query.execute(self.graphql_client.clone()).await?;
11084        Ok(Llm {
11085            proc: self.proc.clone(),
11086            selection: query
11087                .root()
11088                .select("node")
11089                .arg("id", &id.0)
11090                .inline_fragment("LLM"),
11091            graphql_client: self.graphql_client.clone(),
11092        })
11093    }
11094    /// returns the token usage of the current state
11095    pub fn token_usage(&self) -> LlmTokenUsage {
11096        let query = self.selection.select("tokenUsage");
11097        LlmTokenUsage {
11098            proc: self.proc.clone(),
11099            selection: query,
11100            graphql_client: self.graphql_client.clone(),
11101        }
11102    }
11103    /// print documentation for available tools
11104    pub async fn tools(&self) -> Result<String, DaggerError> {
11105        let query = self.selection.select("tools");
11106        query.execute(self.graphql_client.clone()).await
11107    }
11108    /// Return a new LLM with the specified function no longer exposed as a tool
11109    ///
11110    /// # Arguments
11111    ///
11112    /// * `type_name` - The type name whose function will be blocked
11113    /// * `function` - The function to block
11114    ///
11115    /// Will be converted to lowerCamelCase if necessary.
11116    pub fn with_blocked_function(
11117        &self,
11118        type_name: impl Into<String>,
11119        function: impl Into<String>,
11120    ) -> Llm {
11121        let mut query = self.selection.select("withBlockedFunction");
11122        query = query.arg("typeName", type_name.into());
11123        query = query.arg("function", function.into());
11124        Llm {
11125            proc: self.proc.clone(),
11126            selection: query,
11127            graphql_client: self.graphql_client.clone(),
11128        }
11129    }
11130    /// allow the LLM to interact with an environment via MCP
11131    pub fn with_env(&self, env: impl IntoID<Id>) -> Llm {
11132        let mut query = self.selection.select("withEnv");
11133        query = query.arg_lazy(
11134            "env",
11135            Box::new(move || {
11136                let env = env.clone();
11137                Box::pin(async move { env.into_id().await.unwrap().quote() })
11138            }),
11139        );
11140        Llm {
11141            proc: self.proc.clone(),
11142            selection: query,
11143            graphql_client: self.graphql_client.clone(),
11144        }
11145    }
11146    /// Add an external MCP server to the LLM
11147    ///
11148    /// # Arguments
11149    ///
11150    /// * `name` - The name of the MCP server
11151    /// * `service` - The MCP service to run and communicate with over stdio
11152    pub fn with_mcp_server(&self, name: impl Into<String>, service: impl IntoID<Id>) -> Llm {
11153        let mut query = self.selection.select("withMCPServer");
11154        query = query.arg("name", name.into());
11155        query = query.arg_lazy(
11156            "service",
11157            Box::new(move || {
11158                let service = service.clone();
11159                Box::pin(async move { service.into_id().await.unwrap().quote() })
11160            }),
11161        );
11162        Llm {
11163            proc: self.proc.clone(),
11164            selection: query,
11165            graphql_client: self.graphql_client.clone(),
11166        }
11167    }
11168    /// swap out the llm model
11169    ///
11170    /// # Arguments
11171    ///
11172    /// * `model` - The model to use
11173    pub fn with_model(&self, model: impl Into<String>) -> Llm {
11174        let mut query = self.selection.select("withModel");
11175        query = query.arg("model", model.into());
11176        Llm {
11177            proc: self.proc.clone(),
11178            selection: query,
11179            graphql_client: self.graphql_client.clone(),
11180        }
11181    }
11182    /// append a prompt to the llm context
11183    ///
11184    /// # Arguments
11185    ///
11186    /// * `prompt` - The prompt to send
11187    pub fn with_prompt(&self, prompt: impl Into<String>) -> Llm {
11188        let mut query = self.selection.select("withPrompt");
11189        query = query.arg("prompt", prompt.into());
11190        Llm {
11191            proc: self.proc.clone(),
11192            selection: query,
11193            graphql_client: self.graphql_client.clone(),
11194        }
11195    }
11196    /// append the contents of a file to the llm context
11197    ///
11198    /// # Arguments
11199    ///
11200    /// * `file` - The file to read the prompt from
11201    pub fn with_prompt_file(&self, file: impl IntoID<Id>) -> Llm {
11202        let mut query = self.selection.select("withPromptFile");
11203        query = query.arg_lazy(
11204            "file",
11205            Box::new(move || {
11206                let file = file.clone();
11207                Box::pin(async move { file.into_id().await.unwrap().quote() })
11208            }),
11209        );
11210        Llm {
11211            proc: self.proc.clone(),
11212            selection: query,
11213            graphql_client: self.graphql_client.clone(),
11214        }
11215    }
11216    /// Use a static set of tools for method calls, e.g. for MCP clients that do not support dynamic tool registration
11217    pub fn with_static_tools(&self) -> Llm {
11218        let query = self.selection.select("withStaticTools");
11219        Llm {
11220            proc: self.proc.clone(),
11221            selection: query,
11222            graphql_client: self.graphql_client.clone(),
11223        }
11224    }
11225    /// Add a system prompt to the LLM's environment
11226    ///
11227    /// # Arguments
11228    ///
11229    /// * `prompt` - The system prompt to send
11230    pub fn with_system_prompt(&self, prompt: impl Into<String>) -> Llm {
11231        let mut query = self.selection.select("withSystemPrompt");
11232        query = query.arg("prompt", prompt.into());
11233        Llm {
11234            proc: self.proc.clone(),
11235            selection: query,
11236            graphql_client: self.graphql_client.clone(),
11237        }
11238    }
11239    /// Disable the default system prompt
11240    pub fn without_default_system_prompt(&self) -> Llm {
11241        let query = self.selection.select("withoutDefaultSystemPrompt");
11242        Llm {
11243            proc: self.proc.clone(),
11244            selection: query,
11245            graphql_client: self.graphql_client.clone(),
11246        }
11247    }
11248    /// Clear the message history, leaving only the system prompts
11249    pub fn without_message_history(&self) -> Llm {
11250        let query = self.selection.select("withoutMessageHistory");
11251        Llm {
11252            proc: self.proc.clone(),
11253            selection: query,
11254            graphql_client: self.graphql_client.clone(),
11255        }
11256    }
11257    /// Clear the system prompts, leaving only the default system prompt
11258    pub fn without_system_prompts(&self) -> Llm {
11259        let query = self.selection.select("withoutSystemPrompts");
11260        Llm {
11261            proc: self.proc.clone(),
11262            selection: query,
11263            graphql_client: self.graphql_client.clone(),
11264        }
11265    }
11266}
11267impl Node for Llm {
11268    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
11269        let query = self.selection.select("id");
11270        let graphql_client = self.graphql_client.clone();
11271        async move { query.execute(graphql_client).await }
11272    }
11273}
11274impl Syncer for Llm {
11275    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
11276        let query = self.selection.select("id");
11277        let graphql_client = self.graphql_client.clone();
11278        async move { query.execute(graphql_client).await }
11279    }
11280    fn sync(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
11281        let query = self.selection.select("sync");
11282        let graphql_client = self.graphql_client.clone();
11283        async move { query.execute(graphql_client).await }
11284    }
11285}
11286#[derive(Clone)]
11287pub struct LlmTokenUsage {
11288    pub proc: Option<Arc<DaggerSessionProc>>,
11289    pub selection: Selection,
11290    pub graphql_client: DynGraphQLClient,
11291}
11292impl IntoID<Id> for LlmTokenUsage {
11293    fn into_id(
11294        self,
11295    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
11296        Box::pin(async move { self.id().await })
11297    }
11298}
11299impl Loadable for LlmTokenUsage {
11300    fn graphql_type() -> &'static str {
11301        "LLMTokenUsage"
11302    }
11303    fn from_query(
11304        proc: Option<Arc<DaggerSessionProc>>,
11305        selection: Selection,
11306        graphql_client: DynGraphQLClient,
11307    ) -> Self {
11308        Self {
11309            proc,
11310            selection,
11311            graphql_client,
11312        }
11313    }
11314}
11315impl LlmTokenUsage {
11316    pub async fn cached_token_reads(&self) -> Result<isize, DaggerError> {
11317        let query = self.selection.select("cachedTokenReads");
11318        query.execute(self.graphql_client.clone()).await
11319    }
11320    pub async fn cached_token_writes(&self) -> Result<isize, DaggerError> {
11321        let query = self.selection.select("cachedTokenWrites");
11322        query.execute(self.graphql_client.clone()).await
11323    }
11324    /// A unique identifier for this LLMTokenUsage.
11325    pub async fn id(&self) -> Result<Id, DaggerError> {
11326        let query = self.selection.select("id");
11327        query.execute(self.graphql_client.clone()).await
11328    }
11329    pub async fn input_tokens(&self) -> Result<isize, DaggerError> {
11330        let query = self.selection.select("inputTokens");
11331        query.execute(self.graphql_client.clone()).await
11332    }
11333    pub async fn output_tokens(&self) -> Result<isize, DaggerError> {
11334        let query = self.selection.select("outputTokens");
11335        query.execute(self.graphql_client.clone()).await
11336    }
11337    pub async fn total_tokens(&self) -> Result<isize, DaggerError> {
11338        let query = self.selection.select("totalTokens");
11339        query.execute(self.graphql_client.clone()).await
11340    }
11341}
11342impl Node for LlmTokenUsage {
11343    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
11344        let query = self.selection.select("id");
11345        let graphql_client = self.graphql_client.clone();
11346        async move { query.execute(graphql_client).await }
11347    }
11348}
11349#[derive(Clone)]
11350pub struct Label {
11351    pub proc: Option<Arc<DaggerSessionProc>>,
11352    pub selection: Selection,
11353    pub graphql_client: DynGraphQLClient,
11354}
11355impl IntoID<Id> for Label {
11356    fn into_id(
11357        self,
11358    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
11359        Box::pin(async move { self.id().await })
11360    }
11361}
11362impl Loadable for Label {
11363    fn graphql_type() -> &'static str {
11364        "Label"
11365    }
11366    fn from_query(
11367        proc: Option<Arc<DaggerSessionProc>>,
11368        selection: Selection,
11369        graphql_client: DynGraphQLClient,
11370    ) -> Self {
11371        Self {
11372            proc,
11373            selection,
11374            graphql_client,
11375        }
11376    }
11377}
11378impl Label {
11379    /// A unique identifier for this Label.
11380    pub async fn id(&self) -> Result<Id, DaggerError> {
11381        let query = self.selection.select("id");
11382        query.execute(self.graphql_client.clone()).await
11383    }
11384    /// The label name.
11385    pub async fn name(&self) -> Result<String, DaggerError> {
11386        let query = self.selection.select("name");
11387        query.execute(self.graphql_client.clone()).await
11388    }
11389    /// The label value.
11390    pub async fn value(&self) -> Result<String, DaggerError> {
11391        let query = self.selection.select("value");
11392        query.execute(self.graphql_client.clone()).await
11393    }
11394}
11395impl Node for Label {
11396    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
11397        let query = self.selection.select("id");
11398        let graphql_client = self.graphql_client.clone();
11399        async move { query.execute(graphql_client).await }
11400    }
11401}
11402#[derive(Clone)]
11403pub struct ListTypeDef {
11404    pub proc: Option<Arc<DaggerSessionProc>>,
11405    pub selection: Selection,
11406    pub graphql_client: DynGraphQLClient,
11407}
11408impl IntoID<Id> for ListTypeDef {
11409    fn into_id(
11410        self,
11411    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
11412        Box::pin(async move { self.id().await })
11413    }
11414}
11415impl Loadable for ListTypeDef {
11416    fn graphql_type() -> &'static str {
11417        "ListTypeDef"
11418    }
11419    fn from_query(
11420        proc: Option<Arc<DaggerSessionProc>>,
11421        selection: Selection,
11422        graphql_client: DynGraphQLClient,
11423    ) -> Self {
11424        Self {
11425            proc,
11426            selection,
11427            graphql_client,
11428        }
11429    }
11430}
11431impl ListTypeDef {
11432    /// The type of the elements in the list.
11433    pub fn element_type_def(&self) -> TypeDef {
11434        let query = self.selection.select("elementTypeDef");
11435        TypeDef {
11436            proc: self.proc.clone(),
11437            selection: query,
11438            graphql_client: self.graphql_client.clone(),
11439        }
11440    }
11441    /// A unique identifier for this ListTypeDef.
11442    pub async fn id(&self) -> Result<Id, DaggerError> {
11443        let query = self.selection.select("id");
11444        query.execute(self.graphql_client.clone()).await
11445    }
11446}
11447impl Node for ListTypeDef {
11448    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
11449        let query = self.selection.select("id");
11450        let graphql_client = self.graphql_client.clone();
11451        async move { query.execute(graphql_client).await }
11452    }
11453}
11454#[derive(Clone)]
11455pub struct Module {
11456    pub proc: Option<Arc<DaggerSessionProc>>,
11457    pub selection: Selection,
11458    pub graphql_client: DynGraphQLClient,
11459}
11460#[derive(Builder, Debug, PartialEq)]
11461pub struct ModuleChecksOpts<'a> {
11462    /// Only include checks matching the specified patterns
11463    #[builder(setter(into, strip_option), default)]
11464    pub include: Option<Vec<&'a str>>,
11465    /// When true, only return annotated check functions; exclude generate-as-checks
11466    #[builder(setter(into, strip_option), default)]
11467    pub no_generate: Option<bool>,
11468}
11469#[derive(Builder, Debug, PartialEq)]
11470pub struct ModuleGeneratorsOpts<'a> {
11471    /// Only include generators matching the specified patterns
11472    #[builder(setter(into, strip_option), default)]
11473    pub include: Option<Vec<&'a str>>,
11474}
11475#[derive(Builder, Debug, PartialEq)]
11476pub struct ModuleServeOpts {
11477    /// Install the module as the entrypoint, promoting its main-object methods onto the Query root
11478    #[builder(setter(into, strip_option), default)]
11479    pub entrypoint: Option<bool>,
11480    /// Expose the dependencies of this module to the client
11481    #[builder(setter(into, strip_option), default)]
11482    pub include_dependencies: Option<bool>,
11483}
11484#[derive(Builder, Debug, PartialEq)]
11485pub struct ModuleServicesOpts<'a> {
11486    /// Only include services matching the specified patterns
11487    #[builder(setter(into, strip_option), default)]
11488    pub include: Option<Vec<&'a str>>,
11489}
11490impl IntoID<Id> for Module {
11491    fn into_id(
11492        self,
11493    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
11494        Box::pin(async move { self.id().await })
11495    }
11496}
11497impl Loadable for Module {
11498    fn graphql_type() -> &'static str {
11499        "Module"
11500    }
11501    fn from_query(
11502        proc: Option<Arc<DaggerSessionProc>>,
11503        selection: Selection,
11504        graphql_client: DynGraphQLClient,
11505    ) -> Self {
11506        Self {
11507            proc,
11508            selection,
11509            graphql_client,
11510        }
11511    }
11512}
11513impl Module {
11514    /// Return the check defined by the module with the given name. Must match to exactly one check.
11515    ///
11516    /// # Arguments
11517    ///
11518    /// * `name` - The name of the check to retrieve
11519    pub fn check(&self, name: impl Into<String>) -> Check {
11520        let mut query = self.selection.select("check");
11521        query = query.arg("name", name.into());
11522        Check {
11523            proc: self.proc.clone(),
11524            selection: query,
11525            graphql_client: self.graphql_client.clone(),
11526        }
11527    }
11528    /// Return all checks defined by the module
11529    ///
11530    /// # Arguments
11531    ///
11532    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11533    pub fn checks(&self) -> CheckGroup {
11534        let query = self.selection.select("checks");
11535        CheckGroup {
11536            proc: self.proc.clone(),
11537            selection: query,
11538            graphql_client: self.graphql_client.clone(),
11539        }
11540    }
11541    /// Return all checks defined by the module
11542    ///
11543    /// # Arguments
11544    ///
11545    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11546    pub fn checks_opts<'a>(&self, opts: ModuleChecksOpts<'a>) -> CheckGroup {
11547        let mut query = self.selection.select("checks");
11548        if let Some(include) = opts.include {
11549            query = query.arg("include", include);
11550        }
11551        if let Some(no_generate) = opts.no_generate {
11552            query = query.arg("noGenerate", no_generate);
11553        }
11554        CheckGroup {
11555            proc: self.proc.clone(),
11556            selection: query,
11557            graphql_client: self.graphql_client.clone(),
11558        }
11559    }
11560    /// The dependencies of the module.
11561    pub async fn dependencies(&self) -> Result<Vec<Module>, DaggerError> {
11562        let query = self.selection.select("dependencies");
11563        let query = query.select("id");
11564        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
11565        Ok(ids
11566            .into_iter()
11567            .map(|id| Module {
11568                proc: self.proc.clone(),
11569                selection: crate::querybuilder::query()
11570                    .select("node")
11571                    .arg("id", &id.0)
11572                    .inline_fragment("Module"),
11573                graphql_client: self.graphql_client.clone(),
11574            })
11575            .collect())
11576    }
11577    /// The doc string of the module, if any
11578    pub async fn description(&self) -> Result<String, DaggerError> {
11579        let query = self.selection.select("description");
11580        query.execute(self.graphql_client.clone()).await
11581    }
11582    /// Enumerations served by this module.
11583    pub async fn enums(&self) -> Result<Vec<TypeDef>, DaggerError> {
11584        let query = self.selection.select("enums");
11585        let query = query.select("id");
11586        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
11587        Ok(ids
11588            .into_iter()
11589            .map(|id| TypeDef {
11590                proc: self.proc.clone(),
11591                selection: crate::querybuilder::query()
11592                    .select("node")
11593                    .arg("id", &id.0)
11594                    .inline_fragment("TypeDef"),
11595                graphql_client: self.graphql_client.clone(),
11596            })
11597            .collect())
11598    }
11599    /// The generated files and directories made on top of the module source's context directory.
11600    pub fn generated_context_directory(&self) -> Directory {
11601        let query = self.selection.select("generatedContextDirectory");
11602        Directory {
11603            proc: self.proc.clone(),
11604            selection: query,
11605            graphql_client: self.graphql_client.clone(),
11606        }
11607    }
11608    /// Return the generator defined by the module with the given name. Must match to exactly one generator.
11609    ///
11610    /// # Arguments
11611    ///
11612    /// * `name` - The name of the generator to retrieve
11613    pub fn generator(&self, name: impl Into<String>) -> Generator {
11614        let mut query = self.selection.select("generator");
11615        query = query.arg("name", name.into());
11616        Generator {
11617            proc: self.proc.clone(),
11618            selection: query,
11619            graphql_client: self.graphql_client.clone(),
11620        }
11621    }
11622    /// Return all generators defined by the module
11623    ///
11624    /// # Arguments
11625    ///
11626    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11627    pub fn generators(&self) -> GeneratorGroup {
11628        let query = self.selection.select("generators");
11629        GeneratorGroup {
11630            proc: self.proc.clone(),
11631            selection: query,
11632            graphql_client: self.graphql_client.clone(),
11633        }
11634    }
11635    /// Return all generators defined by the module
11636    ///
11637    /// # Arguments
11638    ///
11639    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11640    pub fn generators_opts<'a>(&self, opts: ModuleGeneratorsOpts<'a>) -> GeneratorGroup {
11641        let mut query = self.selection.select("generators");
11642        if let Some(include) = opts.include {
11643            query = query.arg("include", include);
11644        }
11645        GeneratorGroup {
11646            proc: self.proc.clone(),
11647            selection: query,
11648            graphql_client: self.graphql_client.clone(),
11649        }
11650    }
11651    /// A unique identifier for this Module.
11652    pub async fn id(&self) -> Result<Id, DaggerError> {
11653        let query = self.selection.select("id");
11654        query.execute(self.graphql_client.clone()).await
11655    }
11656    /// Interfaces served by this module.
11657    pub async fn interfaces(&self) -> Result<Vec<TypeDef>, DaggerError> {
11658        let query = self.selection.select("interfaces");
11659        let query = query.select("id");
11660        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
11661        Ok(ids
11662            .into_iter()
11663            .map(|id| TypeDef {
11664                proc: self.proc.clone(),
11665                selection: crate::querybuilder::query()
11666                    .select("node")
11667                    .arg("id", &id.0)
11668                    .inline_fragment("TypeDef"),
11669                graphql_client: self.graphql_client.clone(),
11670            })
11671            .collect())
11672    }
11673    /// The introspection schema JSON file for this module.
11674    /// This file represents the schema visible to the module's source code, including all core types and those from the dependencies.
11675    /// Note: this is in the context of a module, so some core types may be hidden.
11676    pub fn introspection_schema_json(&self) -> File {
11677        let query = self.selection.select("introspectionSchemaJSON");
11678        File {
11679            proc: self.proc.clone(),
11680            selection: query,
11681            graphql_client: self.graphql_client.clone(),
11682        }
11683    }
11684    /// The name of the module
11685    pub async fn name(&self) -> Result<String, DaggerError> {
11686        let query = self.selection.select("name");
11687        query.execute(self.graphql_client.clone()).await
11688    }
11689    /// Objects served by this module.
11690    pub async fn objects(&self) -> Result<Vec<TypeDef>, DaggerError> {
11691        let query = self.selection.select("objects");
11692        let query = query.select("id");
11693        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
11694        Ok(ids
11695            .into_iter()
11696            .map(|id| TypeDef {
11697                proc: self.proc.clone(),
11698                selection: crate::querybuilder::query()
11699                    .select("node")
11700                    .arg("id", &id.0)
11701                    .inline_fragment("TypeDef"),
11702                graphql_client: self.graphql_client.clone(),
11703            })
11704            .collect())
11705    }
11706    /// The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile.
11707    pub fn runtime(&self) -> Container {
11708        let query = self.selection.select("runtime");
11709        Container {
11710            proc: self.proc.clone(),
11711            selection: query,
11712            graphql_client: self.graphql_client.clone(),
11713        }
11714    }
11715    /// The SDK config used by this module.
11716    pub fn sdk(&self) -> SdkConfig {
11717        let query = self.selection.select("sdk");
11718        SdkConfig {
11719            proc: self.proc.clone(),
11720            selection: query,
11721            graphql_client: self.graphql_client.clone(),
11722        }
11723    }
11724    /// Serve a module's API in the current session.
11725    /// Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
11726    ///
11727    /// # Arguments
11728    ///
11729    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11730    pub async fn serve(&self) -> Result<Void, DaggerError> {
11731        let query = self.selection.select("serve");
11732        query.execute(self.graphql_client.clone()).await
11733    }
11734    /// Serve a module's API in the current session.
11735    /// Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
11736    ///
11737    /// # Arguments
11738    ///
11739    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11740    pub async fn serve_opts(&self, opts: ModuleServeOpts) -> Result<Void, DaggerError> {
11741        let mut query = self.selection.select("serve");
11742        if let Some(include_dependencies) = opts.include_dependencies {
11743            query = query.arg("includeDependencies", include_dependencies);
11744        }
11745        if let Some(entrypoint) = opts.entrypoint {
11746            query = query.arg("entrypoint", entrypoint);
11747        }
11748        query.execute(self.graphql_client.clone()).await
11749    }
11750    /// Return all services defined by the module
11751    ///
11752    /// # Arguments
11753    ///
11754    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11755    pub fn services(&self) -> UpGroup {
11756        let query = self.selection.select("services");
11757        UpGroup {
11758            proc: self.proc.clone(),
11759            selection: query,
11760            graphql_client: self.graphql_client.clone(),
11761        }
11762    }
11763    /// Return all services defined by the module
11764    ///
11765    /// # Arguments
11766    ///
11767    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11768    pub fn services_opts<'a>(&self, opts: ModuleServicesOpts<'a>) -> UpGroup {
11769        let mut query = self.selection.select("services");
11770        if let Some(include) = opts.include {
11771            query = query.arg("include", include);
11772        }
11773        UpGroup {
11774            proc: self.proc.clone(),
11775            selection: query,
11776            graphql_client: self.graphql_client.clone(),
11777        }
11778    }
11779    /// The source for the module.
11780    pub fn source(&self) -> ModuleSource {
11781        let query = self.selection.select("source");
11782        ModuleSource {
11783            proc: self.proc.clone(),
11784            selection: query,
11785            graphql_client: self.graphql_client.clone(),
11786        }
11787    }
11788    /// Forces evaluation of the module, including any loading into the engine and associated validation.
11789    pub async fn sync(&self) -> Result<Module, DaggerError> {
11790        let query = self.selection.select("sync");
11791        let id: Id = query.execute(self.graphql_client.clone()).await?;
11792        Ok(Module {
11793            proc: self.proc.clone(),
11794            selection: query
11795                .root()
11796                .select("node")
11797                .arg("id", &id.0)
11798                .inline_fragment("Module"),
11799            graphql_client: self.graphql_client.clone(),
11800        })
11801    }
11802    /// User-defined default values, loaded from local .env files.
11803    pub fn user_defaults(&self) -> EnvFile {
11804        let query = self.selection.select("userDefaults");
11805        EnvFile {
11806            proc: self.proc.clone(),
11807            selection: query,
11808            graphql_client: self.graphql_client.clone(),
11809        }
11810    }
11811    /// Retrieves the module with the given description
11812    ///
11813    /// # Arguments
11814    ///
11815    /// * `description` - The description to set
11816    pub fn with_description(&self, description: impl Into<String>) -> Module {
11817        let mut query = self.selection.select("withDescription");
11818        query = query.arg("description", description.into());
11819        Module {
11820            proc: self.proc.clone(),
11821            selection: query,
11822            graphql_client: self.graphql_client.clone(),
11823        }
11824    }
11825    /// This module plus the given Enum type and associated values
11826    pub fn with_enum(&self, r#enum: impl IntoID<Id>) -> Module {
11827        let mut query = self.selection.select("withEnum");
11828        query = query.arg_lazy(
11829            "enum",
11830            Box::new(move || {
11831                let r#enum = r#enum.clone();
11832                Box::pin(async move { r#enum.into_id().await.unwrap().quote() })
11833            }),
11834        );
11835        Module {
11836            proc: self.proc.clone(),
11837            selection: query,
11838            graphql_client: self.graphql_client.clone(),
11839        }
11840    }
11841    /// This module plus the given Interface type and associated functions
11842    pub fn with_interface(&self, iface: impl IntoID<Id>) -> Module {
11843        let mut query = self.selection.select("withInterface");
11844        query = query.arg_lazy(
11845            "iface",
11846            Box::new(move || {
11847                let iface = iface.clone();
11848                Box::pin(async move { iface.into_id().await.unwrap().quote() })
11849            }),
11850        );
11851        Module {
11852            proc: self.proc.clone(),
11853            selection: query,
11854            graphql_client: self.graphql_client.clone(),
11855        }
11856    }
11857    /// This module plus the given Object type and associated functions.
11858    pub fn with_object(&self, object: impl IntoID<Id>) -> Module {
11859        let mut query = self.selection.select("withObject");
11860        query = query.arg_lazy(
11861            "object",
11862            Box::new(move || {
11863                let object = object.clone();
11864                Box::pin(async move { object.into_id().await.unwrap().quote() })
11865            }),
11866        );
11867        Module {
11868            proc: self.proc.clone(),
11869            selection: query,
11870            graphql_client: self.graphql_client.clone(),
11871        }
11872    }
11873}
11874impl Node for Module {
11875    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
11876        let query = self.selection.select("id");
11877        let graphql_client = self.graphql_client.clone();
11878        async move { query.execute(graphql_client).await }
11879    }
11880}
11881impl Syncer for Module {
11882    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
11883        let query = self.selection.select("id");
11884        let graphql_client = self.graphql_client.clone();
11885        async move { query.execute(graphql_client).await }
11886    }
11887    fn sync(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
11888        let query = self.selection.select("sync");
11889        let graphql_client = self.graphql_client.clone();
11890        async move { query.execute(graphql_client).await }
11891    }
11892}
11893#[derive(Clone)]
11894pub struct ModuleConfigClient {
11895    pub proc: Option<Arc<DaggerSessionProc>>,
11896    pub selection: Selection,
11897    pub graphql_client: DynGraphQLClient,
11898}
11899impl IntoID<Id> for ModuleConfigClient {
11900    fn into_id(
11901        self,
11902    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
11903        Box::pin(async move { self.id().await })
11904    }
11905}
11906impl Loadable for ModuleConfigClient {
11907    fn graphql_type() -> &'static str {
11908        "ModuleConfigClient"
11909    }
11910    fn from_query(
11911        proc: Option<Arc<DaggerSessionProc>>,
11912        selection: Selection,
11913        graphql_client: DynGraphQLClient,
11914    ) -> Self {
11915        Self {
11916            proc,
11917            selection,
11918            graphql_client,
11919        }
11920    }
11921}
11922impl ModuleConfigClient {
11923    /// The directory the client is generated in.
11924    pub async fn directory(&self) -> Result<String, DaggerError> {
11925        let query = self.selection.select("directory");
11926        query.execute(self.graphql_client.clone()).await
11927    }
11928    /// The generator to use
11929    pub async fn generator(&self) -> Result<String, DaggerError> {
11930        let query = self.selection.select("generator");
11931        query.execute(self.graphql_client.clone()).await
11932    }
11933    /// A unique identifier for this ModuleConfigClient.
11934    pub async fn id(&self) -> Result<Id, DaggerError> {
11935        let query = self.selection.select("id");
11936        query.execute(self.graphql_client.clone()).await
11937    }
11938}
11939impl Node for ModuleConfigClient {
11940    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
11941        let query = self.selection.select("id");
11942        let graphql_client = self.graphql_client.clone();
11943        async move { query.execute(graphql_client).await }
11944    }
11945}
11946#[derive(Clone)]
11947pub struct ModuleSource {
11948    pub proc: Option<Arc<DaggerSessionProc>>,
11949    pub selection: Selection,
11950    pub graphql_client: DynGraphQLClient,
11951}
11952impl IntoID<Id> for ModuleSource {
11953    fn into_id(
11954        self,
11955    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
11956        Box::pin(async move { self.id().await })
11957    }
11958}
11959impl Loadable for ModuleSource {
11960    fn graphql_type() -> &'static str {
11961        "ModuleSource"
11962    }
11963    fn from_query(
11964        proc: Option<Arc<DaggerSessionProc>>,
11965        selection: Selection,
11966        graphql_client: DynGraphQLClient,
11967    ) -> Self {
11968        Self {
11969            proc,
11970            selection,
11971            graphql_client,
11972        }
11973    }
11974}
11975impl ModuleSource {
11976    /// Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation
11977    pub fn as_module(&self) -> Module {
11978        let query = self.selection.select("asModule");
11979        Module {
11980            proc: self.proc.clone(),
11981            selection: query,
11982            graphql_client: self.graphql_client.clone(),
11983        }
11984    }
11985    /// A human readable ref string representation of this module source.
11986    pub async fn as_string(&self) -> Result<String, DaggerError> {
11987        let query = self.selection.select("asString");
11988        query.execute(self.graphql_client.clone()).await
11989    }
11990    /// The blueprint referenced by the module source.
11991    pub fn blueprint(&self) -> ModuleSource {
11992        let query = self.selection.select("blueprint");
11993        ModuleSource {
11994            proc: self.proc.clone(),
11995            selection: query,
11996            graphql_client: self.graphql_client.clone(),
11997        }
11998    }
11999    /// The ref to clone the root of the git repo from. Only valid for git sources.
12000    pub async fn clone_ref(&self) -> Result<String, DaggerError> {
12001        let query = self.selection.select("cloneRef");
12002        query.execute(self.graphql_client.clone()).await
12003    }
12004    /// The resolved commit of the git repo this source points to.
12005    pub async fn commit(&self) -> Result<String, DaggerError> {
12006        let query = self.selection.select("commit");
12007        query.execute(self.graphql_client.clone()).await
12008    }
12009    /// The clients generated for the module.
12010    pub async fn config_clients(&self) -> Result<Vec<ModuleConfigClient>, DaggerError> {
12011        let query = self.selection.select("configClients");
12012        let query = query.select("id");
12013        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
12014        Ok(ids
12015            .into_iter()
12016            .map(|id| ModuleConfigClient {
12017                proc: self.proc.clone(),
12018                selection: crate::querybuilder::query()
12019                    .select("node")
12020                    .arg("id", &id.0)
12021                    .inline_fragment("ModuleConfigClient"),
12022                graphql_client: self.graphql_client.clone(),
12023            })
12024            .collect())
12025    }
12026    /// Whether an existing dagger.json for the module was found.
12027    pub async fn config_exists(&self) -> Result<bool, DaggerError> {
12028        let query = self.selection.select("configExists");
12029        query.execute(self.graphql_client.clone()).await
12030    }
12031    /// The full directory loaded for the module source, including the source code as a subdirectory.
12032    pub fn context_directory(&self) -> Directory {
12033        let query = self.selection.select("contextDirectory");
12034        Directory {
12035            proc: self.proc.clone(),
12036            selection: query,
12037            graphql_client: self.graphql_client.clone(),
12038        }
12039    }
12040    /// The dependencies of the module source.
12041    pub async fn dependencies(&self) -> Result<Vec<ModuleSource>, DaggerError> {
12042        let query = self.selection.select("dependencies");
12043        let query = query.select("id");
12044        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
12045        Ok(ids
12046            .into_iter()
12047            .map(|id| ModuleSource {
12048                proc: self.proc.clone(),
12049                selection: crate::querybuilder::query()
12050                    .select("node")
12051                    .arg("id", &id.0)
12052                    .inline_fragment("ModuleSource"),
12053                graphql_client: self.graphql_client.clone(),
12054            })
12055            .collect())
12056    }
12057    /// A content-hash of the module source. Module sources with the same digest will output the same generated context and convert into the same module instance.
12058    pub async fn digest(&self) -> Result<String, DaggerError> {
12059        let query = self.selection.select("digest");
12060        query.execute(self.graphql_client.clone()).await
12061    }
12062    /// The directory containing the module configuration and source code (source code may be in a subdir).
12063    ///
12064    /// # Arguments
12065    ///
12066    /// * `path` - A subpath from the source directory to select.
12067    pub fn directory(&self, path: impl Into<String>) -> Directory {
12068        let mut query = self.selection.select("directory");
12069        query = query.arg("path", path.into());
12070        Directory {
12071            proc: self.proc.clone(),
12072            selection: query,
12073            graphql_client: self.graphql_client.clone(),
12074        }
12075    }
12076    /// The engine version of the module.
12077    pub async fn engine_version(&self) -> Result<String, DaggerError> {
12078        let query = self.selection.select("engineVersion");
12079        query.execute(self.graphql_client.clone()).await
12080    }
12081    /// The generated files and directories made on top of the module source's context directory, returned as a Changeset.
12082    pub fn generated_context_changeset(&self) -> Changeset {
12083        let query = self.selection.select("generatedContextChangeset");
12084        Changeset {
12085            proc: self.proc.clone(),
12086            selection: query,
12087            graphql_client: self.graphql_client.clone(),
12088        }
12089    }
12090    /// The generated files and directories made on top of the module source's context directory.
12091    pub fn generated_context_directory(&self) -> Directory {
12092        let query = self.selection.select("generatedContextDirectory");
12093        Directory {
12094            proc: self.proc.clone(),
12095            selection: query,
12096            graphql_client: self.graphql_client.clone(),
12097        }
12098    }
12099    /// The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket).
12100    pub async fn html_repo_url(&self) -> Result<String, DaggerError> {
12101        let query = self.selection.select("htmlRepoURL");
12102        query.execute(self.graphql_client.clone()).await
12103    }
12104    /// The URL to the source's git repo in a web browser. Only valid for git sources.
12105    pub async fn html_url(&self) -> Result<String, DaggerError> {
12106        let query = self.selection.select("htmlURL");
12107        query.execute(self.graphql_client.clone()).await
12108    }
12109    /// A unique identifier for this ModuleSource.
12110    pub async fn id(&self) -> Result<Id, DaggerError> {
12111        let query = self.selection.select("id");
12112        query.execute(self.graphql_client.clone()).await
12113    }
12114    /// The introspection schema JSON file for this module source.
12115    /// This file represents the schema visible to the module's source code, including all core types and those from the dependencies.
12116    /// Note: this is in the context of a module, so some core types may be hidden.
12117    pub fn introspection_schema_json(&self) -> File {
12118        let query = self.selection.select("introspectionSchemaJSON");
12119        File {
12120            proc: self.proc.clone(),
12121            selection: query,
12122            graphql_client: self.graphql_client.clone(),
12123        }
12124    }
12125    /// The kind of module source (currently local, git or dir).
12126    pub async fn kind(&self) -> Result<ModuleSourceKind, DaggerError> {
12127        let query = self.selection.select("kind");
12128        query.execute(self.graphql_client.clone()).await
12129    }
12130    /// The full absolute path to the context directory on the caller's host filesystem that this module source is loaded from. Only valid for local module sources.
12131    pub async fn local_context_directory_path(&self) -> Result<String, DaggerError> {
12132        let query = self.selection.select("localContextDirectoryPath");
12133        query.execute(self.graphql_client.clone()).await
12134    }
12135    /// The name of the module, including any setting via the withName API.
12136    pub async fn module_name(&self) -> Result<String, DaggerError> {
12137        let query = self.selection.select("moduleName");
12138        query.execute(self.graphql_client.clone()).await
12139    }
12140    /// The original name of the module as read from the module's dagger.json (or set for the first time with the withName API).
12141    pub async fn module_original_name(&self) -> Result<String, DaggerError> {
12142        let query = self.selection.select("moduleOriginalName");
12143        query.execute(self.graphql_client.clone()).await
12144    }
12145    /// The original subpath used when instantiating this module source, relative to the context directory.
12146    pub async fn original_subpath(&self) -> Result<String, DaggerError> {
12147        let query = self.selection.select("originalSubpath");
12148        query.execute(self.graphql_client.clone()).await
12149    }
12150    /// The pinned version of this module source.
12151    pub async fn pin(&self) -> Result<String, DaggerError> {
12152        let query = self.selection.select("pin");
12153        query.execute(self.graphql_client.clone()).await
12154    }
12155    /// The import path corresponding to the root of the git repo this source points to. Only valid for git sources.
12156    pub async fn repo_root_path(&self) -> Result<String, DaggerError> {
12157        let query = self.selection.select("repoRootPath");
12158        query.execute(self.graphql_client.clone()).await
12159    }
12160    /// The SDK configuration of the module.
12161    pub fn sdk(&self) -> SdkConfig {
12162        let query = self.selection.select("sdk");
12163        SdkConfig {
12164            proc: self.proc.clone(),
12165            selection: query,
12166            graphql_client: self.graphql_client.clone(),
12167        }
12168    }
12169    /// The path, relative to the context directory, that contains the module's dagger.json.
12170    pub async fn source_root_subpath(&self) -> Result<String, DaggerError> {
12171        let query = self.selection.select("sourceRootSubpath");
12172        query.execute(self.graphql_client.clone()).await
12173    }
12174    /// The path to the directory containing the module's source code, relative to the context directory.
12175    pub async fn source_subpath(&self) -> Result<String, DaggerError> {
12176        let query = self.selection.select("sourceSubpath");
12177        query.execute(self.graphql_client.clone()).await
12178    }
12179    /// Forces evaluation of the module source, including any loading into the engine and associated validation.
12180    pub async fn sync(&self) -> Result<ModuleSource, DaggerError> {
12181        let query = self.selection.select("sync");
12182        let id: Id = query.execute(self.graphql_client.clone()).await?;
12183        Ok(ModuleSource {
12184            proc: self.proc.clone(),
12185            selection: query
12186                .root()
12187                .select("node")
12188                .arg("id", &id.0)
12189                .inline_fragment("ModuleSource"),
12190            graphql_client: self.graphql_client.clone(),
12191        })
12192    }
12193    /// The toolchains referenced by the module source.
12194    pub async fn toolchains(&self) -> Result<Vec<ModuleSource>, DaggerError> {
12195        let query = self.selection.select("toolchains");
12196        let query = query.select("id");
12197        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
12198        Ok(ids
12199            .into_iter()
12200            .map(|id| ModuleSource {
12201                proc: self.proc.clone(),
12202                selection: crate::querybuilder::query()
12203                    .select("node")
12204                    .arg("id", &id.0)
12205                    .inline_fragment("ModuleSource"),
12206                graphql_client: self.graphql_client.clone(),
12207            })
12208            .collect())
12209    }
12210    /// User-defined defaults read from local .env files
12211    pub fn user_defaults(&self) -> EnvFile {
12212        let query = self.selection.select("userDefaults");
12213        EnvFile {
12214            proc: self.proc.clone(),
12215            selection: query,
12216            graphql_client: self.graphql_client.clone(),
12217        }
12218    }
12219    /// The specified version of the git repo this source points to.
12220    pub async fn version(&self) -> Result<String, DaggerError> {
12221        let query = self.selection.select("version");
12222        query.execute(self.graphql_client.clone()).await
12223    }
12224    /// Set a blueprint for the module source.
12225    ///
12226    /// # Arguments
12227    ///
12228    /// * `blueprint` - The blueprint module to set.
12229    pub fn with_blueprint(&self, blueprint: impl IntoID<Id>) -> ModuleSource {
12230        let mut query = self.selection.select("withBlueprint");
12231        query = query.arg_lazy(
12232            "blueprint",
12233            Box::new(move || {
12234                let blueprint = blueprint.clone();
12235                Box::pin(async move { blueprint.into_id().await.unwrap().quote() })
12236            }),
12237        );
12238        ModuleSource {
12239            proc: self.proc.clone(),
12240            selection: query,
12241            graphql_client: self.graphql_client.clone(),
12242        }
12243    }
12244    /// Update the module source with a new client to generate.
12245    ///
12246    /// # Arguments
12247    ///
12248    /// * `generator` - The generator to use
12249    /// * `output_dir` - The output directory for the generated client.
12250    pub fn with_client(
12251        &self,
12252        generator: impl Into<String>,
12253        output_dir: impl Into<String>,
12254    ) -> ModuleSource {
12255        let mut query = self.selection.select("withClient");
12256        query = query.arg("generator", generator.into());
12257        query = query.arg("outputDir", output_dir.into());
12258        ModuleSource {
12259            proc: self.proc.clone(),
12260            selection: query,
12261            graphql_client: self.graphql_client.clone(),
12262        }
12263    }
12264    /// Append the provided dependencies to the module source's dependency list.
12265    ///
12266    /// # Arguments
12267    ///
12268    /// * `dependencies` - The dependencies to append.
12269    pub fn with_dependencies(&self, dependencies: Vec<Id>) -> ModuleSource {
12270        let mut query = self.selection.select("withDependencies");
12271        query = query.arg("dependencies", dependencies);
12272        ModuleSource {
12273            proc: self.proc.clone(),
12274            selection: query,
12275            graphql_client: self.graphql_client.clone(),
12276        }
12277    }
12278    /// Upgrade the engine version of the module to the given value.
12279    ///
12280    /// # Arguments
12281    ///
12282    /// * `version` - The engine version to upgrade to.
12283    pub fn with_engine_version(&self, version: impl Into<String>) -> ModuleSource {
12284        let mut query = self.selection.select("withEngineVersion");
12285        query = query.arg("version", version.into());
12286        ModuleSource {
12287            proc: self.proc.clone(),
12288            selection: query,
12289            graphql_client: self.graphql_client.clone(),
12290        }
12291    }
12292    /// Enable the experimental features for the module source.
12293    ///
12294    /// # Arguments
12295    ///
12296    /// * `features` - The experimental features to enable.
12297    pub fn with_experimental_features(
12298        &self,
12299        features: Vec<ModuleSourceExperimentalFeature>,
12300    ) -> ModuleSource {
12301        let mut query = self.selection.select("withExperimentalFeatures");
12302        query = query.arg("features", features);
12303        ModuleSource {
12304            proc: self.proc.clone(),
12305            selection: query,
12306            graphql_client: self.graphql_client.clone(),
12307        }
12308    }
12309    /// Update the module source with additional include patterns for files+directories from its context that are required for building it
12310    ///
12311    /// # Arguments
12312    ///
12313    /// * `patterns` - The new additional include patterns.
12314    pub fn with_includes(&self, patterns: Vec<impl Into<String>>) -> ModuleSource {
12315        let mut query = self.selection.select("withIncludes");
12316        query = query.arg(
12317            "patterns",
12318            patterns
12319                .into_iter()
12320                .map(|i| i.into())
12321                .collect::<Vec<String>>(),
12322        );
12323        ModuleSource {
12324            proc: self.proc.clone(),
12325            selection: query,
12326            graphql_client: self.graphql_client.clone(),
12327        }
12328    }
12329    /// Update the module source with a new name.
12330    ///
12331    /// # Arguments
12332    ///
12333    /// * `name` - The name to set.
12334    pub fn with_name(&self, name: impl Into<String>) -> ModuleSource {
12335        let mut query = self.selection.select("withName");
12336        query = query.arg("name", name.into());
12337        ModuleSource {
12338            proc: self.proc.clone(),
12339            selection: query,
12340            graphql_client: self.graphql_client.clone(),
12341        }
12342    }
12343    /// Update the module source with a new SDK.
12344    ///
12345    /// # Arguments
12346    ///
12347    /// * `source` - The SDK source to set.
12348    pub fn with_sdk(&self, source: impl Into<String>) -> ModuleSource {
12349        let mut query = self.selection.select("withSDK");
12350        query = query.arg("source", source.into());
12351        ModuleSource {
12352            proc: self.proc.clone(),
12353            selection: query,
12354            graphql_client: self.graphql_client.clone(),
12355        }
12356    }
12357    /// Update the module source with a new source subpath.
12358    ///
12359    /// # Arguments
12360    ///
12361    /// * `path` - The path to set as the source subpath. Must be relative to the module source's source root directory.
12362    pub fn with_source_subpath(&self, path: impl Into<String>) -> ModuleSource {
12363        let mut query = self.selection.select("withSourceSubpath");
12364        query = query.arg("path", path.into());
12365        ModuleSource {
12366            proc: self.proc.clone(),
12367            selection: query,
12368            graphql_client: self.graphql_client.clone(),
12369        }
12370    }
12371    /// Add toolchains to the module source.
12372    ///
12373    /// # Arguments
12374    ///
12375    /// * `toolchains` - The toolchain modules to add.
12376    pub fn with_toolchains(&self, toolchains: Vec<Id>) -> ModuleSource {
12377        let mut query = self.selection.select("withToolchains");
12378        query = query.arg("toolchains", toolchains);
12379        ModuleSource {
12380            proc: self.proc.clone(),
12381            selection: query,
12382            graphql_client: self.graphql_client.clone(),
12383        }
12384    }
12385    /// Update the blueprint module to the latest version.
12386    pub fn with_update_blueprint(&self) -> ModuleSource {
12387        let query = self.selection.select("withUpdateBlueprint");
12388        ModuleSource {
12389            proc: self.proc.clone(),
12390            selection: query,
12391            graphql_client: self.graphql_client.clone(),
12392        }
12393    }
12394    /// Update one or more module dependencies.
12395    ///
12396    /// # Arguments
12397    ///
12398    /// * `dependencies` - The dependencies to update.
12399    pub fn with_update_dependencies(&self, dependencies: Vec<impl Into<String>>) -> ModuleSource {
12400        let mut query = self.selection.select("withUpdateDependencies");
12401        query = query.arg(
12402            "dependencies",
12403            dependencies
12404                .into_iter()
12405                .map(|i| i.into())
12406                .collect::<Vec<String>>(),
12407        );
12408        ModuleSource {
12409            proc: self.proc.clone(),
12410            selection: query,
12411            graphql_client: self.graphql_client.clone(),
12412        }
12413    }
12414    /// Update one or more toolchains.
12415    ///
12416    /// # Arguments
12417    ///
12418    /// * `toolchains` - The toolchains to update.
12419    pub fn with_update_toolchains(&self, toolchains: Vec<impl Into<String>>) -> ModuleSource {
12420        let mut query = self.selection.select("withUpdateToolchains");
12421        query = query.arg(
12422            "toolchains",
12423            toolchains
12424                .into_iter()
12425                .map(|i| i.into())
12426                .collect::<Vec<String>>(),
12427        );
12428        ModuleSource {
12429            proc: self.proc.clone(),
12430            selection: query,
12431            graphql_client: self.graphql_client.clone(),
12432        }
12433    }
12434    /// Update one or more clients.
12435    ///
12436    /// # Arguments
12437    ///
12438    /// * `clients` - The clients to update
12439    pub fn with_updated_clients(&self, clients: Vec<impl Into<String>>) -> ModuleSource {
12440        let mut query = self.selection.select("withUpdatedClients");
12441        query = query.arg(
12442            "clients",
12443            clients
12444                .into_iter()
12445                .map(|i| i.into())
12446                .collect::<Vec<String>>(),
12447        );
12448        ModuleSource {
12449            proc: self.proc.clone(),
12450            selection: query,
12451            graphql_client: self.graphql_client.clone(),
12452        }
12453    }
12454    /// Remove the current blueprint from the module source.
12455    pub fn without_blueprint(&self) -> ModuleSource {
12456        let query = self.selection.select("withoutBlueprint");
12457        ModuleSource {
12458            proc: self.proc.clone(),
12459            selection: query,
12460            graphql_client: self.graphql_client.clone(),
12461        }
12462    }
12463    /// Remove a client from the module source.
12464    ///
12465    /// # Arguments
12466    ///
12467    /// * `path` - The path of the client to remove.
12468    pub fn without_client(&self, path: impl Into<String>) -> ModuleSource {
12469        let mut query = self.selection.select("withoutClient");
12470        query = query.arg("path", path.into());
12471        ModuleSource {
12472            proc: self.proc.clone(),
12473            selection: query,
12474            graphql_client: self.graphql_client.clone(),
12475        }
12476    }
12477    /// Remove the provided dependencies from the module source's dependency list.
12478    ///
12479    /// # Arguments
12480    ///
12481    /// * `dependencies` - The dependencies to remove.
12482    pub fn without_dependencies(&self, dependencies: Vec<impl Into<String>>) -> ModuleSource {
12483        let mut query = self.selection.select("withoutDependencies");
12484        query = query.arg(
12485            "dependencies",
12486            dependencies
12487                .into_iter()
12488                .map(|i| i.into())
12489                .collect::<Vec<String>>(),
12490        );
12491        ModuleSource {
12492            proc: self.proc.clone(),
12493            selection: query,
12494            graphql_client: self.graphql_client.clone(),
12495        }
12496    }
12497    /// Disable experimental features for the module source.
12498    ///
12499    /// # Arguments
12500    ///
12501    /// * `features` - The experimental features to disable.
12502    pub fn without_experimental_features(
12503        &self,
12504        features: Vec<ModuleSourceExperimentalFeature>,
12505    ) -> ModuleSource {
12506        let mut query = self.selection.select("withoutExperimentalFeatures");
12507        query = query.arg("features", features);
12508        ModuleSource {
12509            proc: self.proc.clone(),
12510            selection: query,
12511            graphql_client: self.graphql_client.clone(),
12512        }
12513    }
12514    /// Remove the provided toolchains from the module source.
12515    ///
12516    /// # Arguments
12517    ///
12518    /// * `toolchains` - The toolchains to remove.
12519    pub fn without_toolchains(&self, toolchains: Vec<impl Into<String>>) -> ModuleSource {
12520        let mut query = self.selection.select("withoutToolchains");
12521        query = query.arg(
12522            "toolchains",
12523            toolchains
12524                .into_iter()
12525                .map(|i| i.into())
12526                .collect::<Vec<String>>(),
12527        );
12528        ModuleSource {
12529            proc: self.proc.clone(),
12530            selection: query,
12531            graphql_client: self.graphql_client.clone(),
12532        }
12533    }
12534}
12535impl Node for ModuleSource {
12536    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
12537        let query = self.selection.select("id");
12538        let graphql_client = self.graphql_client.clone();
12539        async move { query.execute(graphql_client).await }
12540    }
12541}
12542impl Syncer for ModuleSource {
12543    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
12544        let query = self.selection.select("id");
12545        let graphql_client = self.graphql_client.clone();
12546        async move { query.execute(graphql_client).await }
12547    }
12548    fn sync(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
12549        let query = self.selection.select("sync");
12550        let graphql_client = self.graphql_client.clone();
12551        async move { query.execute(graphql_client).await }
12552    }
12553}
12554#[derive(Clone)]
12555pub struct ObjectTypeDef {
12556    pub proc: Option<Arc<DaggerSessionProc>>,
12557    pub selection: Selection,
12558    pub graphql_client: DynGraphQLClient,
12559}
12560impl IntoID<Id> for ObjectTypeDef {
12561    fn into_id(
12562        self,
12563    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
12564        Box::pin(async move { self.id().await })
12565    }
12566}
12567impl Loadable for ObjectTypeDef {
12568    fn graphql_type() -> &'static str {
12569        "ObjectTypeDef"
12570    }
12571    fn from_query(
12572        proc: Option<Arc<DaggerSessionProc>>,
12573        selection: Selection,
12574        graphql_client: DynGraphQLClient,
12575    ) -> Self {
12576        Self {
12577            proc,
12578            selection,
12579            graphql_client,
12580        }
12581    }
12582}
12583impl ObjectTypeDef {
12584    /// The function used to construct new instances of this object, if any.
12585    pub fn constructor(&self) -> Function {
12586        let query = self.selection.select("constructor");
12587        Function {
12588            proc: self.proc.clone(),
12589            selection: query,
12590            graphql_client: self.graphql_client.clone(),
12591        }
12592    }
12593    /// The reason this enum member is deprecated, if any.
12594    pub async fn deprecated(&self) -> Result<String, DaggerError> {
12595        let query = self.selection.select("deprecated");
12596        query.execute(self.graphql_client.clone()).await
12597    }
12598    /// The doc string for the object, if any.
12599    pub async fn description(&self) -> Result<String, DaggerError> {
12600        let query = self.selection.select("description");
12601        query.execute(self.graphql_client.clone()).await
12602    }
12603    /// Static fields defined on this object, if any.
12604    pub async fn fields(&self) -> Result<Vec<FieldTypeDef>, DaggerError> {
12605        let query = self.selection.select("fields");
12606        let query = query.select("id");
12607        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
12608        Ok(ids
12609            .into_iter()
12610            .map(|id| FieldTypeDef {
12611                proc: self.proc.clone(),
12612                selection: crate::querybuilder::query()
12613                    .select("node")
12614                    .arg("id", &id.0)
12615                    .inline_fragment("FieldTypeDef"),
12616                graphql_client: self.graphql_client.clone(),
12617            })
12618            .collect())
12619    }
12620    /// Functions defined on this object, if any.
12621    pub async fn functions(&self) -> Result<Vec<Function>, DaggerError> {
12622        let query = self.selection.select("functions");
12623        let query = query.select("id");
12624        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
12625        Ok(ids
12626            .into_iter()
12627            .map(|id| Function {
12628                proc: self.proc.clone(),
12629                selection: crate::querybuilder::query()
12630                    .select("node")
12631                    .arg("id", &id.0)
12632                    .inline_fragment("Function"),
12633                graphql_client: self.graphql_client.clone(),
12634            })
12635            .collect())
12636    }
12637    /// A unique identifier for this ObjectTypeDef.
12638    pub async fn id(&self) -> Result<Id, DaggerError> {
12639        let query = self.selection.select("id");
12640        query.execute(self.graphql_client.clone()).await
12641    }
12642    /// The name of the object.
12643    pub async fn name(&self) -> Result<String, DaggerError> {
12644        let query = self.selection.select("name");
12645        query.execute(self.graphql_client.clone()).await
12646    }
12647    /// The location of this object declaration.
12648    pub fn source_map(&self) -> SourceMap {
12649        let query = self.selection.select("sourceMap");
12650        SourceMap {
12651            proc: self.proc.clone(),
12652            selection: query,
12653            graphql_client: self.graphql_client.clone(),
12654        }
12655    }
12656    /// If this ObjectTypeDef is associated with a Module, the name of the module. Unset otherwise.
12657    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
12658        let query = self.selection.select("sourceModuleName");
12659        query.execute(self.graphql_client.clone()).await
12660    }
12661}
12662impl Node for ObjectTypeDef {
12663    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
12664        let query = self.selection.select("id");
12665        let graphql_client = self.graphql_client.clone();
12666        async move { query.execute(graphql_client).await }
12667    }
12668}
12669#[derive(Clone)]
12670pub struct Port {
12671    pub proc: Option<Arc<DaggerSessionProc>>,
12672    pub selection: Selection,
12673    pub graphql_client: DynGraphQLClient,
12674}
12675impl IntoID<Id> for Port {
12676    fn into_id(
12677        self,
12678    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
12679        Box::pin(async move { self.id().await })
12680    }
12681}
12682impl Loadable for Port {
12683    fn graphql_type() -> &'static str {
12684        "Port"
12685    }
12686    fn from_query(
12687        proc: Option<Arc<DaggerSessionProc>>,
12688        selection: Selection,
12689        graphql_client: DynGraphQLClient,
12690    ) -> Self {
12691        Self {
12692            proc,
12693            selection,
12694            graphql_client,
12695        }
12696    }
12697}
12698impl Port {
12699    /// The port description.
12700    pub async fn description(&self) -> Result<String, DaggerError> {
12701        let query = self.selection.select("description");
12702        query.execute(self.graphql_client.clone()).await
12703    }
12704    /// Skip the health check when run as a service.
12705    pub async fn experimental_skip_healthcheck(&self) -> Result<bool, DaggerError> {
12706        let query = self.selection.select("experimentalSkipHealthcheck");
12707        query.execute(self.graphql_client.clone()).await
12708    }
12709    /// A unique identifier for this Port.
12710    pub async fn id(&self) -> Result<Id, DaggerError> {
12711        let query = self.selection.select("id");
12712        query.execute(self.graphql_client.clone()).await
12713    }
12714    /// The port number.
12715    pub async fn port(&self) -> Result<isize, DaggerError> {
12716        let query = self.selection.select("port");
12717        query.execute(self.graphql_client.clone()).await
12718    }
12719    /// The transport layer protocol.
12720    pub async fn protocol(&self) -> Result<NetworkProtocol, DaggerError> {
12721        let query = self.selection.select("protocol");
12722        query.execute(self.graphql_client.clone()).await
12723    }
12724}
12725impl Node for Port {
12726    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
12727        let query = self.selection.select("id");
12728        let graphql_client = self.graphql_client.clone();
12729        async move { query.execute(graphql_client).await }
12730    }
12731}
12732#[derive(Clone)]
12733pub struct Query {
12734    pub proc: Option<Arc<DaggerSessionProc>>,
12735    pub selection: Selection,
12736    pub graphql_client: DynGraphQLClient,
12737}
12738#[derive(Builder, Debug, PartialEq)]
12739pub struct QueryCacheVolumeOpts<'a> {
12740    /// A user:group to set for the cache volume root.
12741    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
12742    /// If the group is omitted, it defaults to the same as the user.
12743    #[builder(setter(into, strip_option), default)]
12744    pub owner: Option<&'a str>,
12745    /// Sharing mode of the cache volume.
12746    #[builder(setter(into, strip_option), default)]
12747    pub sharing: Option<CacheSharingMode>,
12748    /// Identifier of the directory to use as the cache volume's root.
12749    #[builder(setter(into, strip_option), default)]
12750    pub source: Option<Id>,
12751}
12752#[derive(Builder, Debug, PartialEq)]
12753pub struct QueryContainerOpts {
12754    /// Platform to initialize the container with. Defaults to the native platform of the current engine
12755    #[builder(setter(into, strip_option), default)]
12756    pub platform: Option<Platform>,
12757}
12758#[derive(Builder, Debug, PartialEq)]
12759pub struct QueryCurrentTypeDefsOpts {
12760    /// Strip core API functions from the Query type, leaving only module-sourced functions (constructors, entrypoint proxies, etc.).
12761    /// Core types (Container, Directory, etc.) are kept so return types and method chaining still work.
12762    #[builder(setter(into, strip_option), default)]
12763    pub hide_core: Option<bool>,
12764    /// Return the full referenced typedef closure instead of only top-level served typedefs.
12765    #[builder(setter(into, strip_option), default)]
12766    pub return_all_types: Option<bool>,
12767}
12768#[derive(Builder, Debug, PartialEq)]
12769pub struct QueryEnvOpts {
12770    /// Give the environment the same privileges as the caller: core API including host access, current module, and dependencies
12771    #[builder(setter(into, strip_option), default)]
12772    pub privileged: Option<bool>,
12773    /// Allow new outputs to be declared and saved in the environment
12774    #[builder(setter(into, strip_option), default)]
12775    pub writable: Option<bool>,
12776}
12777#[derive(Builder, Debug, PartialEq)]
12778pub struct QueryEnvFileOpts {
12779    /// Replace "${VAR}" or "$VAR" with the value of other vars
12780    #[builder(setter(into, strip_option), default)]
12781    pub expand: Option<bool>,
12782}
12783#[derive(Builder, Debug, PartialEq)]
12784pub struct QueryFileOpts {
12785    /// Permissions of the new file. Example: 0600
12786    #[builder(setter(into, strip_option), default)]
12787    pub permissions: Option<isize>,
12788}
12789#[derive(Builder, Debug, PartialEq)]
12790pub struct QueryGitOpts<'a> {
12791    /// A service which must be started before the repo is fetched.
12792    #[builder(setter(into, strip_option), default)]
12793    pub experimental_service_host: Option<Id>,
12794    /// Secret used to populate the Authorization HTTP header
12795    #[builder(setter(into, strip_option), default)]
12796    pub http_auth_header: Option<Id>,
12797    /// Secret used to populate the password during basic HTTP Authorization
12798    #[builder(setter(into, strip_option), default)]
12799    pub http_auth_token: Option<Id>,
12800    /// Username used to populate the password during basic HTTP Authorization
12801    #[builder(setter(into, strip_option), default)]
12802    pub http_auth_username: Option<&'a str>,
12803    /// DEPRECATED: Set to true to keep .git directory.
12804    #[builder(setter(into, strip_option), default)]
12805    pub keep_git_dir: Option<bool>,
12806    /// Set SSH auth socket
12807    #[builder(setter(into, strip_option), default)]
12808    pub ssh_auth_socket: Option<Id>,
12809    /// Set SSH known hosts
12810    #[builder(setter(into, strip_option), default)]
12811    pub ssh_known_hosts: Option<&'a str>,
12812}
12813#[derive(Builder, Debug, PartialEq)]
12814pub struct QueryHttpOpts<'a> {
12815    /// Secret used to populate the Authorization HTTP header
12816    #[builder(setter(into, strip_option), default)]
12817    pub auth_header: Option<Id>,
12818    /// Expected digest of the downloaded content (e.g., "sha256:...").
12819    #[builder(setter(into, strip_option), default)]
12820    pub checksum: Option<&'a str>,
12821    /// A service which must be started before the URL is fetched.
12822    #[builder(setter(into, strip_option), default)]
12823    pub experimental_service_host: Option<Id>,
12824    /// File name to use for the file. Defaults to the last part of the URL.
12825    #[builder(setter(into, strip_option), default)]
12826    pub name: Option<&'a str>,
12827    /// Permissions to set on the file.
12828    #[builder(setter(into, strip_option), default)]
12829    pub permissions: Option<isize>,
12830}
12831#[derive(Builder, Debug, PartialEq)]
12832pub struct QueryLlmOpts<'a> {
12833    /// Cap the number of API calls for this LLM
12834    #[builder(setter(into, strip_option), default)]
12835    pub max_api_calls: Option<isize>,
12836    /// Model to use
12837    #[builder(setter(into, strip_option), default)]
12838    pub model: Option<&'a str>,
12839}
12840#[derive(Builder, Debug, PartialEq)]
12841pub struct QueryModuleSourceOpts<'a> {
12842    /// If true, do not error out if the provided ref string is a local path and does not exist yet. Useful when initializing new modules in directories that don't exist yet.
12843    #[builder(setter(into, strip_option), default)]
12844    pub allow_not_exists: Option<bool>,
12845    /// If true, do not attempt to find dagger.json in a parent directory of the provided path. Only relevant for local module sources.
12846    #[builder(setter(into, strip_option), default)]
12847    pub disable_find_up: Option<bool>,
12848    /// The pinned version of the module source
12849    #[builder(setter(into, strip_option), default)]
12850    pub ref_pin: Option<&'a str>,
12851    /// If set, error out if the ref string is not of the provided requireKind.
12852    #[builder(setter(into, strip_option), default)]
12853    pub require_kind: Option<ModuleSourceKind>,
12854}
12855#[derive(Builder, Debug, PartialEq)]
12856pub struct QuerySecretOpts<'a> {
12857    /// If set, the given string will be used as the cache key for this secret. This means that any secrets with the same cache key will be considered equivalent in terms of cache lookups, even if they have different URIs or plaintext values.
12858    /// For example, two secrets with the same cache key provided as secret env vars to other wise equivalent containers will result in the container withExecs hitting the cache for each other.
12859    /// If not set, the cache key for the secret will be derived from its plaintext value as looked up when the secret is constructed.
12860    #[builder(setter(into, strip_option), default)]
12861    pub cache_key: Option<&'a str>,
12862}
12863impl IntoID<Id> for Query {
12864    fn into_id(
12865        self,
12866    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
12867        Box::pin(async move { self.id().await })
12868    }
12869}
12870impl Loadable for Query {
12871    fn graphql_type() -> &'static str {
12872        "Query"
12873    }
12874    fn from_query(
12875        proc: Option<Arc<DaggerSessionProc>>,
12876        selection: Selection,
12877        graphql_client: DynGraphQLClient,
12878    ) -> Self {
12879        Self {
12880            proc,
12881            selection,
12882            graphql_client,
12883        }
12884    }
12885}
12886impl Query {
12887    /// initialize an address to load directories, containers, secrets or other object types.
12888    pub fn address(&self, value: impl Into<String>) -> Address {
12889        let mut query = self.selection.select("address");
12890        query = query.arg("value", value.into());
12891        Address {
12892            proc: self.proc.clone(),
12893            selection: query,
12894            graphql_client: self.graphql_client.clone(),
12895        }
12896    }
12897    /// Constructs a cache volume for a given cache key.
12898    ///
12899    /// # Arguments
12900    ///
12901    /// * `key` - A string identifier to target this cache volume (e.g., "modules-cache").
12902    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12903    pub fn cache_volume(&self, key: impl Into<String>) -> CacheVolume {
12904        let mut query = self.selection.select("cacheVolume");
12905        query = query.arg("key", key.into());
12906        CacheVolume {
12907            proc: self.proc.clone(),
12908            selection: query,
12909            graphql_client: self.graphql_client.clone(),
12910        }
12911    }
12912    /// Constructs a cache volume for a given cache key.
12913    ///
12914    /// # Arguments
12915    ///
12916    /// * `key` - A string identifier to target this cache volume (e.g., "modules-cache").
12917    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12918    pub fn cache_volume_opts<'a>(
12919        &self,
12920        key: impl Into<String>,
12921        opts: QueryCacheVolumeOpts<'a>,
12922    ) -> CacheVolume {
12923        let mut query = self.selection.select("cacheVolume");
12924        query = query.arg("key", key.into());
12925        if let Some(source) = opts.source {
12926            query = query.arg("source", source);
12927        }
12928        if let Some(sharing) = opts.sharing {
12929            query = query.arg("sharing", sharing);
12930        }
12931        if let Some(owner) = opts.owner {
12932            query = query.arg("owner", owner);
12933        }
12934        CacheVolume {
12935            proc: self.proc.clone(),
12936            selection: query,
12937            graphql_client: self.graphql_client.clone(),
12938        }
12939    }
12940    /// Creates an empty changeset
12941    pub fn changeset(&self) -> Changeset {
12942        let query = self.selection.select("changeset");
12943        Changeset {
12944            proc: self.proc.clone(),
12945            selection: query,
12946            graphql_client: self.graphql_client.clone(),
12947        }
12948    }
12949    /// Dagger Cloud configuration and state
12950    pub fn cloud(&self) -> Cloud {
12951        let query = self.selection.select("cloud");
12952        Cloud {
12953            proc: self.proc.clone(),
12954            selection: query,
12955            graphql_client: self.graphql_client.clone(),
12956        }
12957    }
12958    /// Creates a scratch container, with no image or metadata.
12959    /// To pull an image, follow up with the "from" function.
12960    ///
12961    /// # Arguments
12962    ///
12963    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12964    pub fn container(&self) -> Container {
12965        let query = self.selection.select("container");
12966        Container {
12967            proc: self.proc.clone(),
12968            selection: query,
12969            graphql_client: self.graphql_client.clone(),
12970        }
12971    }
12972    /// Creates a scratch container, with no image or metadata.
12973    /// To pull an image, follow up with the "from" function.
12974    ///
12975    /// # Arguments
12976    ///
12977    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12978    pub fn container_opts(&self, opts: QueryContainerOpts) -> Container {
12979        let mut query = self.selection.select("container");
12980        if let Some(platform) = opts.platform {
12981            query = query.arg("platform", platform);
12982        }
12983        Container {
12984            proc: self.proc.clone(),
12985            selection: query,
12986            graphql_client: self.graphql_client.clone(),
12987        }
12988    }
12989    /// Returns the current environment
12990    /// When called from a function invoked via an LLM tool call, this will be the LLM's current environment, including any modifications made through calling tools. Env values returned by functions become the new environment for subsequent calls, and Changeset values returned by functions are applied to the environment's workspace.
12991    /// When called from a module function outside of an LLM, this returns an Env with the current module installed, and with the current module's source directory as its workspace.
12992    pub fn current_env(&self) -> Env {
12993        let query = self.selection.select("currentEnv");
12994        Env {
12995            proc: self.proc.clone(),
12996            selection: query,
12997            graphql_client: self.graphql_client.clone(),
12998        }
12999    }
13000    /// The FunctionCall context that the SDK caller is currently executing in.
13001    /// If the caller is not currently executing in a function, this will return an error.
13002    pub fn current_function_call(&self) -> FunctionCall {
13003        let query = self.selection.select("currentFunctionCall");
13004        FunctionCall {
13005            proc: self.proc.clone(),
13006            selection: query,
13007            graphql_client: self.graphql_client.clone(),
13008        }
13009    }
13010    /// The module currently being served in the session, if any.
13011    pub fn current_module(&self) -> CurrentModule {
13012        let query = self.selection.select("currentModule");
13013        CurrentModule {
13014            proc: self.proc.clone(),
13015            selection: query,
13016            graphql_client: self.graphql_client.clone(),
13017        }
13018    }
13019    /// The TypeDef representations of the objects currently being served in the session.
13020    ///
13021    /// # Arguments
13022    ///
13023    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13024    pub async fn current_type_defs(&self) -> Result<Vec<TypeDef>, DaggerError> {
13025        let query = self.selection.select("currentTypeDefs");
13026        let query = query.select("id");
13027        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
13028        Ok(ids
13029            .into_iter()
13030            .map(|id| TypeDef {
13031                proc: self.proc.clone(),
13032                selection: crate::querybuilder::query()
13033                    .select("node")
13034                    .arg("id", &id.0)
13035                    .inline_fragment("TypeDef"),
13036                graphql_client: self.graphql_client.clone(),
13037            })
13038            .collect())
13039    }
13040    /// The TypeDef representations of the objects currently being served in the session.
13041    ///
13042    /// # Arguments
13043    ///
13044    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13045    pub async fn current_type_defs_opts(
13046        &self,
13047        opts: QueryCurrentTypeDefsOpts,
13048    ) -> Result<Vec<TypeDef>, DaggerError> {
13049        let mut query = self.selection.select("currentTypeDefs");
13050        if let Some(return_all_types) = opts.return_all_types {
13051            query = query.arg("returnAllTypes", return_all_types);
13052        }
13053        if let Some(hide_core) = opts.hide_core {
13054            query = query.arg("hideCore", hide_core);
13055        }
13056        let query = query.select("id");
13057        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
13058        Ok(ids
13059            .into_iter()
13060            .map(|id| TypeDef {
13061                proc: self.proc.clone(),
13062                selection: crate::querybuilder::query()
13063                    .select("node")
13064                    .arg("id", &id.0)
13065                    .inline_fragment("TypeDef"),
13066                graphql_client: self.graphql_client.clone(),
13067            })
13068            .collect())
13069    }
13070    /// Detect and return the current workspace.
13071    pub fn current_workspace(&self) -> Workspace {
13072        let query = self.selection.select("currentWorkspace");
13073        Workspace {
13074            proc: self.proc.clone(),
13075            selection: query,
13076            graphql_client: self.graphql_client.clone(),
13077        }
13078    }
13079    /// The default platform of the engine.
13080    pub async fn default_platform(&self) -> Result<Platform, DaggerError> {
13081        let query = self.selection.select("defaultPlatform");
13082        query.execute(self.graphql_client.clone()).await
13083    }
13084    /// Creates an empty directory.
13085    pub fn directory(&self) -> Directory {
13086        let query = self.selection.select("directory");
13087        Directory {
13088            proc: self.proc.clone(),
13089            selection: query,
13090            graphql_client: self.graphql_client.clone(),
13091        }
13092    }
13093    /// The Dagger engine container configuration and state
13094    pub fn engine(&self) -> Engine {
13095        let query = self.selection.select("engine");
13096        Engine {
13097            proc: self.proc.clone(),
13098            selection: query,
13099            graphql_client: self.graphql_client.clone(),
13100        }
13101    }
13102    /// Initializes a new environment
13103    ///
13104    /// # Arguments
13105    ///
13106    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13107    pub fn env(&self) -> Env {
13108        let query = self.selection.select("env");
13109        Env {
13110            proc: self.proc.clone(),
13111            selection: query,
13112            graphql_client: self.graphql_client.clone(),
13113        }
13114    }
13115    /// Initializes a new environment
13116    ///
13117    /// # Arguments
13118    ///
13119    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13120    pub fn env_opts(&self, opts: QueryEnvOpts) -> Env {
13121        let mut query = self.selection.select("env");
13122        if let Some(privileged) = opts.privileged {
13123            query = query.arg("privileged", privileged);
13124        }
13125        if let Some(writable) = opts.writable {
13126            query = query.arg("writable", writable);
13127        }
13128        Env {
13129            proc: self.proc.clone(),
13130            selection: query,
13131            graphql_client: self.graphql_client.clone(),
13132        }
13133    }
13134    /// Initialize an environment file
13135    ///
13136    /// # Arguments
13137    ///
13138    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13139    pub fn env_file(&self) -> EnvFile {
13140        let query = self.selection.select("envFile");
13141        EnvFile {
13142            proc: self.proc.clone(),
13143            selection: query,
13144            graphql_client: self.graphql_client.clone(),
13145        }
13146    }
13147    /// Initialize an environment file
13148    ///
13149    /// # Arguments
13150    ///
13151    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13152    pub fn env_file_opts(&self, opts: QueryEnvFileOpts) -> EnvFile {
13153        let mut query = self.selection.select("envFile");
13154        if let Some(expand) = opts.expand {
13155            query = query.arg("expand", expand);
13156        }
13157        EnvFile {
13158            proc: self.proc.clone(),
13159            selection: query,
13160            graphql_client: self.graphql_client.clone(),
13161        }
13162    }
13163    /// Create a new error.
13164    ///
13165    /// # Arguments
13166    ///
13167    /// * `message` - A brief description of the error.
13168    pub fn error(&self, message: impl Into<String>) -> Error {
13169        let mut query = self.selection.select("error");
13170        query = query.arg("message", message.into());
13171        Error {
13172            proc: self.proc.clone(),
13173            selection: query,
13174            graphql_client: self.graphql_client.clone(),
13175        }
13176    }
13177    /// Creates a file with the specified contents.
13178    ///
13179    /// # Arguments
13180    ///
13181    /// * `name` - Name of the new file. Example: "foo.txt"
13182    /// * `contents` - Contents of the new file. Example: "Hello world!"
13183    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13184    pub fn file(&self, name: impl Into<String>, contents: impl Into<String>) -> File {
13185        let mut query = self.selection.select("file");
13186        query = query.arg("name", name.into());
13187        query = query.arg("contents", contents.into());
13188        File {
13189            proc: self.proc.clone(),
13190            selection: query,
13191            graphql_client: self.graphql_client.clone(),
13192        }
13193    }
13194    /// Creates a file with the specified contents.
13195    ///
13196    /// # Arguments
13197    ///
13198    /// * `name` - Name of the new file. Example: "foo.txt"
13199    /// * `contents` - Contents of the new file. Example: "Hello world!"
13200    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13201    pub fn file_opts(
13202        &self,
13203        name: impl Into<String>,
13204        contents: impl Into<String>,
13205        opts: QueryFileOpts,
13206    ) -> File {
13207        let mut query = self.selection.select("file");
13208        query = query.arg("name", name.into());
13209        query = query.arg("contents", contents.into());
13210        if let Some(permissions) = opts.permissions {
13211            query = query.arg("permissions", permissions);
13212        }
13213        File {
13214            proc: self.proc.clone(),
13215            selection: query,
13216            graphql_client: self.graphql_client.clone(),
13217        }
13218    }
13219    /// Creates a function.
13220    ///
13221    /// # Arguments
13222    ///
13223    /// * `name` - Name of the function, in its original format from the implementation language.
13224    /// * `return_type` - Return type of the function.
13225    pub fn function(&self, name: impl Into<String>, return_type: impl IntoID<Id>) -> Function {
13226        let mut query = self.selection.select("function");
13227        query = query.arg("name", name.into());
13228        query = query.arg_lazy(
13229            "returnType",
13230            Box::new(move || {
13231                let return_type = return_type.clone();
13232                Box::pin(async move { return_type.into_id().await.unwrap().quote() })
13233            }),
13234        );
13235        Function {
13236            proc: self.proc.clone(),
13237            selection: query,
13238            graphql_client: self.graphql_client.clone(),
13239        }
13240    }
13241    /// Create a code generation result, given a directory containing the generated code.
13242    pub fn generated_code(&self, code: impl IntoID<Id>) -> GeneratedCode {
13243        let mut query = self.selection.select("generatedCode");
13244        query = query.arg_lazy(
13245            "code",
13246            Box::new(move || {
13247                let code = code.clone();
13248                Box::pin(async move { code.into_id().await.unwrap().quote() })
13249            }),
13250        );
13251        GeneratedCode {
13252            proc: self.proc.clone(),
13253            selection: query,
13254            graphql_client: self.graphql_client.clone(),
13255        }
13256    }
13257    /// Queries a Git repository.
13258    ///
13259    /// # Arguments
13260    ///
13261    /// * `url` - URL of the git repository.
13262    ///
13263    /// Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.
13264    ///
13265    /// Suffix ".git" is optional.
13266    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13267    pub fn git(&self, url: impl Into<String>) -> GitRepository {
13268        let mut query = self.selection.select("git");
13269        query = query.arg("url", url.into());
13270        GitRepository {
13271            proc: self.proc.clone(),
13272            selection: query,
13273            graphql_client: self.graphql_client.clone(),
13274        }
13275    }
13276    /// Queries a Git repository.
13277    ///
13278    /// # Arguments
13279    ///
13280    /// * `url` - URL of the git repository.
13281    ///
13282    /// Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.
13283    ///
13284    /// Suffix ".git" is optional.
13285    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13286    pub fn git_opts<'a>(&self, url: impl Into<String>, opts: QueryGitOpts<'a>) -> GitRepository {
13287        let mut query = self.selection.select("git");
13288        query = query.arg("url", url.into());
13289        if let Some(keep_git_dir) = opts.keep_git_dir {
13290            query = query.arg("keepGitDir", keep_git_dir);
13291        }
13292        if let Some(ssh_known_hosts) = opts.ssh_known_hosts {
13293            query = query.arg("sshKnownHosts", ssh_known_hosts);
13294        }
13295        if let Some(ssh_auth_socket) = opts.ssh_auth_socket {
13296            query = query.arg("sshAuthSocket", ssh_auth_socket);
13297        }
13298        if let Some(http_auth_username) = opts.http_auth_username {
13299            query = query.arg("httpAuthUsername", http_auth_username);
13300        }
13301        if let Some(http_auth_token) = opts.http_auth_token {
13302            query = query.arg("httpAuthToken", http_auth_token);
13303        }
13304        if let Some(http_auth_header) = opts.http_auth_header {
13305            query = query.arg("httpAuthHeader", http_auth_header);
13306        }
13307        if let Some(experimental_service_host) = opts.experimental_service_host {
13308            query = query.arg("experimentalServiceHost", experimental_service_host);
13309        }
13310        GitRepository {
13311            proc: self.proc.clone(),
13312            selection: query,
13313            graphql_client: self.graphql_client.clone(),
13314        }
13315    }
13316    /// Queries the host environment.
13317    pub fn host(&self) -> Host {
13318        let query = self.selection.select("host");
13319        Host {
13320            proc: self.proc.clone(),
13321            selection: query,
13322            graphql_client: self.graphql_client.clone(),
13323        }
13324    }
13325    /// Returns a file containing an http remote url content.
13326    ///
13327    /// # Arguments
13328    ///
13329    /// * `url` - HTTP url to get the content from (e.g., "https://docs.dagger.io").
13330    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13331    pub fn http(&self, url: impl Into<String>) -> File {
13332        let mut query = self.selection.select("http");
13333        query = query.arg("url", url.into());
13334        File {
13335            proc: self.proc.clone(),
13336            selection: query,
13337            graphql_client: self.graphql_client.clone(),
13338        }
13339    }
13340    /// Returns a file containing an http remote url content.
13341    ///
13342    /// # Arguments
13343    ///
13344    /// * `url` - HTTP url to get the content from (e.g., "https://docs.dagger.io").
13345    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13346    pub fn http_opts<'a>(&self, url: impl Into<String>, opts: QueryHttpOpts<'a>) -> File {
13347        let mut query = self.selection.select("http");
13348        query = query.arg("url", url.into());
13349        if let Some(name) = opts.name {
13350            query = query.arg("name", name);
13351        }
13352        if let Some(permissions) = opts.permissions {
13353            query = query.arg("permissions", permissions);
13354        }
13355        if let Some(checksum) = opts.checksum {
13356            query = query.arg("checksum", checksum);
13357        }
13358        if let Some(auth_header) = opts.auth_header {
13359            query = query.arg("authHeader", auth_header);
13360        }
13361        if let Some(experimental_service_host) = opts.experimental_service_host {
13362            query = query.arg("experimentalServiceHost", experimental_service_host);
13363        }
13364        File {
13365            proc: self.proc.clone(),
13366            selection: query,
13367            graphql_client: self.graphql_client.clone(),
13368        }
13369    }
13370    /// A unique identifier for this Query.
13371    pub async fn id(&self) -> Result<Id, DaggerError> {
13372        let query = self.selection.select("id");
13373        query.execute(self.graphql_client.clone()).await
13374    }
13375    /// Initialize a JSON value
13376    pub fn json(&self) -> JsonValue {
13377        let query = self.selection.select("json");
13378        JsonValue {
13379            proc: self.proc.clone(),
13380            selection: query,
13381            graphql_client: self.graphql_client.clone(),
13382        }
13383    }
13384    /// Initialize a Large Language Model (LLM)
13385    ///
13386    /// # Arguments
13387    ///
13388    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13389    pub fn llm(&self) -> Llm {
13390        let query = self.selection.select("llm");
13391        Llm {
13392            proc: self.proc.clone(),
13393            selection: query,
13394            graphql_client: self.graphql_client.clone(),
13395        }
13396    }
13397    /// Initialize a Large Language Model (LLM)
13398    ///
13399    /// # Arguments
13400    ///
13401    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13402    pub fn llm_opts<'a>(&self, opts: QueryLlmOpts<'a>) -> Llm {
13403        let mut query = self.selection.select("llm");
13404        if let Some(model) = opts.model {
13405            query = query.arg("model", model);
13406        }
13407        if let Some(max_api_calls) = opts.max_api_calls {
13408            query = query.arg("maxAPICalls", max_api_calls);
13409        }
13410        Llm {
13411            proc: self.proc.clone(),
13412            selection: query,
13413            graphql_client: self.graphql_client.clone(),
13414        }
13415    }
13416    /// Load a Address from its ID.
13417    pub fn load_address_from_id(&self, id: impl IntoID<AddressId>) -> Address {
13418        let mut query = self.selection.select("loadAddressFromID");
13419        query = query.arg_lazy(
13420            "id",
13421            Box::new(move || {
13422                let id = id.clone();
13423                Box::pin(async move { id.into_id().await.unwrap().quote() })
13424            }),
13425        );
13426        Address {
13427            proc: self.proc.clone(),
13428            selection: query,
13429            graphql_client: self.graphql_client.clone(),
13430        }
13431    }
13432    /// Load a Binding from its ID.
13433    pub fn load_binding_from_id(&self, id: impl IntoID<BindingId>) -> Binding {
13434        let mut query = self.selection.select("loadBindingFromID");
13435        query = query.arg_lazy(
13436            "id",
13437            Box::new(move || {
13438                let id = id.clone();
13439                Box::pin(async move { id.into_id().await.unwrap().quote() })
13440            }),
13441        );
13442        Binding {
13443            proc: self.proc.clone(),
13444            selection: query,
13445            graphql_client: self.graphql_client.clone(),
13446        }
13447    }
13448    /// Load a CacheVolume from its ID.
13449    pub fn load_cache_volume_from_id(&self, id: impl IntoID<CacheVolumeId>) -> CacheVolume {
13450        let mut query = self.selection.select("loadCacheVolumeFromID");
13451        query = query.arg_lazy(
13452            "id",
13453            Box::new(move || {
13454                let id = id.clone();
13455                Box::pin(async move { id.into_id().await.unwrap().quote() })
13456            }),
13457        );
13458        CacheVolume {
13459            proc: self.proc.clone(),
13460            selection: query,
13461            graphql_client: self.graphql_client.clone(),
13462        }
13463    }
13464    /// Load a Changeset from its ID.
13465    pub fn load_changeset_from_id(&self, id: impl IntoID<ChangesetId>) -> Changeset {
13466        let mut query = self.selection.select("loadChangesetFromID");
13467        query = query.arg_lazy(
13468            "id",
13469            Box::new(move || {
13470                let id = id.clone();
13471                Box::pin(async move { id.into_id().await.unwrap().quote() })
13472            }),
13473        );
13474        Changeset {
13475            proc: self.proc.clone(),
13476            selection: query,
13477            graphql_client: self.graphql_client.clone(),
13478        }
13479    }
13480    /// Load a Check from its ID.
13481    pub fn load_check_from_id(&self, id: impl IntoID<CheckId>) -> Check {
13482        let mut query = self.selection.select("loadCheckFromID");
13483        query = query.arg_lazy(
13484            "id",
13485            Box::new(move || {
13486                let id = id.clone();
13487                Box::pin(async move { id.into_id().await.unwrap().quote() })
13488            }),
13489        );
13490        Check {
13491            proc: self.proc.clone(),
13492            selection: query,
13493            graphql_client: self.graphql_client.clone(),
13494        }
13495    }
13496    /// Load a CheckGroup from its ID.
13497    pub fn load_check_group_from_id(&self, id: impl IntoID<CheckGroupId>) -> CheckGroup {
13498        let mut query = self.selection.select("loadCheckGroupFromID");
13499        query = query.arg_lazy(
13500            "id",
13501            Box::new(move || {
13502                let id = id.clone();
13503                Box::pin(async move { id.into_id().await.unwrap().quote() })
13504            }),
13505        );
13506        CheckGroup {
13507            proc: self.proc.clone(),
13508            selection: query,
13509            graphql_client: self.graphql_client.clone(),
13510        }
13511    }
13512    /// Load a ClientFilesyncMirror from its ID.
13513    pub fn load_client_filesync_mirror_from_id(
13514        &self,
13515        id: impl IntoID<ClientFilesyncMirrorId>,
13516    ) -> ClientFilesyncMirror {
13517        let mut query = self.selection.select("loadClientFilesyncMirrorFromID");
13518        query = query.arg_lazy(
13519            "id",
13520            Box::new(move || {
13521                let id = id.clone();
13522                Box::pin(async move { id.into_id().await.unwrap().quote() })
13523            }),
13524        );
13525        ClientFilesyncMirror {
13526            proc: self.proc.clone(),
13527            selection: query,
13528            graphql_client: self.graphql_client.clone(),
13529        }
13530    }
13531    /// Load a Cloud from its ID.
13532    pub fn load_cloud_from_id(&self, id: impl IntoID<CloudId>) -> Cloud {
13533        let mut query = self.selection.select("loadCloudFromID");
13534        query = query.arg_lazy(
13535            "id",
13536            Box::new(move || {
13537                let id = id.clone();
13538                Box::pin(async move { id.into_id().await.unwrap().quote() })
13539            }),
13540        );
13541        Cloud {
13542            proc: self.proc.clone(),
13543            selection: query,
13544            graphql_client: self.graphql_client.clone(),
13545        }
13546    }
13547    /// Load a Container from its ID.
13548    pub fn load_container_from_id(&self, id: impl IntoID<ContainerId>) -> Container {
13549        let mut query = self.selection.select("loadContainerFromID");
13550        query = query.arg_lazy(
13551            "id",
13552            Box::new(move || {
13553                let id = id.clone();
13554                Box::pin(async move { id.into_id().await.unwrap().quote() })
13555            }),
13556        );
13557        Container {
13558            proc: self.proc.clone(),
13559            selection: query,
13560            graphql_client: self.graphql_client.clone(),
13561        }
13562    }
13563    /// Load a CurrentModule from its ID.
13564    pub fn load_current_module_from_id(&self, id: impl IntoID<CurrentModuleId>) -> CurrentModule {
13565        let mut query = self.selection.select("loadCurrentModuleFromID");
13566        query = query.arg_lazy(
13567            "id",
13568            Box::new(move || {
13569                let id = id.clone();
13570                Box::pin(async move { id.into_id().await.unwrap().quote() })
13571            }),
13572        );
13573        CurrentModule {
13574            proc: self.proc.clone(),
13575            selection: query,
13576            graphql_client: self.graphql_client.clone(),
13577        }
13578    }
13579    /// Load a DiffStat from its ID.
13580    pub fn load_diff_stat_from_id(&self, id: impl IntoID<DiffStatId>) -> DiffStat {
13581        let mut query = self.selection.select("loadDiffStatFromID");
13582        query = query.arg_lazy(
13583            "id",
13584            Box::new(move || {
13585                let id = id.clone();
13586                Box::pin(async move { id.into_id().await.unwrap().quote() })
13587            }),
13588        );
13589        DiffStat {
13590            proc: self.proc.clone(),
13591            selection: query,
13592            graphql_client: self.graphql_client.clone(),
13593        }
13594    }
13595    /// Load a Directory from its ID.
13596    pub fn load_directory_from_id(&self, id: impl IntoID<DirectoryId>) -> Directory {
13597        let mut query = self.selection.select("loadDirectoryFromID");
13598        query = query.arg_lazy(
13599            "id",
13600            Box::new(move || {
13601                let id = id.clone();
13602                Box::pin(async move { id.into_id().await.unwrap().quote() })
13603            }),
13604        );
13605        Directory {
13606            proc: self.proc.clone(),
13607            selection: query,
13608            graphql_client: self.graphql_client.clone(),
13609        }
13610    }
13611    /// Load a EngineCacheEntry from its ID.
13612    pub fn load_engine_cache_entry_from_id(
13613        &self,
13614        id: impl IntoID<EngineCacheEntryId>,
13615    ) -> EngineCacheEntry {
13616        let mut query = self.selection.select("loadEngineCacheEntryFromID");
13617        query = query.arg_lazy(
13618            "id",
13619            Box::new(move || {
13620                let id = id.clone();
13621                Box::pin(async move { id.into_id().await.unwrap().quote() })
13622            }),
13623        );
13624        EngineCacheEntry {
13625            proc: self.proc.clone(),
13626            selection: query,
13627            graphql_client: self.graphql_client.clone(),
13628        }
13629    }
13630    /// Load a EngineCacheEntrySet from its ID.
13631    pub fn load_engine_cache_entry_set_from_id(
13632        &self,
13633        id: impl IntoID<EngineCacheEntrySetId>,
13634    ) -> EngineCacheEntrySet {
13635        let mut query = self.selection.select("loadEngineCacheEntrySetFromID");
13636        query = query.arg_lazy(
13637            "id",
13638            Box::new(move || {
13639                let id = id.clone();
13640                Box::pin(async move { id.into_id().await.unwrap().quote() })
13641            }),
13642        );
13643        EngineCacheEntrySet {
13644            proc: self.proc.clone(),
13645            selection: query,
13646            graphql_client: self.graphql_client.clone(),
13647        }
13648    }
13649    /// Load a EngineCache from its ID.
13650    pub fn load_engine_cache_from_id(&self, id: impl IntoID<EngineCacheId>) -> EngineCache {
13651        let mut query = self.selection.select("loadEngineCacheFromID");
13652        query = query.arg_lazy(
13653            "id",
13654            Box::new(move || {
13655                let id = id.clone();
13656                Box::pin(async move { id.into_id().await.unwrap().quote() })
13657            }),
13658        );
13659        EngineCache {
13660            proc: self.proc.clone(),
13661            selection: query,
13662            graphql_client: self.graphql_client.clone(),
13663        }
13664    }
13665    /// Load a Engine from its ID.
13666    pub fn load_engine_from_id(&self, id: impl IntoID<EngineId>) -> Engine {
13667        let mut query = self.selection.select("loadEngineFromID");
13668        query = query.arg_lazy(
13669            "id",
13670            Box::new(move || {
13671                let id = id.clone();
13672                Box::pin(async move { id.into_id().await.unwrap().quote() })
13673            }),
13674        );
13675        Engine {
13676            proc: self.proc.clone(),
13677            selection: query,
13678            graphql_client: self.graphql_client.clone(),
13679        }
13680    }
13681    /// Load a EnumTypeDef from its ID.
13682    pub fn load_enum_type_def_from_id(&self, id: impl IntoID<EnumTypeDefId>) -> EnumTypeDef {
13683        let mut query = self.selection.select("loadEnumTypeDefFromID");
13684        query = query.arg_lazy(
13685            "id",
13686            Box::new(move || {
13687                let id = id.clone();
13688                Box::pin(async move { id.into_id().await.unwrap().quote() })
13689            }),
13690        );
13691        EnumTypeDef {
13692            proc: self.proc.clone(),
13693            selection: query,
13694            graphql_client: self.graphql_client.clone(),
13695        }
13696    }
13697    /// Load a EnumValueTypeDef from its ID.
13698    pub fn load_enum_value_type_def_from_id(
13699        &self,
13700        id: impl IntoID<EnumValueTypeDefId>,
13701    ) -> EnumValueTypeDef {
13702        let mut query = self.selection.select("loadEnumValueTypeDefFromID");
13703        query = query.arg_lazy(
13704            "id",
13705            Box::new(move || {
13706                let id = id.clone();
13707                Box::pin(async move { id.into_id().await.unwrap().quote() })
13708            }),
13709        );
13710        EnumValueTypeDef {
13711            proc: self.proc.clone(),
13712            selection: query,
13713            graphql_client: self.graphql_client.clone(),
13714        }
13715    }
13716    /// Load a EnvFile from its ID.
13717    pub fn load_env_file_from_id(&self, id: impl IntoID<EnvFileId>) -> EnvFile {
13718        let mut query = self.selection.select("loadEnvFileFromID");
13719        query = query.arg_lazy(
13720            "id",
13721            Box::new(move || {
13722                let id = id.clone();
13723                Box::pin(async move { id.into_id().await.unwrap().quote() })
13724            }),
13725        );
13726        EnvFile {
13727            proc: self.proc.clone(),
13728            selection: query,
13729            graphql_client: self.graphql_client.clone(),
13730        }
13731    }
13732    /// Load a Env from its ID.
13733    pub fn load_env_from_id(&self, id: impl IntoID<EnvId>) -> Env {
13734        let mut query = self.selection.select("loadEnvFromID");
13735        query = query.arg_lazy(
13736            "id",
13737            Box::new(move || {
13738                let id = id.clone();
13739                Box::pin(async move { id.into_id().await.unwrap().quote() })
13740            }),
13741        );
13742        Env {
13743            proc: self.proc.clone(),
13744            selection: query,
13745            graphql_client: self.graphql_client.clone(),
13746        }
13747    }
13748    /// Load a EnvVariable from its ID.
13749    pub fn load_env_variable_from_id(&self, id: impl IntoID<EnvVariableId>) -> EnvVariable {
13750        let mut query = self.selection.select("loadEnvVariableFromID");
13751        query = query.arg_lazy(
13752            "id",
13753            Box::new(move || {
13754                let id = id.clone();
13755                Box::pin(async move { id.into_id().await.unwrap().quote() })
13756            }),
13757        );
13758        EnvVariable {
13759            proc: self.proc.clone(),
13760            selection: query,
13761            graphql_client: self.graphql_client.clone(),
13762        }
13763    }
13764    /// Load a Error from its ID.
13765    pub fn load_error_from_id(&self, id: impl IntoID<ErrorId>) -> Error {
13766        let mut query = self.selection.select("loadErrorFromID");
13767        query = query.arg_lazy(
13768            "id",
13769            Box::new(move || {
13770                let id = id.clone();
13771                Box::pin(async move { id.into_id().await.unwrap().quote() })
13772            }),
13773        );
13774        Error {
13775            proc: self.proc.clone(),
13776            selection: query,
13777            graphql_client: self.graphql_client.clone(),
13778        }
13779    }
13780    /// Load a ErrorValue from its ID.
13781    pub fn load_error_value_from_id(&self, id: impl IntoID<ErrorValueId>) -> ErrorValue {
13782        let mut query = self.selection.select("loadErrorValueFromID");
13783        query = query.arg_lazy(
13784            "id",
13785            Box::new(move || {
13786                let id = id.clone();
13787                Box::pin(async move { id.into_id().await.unwrap().quote() })
13788            }),
13789        );
13790        ErrorValue {
13791            proc: self.proc.clone(),
13792            selection: query,
13793            graphql_client: self.graphql_client.clone(),
13794        }
13795    }
13796    /// Load a Exportable from its ID.
13797    pub fn load_exportable_from_id(&self, id: impl IntoID<ExportableId>) -> ExportableClient {
13798        let mut query = self.selection.select("loadExportableFromID");
13799        query = query.arg_lazy(
13800            "id",
13801            Box::new(move || {
13802                let id = id.clone();
13803                Box::pin(async move { id.into_id().await.unwrap().quote() })
13804            }),
13805        );
13806        ExportableClient {
13807            proc: self.proc.clone(),
13808            selection: query,
13809            graphql_client: self.graphql_client.clone(),
13810        }
13811    }
13812    /// Load a FieldTypeDef from its ID.
13813    pub fn load_field_type_def_from_id(&self, id: impl IntoID<FieldTypeDefId>) -> FieldTypeDef {
13814        let mut query = self.selection.select("loadFieldTypeDefFromID");
13815        query = query.arg_lazy(
13816            "id",
13817            Box::new(move || {
13818                let id = id.clone();
13819                Box::pin(async move { id.into_id().await.unwrap().quote() })
13820            }),
13821        );
13822        FieldTypeDef {
13823            proc: self.proc.clone(),
13824            selection: query,
13825            graphql_client: self.graphql_client.clone(),
13826        }
13827    }
13828    /// Load a File from its ID.
13829    pub fn load_file_from_id(&self, id: impl IntoID<FileId>) -> File {
13830        let mut query = self.selection.select("loadFileFromID");
13831        query = query.arg_lazy(
13832            "id",
13833            Box::new(move || {
13834                let id = id.clone();
13835                Box::pin(async move { id.into_id().await.unwrap().quote() })
13836            }),
13837        );
13838        File {
13839            proc: self.proc.clone(),
13840            selection: query,
13841            graphql_client: self.graphql_client.clone(),
13842        }
13843    }
13844    /// Load a FunctionArg from its ID.
13845    pub fn load_function_arg_from_id(&self, id: impl IntoID<FunctionArgId>) -> FunctionArg {
13846        let mut query = self.selection.select("loadFunctionArgFromID");
13847        query = query.arg_lazy(
13848            "id",
13849            Box::new(move || {
13850                let id = id.clone();
13851                Box::pin(async move { id.into_id().await.unwrap().quote() })
13852            }),
13853        );
13854        FunctionArg {
13855            proc: self.proc.clone(),
13856            selection: query,
13857            graphql_client: self.graphql_client.clone(),
13858        }
13859    }
13860    /// Load a FunctionCallArgValue from its ID.
13861    pub fn load_function_call_arg_value_from_id(
13862        &self,
13863        id: impl IntoID<FunctionCallArgValueId>,
13864    ) -> FunctionCallArgValue {
13865        let mut query = self.selection.select("loadFunctionCallArgValueFromID");
13866        query = query.arg_lazy(
13867            "id",
13868            Box::new(move || {
13869                let id = id.clone();
13870                Box::pin(async move { id.into_id().await.unwrap().quote() })
13871            }),
13872        );
13873        FunctionCallArgValue {
13874            proc: self.proc.clone(),
13875            selection: query,
13876            graphql_client: self.graphql_client.clone(),
13877        }
13878    }
13879    /// Load a FunctionCall from its ID.
13880    pub fn load_function_call_from_id(&self, id: impl IntoID<FunctionCallId>) -> FunctionCall {
13881        let mut query = self.selection.select("loadFunctionCallFromID");
13882        query = query.arg_lazy(
13883            "id",
13884            Box::new(move || {
13885                let id = id.clone();
13886                Box::pin(async move { id.into_id().await.unwrap().quote() })
13887            }),
13888        );
13889        FunctionCall {
13890            proc: self.proc.clone(),
13891            selection: query,
13892            graphql_client: self.graphql_client.clone(),
13893        }
13894    }
13895    /// Load a Function from its ID.
13896    pub fn load_function_from_id(&self, id: impl IntoID<FunctionId>) -> Function {
13897        let mut query = self.selection.select("loadFunctionFromID");
13898        query = query.arg_lazy(
13899            "id",
13900            Box::new(move || {
13901                let id = id.clone();
13902                Box::pin(async move { id.into_id().await.unwrap().quote() })
13903            }),
13904        );
13905        Function {
13906            proc: self.proc.clone(),
13907            selection: query,
13908            graphql_client: self.graphql_client.clone(),
13909        }
13910    }
13911    /// Load a GeneratedCode from its ID.
13912    pub fn load_generated_code_from_id(&self, id: impl IntoID<GeneratedCodeId>) -> GeneratedCode {
13913        let mut query = self.selection.select("loadGeneratedCodeFromID");
13914        query = query.arg_lazy(
13915            "id",
13916            Box::new(move || {
13917                let id = id.clone();
13918                Box::pin(async move { id.into_id().await.unwrap().quote() })
13919            }),
13920        );
13921        GeneratedCode {
13922            proc: self.proc.clone(),
13923            selection: query,
13924            graphql_client: self.graphql_client.clone(),
13925        }
13926    }
13927    /// Load a Generator from its ID.
13928    pub fn load_generator_from_id(&self, id: impl IntoID<GeneratorId>) -> Generator {
13929        let mut query = self.selection.select("loadGeneratorFromID");
13930        query = query.arg_lazy(
13931            "id",
13932            Box::new(move || {
13933                let id = id.clone();
13934                Box::pin(async move { id.into_id().await.unwrap().quote() })
13935            }),
13936        );
13937        Generator {
13938            proc: self.proc.clone(),
13939            selection: query,
13940            graphql_client: self.graphql_client.clone(),
13941        }
13942    }
13943    /// Load a GeneratorGroup from its ID.
13944    pub fn load_generator_group_from_id(
13945        &self,
13946        id: impl IntoID<GeneratorGroupId>,
13947    ) -> GeneratorGroup {
13948        let mut query = self.selection.select("loadGeneratorGroupFromID");
13949        query = query.arg_lazy(
13950            "id",
13951            Box::new(move || {
13952                let id = id.clone();
13953                Box::pin(async move { id.into_id().await.unwrap().quote() })
13954            }),
13955        );
13956        GeneratorGroup {
13957            proc: self.proc.clone(),
13958            selection: query,
13959            graphql_client: self.graphql_client.clone(),
13960        }
13961    }
13962    /// Load a GitRef from its ID.
13963    pub fn load_git_ref_from_id(&self, id: impl IntoID<GitRefId>) -> GitRef {
13964        let mut query = self.selection.select("loadGitRefFromID");
13965        query = query.arg_lazy(
13966            "id",
13967            Box::new(move || {
13968                let id = id.clone();
13969                Box::pin(async move { id.into_id().await.unwrap().quote() })
13970            }),
13971        );
13972        GitRef {
13973            proc: self.proc.clone(),
13974            selection: query,
13975            graphql_client: self.graphql_client.clone(),
13976        }
13977    }
13978    /// Load a GitRepository from its ID.
13979    pub fn load_git_repository_from_id(&self, id: impl IntoID<GitRepositoryId>) -> GitRepository {
13980        let mut query = self.selection.select("loadGitRepositoryFromID");
13981        query = query.arg_lazy(
13982            "id",
13983            Box::new(move || {
13984                let id = id.clone();
13985                Box::pin(async move { id.into_id().await.unwrap().quote() })
13986            }),
13987        );
13988        GitRepository {
13989            proc: self.proc.clone(),
13990            selection: query,
13991            graphql_client: self.graphql_client.clone(),
13992        }
13993    }
13994    /// Load a HTTPState from its ID.
13995    pub fn load_http_state_from_id(&self, id: impl IntoID<HttpStateId>) -> HttpState {
13996        let mut query = self.selection.select("loadHTTPStateFromID");
13997        query = query.arg_lazy(
13998            "id",
13999            Box::new(move || {
14000                let id = id.clone();
14001                Box::pin(async move { id.into_id().await.unwrap().quote() })
14002            }),
14003        );
14004        HttpState {
14005            proc: self.proc.clone(),
14006            selection: query,
14007            graphql_client: self.graphql_client.clone(),
14008        }
14009    }
14010    /// Load a HealthcheckConfig from its ID.
14011    pub fn load_healthcheck_config_from_id(
14012        &self,
14013        id: impl IntoID<HealthcheckConfigId>,
14014    ) -> HealthcheckConfig {
14015        let mut query = self.selection.select("loadHealthcheckConfigFromID");
14016        query = query.arg_lazy(
14017            "id",
14018            Box::new(move || {
14019                let id = id.clone();
14020                Box::pin(async move { id.into_id().await.unwrap().quote() })
14021            }),
14022        );
14023        HealthcheckConfig {
14024            proc: self.proc.clone(),
14025            selection: query,
14026            graphql_client: self.graphql_client.clone(),
14027        }
14028    }
14029    /// Load a Host from its ID.
14030    pub fn load_host_from_id(&self, id: impl IntoID<HostId>) -> Host {
14031        let mut query = self.selection.select("loadHostFromID");
14032        query = query.arg_lazy(
14033            "id",
14034            Box::new(move || {
14035                let id = id.clone();
14036                Box::pin(async move { id.into_id().await.unwrap().quote() })
14037            }),
14038        );
14039        Host {
14040            proc: self.proc.clone(),
14041            selection: query,
14042            graphql_client: self.graphql_client.clone(),
14043        }
14044    }
14045    /// Load a InputTypeDef from its ID.
14046    pub fn load_input_type_def_from_id(&self, id: impl IntoID<InputTypeDefId>) -> InputTypeDef {
14047        let mut query = self.selection.select("loadInputTypeDefFromID");
14048        query = query.arg_lazy(
14049            "id",
14050            Box::new(move || {
14051                let id = id.clone();
14052                Box::pin(async move { id.into_id().await.unwrap().quote() })
14053            }),
14054        );
14055        InputTypeDef {
14056            proc: self.proc.clone(),
14057            selection: query,
14058            graphql_client: self.graphql_client.clone(),
14059        }
14060    }
14061    /// Load a InterfaceTypeDef from its ID.
14062    pub fn load_interface_type_def_from_id(
14063        &self,
14064        id: impl IntoID<InterfaceTypeDefId>,
14065    ) -> InterfaceTypeDef {
14066        let mut query = self.selection.select("loadInterfaceTypeDefFromID");
14067        query = query.arg_lazy(
14068            "id",
14069            Box::new(move || {
14070                let id = id.clone();
14071                Box::pin(async move { id.into_id().await.unwrap().quote() })
14072            }),
14073        );
14074        InterfaceTypeDef {
14075            proc: self.proc.clone(),
14076            selection: query,
14077            graphql_client: self.graphql_client.clone(),
14078        }
14079    }
14080    /// Load a JSONValue from its ID.
14081    pub fn load_json_value_from_id(&self, id: impl IntoID<JsonValueId>) -> JsonValue {
14082        let mut query = self.selection.select("loadJSONValueFromID");
14083        query = query.arg_lazy(
14084            "id",
14085            Box::new(move || {
14086                let id = id.clone();
14087                Box::pin(async move { id.into_id().await.unwrap().quote() })
14088            }),
14089        );
14090        JsonValue {
14091            proc: self.proc.clone(),
14092            selection: query,
14093            graphql_client: self.graphql_client.clone(),
14094        }
14095    }
14096    /// Load a LLM from its ID.
14097    pub fn load_llm_from_id(&self, id: impl IntoID<Llmid>) -> Llm {
14098        let mut query = self.selection.select("loadLLMFromID");
14099        query = query.arg_lazy(
14100            "id",
14101            Box::new(move || {
14102                let id = id.clone();
14103                Box::pin(async move { id.into_id().await.unwrap().quote() })
14104            }),
14105        );
14106        Llm {
14107            proc: self.proc.clone(),
14108            selection: query,
14109            graphql_client: self.graphql_client.clone(),
14110        }
14111    }
14112    /// Load a LLMTokenUsage from its ID.
14113    pub fn load_llm_token_usage_from_id(&self, id: impl IntoID<LlmTokenUsageId>) -> LlmTokenUsage {
14114        let mut query = self.selection.select("loadLLMTokenUsageFromID");
14115        query = query.arg_lazy(
14116            "id",
14117            Box::new(move || {
14118                let id = id.clone();
14119                Box::pin(async move { id.into_id().await.unwrap().quote() })
14120            }),
14121        );
14122        LlmTokenUsage {
14123            proc: self.proc.clone(),
14124            selection: query,
14125            graphql_client: self.graphql_client.clone(),
14126        }
14127    }
14128    /// Load a Label from its ID.
14129    pub fn load_label_from_id(&self, id: impl IntoID<LabelId>) -> Label {
14130        let mut query = self.selection.select("loadLabelFromID");
14131        query = query.arg_lazy(
14132            "id",
14133            Box::new(move || {
14134                let id = id.clone();
14135                Box::pin(async move { id.into_id().await.unwrap().quote() })
14136            }),
14137        );
14138        Label {
14139            proc: self.proc.clone(),
14140            selection: query,
14141            graphql_client: self.graphql_client.clone(),
14142        }
14143    }
14144    /// Load a ListTypeDef from its ID.
14145    pub fn load_list_type_def_from_id(&self, id: impl IntoID<ListTypeDefId>) -> ListTypeDef {
14146        let mut query = self.selection.select("loadListTypeDefFromID");
14147        query = query.arg_lazy(
14148            "id",
14149            Box::new(move || {
14150                let id = id.clone();
14151                Box::pin(async move { id.into_id().await.unwrap().quote() })
14152            }),
14153        );
14154        ListTypeDef {
14155            proc: self.proc.clone(),
14156            selection: query,
14157            graphql_client: self.graphql_client.clone(),
14158        }
14159    }
14160    /// Load a ModuleConfigClient from its ID.
14161    pub fn load_module_config_client_from_id(
14162        &self,
14163        id: impl IntoID<ModuleConfigClientId>,
14164    ) -> ModuleConfigClient {
14165        let mut query = self.selection.select("loadModuleConfigClientFromID");
14166        query = query.arg_lazy(
14167            "id",
14168            Box::new(move || {
14169                let id = id.clone();
14170                Box::pin(async move { id.into_id().await.unwrap().quote() })
14171            }),
14172        );
14173        ModuleConfigClient {
14174            proc: self.proc.clone(),
14175            selection: query,
14176            graphql_client: self.graphql_client.clone(),
14177        }
14178    }
14179    /// Load a Module from its ID.
14180    pub fn load_module_from_id(&self, id: impl IntoID<ModuleId>) -> Module {
14181        let mut query = self.selection.select("loadModuleFromID");
14182        query = query.arg_lazy(
14183            "id",
14184            Box::new(move || {
14185                let id = id.clone();
14186                Box::pin(async move { id.into_id().await.unwrap().quote() })
14187            }),
14188        );
14189        Module {
14190            proc: self.proc.clone(),
14191            selection: query,
14192            graphql_client: self.graphql_client.clone(),
14193        }
14194    }
14195    /// Load a ModuleSource from its ID.
14196    pub fn load_module_source_from_id(&self, id: impl IntoID<ModuleSourceId>) -> ModuleSource {
14197        let mut query = self.selection.select("loadModuleSourceFromID");
14198        query = query.arg_lazy(
14199            "id",
14200            Box::new(move || {
14201                let id = id.clone();
14202                Box::pin(async move { id.into_id().await.unwrap().quote() })
14203            }),
14204        );
14205        ModuleSource {
14206            proc: self.proc.clone(),
14207            selection: query,
14208            graphql_client: self.graphql_client.clone(),
14209        }
14210    }
14211    /// Load a ObjectTypeDef from its ID.
14212    pub fn load_object_type_def_from_id(&self, id: impl IntoID<ObjectTypeDefId>) -> ObjectTypeDef {
14213        let mut query = self.selection.select("loadObjectTypeDefFromID");
14214        query = query.arg_lazy(
14215            "id",
14216            Box::new(move || {
14217                let id = id.clone();
14218                Box::pin(async move { id.into_id().await.unwrap().quote() })
14219            }),
14220        );
14221        ObjectTypeDef {
14222            proc: self.proc.clone(),
14223            selection: query,
14224            graphql_client: self.graphql_client.clone(),
14225        }
14226    }
14227    /// Load a Port from its ID.
14228    pub fn load_port_from_id(&self, id: impl IntoID<PortId>) -> Port {
14229        let mut query = self.selection.select("loadPortFromID");
14230        query = query.arg_lazy(
14231            "id",
14232            Box::new(move || {
14233                let id = id.clone();
14234                Box::pin(async move { id.into_id().await.unwrap().quote() })
14235            }),
14236        );
14237        Port {
14238            proc: self.proc.clone(),
14239            selection: query,
14240            graphql_client: self.graphql_client.clone(),
14241        }
14242    }
14243    /// Load a RemoteGitMirror from its ID.
14244    pub fn load_remote_git_mirror_from_id(
14245        &self,
14246        id: impl IntoID<RemoteGitMirrorId>,
14247    ) -> RemoteGitMirror {
14248        let mut query = self.selection.select("loadRemoteGitMirrorFromID");
14249        query = query.arg_lazy(
14250            "id",
14251            Box::new(move || {
14252                let id = id.clone();
14253                Box::pin(async move { id.into_id().await.unwrap().quote() })
14254            }),
14255        );
14256        RemoteGitMirror {
14257            proc: self.proc.clone(),
14258            selection: query,
14259            graphql_client: self.graphql_client.clone(),
14260        }
14261    }
14262    /// Load a SDKConfig from its ID.
14263    pub fn load_sdk_config_from_id(&self, id: impl IntoID<SdkConfigId>) -> SdkConfig {
14264        let mut query = self.selection.select("loadSDKConfigFromID");
14265        query = query.arg_lazy(
14266            "id",
14267            Box::new(move || {
14268                let id = id.clone();
14269                Box::pin(async move { id.into_id().await.unwrap().quote() })
14270            }),
14271        );
14272        SdkConfig {
14273            proc: self.proc.clone(),
14274            selection: query,
14275            graphql_client: self.graphql_client.clone(),
14276        }
14277    }
14278    /// Load a ScalarTypeDef from its ID.
14279    pub fn load_scalar_type_def_from_id(&self, id: impl IntoID<ScalarTypeDefId>) -> ScalarTypeDef {
14280        let mut query = self.selection.select("loadScalarTypeDefFromID");
14281        query = query.arg_lazy(
14282            "id",
14283            Box::new(move || {
14284                let id = id.clone();
14285                Box::pin(async move { id.into_id().await.unwrap().quote() })
14286            }),
14287        );
14288        ScalarTypeDef {
14289            proc: self.proc.clone(),
14290            selection: query,
14291            graphql_client: self.graphql_client.clone(),
14292        }
14293    }
14294    /// Load a SearchResult from its ID.
14295    pub fn load_search_result_from_id(&self, id: impl IntoID<SearchResultId>) -> SearchResult {
14296        let mut query = self.selection.select("loadSearchResultFromID");
14297        query = query.arg_lazy(
14298            "id",
14299            Box::new(move || {
14300                let id = id.clone();
14301                Box::pin(async move { id.into_id().await.unwrap().quote() })
14302            }),
14303        );
14304        SearchResult {
14305            proc: self.proc.clone(),
14306            selection: query,
14307            graphql_client: self.graphql_client.clone(),
14308        }
14309    }
14310    /// Load a SearchSubmatch from its ID.
14311    pub fn load_search_submatch_from_id(
14312        &self,
14313        id: impl IntoID<SearchSubmatchId>,
14314    ) -> SearchSubmatch {
14315        let mut query = self.selection.select("loadSearchSubmatchFromID");
14316        query = query.arg_lazy(
14317            "id",
14318            Box::new(move || {
14319                let id = id.clone();
14320                Box::pin(async move { id.into_id().await.unwrap().quote() })
14321            }),
14322        );
14323        SearchSubmatch {
14324            proc: self.proc.clone(),
14325            selection: query,
14326            graphql_client: self.graphql_client.clone(),
14327        }
14328    }
14329    /// Load a Secret from its ID.
14330    pub fn load_secret_from_id(&self, id: impl IntoID<SecretId>) -> Secret {
14331        let mut query = self.selection.select("loadSecretFromID");
14332        query = query.arg_lazy(
14333            "id",
14334            Box::new(move || {
14335                let id = id.clone();
14336                Box::pin(async move { id.into_id().await.unwrap().quote() })
14337            }),
14338        );
14339        Secret {
14340            proc: self.proc.clone(),
14341            selection: query,
14342            graphql_client: self.graphql_client.clone(),
14343        }
14344    }
14345    /// Load a Service from its ID.
14346    pub fn load_service_from_id(&self, id: impl IntoID<ServiceId>) -> Service {
14347        let mut query = self.selection.select("loadServiceFromID");
14348        query = query.arg_lazy(
14349            "id",
14350            Box::new(move || {
14351                let id = id.clone();
14352                Box::pin(async move { id.into_id().await.unwrap().quote() })
14353            }),
14354        );
14355        Service {
14356            proc: self.proc.clone(),
14357            selection: query,
14358            graphql_client: self.graphql_client.clone(),
14359        }
14360    }
14361    /// Load a Socket from its ID.
14362    pub fn load_socket_from_id(&self, id: impl IntoID<SocketId>) -> Socket {
14363        let mut query = self.selection.select("loadSocketFromID");
14364        query = query.arg_lazy(
14365            "id",
14366            Box::new(move || {
14367                let id = id.clone();
14368                Box::pin(async move { id.into_id().await.unwrap().quote() })
14369            }),
14370        );
14371        Socket {
14372            proc: self.proc.clone(),
14373            selection: query,
14374            graphql_client: self.graphql_client.clone(),
14375        }
14376    }
14377    /// Load a SourceMap from its ID.
14378    pub fn load_source_map_from_id(&self, id: impl IntoID<SourceMapId>) -> SourceMap {
14379        let mut query = self.selection.select("loadSourceMapFromID");
14380        query = query.arg_lazy(
14381            "id",
14382            Box::new(move || {
14383                let id = id.clone();
14384                Box::pin(async move { id.into_id().await.unwrap().quote() })
14385            }),
14386        );
14387        SourceMap {
14388            proc: self.proc.clone(),
14389            selection: query,
14390            graphql_client: self.graphql_client.clone(),
14391        }
14392    }
14393    /// Load a Stat from its ID.
14394    pub fn load_stat_from_id(&self, id: impl IntoID<StatId>) -> Stat {
14395        let mut query = self.selection.select("loadStatFromID");
14396        query = query.arg_lazy(
14397            "id",
14398            Box::new(move || {
14399                let id = id.clone();
14400                Box::pin(async move { id.into_id().await.unwrap().quote() })
14401            }),
14402        );
14403        Stat {
14404            proc: self.proc.clone(),
14405            selection: query,
14406            graphql_client: self.graphql_client.clone(),
14407        }
14408    }
14409    /// Load a Syncer from its ID.
14410    pub fn load_syncer_from_id(&self, id: impl IntoID<SyncerId>) -> SyncerClient {
14411        let mut query = self.selection.select("loadSyncerFromID");
14412        query = query.arg_lazy(
14413            "id",
14414            Box::new(move || {
14415                let id = id.clone();
14416                Box::pin(async move { id.into_id().await.unwrap().quote() })
14417            }),
14418        );
14419        SyncerClient {
14420            proc: self.proc.clone(),
14421            selection: query,
14422            graphql_client: self.graphql_client.clone(),
14423        }
14424    }
14425    /// Load a Terminal from its ID.
14426    pub fn load_terminal_from_id(&self, id: impl IntoID<TerminalId>) -> Terminal {
14427        let mut query = self.selection.select("loadTerminalFromID");
14428        query = query.arg_lazy(
14429            "id",
14430            Box::new(move || {
14431                let id = id.clone();
14432                Box::pin(async move { id.into_id().await.unwrap().quote() })
14433            }),
14434        );
14435        Terminal {
14436            proc: self.proc.clone(),
14437            selection: query,
14438            graphql_client: self.graphql_client.clone(),
14439        }
14440    }
14441    /// Load a TypeDef from its ID.
14442    pub fn load_type_def_from_id(&self, id: impl IntoID<TypeDefId>) -> TypeDef {
14443        let mut query = self.selection.select("loadTypeDefFromID");
14444        query = query.arg_lazy(
14445            "id",
14446            Box::new(move || {
14447                let id = id.clone();
14448                Box::pin(async move { id.into_id().await.unwrap().quote() })
14449            }),
14450        );
14451        TypeDef {
14452            proc: self.proc.clone(),
14453            selection: query,
14454            graphql_client: self.graphql_client.clone(),
14455        }
14456    }
14457    /// Load a Up from its ID.
14458    pub fn load_up_from_id(&self, id: impl IntoID<UpId>) -> Up {
14459        let mut query = self.selection.select("loadUpFromID");
14460        query = query.arg_lazy(
14461            "id",
14462            Box::new(move || {
14463                let id = id.clone();
14464                Box::pin(async move { id.into_id().await.unwrap().quote() })
14465            }),
14466        );
14467        Up {
14468            proc: self.proc.clone(),
14469            selection: query,
14470            graphql_client: self.graphql_client.clone(),
14471        }
14472    }
14473    /// Load a UpGroup from its ID.
14474    pub fn load_up_group_from_id(&self, id: impl IntoID<UpGroupId>) -> UpGroup {
14475        let mut query = self.selection.select("loadUpGroupFromID");
14476        query = query.arg_lazy(
14477            "id",
14478            Box::new(move || {
14479                let id = id.clone();
14480                Box::pin(async move { id.into_id().await.unwrap().quote() })
14481            }),
14482        );
14483        UpGroup {
14484            proc: self.proc.clone(),
14485            selection: query,
14486            graphql_client: self.graphql_client.clone(),
14487        }
14488    }
14489    /// Load a Workspace from its ID.
14490    pub fn load_workspace_from_id(&self, id: impl IntoID<WorkspaceId>) -> Workspace {
14491        let mut query = self.selection.select("loadWorkspaceFromID");
14492        query = query.arg_lazy(
14493            "id",
14494            Box::new(move || {
14495                let id = id.clone();
14496                Box::pin(async move { id.into_id().await.unwrap().quote() })
14497            }),
14498        );
14499        Workspace {
14500            proc: self.proc.clone(),
14501            selection: query,
14502            graphql_client: self.graphql_client.clone(),
14503        }
14504    }
14505    /// Create a new module.
14506    pub fn module(&self) -> Module {
14507        let query = self.selection.select("module");
14508        Module {
14509            proc: self.proc.clone(),
14510            selection: query,
14511            graphql_client: self.graphql_client.clone(),
14512        }
14513    }
14514    /// Create a new module source instance from a source ref string
14515    ///
14516    /// # Arguments
14517    ///
14518    /// * `ref_string` - The string ref representation of the module source
14519    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
14520    pub fn module_source(&self, ref_string: impl Into<String>) -> ModuleSource {
14521        let mut query = self.selection.select("moduleSource");
14522        query = query.arg("refString", ref_string.into());
14523        ModuleSource {
14524            proc: self.proc.clone(),
14525            selection: query,
14526            graphql_client: self.graphql_client.clone(),
14527        }
14528    }
14529    /// Create a new module source instance from a source ref string
14530    ///
14531    /// # Arguments
14532    ///
14533    /// * `ref_string` - The string ref representation of the module source
14534    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
14535    pub fn module_source_opts<'a>(
14536        &self,
14537        ref_string: impl Into<String>,
14538        opts: QueryModuleSourceOpts<'a>,
14539    ) -> ModuleSource {
14540        let mut query = self.selection.select("moduleSource");
14541        query = query.arg("refString", ref_string.into());
14542        if let Some(ref_pin) = opts.ref_pin {
14543            query = query.arg("refPin", ref_pin);
14544        }
14545        if let Some(disable_find_up) = opts.disable_find_up {
14546            query = query.arg("disableFindUp", disable_find_up);
14547        }
14548        if let Some(allow_not_exists) = opts.allow_not_exists {
14549            query = query.arg("allowNotExists", allow_not_exists);
14550        }
14551        if let Some(require_kind) = opts.require_kind {
14552            query = query.arg("requireKind", require_kind);
14553        }
14554        ModuleSource {
14555            proc: self.proc.clone(),
14556            selection: query,
14557            graphql_client: self.graphql_client.clone(),
14558        }
14559    }
14560    /// Load any object by its ID.
14561    pub fn node(&self, id: impl IntoID<Id>) -> NodeClient {
14562        let mut query = self.selection.select("node");
14563        query = query.arg_lazy(
14564            "id",
14565            Box::new(move || {
14566                let id = id.clone();
14567                Box::pin(async move { id.into_id().await.unwrap().quote() })
14568            }),
14569        );
14570        NodeClient {
14571            proc: self.proc.clone(),
14572            selection: query,
14573            graphql_client: self.graphql_client.clone(),
14574        }
14575    }
14576    /// Creates a new secret.
14577    ///
14578    /// # Arguments
14579    ///
14580    /// * `uri` - The URI of the secret store
14581    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
14582    pub fn secret(&self, uri: impl Into<String>) -> Secret {
14583        let mut query = self.selection.select("secret");
14584        query = query.arg("uri", uri.into());
14585        Secret {
14586            proc: self.proc.clone(),
14587            selection: query,
14588            graphql_client: self.graphql_client.clone(),
14589        }
14590    }
14591    /// Creates a new secret.
14592    ///
14593    /// # Arguments
14594    ///
14595    /// * `uri` - The URI of the secret store
14596    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
14597    pub fn secret_opts<'a>(&self, uri: impl Into<String>, opts: QuerySecretOpts<'a>) -> Secret {
14598        let mut query = self.selection.select("secret");
14599        query = query.arg("uri", uri.into());
14600        if let Some(cache_key) = opts.cache_key {
14601            query = query.arg("cacheKey", cache_key);
14602        }
14603        Secret {
14604            proc: self.proc.clone(),
14605            selection: query,
14606            graphql_client: self.graphql_client.clone(),
14607        }
14608    }
14609    /// Sets a secret given a user defined name to its plaintext and returns the secret.
14610    /// The plaintext value is limited to a size of 128000 bytes.
14611    ///
14612    /// # Arguments
14613    ///
14614    /// * `name` - The user defined name for this secret
14615    /// * `plaintext` - The plaintext of the secret
14616    pub fn set_secret(&self, name: impl Into<String>, plaintext: impl Into<String>) -> Secret {
14617        let mut query = self.selection.select("setSecret");
14618        query = query.arg("name", name.into());
14619        query = query.arg("plaintext", plaintext.into());
14620        Secret {
14621            proc: self.proc.clone(),
14622            selection: query,
14623            graphql_client: self.graphql_client.clone(),
14624        }
14625    }
14626    /// Creates source map metadata.
14627    ///
14628    /// # Arguments
14629    ///
14630    /// * `filename` - The filename from the module source.
14631    /// * `line` - The line number within the filename.
14632    /// * `column` - The column number within the line.
14633    pub fn source_map(&self, filename: impl Into<String>, line: isize, column: isize) -> SourceMap {
14634        let mut query = self.selection.select("sourceMap");
14635        query = query.arg("filename", filename.into());
14636        query = query.arg("line", line);
14637        query = query.arg("column", column);
14638        SourceMap {
14639            proc: self.proc.clone(),
14640            selection: query,
14641            graphql_client: self.graphql_client.clone(),
14642        }
14643    }
14644    /// Create a new TypeDef.
14645    pub fn type_def(&self) -> TypeDef {
14646        let query = self.selection.select("typeDef");
14647        TypeDef {
14648            proc: self.proc.clone(),
14649            selection: query,
14650            graphql_client: self.graphql_client.clone(),
14651        }
14652    }
14653    /// Get the current Dagger Engine version.
14654    pub async fn version(&self) -> Result<String, DaggerError> {
14655        let query = self.selection.select("version");
14656        query.execute(self.graphql_client.clone()).await
14657    }
14658}
14659impl Node for Query {
14660    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
14661        let query = self.selection.select("id");
14662        let graphql_client = self.graphql_client.clone();
14663        async move { query.execute(graphql_client).await }
14664    }
14665}
14666#[derive(Clone)]
14667pub struct RemoteGitMirror {
14668    pub proc: Option<Arc<DaggerSessionProc>>,
14669    pub selection: Selection,
14670    pub graphql_client: DynGraphQLClient,
14671}
14672impl IntoID<Id> for RemoteGitMirror {
14673    fn into_id(
14674        self,
14675    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
14676        Box::pin(async move { self.id().await })
14677    }
14678}
14679impl Loadable for RemoteGitMirror {
14680    fn graphql_type() -> &'static str {
14681        "RemoteGitMirror"
14682    }
14683    fn from_query(
14684        proc: Option<Arc<DaggerSessionProc>>,
14685        selection: Selection,
14686        graphql_client: DynGraphQLClient,
14687    ) -> Self {
14688        Self {
14689            proc,
14690            selection,
14691            graphql_client,
14692        }
14693    }
14694}
14695impl RemoteGitMirror {
14696    /// A unique identifier for this RemoteGitMirror.
14697    pub async fn id(&self) -> Result<Id, DaggerError> {
14698        let query = self.selection.select("id");
14699        query.execute(self.graphql_client.clone()).await
14700    }
14701}
14702impl Node for RemoteGitMirror {
14703    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
14704        let query = self.selection.select("id");
14705        let graphql_client = self.graphql_client.clone();
14706        async move { query.execute(graphql_client).await }
14707    }
14708}
14709#[derive(Clone)]
14710pub struct SdkConfig {
14711    pub proc: Option<Arc<DaggerSessionProc>>,
14712    pub selection: Selection,
14713    pub graphql_client: DynGraphQLClient,
14714}
14715impl IntoID<Id> for SdkConfig {
14716    fn into_id(
14717        self,
14718    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
14719        Box::pin(async move { self.id().await })
14720    }
14721}
14722impl Loadable for SdkConfig {
14723    fn graphql_type() -> &'static str {
14724        "SDKConfig"
14725    }
14726    fn from_query(
14727        proc: Option<Arc<DaggerSessionProc>>,
14728        selection: Selection,
14729        graphql_client: DynGraphQLClient,
14730    ) -> Self {
14731        Self {
14732            proc,
14733            selection,
14734            graphql_client,
14735        }
14736    }
14737}
14738impl SdkConfig {
14739    /// Whether to start the SDK runtime in debug mode with an interactive terminal.
14740    pub async fn debug(&self) -> Result<bool, DaggerError> {
14741        let query = self.selection.select("debug");
14742        query.execute(self.graphql_client.clone()).await
14743    }
14744    /// A unique identifier for this SDKConfig.
14745    pub async fn id(&self) -> Result<Id, DaggerError> {
14746        let query = self.selection.select("id");
14747        query.execute(self.graphql_client.clone()).await
14748    }
14749    /// Source of the SDK. Either a name of a builtin SDK or a module source ref string pointing to the SDK's implementation.
14750    pub async fn source(&self) -> Result<String, DaggerError> {
14751        let query = self.selection.select("source");
14752        query.execute(self.graphql_client.clone()).await
14753    }
14754}
14755impl Node for SdkConfig {
14756    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
14757        let query = self.selection.select("id");
14758        let graphql_client = self.graphql_client.clone();
14759        async move { query.execute(graphql_client).await }
14760    }
14761}
14762#[derive(Clone)]
14763pub struct ScalarTypeDef {
14764    pub proc: Option<Arc<DaggerSessionProc>>,
14765    pub selection: Selection,
14766    pub graphql_client: DynGraphQLClient,
14767}
14768impl IntoID<Id> for ScalarTypeDef {
14769    fn into_id(
14770        self,
14771    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
14772        Box::pin(async move { self.id().await })
14773    }
14774}
14775impl Loadable for ScalarTypeDef {
14776    fn graphql_type() -> &'static str {
14777        "ScalarTypeDef"
14778    }
14779    fn from_query(
14780        proc: Option<Arc<DaggerSessionProc>>,
14781        selection: Selection,
14782        graphql_client: DynGraphQLClient,
14783    ) -> Self {
14784        Self {
14785            proc,
14786            selection,
14787            graphql_client,
14788        }
14789    }
14790}
14791impl ScalarTypeDef {
14792    /// A doc string for the scalar, if any.
14793    pub async fn description(&self) -> Result<String, DaggerError> {
14794        let query = self.selection.select("description");
14795        query.execute(self.graphql_client.clone()).await
14796    }
14797    /// A unique identifier for this ScalarTypeDef.
14798    pub async fn id(&self) -> Result<Id, DaggerError> {
14799        let query = self.selection.select("id");
14800        query.execute(self.graphql_client.clone()).await
14801    }
14802    /// The name of the scalar.
14803    pub async fn name(&self) -> Result<String, DaggerError> {
14804        let query = self.selection.select("name");
14805        query.execute(self.graphql_client.clone()).await
14806    }
14807    /// If this ScalarTypeDef is associated with a Module, the name of the module. Unset otherwise.
14808    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
14809        let query = self.selection.select("sourceModuleName");
14810        query.execute(self.graphql_client.clone()).await
14811    }
14812}
14813impl Node for ScalarTypeDef {
14814    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
14815        let query = self.selection.select("id");
14816        let graphql_client = self.graphql_client.clone();
14817        async move { query.execute(graphql_client).await }
14818    }
14819}
14820#[derive(Clone)]
14821pub struct SearchResult {
14822    pub proc: Option<Arc<DaggerSessionProc>>,
14823    pub selection: Selection,
14824    pub graphql_client: DynGraphQLClient,
14825}
14826impl IntoID<Id> for SearchResult {
14827    fn into_id(
14828        self,
14829    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
14830        Box::pin(async move { self.id().await })
14831    }
14832}
14833impl Loadable for SearchResult {
14834    fn graphql_type() -> &'static str {
14835        "SearchResult"
14836    }
14837    fn from_query(
14838        proc: Option<Arc<DaggerSessionProc>>,
14839        selection: Selection,
14840        graphql_client: DynGraphQLClient,
14841    ) -> Self {
14842        Self {
14843            proc,
14844            selection,
14845            graphql_client,
14846        }
14847    }
14848}
14849impl SearchResult {
14850    /// The byte offset of this line within the file.
14851    pub async fn absolute_offset(&self) -> Result<isize, DaggerError> {
14852        let query = self.selection.select("absoluteOffset");
14853        query.execute(self.graphql_client.clone()).await
14854    }
14855    /// The path to the file that matched.
14856    pub async fn file_path(&self) -> Result<String, DaggerError> {
14857        let query = self.selection.select("filePath");
14858        query.execute(self.graphql_client.clone()).await
14859    }
14860    /// A unique identifier for this SearchResult.
14861    pub async fn id(&self) -> Result<Id, DaggerError> {
14862        let query = self.selection.select("id");
14863        query.execute(self.graphql_client.clone()).await
14864    }
14865    /// The first line that matched.
14866    pub async fn line_number(&self) -> Result<isize, DaggerError> {
14867        let query = self.selection.select("lineNumber");
14868        query.execute(self.graphql_client.clone()).await
14869    }
14870    /// The line content that matched.
14871    pub async fn matched_lines(&self) -> Result<String, DaggerError> {
14872        let query = self.selection.select("matchedLines");
14873        query.execute(self.graphql_client.clone()).await
14874    }
14875    /// Sub-match positions and content within the matched lines.
14876    pub async fn submatches(&self) -> Result<Vec<SearchSubmatch>, DaggerError> {
14877        let query = self.selection.select("submatches");
14878        let query = query.select("id");
14879        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
14880        Ok(ids
14881            .into_iter()
14882            .map(|id| SearchSubmatch {
14883                proc: self.proc.clone(),
14884                selection: crate::querybuilder::query()
14885                    .select("node")
14886                    .arg("id", &id.0)
14887                    .inline_fragment("SearchSubmatch"),
14888                graphql_client: self.graphql_client.clone(),
14889            })
14890            .collect())
14891    }
14892}
14893impl Node for SearchResult {
14894    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
14895        let query = self.selection.select("id");
14896        let graphql_client = self.graphql_client.clone();
14897        async move { query.execute(graphql_client).await }
14898    }
14899}
14900#[derive(Clone)]
14901pub struct SearchSubmatch {
14902    pub proc: Option<Arc<DaggerSessionProc>>,
14903    pub selection: Selection,
14904    pub graphql_client: DynGraphQLClient,
14905}
14906impl IntoID<Id> for SearchSubmatch {
14907    fn into_id(
14908        self,
14909    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
14910        Box::pin(async move { self.id().await })
14911    }
14912}
14913impl Loadable for SearchSubmatch {
14914    fn graphql_type() -> &'static str {
14915        "SearchSubmatch"
14916    }
14917    fn from_query(
14918        proc: Option<Arc<DaggerSessionProc>>,
14919        selection: Selection,
14920        graphql_client: DynGraphQLClient,
14921    ) -> Self {
14922        Self {
14923            proc,
14924            selection,
14925            graphql_client,
14926        }
14927    }
14928}
14929impl SearchSubmatch {
14930    /// The match's end offset within the matched lines.
14931    pub async fn end(&self) -> Result<isize, DaggerError> {
14932        let query = self.selection.select("end");
14933        query.execute(self.graphql_client.clone()).await
14934    }
14935    /// A unique identifier for this SearchSubmatch.
14936    pub async fn id(&self) -> Result<Id, DaggerError> {
14937        let query = self.selection.select("id");
14938        query.execute(self.graphql_client.clone()).await
14939    }
14940    /// The match's start offset within the matched lines.
14941    pub async fn start(&self) -> Result<isize, DaggerError> {
14942        let query = self.selection.select("start");
14943        query.execute(self.graphql_client.clone()).await
14944    }
14945    /// The matched text.
14946    pub async fn text(&self) -> Result<String, DaggerError> {
14947        let query = self.selection.select("text");
14948        query.execute(self.graphql_client.clone()).await
14949    }
14950}
14951impl Node for SearchSubmatch {
14952    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
14953        let query = self.selection.select("id");
14954        let graphql_client = self.graphql_client.clone();
14955        async move { query.execute(graphql_client).await }
14956    }
14957}
14958#[derive(Clone)]
14959pub struct Secret {
14960    pub proc: Option<Arc<DaggerSessionProc>>,
14961    pub selection: Selection,
14962    pub graphql_client: DynGraphQLClient,
14963}
14964impl IntoID<Id> for Secret {
14965    fn into_id(
14966        self,
14967    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
14968        Box::pin(async move { self.id().await })
14969    }
14970}
14971impl Loadable for Secret {
14972    fn graphql_type() -> &'static str {
14973        "Secret"
14974    }
14975    fn from_query(
14976        proc: Option<Arc<DaggerSessionProc>>,
14977        selection: Selection,
14978        graphql_client: DynGraphQLClient,
14979    ) -> Self {
14980        Self {
14981            proc,
14982            selection,
14983            graphql_client,
14984        }
14985    }
14986}
14987impl Secret {
14988    /// A unique identifier for this Secret.
14989    pub async fn id(&self) -> Result<Id, DaggerError> {
14990        let query = self.selection.select("id");
14991        query.execute(self.graphql_client.clone()).await
14992    }
14993    /// The name of this secret.
14994    pub async fn name(&self) -> Result<String, DaggerError> {
14995        let query = self.selection.select("name");
14996        query.execute(self.graphql_client.clone()).await
14997    }
14998    /// The value of this secret.
14999    pub async fn plaintext(&self) -> Result<String, DaggerError> {
15000        let query = self.selection.select("plaintext");
15001        query.execute(self.graphql_client.clone()).await
15002    }
15003    /// The URI of this secret.
15004    pub async fn uri(&self) -> Result<String, DaggerError> {
15005        let query = self.selection.select("uri");
15006        query.execute(self.graphql_client.clone()).await
15007    }
15008}
15009impl Node for Secret {
15010    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
15011        let query = self.selection.select("id");
15012        let graphql_client = self.graphql_client.clone();
15013        async move { query.execute(graphql_client).await }
15014    }
15015}
15016#[derive(Clone)]
15017pub struct Service {
15018    pub proc: Option<Arc<DaggerSessionProc>>,
15019    pub selection: Selection,
15020    pub graphql_client: DynGraphQLClient,
15021}
15022#[derive(Builder, Debug, PartialEq)]
15023pub struct ServiceEndpointOpts<'a> {
15024    /// The exposed port number for the endpoint
15025    #[builder(setter(into, strip_option), default)]
15026    pub port: Option<isize>,
15027    /// Return a URL with the given scheme, eg. http for http://
15028    #[builder(setter(into, strip_option), default)]
15029    pub scheme: Option<&'a str>,
15030}
15031#[derive(Builder, Debug, PartialEq)]
15032pub struct ServiceStopOpts {
15033    /// Immediately kill the service without waiting for a graceful exit
15034    #[builder(setter(into, strip_option), default)]
15035    pub kill: Option<bool>,
15036}
15037#[derive(Builder, Debug, PartialEq)]
15038pub struct ServiceTerminalOpts<'a> {
15039    #[builder(setter(into, strip_option), default)]
15040    pub cmd: Option<Vec<&'a str>>,
15041}
15042#[derive(Builder, Debug, PartialEq)]
15043pub struct ServiceUpOpts {
15044    /// List of frontend/backend port mappings to forward.
15045    /// Frontend is the port accepting traffic on the host, backend is the service port.
15046    #[builder(setter(into, strip_option), default)]
15047    pub ports: Option<Vec<PortForward>>,
15048    /// Bind each tunnel port to a random port on the host.
15049    #[builder(setter(into, strip_option), default)]
15050    pub random: Option<bool>,
15051}
15052impl IntoID<Id> for Service {
15053    fn into_id(
15054        self,
15055    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
15056        Box::pin(async move { self.id().await })
15057    }
15058}
15059impl Loadable for Service {
15060    fn graphql_type() -> &'static str {
15061        "Service"
15062    }
15063    fn from_query(
15064        proc: Option<Arc<DaggerSessionProc>>,
15065        selection: Selection,
15066        graphql_client: DynGraphQLClient,
15067    ) -> Self {
15068        Self {
15069            proc,
15070            selection,
15071            graphql_client,
15072        }
15073    }
15074}
15075impl Service {
15076    /// Retrieves an endpoint that clients can use to reach this container.
15077    /// If no port is specified, the first exposed port is used. If none exist an error is returned.
15078    /// If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.
15079    ///
15080    /// # Arguments
15081    ///
15082    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
15083    pub async fn endpoint(&self) -> Result<String, DaggerError> {
15084        let query = self.selection.select("endpoint");
15085        query.execute(self.graphql_client.clone()).await
15086    }
15087    /// Retrieves an endpoint that clients can use to reach this container.
15088    /// If no port is specified, the first exposed port is used. If none exist an error is returned.
15089    /// If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.
15090    ///
15091    /// # Arguments
15092    ///
15093    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
15094    pub async fn endpoint_opts<'a>(
15095        &self,
15096        opts: ServiceEndpointOpts<'a>,
15097    ) -> Result<String, DaggerError> {
15098        let mut query = self.selection.select("endpoint");
15099        if let Some(port) = opts.port {
15100            query = query.arg("port", port);
15101        }
15102        if let Some(scheme) = opts.scheme {
15103            query = query.arg("scheme", scheme);
15104        }
15105        query.execute(self.graphql_client.clone()).await
15106    }
15107    /// Retrieves a hostname which can be used by clients to reach this container.
15108    pub async fn hostname(&self) -> Result<String, DaggerError> {
15109        let query = self.selection.select("hostname");
15110        query.execute(self.graphql_client.clone()).await
15111    }
15112    /// A unique identifier for this Service.
15113    pub async fn id(&self) -> Result<Id, DaggerError> {
15114        let query = self.selection.select("id");
15115        query.execute(self.graphql_client.clone()).await
15116    }
15117    /// Retrieves the list of ports provided by the service.
15118    pub async fn ports(&self) -> Result<Vec<Port>, DaggerError> {
15119        let query = self.selection.select("ports");
15120        let query = query.select("id");
15121        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
15122        Ok(ids
15123            .into_iter()
15124            .map(|id| Port {
15125                proc: self.proc.clone(),
15126                selection: crate::querybuilder::query()
15127                    .select("node")
15128                    .arg("id", &id.0)
15129                    .inline_fragment("Port"),
15130                graphql_client: self.graphql_client.clone(),
15131            })
15132            .collect())
15133    }
15134    /// Start the service and wait for its health checks to succeed.
15135    /// Services bound to a Container do not need to be manually started.
15136    pub async fn start(&self) -> Result<Service, DaggerError> {
15137        let query = self.selection.select("start");
15138        let id: Id = query.execute(self.graphql_client.clone()).await?;
15139        Ok(Service {
15140            proc: self.proc.clone(),
15141            selection: query
15142                .root()
15143                .select("node")
15144                .arg("id", &id.0)
15145                .inline_fragment("Service"),
15146            graphql_client: self.graphql_client.clone(),
15147        })
15148    }
15149    /// Stop the service.
15150    ///
15151    /// # Arguments
15152    ///
15153    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
15154    pub async fn stop(&self) -> Result<Service, DaggerError> {
15155        let query = self.selection.select("stop");
15156        let id: Id = query.execute(self.graphql_client.clone()).await?;
15157        Ok(Service {
15158            proc: self.proc.clone(),
15159            selection: query
15160                .root()
15161                .select("node")
15162                .arg("id", &id.0)
15163                .inline_fragment("Service"),
15164            graphql_client: self.graphql_client.clone(),
15165        })
15166    }
15167    /// Stop the service.
15168    ///
15169    /// # Arguments
15170    ///
15171    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
15172    pub async fn stop_opts(&self, opts: ServiceStopOpts) -> Result<Service, DaggerError> {
15173        let mut query = self.selection.select("stop");
15174        if let Some(kill) = opts.kill {
15175            query = query.arg("kill", kill);
15176        }
15177        let id: Id = query.execute(self.graphql_client.clone()).await?;
15178        Ok(Service {
15179            proc: self.proc.clone(),
15180            selection: query
15181                .root()
15182                .select("node")
15183                .arg("id", &id.0)
15184                .inline_fragment("Service"),
15185            graphql_client: self.graphql_client.clone(),
15186        })
15187    }
15188    /// Forces evaluation of the pipeline in the engine.
15189    pub async fn sync(&self) -> Result<Service, DaggerError> {
15190        let query = self.selection.select("sync");
15191        let id: Id = query.execute(self.graphql_client.clone()).await?;
15192        Ok(Service {
15193            proc: self.proc.clone(),
15194            selection: query
15195                .root()
15196                .select("node")
15197                .arg("id", &id.0)
15198                .inline_fragment("Service"),
15199            graphql_client: self.graphql_client.clone(),
15200        })
15201    }
15202    ///
15203    /// # Arguments
15204    ///
15205    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
15206    pub fn terminal(&self) -> Service {
15207        let query = self.selection.select("terminal");
15208        Service {
15209            proc: self.proc.clone(),
15210            selection: query,
15211            graphql_client: self.graphql_client.clone(),
15212        }
15213    }
15214    ///
15215    /// # Arguments
15216    ///
15217    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
15218    pub fn terminal_opts<'a>(&self, opts: ServiceTerminalOpts<'a>) -> Service {
15219        let mut query = self.selection.select("terminal");
15220        if let Some(cmd) = opts.cmd {
15221            query = query.arg("cmd", cmd);
15222        }
15223        Service {
15224            proc: self.proc.clone(),
15225            selection: query,
15226            graphql_client: self.graphql_client.clone(),
15227        }
15228    }
15229    /// Creates a tunnel that forwards traffic from the caller's network to this service.
15230    ///
15231    /// # Arguments
15232    ///
15233    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
15234    pub async fn up(&self) -> Result<Void, DaggerError> {
15235        let query = self.selection.select("up");
15236        query.execute(self.graphql_client.clone()).await
15237    }
15238    /// Creates a tunnel that forwards traffic from the caller's network to this service.
15239    ///
15240    /// # Arguments
15241    ///
15242    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
15243    pub async fn up_opts(&self, opts: ServiceUpOpts) -> Result<Void, DaggerError> {
15244        let mut query = self.selection.select("up");
15245        if let Some(ports) = opts.ports {
15246            query = query.arg("ports", ports);
15247        }
15248        if let Some(random) = opts.random {
15249            query = query.arg("random", random);
15250        }
15251        query.execute(self.graphql_client.clone()).await
15252    }
15253    /// Configures a hostname which can be used by clients within the session to reach this container.
15254    ///
15255    /// # Arguments
15256    ///
15257    /// * `hostname` - The hostname to use.
15258    pub fn with_hostname(&self, hostname: impl Into<String>) -> Service {
15259        let mut query = self.selection.select("withHostname");
15260        query = query.arg("hostname", hostname.into());
15261        Service {
15262            proc: self.proc.clone(),
15263            selection: query,
15264            graphql_client: self.graphql_client.clone(),
15265        }
15266    }
15267}
15268impl Node for Service {
15269    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
15270        let query = self.selection.select("id");
15271        let graphql_client = self.graphql_client.clone();
15272        async move { query.execute(graphql_client).await }
15273    }
15274}
15275impl Syncer for Service {
15276    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
15277        let query = self.selection.select("id");
15278        let graphql_client = self.graphql_client.clone();
15279        async move { query.execute(graphql_client).await }
15280    }
15281    fn sync(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
15282        let query = self.selection.select("sync");
15283        let graphql_client = self.graphql_client.clone();
15284        async move { query.execute(graphql_client).await }
15285    }
15286}
15287#[derive(Clone)]
15288pub struct Socket {
15289    pub proc: Option<Arc<DaggerSessionProc>>,
15290    pub selection: Selection,
15291    pub graphql_client: DynGraphQLClient,
15292}
15293impl IntoID<Id> for Socket {
15294    fn into_id(
15295        self,
15296    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
15297        Box::pin(async move { self.id().await })
15298    }
15299}
15300impl Loadable for Socket {
15301    fn graphql_type() -> &'static str {
15302        "Socket"
15303    }
15304    fn from_query(
15305        proc: Option<Arc<DaggerSessionProc>>,
15306        selection: Selection,
15307        graphql_client: DynGraphQLClient,
15308    ) -> Self {
15309        Self {
15310            proc,
15311            selection,
15312            graphql_client,
15313        }
15314    }
15315}
15316impl Socket {
15317    /// A unique identifier for this Socket.
15318    pub async fn id(&self) -> Result<Id, DaggerError> {
15319        let query = self.selection.select("id");
15320        query.execute(self.graphql_client.clone()).await
15321    }
15322}
15323impl Node for Socket {
15324    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
15325        let query = self.selection.select("id");
15326        let graphql_client = self.graphql_client.clone();
15327        async move { query.execute(graphql_client).await }
15328    }
15329}
15330#[derive(Clone)]
15331pub struct SourceMap {
15332    pub proc: Option<Arc<DaggerSessionProc>>,
15333    pub selection: Selection,
15334    pub graphql_client: DynGraphQLClient,
15335}
15336impl IntoID<Id> for SourceMap {
15337    fn into_id(
15338        self,
15339    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
15340        Box::pin(async move { self.id().await })
15341    }
15342}
15343impl Loadable for SourceMap {
15344    fn graphql_type() -> &'static str {
15345        "SourceMap"
15346    }
15347    fn from_query(
15348        proc: Option<Arc<DaggerSessionProc>>,
15349        selection: Selection,
15350        graphql_client: DynGraphQLClient,
15351    ) -> Self {
15352        Self {
15353            proc,
15354            selection,
15355            graphql_client,
15356        }
15357    }
15358}
15359impl SourceMap {
15360    /// The column number within the line.
15361    pub async fn column(&self) -> Result<isize, DaggerError> {
15362        let query = self.selection.select("column");
15363        query.execute(self.graphql_client.clone()).await
15364    }
15365    /// The filename from the module source.
15366    pub async fn filename(&self) -> Result<String, DaggerError> {
15367        let query = self.selection.select("filename");
15368        query.execute(self.graphql_client.clone()).await
15369    }
15370    /// A unique identifier for this SourceMap.
15371    pub async fn id(&self) -> Result<Id, DaggerError> {
15372        let query = self.selection.select("id");
15373        query.execute(self.graphql_client.clone()).await
15374    }
15375    /// The line number within the filename.
15376    pub async fn line(&self) -> Result<isize, DaggerError> {
15377        let query = self.selection.select("line");
15378        query.execute(self.graphql_client.clone()).await
15379    }
15380    /// The module dependency this was declared in.
15381    pub async fn module(&self) -> Result<String, DaggerError> {
15382        let query = self.selection.select("module");
15383        query.execute(self.graphql_client.clone()).await
15384    }
15385    /// The URL to the file, if any. This can be used to link to the source map in the browser.
15386    pub async fn url(&self) -> Result<String, DaggerError> {
15387        let query = self.selection.select("url");
15388        query.execute(self.graphql_client.clone()).await
15389    }
15390}
15391impl Node for SourceMap {
15392    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
15393        let query = self.selection.select("id");
15394        let graphql_client = self.graphql_client.clone();
15395        async move { query.execute(graphql_client).await }
15396    }
15397}
15398#[derive(Clone)]
15399pub struct Stat {
15400    pub proc: Option<Arc<DaggerSessionProc>>,
15401    pub selection: Selection,
15402    pub graphql_client: DynGraphQLClient,
15403}
15404impl IntoID<Id> for Stat {
15405    fn into_id(
15406        self,
15407    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
15408        Box::pin(async move { self.id().await })
15409    }
15410}
15411impl Loadable for Stat {
15412    fn graphql_type() -> &'static str {
15413        "Stat"
15414    }
15415    fn from_query(
15416        proc: Option<Arc<DaggerSessionProc>>,
15417        selection: Selection,
15418        graphql_client: DynGraphQLClient,
15419    ) -> Self {
15420        Self {
15421            proc,
15422            selection,
15423            graphql_client,
15424        }
15425    }
15426}
15427impl Stat {
15428    /// file type
15429    pub async fn file_type(&self) -> Result<FileType, DaggerError> {
15430        let query = self.selection.select("fileType");
15431        query.execute(self.graphql_client.clone()).await
15432    }
15433    /// A unique identifier for this Stat.
15434    pub async fn id(&self) -> Result<Id, DaggerError> {
15435        let query = self.selection.select("id");
15436        query.execute(self.graphql_client.clone()).await
15437    }
15438    /// file name
15439    pub async fn name(&self) -> Result<String, DaggerError> {
15440        let query = self.selection.select("name");
15441        query.execute(self.graphql_client.clone()).await
15442    }
15443    /// permission bits
15444    pub async fn permissions(&self) -> Result<isize, DaggerError> {
15445        let query = self.selection.select("permissions");
15446        query.execute(self.graphql_client.clone()).await
15447    }
15448    /// file size
15449    pub async fn size(&self) -> Result<isize, DaggerError> {
15450        let query = self.selection.select("size");
15451        query.execute(self.graphql_client.clone()).await
15452    }
15453}
15454impl Node for Stat {
15455    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
15456        let query = self.selection.select("id");
15457        let graphql_client = self.graphql_client.clone();
15458        async move { query.execute(graphql_client).await }
15459    }
15460}
15461#[derive(Clone)]
15462pub struct Terminal {
15463    pub proc: Option<Arc<DaggerSessionProc>>,
15464    pub selection: Selection,
15465    pub graphql_client: DynGraphQLClient,
15466}
15467impl IntoID<Id> for Terminal {
15468    fn into_id(
15469        self,
15470    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
15471        Box::pin(async move { self.id().await })
15472    }
15473}
15474impl Loadable for Terminal {
15475    fn graphql_type() -> &'static str {
15476        "Terminal"
15477    }
15478    fn from_query(
15479        proc: Option<Arc<DaggerSessionProc>>,
15480        selection: Selection,
15481        graphql_client: DynGraphQLClient,
15482    ) -> Self {
15483        Self {
15484            proc,
15485            selection,
15486            graphql_client,
15487        }
15488    }
15489}
15490impl Terminal {
15491    /// A unique identifier for this Terminal.
15492    pub async fn id(&self) -> Result<Id, DaggerError> {
15493        let query = self.selection.select("id");
15494        query.execute(self.graphql_client.clone()).await
15495    }
15496    /// Forces evaluation of the pipeline in the engine.
15497    /// It doesn't run the default command if no exec has been set.
15498    pub async fn sync(&self) -> Result<Terminal, DaggerError> {
15499        let query = self.selection.select("sync");
15500        let id: Id = query.execute(self.graphql_client.clone()).await?;
15501        Ok(Terminal {
15502            proc: self.proc.clone(),
15503            selection: query
15504                .root()
15505                .select("node")
15506                .arg("id", &id.0)
15507                .inline_fragment("Terminal"),
15508            graphql_client: self.graphql_client.clone(),
15509        })
15510    }
15511}
15512impl Node for Terminal {
15513    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
15514        let query = self.selection.select("id");
15515        let graphql_client = self.graphql_client.clone();
15516        async move { query.execute(graphql_client).await }
15517    }
15518}
15519impl Syncer for Terminal {
15520    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
15521        let query = self.selection.select("id");
15522        let graphql_client = self.graphql_client.clone();
15523        async move { query.execute(graphql_client).await }
15524    }
15525    fn sync(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
15526        let query = self.selection.select("sync");
15527        let graphql_client = self.graphql_client.clone();
15528        async move { query.execute(graphql_client).await }
15529    }
15530}
15531#[derive(Clone)]
15532pub struct TypeDef {
15533    pub proc: Option<Arc<DaggerSessionProc>>,
15534    pub selection: Selection,
15535    pub graphql_client: DynGraphQLClient,
15536}
15537#[derive(Builder, Debug, PartialEq)]
15538pub struct TypeDefWithEnumOpts<'a> {
15539    /// A doc string for the enum, if any
15540    #[builder(setter(into, strip_option), default)]
15541    pub description: Option<&'a str>,
15542    /// The source map for the enum definition.
15543    #[builder(setter(into, strip_option), default)]
15544    pub source_map: Option<Id>,
15545}
15546#[derive(Builder, Debug, PartialEq)]
15547pub struct TypeDefWithEnumMemberOpts<'a> {
15548    /// If deprecated, the reason or migration path.
15549    #[builder(setter(into, strip_option), default)]
15550    pub deprecated: Option<&'a str>,
15551    /// A doc string for the member, if any
15552    #[builder(setter(into, strip_option), default)]
15553    pub description: Option<&'a str>,
15554    /// The source map for the enum member definition.
15555    #[builder(setter(into, strip_option), default)]
15556    pub source_map: Option<Id>,
15557    /// The value of the member in the enum
15558    #[builder(setter(into, strip_option), default)]
15559    pub value: Option<&'a str>,
15560}
15561#[derive(Builder, Debug, PartialEq)]
15562pub struct TypeDefWithEnumValueOpts<'a> {
15563    /// If deprecated, the reason or migration path.
15564    #[builder(setter(into, strip_option), default)]
15565    pub deprecated: Option<&'a str>,
15566    /// A doc string for the value, if any
15567    #[builder(setter(into, strip_option), default)]
15568    pub description: Option<&'a str>,
15569    /// The source map for the enum value definition.
15570    #[builder(setter(into, strip_option), default)]
15571    pub source_map: Option<Id>,
15572}
15573#[derive(Builder, Debug, PartialEq)]
15574pub struct TypeDefWithFieldOpts<'a> {
15575    /// If deprecated, the reason or migration path.
15576    #[builder(setter(into, strip_option), default)]
15577    pub deprecated: Option<&'a str>,
15578    /// A doc string for the field, if any
15579    #[builder(setter(into, strip_option), default)]
15580    pub description: Option<&'a str>,
15581    /// The source map for the field definition.
15582    #[builder(setter(into, strip_option), default)]
15583    pub source_map: Option<Id>,
15584}
15585#[derive(Builder, Debug, PartialEq)]
15586pub struct TypeDefWithInterfaceOpts<'a> {
15587    #[builder(setter(into, strip_option), default)]
15588    pub description: Option<&'a str>,
15589    #[builder(setter(into, strip_option), default)]
15590    pub source_map: Option<Id>,
15591}
15592#[derive(Builder, Debug, PartialEq)]
15593pub struct TypeDefWithObjectOpts<'a> {
15594    #[builder(setter(into, strip_option), default)]
15595    pub deprecated: Option<&'a str>,
15596    #[builder(setter(into, strip_option), default)]
15597    pub description: Option<&'a str>,
15598    #[builder(setter(into, strip_option), default)]
15599    pub source_map: Option<Id>,
15600}
15601#[derive(Builder, Debug, PartialEq)]
15602pub struct TypeDefWithScalarOpts<'a> {
15603    #[builder(setter(into, strip_option), default)]
15604    pub description: Option<&'a str>,
15605}
15606impl IntoID<Id> for TypeDef {
15607    fn into_id(
15608        self,
15609    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
15610        Box::pin(async move { self.id().await })
15611    }
15612}
15613impl Loadable for TypeDef {
15614    fn graphql_type() -> &'static str {
15615        "TypeDef"
15616    }
15617    fn from_query(
15618        proc: Option<Arc<DaggerSessionProc>>,
15619        selection: Selection,
15620        graphql_client: DynGraphQLClient,
15621    ) -> Self {
15622        Self {
15623            proc,
15624            selection,
15625            graphql_client,
15626        }
15627    }
15628}
15629impl TypeDef {
15630    /// If kind is ENUM, the enum-specific type definition. If kind is not ENUM, this will be null.
15631    pub fn as_enum(&self) -> EnumTypeDef {
15632        let query = self.selection.select("asEnum");
15633        EnumTypeDef {
15634            proc: self.proc.clone(),
15635            selection: query,
15636            graphql_client: self.graphql_client.clone(),
15637        }
15638    }
15639    /// If kind is INPUT, the input-specific type definition. If kind is not INPUT, this will be null.
15640    pub fn as_input(&self) -> InputTypeDef {
15641        let query = self.selection.select("asInput");
15642        InputTypeDef {
15643            proc: self.proc.clone(),
15644            selection: query,
15645            graphql_client: self.graphql_client.clone(),
15646        }
15647    }
15648    /// If kind is INTERFACE, the interface-specific type definition. If kind is not INTERFACE, this will be null.
15649    pub fn as_interface(&self) -> InterfaceTypeDef {
15650        let query = self.selection.select("asInterface");
15651        InterfaceTypeDef {
15652            proc: self.proc.clone(),
15653            selection: query,
15654            graphql_client: self.graphql_client.clone(),
15655        }
15656    }
15657    /// If kind is LIST, the list-specific type definition. If kind is not LIST, this will be null.
15658    pub fn as_list(&self) -> ListTypeDef {
15659        let query = self.selection.select("asList");
15660        ListTypeDef {
15661            proc: self.proc.clone(),
15662            selection: query,
15663            graphql_client: self.graphql_client.clone(),
15664        }
15665    }
15666    /// If kind is OBJECT, the object-specific type definition. If kind is not OBJECT, this will be null.
15667    pub fn as_object(&self) -> ObjectTypeDef {
15668        let query = self.selection.select("asObject");
15669        ObjectTypeDef {
15670            proc: self.proc.clone(),
15671            selection: query,
15672            graphql_client: self.graphql_client.clone(),
15673        }
15674    }
15675    /// If kind is SCALAR, the scalar-specific type definition. If kind is not SCALAR, this will be null.
15676    pub fn as_scalar(&self) -> ScalarTypeDef {
15677        let query = self.selection.select("asScalar");
15678        ScalarTypeDef {
15679            proc: self.proc.clone(),
15680            selection: query,
15681            graphql_client: self.graphql_client.clone(),
15682        }
15683    }
15684    /// A unique identifier for this TypeDef.
15685    pub async fn id(&self) -> Result<Id, DaggerError> {
15686        let query = self.selection.select("id");
15687        query.execute(self.graphql_client.clone()).await
15688    }
15689    /// The kind of type this is (e.g. primitive, list, object).
15690    pub async fn kind(&self) -> Result<TypeDefKind, DaggerError> {
15691        let query = self.selection.select("kind");
15692        query.execute(self.graphql_client.clone()).await
15693    }
15694    /// The canonical non-optional name of the type.
15695    pub async fn name(&self) -> Result<String, DaggerError> {
15696        let query = self.selection.select("name");
15697        query.execute(self.graphql_client.clone()).await
15698    }
15699    /// Whether this type can be set to null. Defaults to false.
15700    pub async fn optional(&self) -> Result<bool, DaggerError> {
15701        let query = self.selection.select("optional");
15702        query.execute(self.graphql_client.clone()).await
15703    }
15704    /// Adds a function for constructing a new instance of an Object TypeDef, failing if the type is not an object.
15705    pub fn with_constructor(&self, function: impl IntoID<Id>) -> TypeDef {
15706        let mut query = self.selection.select("withConstructor");
15707        query = query.arg_lazy(
15708            "function",
15709            Box::new(move || {
15710                let function = function.clone();
15711                Box::pin(async move { function.into_id().await.unwrap().quote() })
15712            }),
15713        );
15714        TypeDef {
15715            proc: self.proc.clone(),
15716            selection: query,
15717            graphql_client: self.graphql_client.clone(),
15718        }
15719    }
15720    /// Returns a TypeDef of kind Enum with the provided name.
15721    /// Note that an enum's values may be omitted if the intent is only to refer to an enum. This is how functions are able to return their own, or any other circular reference.
15722    ///
15723    /// # Arguments
15724    ///
15725    /// * `name` - The name of the enum
15726    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
15727    pub fn with_enum(&self, name: impl Into<String>) -> TypeDef {
15728        let mut query = self.selection.select("withEnum");
15729        query = query.arg("name", name.into());
15730        TypeDef {
15731            proc: self.proc.clone(),
15732            selection: query,
15733            graphql_client: self.graphql_client.clone(),
15734        }
15735    }
15736    /// Returns a TypeDef of kind Enum with the provided name.
15737    /// Note that an enum's values may be omitted if the intent is only to refer to an enum. This is how functions are able to return their own, or any other circular reference.
15738    ///
15739    /// # Arguments
15740    ///
15741    /// * `name` - The name of the enum
15742    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
15743    pub fn with_enum_opts<'a>(
15744        &self,
15745        name: impl Into<String>,
15746        opts: TypeDefWithEnumOpts<'a>,
15747    ) -> TypeDef {
15748        let mut query = self.selection.select("withEnum");
15749        query = query.arg("name", name.into());
15750        if let Some(description) = opts.description {
15751            query = query.arg("description", description);
15752        }
15753        if let Some(source_map) = opts.source_map {
15754            query = query.arg("sourceMap", source_map);
15755        }
15756        TypeDef {
15757            proc: self.proc.clone(),
15758            selection: query,
15759            graphql_client: self.graphql_client.clone(),
15760        }
15761    }
15762    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
15763    ///
15764    /// # Arguments
15765    ///
15766    /// * `name` - The name of the member in the enum
15767    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
15768    pub fn with_enum_member(&self, name: impl Into<String>) -> TypeDef {
15769        let mut query = self.selection.select("withEnumMember");
15770        query = query.arg("name", name.into());
15771        TypeDef {
15772            proc: self.proc.clone(),
15773            selection: query,
15774            graphql_client: self.graphql_client.clone(),
15775        }
15776    }
15777    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
15778    ///
15779    /// # Arguments
15780    ///
15781    /// * `name` - The name of the member in the enum
15782    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
15783    pub fn with_enum_member_opts<'a>(
15784        &self,
15785        name: impl Into<String>,
15786        opts: TypeDefWithEnumMemberOpts<'a>,
15787    ) -> TypeDef {
15788        let mut query = self.selection.select("withEnumMember");
15789        query = query.arg("name", name.into());
15790        if let Some(value) = opts.value {
15791            query = query.arg("value", value);
15792        }
15793        if let Some(description) = opts.description {
15794            query = query.arg("description", description);
15795        }
15796        if let Some(source_map) = opts.source_map {
15797            query = query.arg("sourceMap", source_map);
15798        }
15799        if let Some(deprecated) = opts.deprecated {
15800            query = query.arg("deprecated", deprecated);
15801        }
15802        TypeDef {
15803            proc: self.proc.clone(),
15804            selection: query,
15805            graphql_client: self.graphql_client.clone(),
15806        }
15807    }
15808    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
15809    ///
15810    /// # Arguments
15811    ///
15812    /// * `value` - The name of the value in the enum
15813    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
15814    pub fn with_enum_value(&self, value: impl Into<String>) -> TypeDef {
15815        let mut query = self.selection.select("withEnumValue");
15816        query = query.arg("value", value.into());
15817        TypeDef {
15818            proc: self.proc.clone(),
15819            selection: query,
15820            graphql_client: self.graphql_client.clone(),
15821        }
15822    }
15823    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
15824    ///
15825    /// # Arguments
15826    ///
15827    /// * `value` - The name of the value in the enum
15828    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
15829    pub fn with_enum_value_opts<'a>(
15830        &self,
15831        value: impl Into<String>,
15832        opts: TypeDefWithEnumValueOpts<'a>,
15833    ) -> TypeDef {
15834        let mut query = self.selection.select("withEnumValue");
15835        query = query.arg("value", value.into());
15836        if let Some(description) = opts.description {
15837            query = query.arg("description", description);
15838        }
15839        if let Some(source_map) = opts.source_map {
15840            query = query.arg("sourceMap", source_map);
15841        }
15842        if let Some(deprecated) = opts.deprecated {
15843            query = query.arg("deprecated", deprecated);
15844        }
15845        TypeDef {
15846            proc: self.proc.clone(),
15847            selection: query,
15848            graphql_client: self.graphql_client.clone(),
15849        }
15850    }
15851    /// Adds a static field for an Object TypeDef, failing if the type is not an object.
15852    ///
15853    /// # Arguments
15854    ///
15855    /// * `name` - The name of the field in the object
15856    /// * `type_def` - The type of the field
15857    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
15858    pub fn with_field(&self, name: impl Into<String>, type_def: impl IntoID<Id>) -> TypeDef {
15859        let mut query = self.selection.select("withField");
15860        query = query.arg("name", name.into());
15861        query = query.arg_lazy(
15862            "typeDef",
15863            Box::new(move || {
15864                let type_def = type_def.clone();
15865                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
15866            }),
15867        );
15868        TypeDef {
15869            proc: self.proc.clone(),
15870            selection: query,
15871            graphql_client: self.graphql_client.clone(),
15872        }
15873    }
15874    /// Adds a static field for an Object TypeDef, failing if the type is not an object.
15875    ///
15876    /// # Arguments
15877    ///
15878    /// * `name` - The name of the field in the object
15879    /// * `type_def` - The type of the field
15880    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
15881    pub fn with_field_opts<'a>(
15882        &self,
15883        name: impl Into<String>,
15884        type_def: impl IntoID<Id>,
15885        opts: TypeDefWithFieldOpts<'a>,
15886    ) -> TypeDef {
15887        let mut query = self.selection.select("withField");
15888        query = query.arg("name", name.into());
15889        query = query.arg_lazy(
15890            "typeDef",
15891            Box::new(move || {
15892                let type_def = type_def.clone();
15893                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
15894            }),
15895        );
15896        if let Some(description) = opts.description {
15897            query = query.arg("description", description);
15898        }
15899        if let Some(source_map) = opts.source_map {
15900            query = query.arg("sourceMap", source_map);
15901        }
15902        if let Some(deprecated) = opts.deprecated {
15903            query = query.arg("deprecated", deprecated);
15904        }
15905        TypeDef {
15906            proc: self.proc.clone(),
15907            selection: query,
15908            graphql_client: self.graphql_client.clone(),
15909        }
15910    }
15911    /// Adds a function for an Object or Interface TypeDef, failing if the type is not one of those kinds.
15912    pub fn with_function(&self, function: impl IntoID<Id>) -> TypeDef {
15913        let mut query = self.selection.select("withFunction");
15914        query = query.arg_lazy(
15915            "function",
15916            Box::new(move || {
15917                let function = function.clone();
15918                Box::pin(async move { function.into_id().await.unwrap().quote() })
15919            }),
15920        );
15921        TypeDef {
15922            proc: self.proc.clone(),
15923            selection: query,
15924            graphql_client: self.graphql_client.clone(),
15925        }
15926    }
15927    /// Returns a TypeDef of kind Interface with the provided name.
15928    ///
15929    /// # Arguments
15930    ///
15931    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
15932    pub fn with_interface(&self, name: impl Into<String>) -> TypeDef {
15933        let mut query = self.selection.select("withInterface");
15934        query = query.arg("name", name.into());
15935        TypeDef {
15936            proc: self.proc.clone(),
15937            selection: query,
15938            graphql_client: self.graphql_client.clone(),
15939        }
15940    }
15941    /// Returns a TypeDef of kind Interface with the provided name.
15942    ///
15943    /// # Arguments
15944    ///
15945    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
15946    pub fn with_interface_opts<'a>(
15947        &self,
15948        name: impl Into<String>,
15949        opts: TypeDefWithInterfaceOpts<'a>,
15950    ) -> TypeDef {
15951        let mut query = self.selection.select("withInterface");
15952        query = query.arg("name", name.into());
15953        if let Some(description) = opts.description {
15954            query = query.arg("description", description);
15955        }
15956        if let Some(source_map) = opts.source_map {
15957            query = query.arg("sourceMap", source_map);
15958        }
15959        TypeDef {
15960            proc: self.proc.clone(),
15961            selection: query,
15962            graphql_client: self.graphql_client.clone(),
15963        }
15964    }
15965    /// Sets the kind of the type.
15966    pub fn with_kind(&self, kind: TypeDefKind) -> TypeDef {
15967        let mut query = self.selection.select("withKind");
15968        query = query.arg("kind", kind);
15969        TypeDef {
15970            proc: self.proc.clone(),
15971            selection: query,
15972            graphql_client: self.graphql_client.clone(),
15973        }
15974    }
15975    /// Returns a TypeDef of kind List with the provided type for its elements.
15976    pub fn with_list_of(&self, element_type: impl IntoID<Id>) -> TypeDef {
15977        let mut query = self.selection.select("withListOf");
15978        query = query.arg_lazy(
15979            "elementType",
15980            Box::new(move || {
15981                let element_type = element_type.clone();
15982                Box::pin(async move { element_type.into_id().await.unwrap().quote() })
15983            }),
15984        );
15985        TypeDef {
15986            proc: self.proc.clone(),
15987            selection: query,
15988            graphql_client: self.graphql_client.clone(),
15989        }
15990    }
15991    /// Returns a TypeDef of kind Object with the provided name.
15992    /// Note that an object's fields and functions may be omitted if the intent is only to refer to an object. This is how functions are able to return their own object, or any other circular reference.
15993    ///
15994    /// # Arguments
15995    ///
15996    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
15997    pub fn with_object(&self, name: impl Into<String>) -> TypeDef {
15998        let mut query = self.selection.select("withObject");
15999        query = query.arg("name", name.into());
16000        TypeDef {
16001            proc: self.proc.clone(),
16002            selection: query,
16003            graphql_client: self.graphql_client.clone(),
16004        }
16005    }
16006    /// Returns a TypeDef of kind Object with the provided name.
16007    /// Note that an object's fields and functions may be omitted if the intent is only to refer to an object. This is how functions are able to return their own object, or any other circular reference.
16008    ///
16009    /// # Arguments
16010    ///
16011    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
16012    pub fn with_object_opts<'a>(
16013        &self,
16014        name: impl Into<String>,
16015        opts: TypeDefWithObjectOpts<'a>,
16016    ) -> TypeDef {
16017        let mut query = self.selection.select("withObject");
16018        query = query.arg("name", name.into());
16019        if let Some(description) = opts.description {
16020            query = query.arg("description", description);
16021        }
16022        if let Some(source_map) = opts.source_map {
16023            query = query.arg("sourceMap", source_map);
16024        }
16025        if let Some(deprecated) = opts.deprecated {
16026            query = query.arg("deprecated", deprecated);
16027        }
16028        TypeDef {
16029            proc: self.proc.clone(),
16030            selection: query,
16031            graphql_client: self.graphql_client.clone(),
16032        }
16033    }
16034    /// Sets whether this type can be set to null.
16035    pub fn with_optional(&self, optional: bool) -> TypeDef {
16036        let mut query = self.selection.select("withOptional");
16037        query = query.arg("optional", optional);
16038        TypeDef {
16039            proc: self.proc.clone(),
16040            selection: query,
16041            graphql_client: self.graphql_client.clone(),
16042        }
16043    }
16044    /// Returns a TypeDef of kind Scalar with the provided name.
16045    ///
16046    /// # Arguments
16047    ///
16048    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
16049    pub fn with_scalar(&self, name: impl Into<String>) -> TypeDef {
16050        let mut query = self.selection.select("withScalar");
16051        query = query.arg("name", name.into());
16052        TypeDef {
16053            proc: self.proc.clone(),
16054            selection: query,
16055            graphql_client: self.graphql_client.clone(),
16056        }
16057    }
16058    /// Returns a TypeDef of kind Scalar with the provided name.
16059    ///
16060    /// # Arguments
16061    ///
16062    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
16063    pub fn with_scalar_opts<'a>(
16064        &self,
16065        name: impl Into<String>,
16066        opts: TypeDefWithScalarOpts<'a>,
16067    ) -> TypeDef {
16068        let mut query = self.selection.select("withScalar");
16069        query = query.arg("name", name.into());
16070        if let Some(description) = opts.description {
16071            query = query.arg("description", description);
16072        }
16073        TypeDef {
16074            proc: self.proc.clone(),
16075            selection: query,
16076            graphql_client: self.graphql_client.clone(),
16077        }
16078    }
16079}
16080impl Node for TypeDef {
16081    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
16082        let query = self.selection.select("id");
16083        let graphql_client = self.graphql_client.clone();
16084        async move { query.execute(graphql_client).await }
16085    }
16086}
16087#[derive(Clone)]
16088pub struct Up {
16089    pub proc: Option<Arc<DaggerSessionProc>>,
16090    pub selection: Selection,
16091    pub graphql_client: DynGraphQLClient,
16092}
16093impl IntoID<Id> for Up {
16094    fn into_id(
16095        self,
16096    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
16097        Box::pin(async move { self.id().await })
16098    }
16099}
16100impl Loadable for Up {
16101    fn graphql_type() -> &'static str {
16102        "Up"
16103    }
16104    fn from_query(
16105        proc: Option<Arc<DaggerSessionProc>>,
16106        selection: Selection,
16107        graphql_client: DynGraphQLClient,
16108    ) -> Self {
16109        Self {
16110            proc,
16111            selection,
16112            graphql_client,
16113        }
16114    }
16115}
16116impl Up {
16117    /// The description of the service
16118    pub async fn description(&self) -> Result<String, DaggerError> {
16119        let query = self.selection.select("description");
16120        query.execute(self.graphql_client.clone()).await
16121    }
16122    /// A unique identifier for this Up.
16123    pub async fn id(&self) -> Result<Id, DaggerError> {
16124        let query = self.selection.select("id");
16125        query.execute(self.graphql_client.clone()).await
16126    }
16127    /// Return the fully qualified name of the service
16128    pub async fn name(&self) -> Result<String, DaggerError> {
16129        let query = self.selection.select("name");
16130        query.execute(self.graphql_client.clone()).await
16131    }
16132    /// The original module in which the service has been defined
16133    pub fn original_module(&self) -> Module {
16134        let query = self.selection.select("originalModule");
16135        Module {
16136            proc: self.proc.clone(),
16137            selection: query,
16138            graphql_client: self.graphql_client.clone(),
16139        }
16140    }
16141    /// The path of the service within its module
16142    pub async fn path(&self) -> Result<Vec<String>, DaggerError> {
16143        let query = self.selection.select("path");
16144        query.execute(self.graphql_client.clone()).await
16145    }
16146    /// Execute the service function
16147    pub fn run(&self) -> Up {
16148        let query = self.selection.select("run");
16149        Up {
16150            proc: self.proc.clone(),
16151            selection: query,
16152            graphql_client: self.graphql_client.clone(),
16153        }
16154    }
16155}
16156impl Node for Up {
16157    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
16158        let query = self.selection.select("id");
16159        let graphql_client = self.graphql_client.clone();
16160        async move { query.execute(graphql_client).await }
16161    }
16162}
16163#[derive(Clone)]
16164pub struct UpGroup {
16165    pub proc: Option<Arc<DaggerSessionProc>>,
16166    pub selection: Selection,
16167    pub graphql_client: DynGraphQLClient,
16168}
16169impl IntoID<Id> for UpGroup {
16170    fn into_id(
16171        self,
16172    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
16173        Box::pin(async move { self.id().await })
16174    }
16175}
16176impl Loadable for UpGroup {
16177    fn graphql_type() -> &'static str {
16178        "UpGroup"
16179    }
16180    fn from_query(
16181        proc: Option<Arc<DaggerSessionProc>>,
16182        selection: Selection,
16183        graphql_client: DynGraphQLClient,
16184    ) -> Self {
16185        Self {
16186            proc,
16187            selection,
16188            graphql_client,
16189        }
16190    }
16191}
16192impl UpGroup {
16193    /// A unique identifier for this UpGroup.
16194    pub async fn id(&self) -> Result<Id, DaggerError> {
16195        let query = self.selection.select("id");
16196        query.execute(self.graphql_client.clone()).await
16197    }
16198    /// Return a list of individual services and their details
16199    pub async fn list(&self) -> Result<Vec<Up>, DaggerError> {
16200        let query = self.selection.select("list");
16201        let query = query.select("id");
16202        let ids: Vec<Id> = query.execute(self.graphql_client.clone()).await?;
16203        Ok(ids
16204            .into_iter()
16205            .map(|id| Up {
16206                proc: self.proc.clone(),
16207                selection: crate::querybuilder::query()
16208                    .select("node")
16209                    .arg("id", &id.0)
16210                    .inline_fragment("Up"),
16211                graphql_client: self.graphql_client.clone(),
16212            })
16213            .collect())
16214    }
16215    /// Execute all selected service functions
16216    pub fn run(&self) -> UpGroup {
16217        let query = self.selection.select("run");
16218        UpGroup {
16219            proc: self.proc.clone(),
16220            selection: query,
16221            graphql_client: self.graphql_client.clone(),
16222        }
16223    }
16224}
16225impl Node for UpGroup {
16226    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
16227        let query = self.selection.select("id");
16228        let graphql_client = self.graphql_client.clone();
16229        async move { query.execute(graphql_client).await }
16230    }
16231}
16232#[derive(Clone)]
16233pub struct Workspace {
16234    pub proc: Option<Arc<DaggerSessionProc>>,
16235    pub selection: Selection,
16236    pub graphql_client: DynGraphQLClient,
16237}
16238#[derive(Builder, Debug, PartialEq)]
16239pub struct WorkspaceChecksOpts<'a> {
16240    /// Only include checks matching the specified patterns
16241    #[builder(setter(into, strip_option), default)]
16242    pub include: Option<Vec<&'a str>>,
16243    /// When true, only return annotated check functions; exclude generate-as-checks
16244    #[builder(setter(into, strip_option), default)]
16245    pub no_generate: Option<bool>,
16246    /// When true, only return generate-as-checks; exclude annotated check functions
16247    #[builder(setter(into, strip_option), default)]
16248    pub only_generate: Option<bool>,
16249}
16250#[derive(Builder, Debug, PartialEq)]
16251pub struct WorkspaceDirectoryOpts<'a> {
16252    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
16253    #[builder(setter(into, strip_option), default)]
16254    pub exclude: Option<Vec<&'a str>>,
16255    /// Apply .gitignore filter rules inside the directory.
16256    #[builder(setter(into, strip_option), default)]
16257    pub gitignore: Option<bool>,
16258    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
16259    #[builder(setter(into, strip_option), default)]
16260    pub include: Option<Vec<&'a str>>,
16261}
16262#[derive(Builder, Debug, PartialEq)]
16263pub struct WorkspaceFindUpOpts<'a> {
16264    /// Path to start the search from. Relative paths resolve from the workspace directory; absolute paths resolve from the workspace boundary.
16265    #[builder(setter(into, strip_option), default)]
16266    pub from: Option<&'a str>,
16267}
16268#[derive(Builder, Debug, PartialEq)]
16269pub struct WorkspaceGeneratorsOpts<'a> {
16270    /// Only include generators matching the specified patterns
16271    #[builder(setter(into, strip_option), default)]
16272    pub include: Option<Vec<&'a str>>,
16273}
16274#[derive(Builder, Debug, PartialEq)]
16275pub struct WorkspaceServicesOpts<'a> {
16276    /// Only include services matching the specified patterns
16277    #[builder(setter(into, strip_option), default)]
16278    pub include: Option<Vec<&'a str>>,
16279}
16280impl IntoID<Id> for Workspace {
16281    fn into_id(
16282        self,
16283    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Id, DaggerError>> + Send>> {
16284        Box::pin(async move { self.id().await })
16285    }
16286}
16287impl Loadable for Workspace {
16288    fn graphql_type() -> &'static str {
16289        "Workspace"
16290    }
16291    fn from_query(
16292        proc: Option<Arc<DaggerSessionProc>>,
16293        selection: Selection,
16294        graphql_client: DynGraphQLClient,
16295    ) -> Self {
16296        Self {
16297            proc,
16298            selection,
16299            graphql_client,
16300        }
16301    }
16302}
16303impl Workspace {
16304    /// Canonical Dagger address of the workspace directory.
16305    pub async fn address(&self) -> Result<String, DaggerError> {
16306        let query = self.selection.select("address");
16307        query.execute(self.graphql_client.clone()).await
16308    }
16309    /// Return all checks from modules loaded in the workspace.
16310    ///
16311    /// # Arguments
16312    ///
16313    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
16314    pub fn checks(&self) -> CheckGroup {
16315        let query = self.selection.select("checks");
16316        CheckGroup {
16317            proc: self.proc.clone(),
16318            selection: query,
16319            graphql_client: self.graphql_client.clone(),
16320        }
16321    }
16322    /// Return all checks from modules loaded in the workspace.
16323    ///
16324    /// # Arguments
16325    ///
16326    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
16327    pub fn checks_opts<'a>(&self, opts: WorkspaceChecksOpts<'a>) -> CheckGroup {
16328        let mut query = self.selection.select("checks");
16329        if let Some(include) = opts.include {
16330            query = query.arg("include", include);
16331        }
16332        if let Some(no_generate) = opts.no_generate {
16333            query = query.arg("noGenerate", no_generate);
16334        }
16335        if let Some(only_generate) = opts.only_generate {
16336            query = query.arg("onlyGenerate", only_generate);
16337        }
16338        CheckGroup {
16339            proc: self.proc.clone(),
16340            selection: query,
16341            graphql_client: self.graphql_client.clone(),
16342        }
16343    }
16344    /// The client ID that owns this workspace's host filesystem.
16345    pub async fn client_id(&self) -> Result<String, DaggerError> {
16346        let query = self.selection.select("clientId");
16347        query.execute(self.graphql_client.clone()).await
16348    }
16349    /// Path to config.toml relative to the workspace boundary (empty if not initialized).
16350    pub async fn config_path(&self) -> Result<String, DaggerError> {
16351        let query = self.selection.select("configPath");
16352        query.execute(self.graphql_client.clone()).await
16353    }
16354    /// Returns a Directory from the workspace.
16355    /// Relative paths resolve from the workspace directory. Absolute paths resolve from the workspace boundary.
16356    ///
16357    /// # Arguments
16358    ///
16359    /// * `path` - Location of the directory to retrieve. Relative paths (e.g., "src") resolve from the workspace directory; absolute paths (e.g., "/src") resolve from the workspace boundary.
16360    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
16361    pub fn directory(&self, path: impl Into<String>) -> Directory {
16362        let mut query = self.selection.select("directory");
16363        query = query.arg("path", path.into());
16364        Directory {
16365            proc: self.proc.clone(),
16366            selection: query,
16367            graphql_client: self.graphql_client.clone(),
16368        }
16369    }
16370    /// Returns a Directory from the workspace.
16371    /// Relative paths resolve from the workspace directory. Absolute paths resolve from the workspace boundary.
16372    ///
16373    /// # Arguments
16374    ///
16375    /// * `path` - Location of the directory to retrieve. Relative paths (e.g., "src") resolve from the workspace directory; absolute paths (e.g., "/src") resolve from the workspace boundary.
16376    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
16377    pub fn directory_opts<'a>(
16378        &self,
16379        path: impl Into<String>,
16380        opts: WorkspaceDirectoryOpts<'a>,
16381    ) -> Directory {
16382        let mut query = self.selection.select("directory");
16383        query = query.arg("path", path.into());
16384        if let Some(exclude) = opts.exclude {
16385            query = query.arg("exclude", exclude);
16386        }
16387        if let Some(include) = opts.include {
16388            query = query.arg("include", include);
16389        }
16390        if let Some(gitignore) = opts.gitignore {
16391            query = query.arg("gitignore", gitignore);
16392        }
16393        Directory {
16394            proc: self.proc.clone(),
16395            selection: query,
16396            graphql_client: self.graphql_client.clone(),
16397        }
16398    }
16399    /// Returns a File from the workspace.
16400    /// Relative paths resolve from the workspace directory. Absolute paths resolve from the workspace boundary.
16401    ///
16402    /// # Arguments
16403    ///
16404    /// * `path` - Location of the file to retrieve. Relative paths (e.g., "go.mod") resolve from the workspace directory; absolute paths (e.g., "/go.mod") resolve from the workspace boundary.
16405    pub fn file(&self, path: impl Into<String>) -> File {
16406        let mut query = self.selection.select("file");
16407        query = query.arg("path", path.into());
16408        File {
16409            proc: self.proc.clone(),
16410            selection: query,
16411            graphql_client: self.graphql_client.clone(),
16412        }
16413    }
16414    /// Search for a file or directory by walking up from the start path within the workspace.
16415    /// Returns the absolute workspace path if found, or null if not found.
16416    /// Relative start paths resolve from the workspace directory.
16417    /// The search stops at the workspace boundary and will not traverse above it.
16418    ///
16419    /// # Arguments
16420    ///
16421    /// * `name` - The name of the file or directory to search for.
16422    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
16423    pub async fn find_up(&self, name: impl Into<String>) -> Result<String, DaggerError> {
16424        let mut query = self.selection.select("findUp");
16425        query = query.arg("name", name.into());
16426        query.execute(self.graphql_client.clone()).await
16427    }
16428    /// Search for a file or directory by walking up from the start path within the workspace.
16429    /// Returns the absolute workspace path if found, or null if not found.
16430    /// Relative start paths resolve from the workspace directory.
16431    /// The search stops at the workspace boundary and will not traverse above it.
16432    ///
16433    /// # Arguments
16434    ///
16435    /// * `name` - The name of the file or directory to search for.
16436    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
16437    pub async fn find_up_opts<'a>(
16438        &self,
16439        name: impl Into<String>,
16440        opts: WorkspaceFindUpOpts<'a>,
16441    ) -> Result<String, DaggerError> {
16442        let mut query = self.selection.select("findUp");
16443        query = query.arg("name", name.into());
16444        if let Some(from) = opts.from {
16445            query = query.arg("from", from);
16446        }
16447        query.execute(self.graphql_client.clone()).await
16448    }
16449    /// Return all generators from modules loaded in the workspace.
16450    ///
16451    /// # Arguments
16452    ///
16453    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
16454    pub fn generators(&self) -> GeneratorGroup {
16455        let query = self.selection.select("generators");
16456        GeneratorGroup {
16457            proc: self.proc.clone(),
16458            selection: query,
16459            graphql_client: self.graphql_client.clone(),
16460        }
16461    }
16462    /// Return all generators from modules loaded in the workspace.
16463    ///
16464    /// # Arguments
16465    ///
16466    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
16467    pub fn generators_opts<'a>(&self, opts: WorkspaceGeneratorsOpts<'a>) -> GeneratorGroup {
16468        let mut query = self.selection.select("generators");
16469        if let Some(include) = opts.include {
16470            query = query.arg("include", include);
16471        }
16472        GeneratorGroup {
16473            proc: self.proc.clone(),
16474            selection: query,
16475            graphql_client: self.graphql_client.clone(),
16476        }
16477    }
16478    /// Whether a config.toml file exists in the workspace.
16479    pub async fn has_config(&self) -> Result<bool, DaggerError> {
16480        let query = self.selection.select("hasConfig");
16481        query.execute(self.graphql_client.clone()).await
16482    }
16483    /// A unique identifier for this Workspace.
16484    pub async fn id(&self) -> Result<Id, DaggerError> {
16485        let query = self.selection.select("id");
16486        query.execute(self.graphql_client.clone()).await
16487    }
16488    /// Whether .dagger/config.toml exists.
16489    pub async fn initialized(&self) -> Result<bool, DaggerError> {
16490        let query = self.selection.select("initialized");
16491        query.execute(self.graphql_client.clone()).await
16492    }
16493    /// Workspace directory path relative to the workspace boundary.
16494    pub async fn path(&self) -> Result<String, DaggerError> {
16495        let query = self.selection.select("path");
16496        query.execute(self.graphql_client.clone()).await
16497    }
16498    /// Return all services from modules loaded in the workspace.
16499    ///
16500    /// # Arguments
16501    ///
16502    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
16503    pub fn services(&self) -> UpGroup {
16504        let query = self.selection.select("services");
16505        UpGroup {
16506            proc: self.proc.clone(),
16507            selection: query,
16508            graphql_client: self.graphql_client.clone(),
16509        }
16510    }
16511    /// Return all services from modules loaded in the workspace.
16512    ///
16513    /// # Arguments
16514    ///
16515    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
16516    pub fn services_opts<'a>(&self, opts: WorkspaceServicesOpts<'a>) -> UpGroup {
16517        let mut query = self.selection.select("services");
16518        if let Some(include) = opts.include {
16519            query = query.arg("include", include);
16520        }
16521        UpGroup {
16522            proc: self.proc.clone(),
16523            selection: query,
16524            graphql_client: self.graphql_client.clone(),
16525        }
16526    }
16527    /// Refresh workspace-managed state and return the resulting changeset.
16528    /// Currently this refreshes existing lockfile entries only.
16529    pub fn update(&self) -> Changeset {
16530        let query = self.selection.select("update");
16531        Changeset {
16532            proc: self.proc.clone(),
16533            selection: query,
16534            graphql_client: self.graphql_client.clone(),
16535        }
16536    }
16537}
16538impl Node for Workspace {
16539    fn id(&self) -> impl core::future::Future<Output = Result<Id, DaggerError>> + Send {
16540        let query = self.selection.select("id");
16541        let graphql_client = self.graphql_client.clone();
16542        async move { query.execute(graphql_client).await }
16543    }
16544}
16545#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
16546pub enum CacheSharingMode {
16547    #[serde(rename = "LOCKED")]
16548    Locked,
16549    #[serde(rename = "PRIVATE")]
16550    Private,
16551    #[serde(rename = "SHARED")]
16552    Shared,
16553}
16554#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
16555pub enum ChangesetMergeConflict {
16556    #[serde(rename = "FAIL")]
16557    Fail,
16558    #[serde(rename = "FAIL_EARLY")]
16559    FailEarly,
16560    #[serde(rename = "LEAVE_CONFLICT_MARKERS")]
16561    LeaveConflictMarkers,
16562    #[serde(rename = "PREFER_OURS")]
16563    PreferOurs,
16564    #[serde(rename = "PREFER_THEIRS")]
16565    PreferTheirs,
16566}
16567#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
16568pub enum ChangesetsMergeConflict {
16569    #[serde(rename = "FAIL")]
16570    Fail,
16571    #[serde(rename = "FAIL_EARLY")]
16572    FailEarly,
16573}
16574#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
16575pub enum DiffStatKind {
16576    #[serde(rename = "ADDED")]
16577    Added,
16578    #[serde(rename = "MODIFIED")]
16579    Modified,
16580    #[serde(rename = "REMOVED")]
16581    Removed,
16582    #[serde(rename = "RENAMED")]
16583    Renamed,
16584}
16585#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
16586pub enum ExistsType {
16587    #[serde(rename = "DIRECTORY_TYPE")]
16588    DirectoryType,
16589    #[serde(rename = "REGULAR_TYPE")]
16590    RegularType,
16591    #[serde(rename = "SYMLINK_TYPE")]
16592    SymlinkType,
16593}
16594#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
16595pub enum FileType {
16596    #[serde(rename = "DIRECTORY")]
16597    Directory,
16598    #[serde(rename = "DIRECTORY_TYPE")]
16599    DirectoryType,
16600    #[serde(rename = "REGULAR")]
16601    Regular,
16602    #[serde(rename = "REGULAR_TYPE")]
16603    RegularType,
16604    #[serde(rename = "SYMLINK")]
16605    Symlink,
16606    #[serde(rename = "SYMLINK_TYPE")]
16607    SymlinkType,
16608    #[serde(rename = "UNKNOWN")]
16609    Unknown,
16610}
16611#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
16612pub enum FunctionCachePolicy {
16613    #[serde(rename = "Default")]
16614    Default,
16615    #[serde(rename = "Never")]
16616    Never,
16617    #[serde(rename = "PerSession")]
16618    PerSession,
16619}
16620#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
16621pub enum ImageLayerCompression {
16622    #[serde(rename = "EStarGZ")]
16623    EStarGz,
16624    #[serde(rename = "ESTARGZ")]
16625    Estargz,
16626    #[serde(rename = "Gzip")]
16627    Gzip,
16628    #[serde(rename = "Uncompressed")]
16629    Uncompressed,
16630    #[serde(rename = "Zstd")]
16631    Zstd,
16632}
16633#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
16634pub enum ImageMediaTypes {
16635    #[serde(rename = "DOCKER")]
16636    Docker,
16637    #[serde(rename = "DockerMediaTypes")]
16638    DockerMediaTypes,
16639    #[serde(rename = "OCI")]
16640    Oci,
16641    #[serde(rename = "OCIMediaTypes")]
16642    OciMediaTypes,
16643}
16644#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
16645pub enum ModuleSourceExperimentalFeature {
16646    #[serde(rename = "SELF_CALLS")]
16647    SelfCalls,
16648}
16649#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
16650pub enum ModuleSourceKind {
16651    #[serde(rename = "DIR")]
16652    Dir,
16653    #[serde(rename = "DIR_SOURCE")]
16654    DirSource,
16655    #[serde(rename = "GIT")]
16656    Git,
16657    #[serde(rename = "GIT_SOURCE")]
16658    GitSource,
16659    #[serde(rename = "LOCAL")]
16660    Local,
16661    #[serde(rename = "LOCAL_SOURCE")]
16662    LocalSource,
16663}
16664#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
16665pub enum NetworkProtocol {
16666    #[serde(rename = "TCP")]
16667    Tcp,
16668    #[serde(rename = "UDP")]
16669    Udp,
16670}
16671#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
16672pub enum ReturnType {
16673    #[serde(rename = "ANY")]
16674    Any,
16675    #[serde(rename = "FAILURE")]
16676    Failure,
16677    #[serde(rename = "SUCCESS")]
16678    Success,
16679}
16680#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
16681pub enum TypeDefKind {
16682    #[serde(rename = "BOOLEAN")]
16683    Boolean,
16684    #[serde(rename = "BOOLEAN_KIND")]
16685    BooleanKind,
16686    #[serde(rename = "ENUM")]
16687    Enum,
16688    #[serde(rename = "ENUM_KIND")]
16689    EnumKind,
16690    #[serde(rename = "FLOAT")]
16691    Float,
16692    #[serde(rename = "FLOAT_KIND")]
16693    FloatKind,
16694    #[serde(rename = "INPUT")]
16695    Input,
16696    #[serde(rename = "INPUT_KIND")]
16697    InputKind,
16698    #[serde(rename = "INTEGER")]
16699    Integer,
16700    #[serde(rename = "INTEGER_KIND")]
16701    IntegerKind,
16702    #[serde(rename = "INTERFACE")]
16703    Interface,
16704    #[serde(rename = "INTERFACE_KIND")]
16705    InterfaceKind,
16706    #[serde(rename = "LIST")]
16707    List,
16708    #[serde(rename = "LIST_KIND")]
16709    ListKind,
16710    #[serde(rename = "OBJECT")]
16711    Object,
16712    #[serde(rename = "OBJECT_KIND")]
16713    ObjectKind,
16714    #[serde(rename = "SCALAR")]
16715    Scalar,
16716    #[serde(rename = "SCALAR_KIND")]
16717    ScalarKind,
16718    #[serde(rename = "STRING")]
16719    String,
16720    #[serde(rename = "STRING_KIND")]
16721    StringKind,
16722    #[serde(rename = "VOID")]
16723    Void,
16724    #[serde(rename = "VOID_KIND")]
16725    VoidKind,
16726}