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::querybuilder::Selection;
8use derive_builder::Builder;
9use serde::{Deserialize, Serialize};
10use std::sync::Arc;
11
12#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
13pub struct AddressId(pub String);
14impl From<&str> for AddressId {
15    fn from(value: &str) -> Self {
16        Self(value.to_string())
17    }
18}
19impl From<String> for AddressId {
20    fn from(value: String) -> Self {
21        Self(value)
22    }
23}
24impl IntoID<AddressId> for Address {
25    fn into_id(
26        self,
27    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<AddressId, DaggerError>> + Send>>
28    {
29        Box::pin(async move { self.id().await })
30    }
31}
32impl IntoID<AddressId> for AddressId {
33    fn into_id(
34        self,
35    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<AddressId, DaggerError>> + Send>>
36    {
37        Box::pin(async move { Ok::<AddressId, DaggerError>(self) })
38    }
39}
40impl AddressId {
41    fn quote(&self) -> String {
42        format!("\"{}\"", self.0.clone())
43    }
44}
45#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
46pub struct BindingId(pub String);
47impl From<&str> for BindingId {
48    fn from(value: &str) -> Self {
49        Self(value.to_string())
50    }
51}
52impl From<String> for BindingId {
53    fn from(value: String) -> Self {
54        Self(value)
55    }
56}
57impl IntoID<BindingId> for Binding {
58    fn into_id(
59        self,
60    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<BindingId, DaggerError>> + Send>>
61    {
62        Box::pin(async move { self.id().await })
63    }
64}
65impl IntoID<BindingId> for BindingId {
66    fn into_id(
67        self,
68    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<BindingId, DaggerError>> + Send>>
69    {
70        Box::pin(async move { Ok::<BindingId, DaggerError>(self) })
71    }
72}
73impl BindingId {
74    fn quote(&self) -> String {
75        format!("\"{}\"", self.0.clone())
76    }
77}
78#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
79pub struct CacheVolumeId(pub String);
80impl From<&str> for CacheVolumeId {
81    fn from(value: &str) -> Self {
82        Self(value.to_string())
83    }
84}
85impl From<String> for CacheVolumeId {
86    fn from(value: String) -> Self {
87        Self(value)
88    }
89}
90impl IntoID<CacheVolumeId> for CacheVolume {
91    fn into_id(
92        self,
93    ) -> std::pin::Pin<
94        Box<dyn core::future::Future<Output = Result<CacheVolumeId, DaggerError>> + Send>,
95    > {
96        Box::pin(async move { self.id().await })
97    }
98}
99impl IntoID<CacheVolumeId> for CacheVolumeId {
100    fn into_id(
101        self,
102    ) -> std::pin::Pin<
103        Box<dyn core::future::Future<Output = Result<CacheVolumeId, DaggerError>> + Send>,
104    > {
105        Box::pin(async move { Ok::<CacheVolumeId, DaggerError>(self) })
106    }
107}
108impl CacheVolumeId {
109    fn quote(&self) -> String {
110        format!("\"{}\"", self.0.clone())
111    }
112}
113#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
114pub struct ChangesetId(pub String);
115impl From<&str> for ChangesetId {
116    fn from(value: &str) -> Self {
117        Self(value.to_string())
118    }
119}
120impl From<String> for ChangesetId {
121    fn from(value: String) -> Self {
122        Self(value)
123    }
124}
125impl IntoID<ChangesetId> for Changeset {
126    fn into_id(
127        self,
128    ) -> std::pin::Pin<
129        Box<dyn core::future::Future<Output = Result<ChangesetId, DaggerError>> + Send>,
130    > {
131        Box::pin(async move { self.id().await })
132    }
133}
134impl IntoID<ChangesetId> for ChangesetId {
135    fn into_id(
136        self,
137    ) -> std::pin::Pin<
138        Box<dyn core::future::Future<Output = Result<ChangesetId, DaggerError>> + Send>,
139    > {
140        Box::pin(async move { Ok::<ChangesetId, DaggerError>(self) })
141    }
142}
143impl ChangesetId {
144    fn quote(&self) -> String {
145        format!("\"{}\"", self.0.clone())
146    }
147}
148#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
149pub struct CheckGroupId(pub String);
150impl From<&str> for CheckGroupId {
151    fn from(value: &str) -> Self {
152        Self(value.to_string())
153    }
154}
155impl From<String> for CheckGroupId {
156    fn from(value: String) -> Self {
157        Self(value)
158    }
159}
160impl IntoID<CheckGroupId> for CheckGroup {
161    fn into_id(
162        self,
163    ) -> std::pin::Pin<
164        Box<dyn core::future::Future<Output = Result<CheckGroupId, DaggerError>> + Send>,
165    > {
166        Box::pin(async move { self.id().await })
167    }
168}
169impl IntoID<CheckGroupId> for CheckGroupId {
170    fn into_id(
171        self,
172    ) -> std::pin::Pin<
173        Box<dyn core::future::Future<Output = Result<CheckGroupId, DaggerError>> + Send>,
174    > {
175        Box::pin(async move { Ok::<CheckGroupId, DaggerError>(self) })
176    }
177}
178impl CheckGroupId {
179    fn quote(&self) -> String {
180        format!("\"{}\"", self.0.clone())
181    }
182}
183#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
184pub struct CheckId(pub String);
185impl From<&str> for CheckId {
186    fn from(value: &str) -> Self {
187        Self(value.to_string())
188    }
189}
190impl From<String> for CheckId {
191    fn from(value: String) -> Self {
192        Self(value)
193    }
194}
195impl IntoID<CheckId> for Check {
196    fn into_id(
197        self,
198    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<CheckId, DaggerError>> + Send>>
199    {
200        Box::pin(async move { self.id().await })
201    }
202}
203impl IntoID<CheckId> for CheckId {
204    fn into_id(
205        self,
206    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<CheckId, DaggerError>> + Send>>
207    {
208        Box::pin(async move { Ok::<CheckId, DaggerError>(self) })
209    }
210}
211impl CheckId {
212    fn quote(&self) -> String {
213        format!("\"{}\"", self.0.clone())
214    }
215}
216#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
217pub struct CloudId(pub String);
218impl From<&str> for CloudId {
219    fn from(value: &str) -> Self {
220        Self(value.to_string())
221    }
222}
223impl From<String> for CloudId {
224    fn from(value: String) -> Self {
225        Self(value)
226    }
227}
228impl IntoID<CloudId> for Cloud {
229    fn into_id(
230        self,
231    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<CloudId, DaggerError>> + Send>>
232    {
233        Box::pin(async move { self.id().await })
234    }
235}
236impl IntoID<CloudId> for CloudId {
237    fn into_id(
238        self,
239    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<CloudId, DaggerError>> + Send>>
240    {
241        Box::pin(async move { Ok::<CloudId, DaggerError>(self) })
242    }
243}
244impl CloudId {
245    fn quote(&self) -> String {
246        format!("\"{}\"", self.0.clone())
247    }
248}
249#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
250pub struct ContainerId(pub String);
251impl From<&str> for ContainerId {
252    fn from(value: &str) -> Self {
253        Self(value.to_string())
254    }
255}
256impl From<String> for ContainerId {
257    fn from(value: String) -> Self {
258        Self(value)
259    }
260}
261impl IntoID<ContainerId> for Container {
262    fn into_id(
263        self,
264    ) -> std::pin::Pin<
265        Box<dyn core::future::Future<Output = Result<ContainerId, DaggerError>> + Send>,
266    > {
267        Box::pin(async move { self.id().await })
268    }
269}
270impl IntoID<ContainerId> for ContainerId {
271    fn into_id(
272        self,
273    ) -> std::pin::Pin<
274        Box<dyn core::future::Future<Output = Result<ContainerId, DaggerError>> + Send>,
275    > {
276        Box::pin(async move { Ok::<ContainerId, DaggerError>(self) })
277    }
278}
279impl ContainerId {
280    fn quote(&self) -> String {
281        format!("\"{}\"", self.0.clone())
282    }
283}
284#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
285pub struct CurrentModuleId(pub String);
286impl From<&str> for CurrentModuleId {
287    fn from(value: &str) -> Self {
288        Self(value.to_string())
289    }
290}
291impl From<String> for CurrentModuleId {
292    fn from(value: String) -> Self {
293        Self(value)
294    }
295}
296impl IntoID<CurrentModuleId> for CurrentModule {
297    fn into_id(
298        self,
299    ) -> std::pin::Pin<
300        Box<dyn core::future::Future<Output = Result<CurrentModuleId, DaggerError>> + Send>,
301    > {
302        Box::pin(async move { self.id().await })
303    }
304}
305impl IntoID<CurrentModuleId> for CurrentModuleId {
306    fn into_id(
307        self,
308    ) -> std::pin::Pin<
309        Box<dyn core::future::Future<Output = Result<CurrentModuleId, DaggerError>> + Send>,
310    > {
311        Box::pin(async move { Ok::<CurrentModuleId, DaggerError>(self) })
312    }
313}
314impl CurrentModuleId {
315    fn quote(&self) -> String {
316        format!("\"{}\"", self.0.clone())
317    }
318}
319#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
320pub struct DirectoryId(pub String);
321impl From<&str> for DirectoryId {
322    fn from(value: &str) -> Self {
323        Self(value.to_string())
324    }
325}
326impl From<String> for DirectoryId {
327    fn from(value: String) -> Self {
328        Self(value)
329    }
330}
331impl IntoID<DirectoryId> for Directory {
332    fn into_id(
333        self,
334    ) -> std::pin::Pin<
335        Box<dyn core::future::Future<Output = Result<DirectoryId, DaggerError>> + Send>,
336    > {
337        Box::pin(async move { self.id().await })
338    }
339}
340impl IntoID<DirectoryId> for DirectoryId {
341    fn into_id(
342        self,
343    ) -> std::pin::Pin<
344        Box<dyn core::future::Future<Output = Result<DirectoryId, DaggerError>> + Send>,
345    > {
346        Box::pin(async move { Ok::<DirectoryId, DaggerError>(self) })
347    }
348}
349impl DirectoryId {
350    fn quote(&self) -> String {
351        format!("\"{}\"", self.0.clone())
352    }
353}
354#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
355pub struct EngineCacheEntryId(pub String);
356impl From<&str> for EngineCacheEntryId {
357    fn from(value: &str) -> Self {
358        Self(value.to_string())
359    }
360}
361impl From<String> for EngineCacheEntryId {
362    fn from(value: String) -> Self {
363        Self(value)
364    }
365}
366impl IntoID<EngineCacheEntryId> for EngineCacheEntry {
367    fn into_id(
368        self,
369    ) -> std::pin::Pin<
370        Box<dyn core::future::Future<Output = Result<EngineCacheEntryId, DaggerError>> + Send>,
371    > {
372        Box::pin(async move { self.id().await })
373    }
374}
375impl IntoID<EngineCacheEntryId> for EngineCacheEntryId {
376    fn into_id(
377        self,
378    ) -> std::pin::Pin<
379        Box<dyn core::future::Future<Output = Result<EngineCacheEntryId, DaggerError>> + Send>,
380    > {
381        Box::pin(async move { Ok::<EngineCacheEntryId, DaggerError>(self) })
382    }
383}
384impl EngineCacheEntryId {
385    fn quote(&self) -> String {
386        format!("\"{}\"", self.0.clone())
387    }
388}
389#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
390pub struct EngineCacheEntrySetId(pub String);
391impl From<&str> for EngineCacheEntrySetId {
392    fn from(value: &str) -> Self {
393        Self(value.to_string())
394    }
395}
396impl From<String> for EngineCacheEntrySetId {
397    fn from(value: String) -> Self {
398        Self(value)
399    }
400}
401impl IntoID<EngineCacheEntrySetId> for EngineCacheEntrySet {
402    fn into_id(
403        self,
404    ) -> std::pin::Pin<
405        Box<dyn core::future::Future<Output = Result<EngineCacheEntrySetId, DaggerError>> + Send>,
406    > {
407        Box::pin(async move { self.id().await })
408    }
409}
410impl IntoID<EngineCacheEntrySetId> for EngineCacheEntrySetId {
411    fn into_id(
412        self,
413    ) -> std::pin::Pin<
414        Box<dyn core::future::Future<Output = Result<EngineCacheEntrySetId, DaggerError>> + Send>,
415    > {
416        Box::pin(async move { Ok::<EngineCacheEntrySetId, DaggerError>(self) })
417    }
418}
419impl EngineCacheEntrySetId {
420    fn quote(&self) -> String {
421        format!("\"{}\"", self.0.clone())
422    }
423}
424#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
425pub struct EngineCacheId(pub String);
426impl From<&str> for EngineCacheId {
427    fn from(value: &str) -> Self {
428        Self(value.to_string())
429    }
430}
431impl From<String> for EngineCacheId {
432    fn from(value: String) -> Self {
433        Self(value)
434    }
435}
436impl IntoID<EngineCacheId> for EngineCache {
437    fn into_id(
438        self,
439    ) -> std::pin::Pin<
440        Box<dyn core::future::Future<Output = Result<EngineCacheId, DaggerError>> + Send>,
441    > {
442        Box::pin(async move { self.id().await })
443    }
444}
445impl IntoID<EngineCacheId> for EngineCacheId {
446    fn into_id(
447        self,
448    ) -> std::pin::Pin<
449        Box<dyn core::future::Future<Output = Result<EngineCacheId, DaggerError>> + Send>,
450    > {
451        Box::pin(async move { Ok::<EngineCacheId, DaggerError>(self) })
452    }
453}
454impl EngineCacheId {
455    fn quote(&self) -> String {
456        format!("\"{}\"", self.0.clone())
457    }
458}
459#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
460pub struct EngineId(pub String);
461impl From<&str> for EngineId {
462    fn from(value: &str) -> Self {
463        Self(value.to_string())
464    }
465}
466impl From<String> for EngineId {
467    fn from(value: String) -> Self {
468        Self(value)
469    }
470}
471impl IntoID<EngineId> for Engine {
472    fn into_id(
473        self,
474    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<EngineId, DaggerError>> + Send>>
475    {
476        Box::pin(async move { self.id().await })
477    }
478}
479impl IntoID<EngineId> for EngineId {
480    fn into_id(
481        self,
482    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<EngineId, DaggerError>> + Send>>
483    {
484        Box::pin(async move { Ok::<EngineId, DaggerError>(self) })
485    }
486}
487impl EngineId {
488    fn quote(&self) -> String {
489        format!("\"{}\"", self.0.clone())
490    }
491}
492#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
493pub struct EnumTypeDefId(pub String);
494impl From<&str> for EnumTypeDefId {
495    fn from(value: &str) -> Self {
496        Self(value.to_string())
497    }
498}
499impl From<String> for EnumTypeDefId {
500    fn from(value: String) -> Self {
501        Self(value)
502    }
503}
504impl IntoID<EnumTypeDefId> for EnumTypeDef {
505    fn into_id(
506        self,
507    ) -> std::pin::Pin<
508        Box<dyn core::future::Future<Output = Result<EnumTypeDefId, DaggerError>> + Send>,
509    > {
510        Box::pin(async move { self.id().await })
511    }
512}
513impl IntoID<EnumTypeDefId> for EnumTypeDefId {
514    fn into_id(
515        self,
516    ) -> std::pin::Pin<
517        Box<dyn core::future::Future<Output = Result<EnumTypeDefId, DaggerError>> + Send>,
518    > {
519        Box::pin(async move { Ok::<EnumTypeDefId, DaggerError>(self) })
520    }
521}
522impl EnumTypeDefId {
523    fn quote(&self) -> String {
524        format!("\"{}\"", self.0.clone())
525    }
526}
527#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
528pub struct EnumValueTypeDefId(pub String);
529impl From<&str> for EnumValueTypeDefId {
530    fn from(value: &str) -> Self {
531        Self(value.to_string())
532    }
533}
534impl From<String> for EnumValueTypeDefId {
535    fn from(value: String) -> Self {
536        Self(value)
537    }
538}
539impl IntoID<EnumValueTypeDefId> for EnumValueTypeDef {
540    fn into_id(
541        self,
542    ) -> std::pin::Pin<
543        Box<dyn core::future::Future<Output = Result<EnumValueTypeDefId, DaggerError>> + Send>,
544    > {
545        Box::pin(async move { self.id().await })
546    }
547}
548impl IntoID<EnumValueTypeDefId> for EnumValueTypeDefId {
549    fn into_id(
550        self,
551    ) -> std::pin::Pin<
552        Box<dyn core::future::Future<Output = Result<EnumValueTypeDefId, DaggerError>> + Send>,
553    > {
554        Box::pin(async move { Ok::<EnumValueTypeDefId, DaggerError>(self) })
555    }
556}
557impl EnumValueTypeDefId {
558    fn quote(&self) -> String {
559        format!("\"{}\"", self.0.clone())
560    }
561}
562#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
563pub struct EnvFileId(pub String);
564impl From<&str> for EnvFileId {
565    fn from(value: &str) -> Self {
566        Self(value.to_string())
567    }
568}
569impl From<String> for EnvFileId {
570    fn from(value: String) -> Self {
571        Self(value)
572    }
573}
574impl IntoID<EnvFileId> for EnvFile {
575    fn into_id(
576        self,
577    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<EnvFileId, DaggerError>> + Send>>
578    {
579        Box::pin(async move { self.id().await })
580    }
581}
582impl IntoID<EnvFileId> for EnvFileId {
583    fn into_id(
584        self,
585    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<EnvFileId, DaggerError>> + Send>>
586    {
587        Box::pin(async move { Ok::<EnvFileId, DaggerError>(self) })
588    }
589}
590impl EnvFileId {
591    fn quote(&self) -> String {
592        format!("\"{}\"", self.0.clone())
593    }
594}
595#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
596pub struct EnvId(pub String);
597impl From<&str> for EnvId {
598    fn from(value: &str) -> Self {
599        Self(value.to_string())
600    }
601}
602impl From<String> for EnvId {
603    fn from(value: String) -> Self {
604        Self(value)
605    }
606}
607impl IntoID<EnvId> for Env {
608    fn into_id(
609        self,
610    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<EnvId, DaggerError>> + Send>>
611    {
612        Box::pin(async move { self.id().await })
613    }
614}
615impl IntoID<EnvId> for EnvId {
616    fn into_id(
617        self,
618    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<EnvId, DaggerError>> + Send>>
619    {
620        Box::pin(async move { Ok::<EnvId, DaggerError>(self) })
621    }
622}
623impl EnvId {
624    fn quote(&self) -> String {
625        format!("\"{}\"", self.0.clone())
626    }
627}
628#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
629pub struct EnvVariableId(pub String);
630impl From<&str> for EnvVariableId {
631    fn from(value: &str) -> Self {
632        Self(value.to_string())
633    }
634}
635impl From<String> for EnvVariableId {
636    fn from(value: String) -> Self {
637        Self(value)
638    }
639}
640impl IntoID<EnvVariableId> for EnvVariable {
641    fn into_id(
642        self,
643    ) -> std::pin::Pin<
644        Box<dyn core::future::Future<Output = Result<EnvVariableId, DaggerError>> + Send>,
645    > {
646        Box::pin(async move { self.id().await })
647    }
648}
649impl IntoID<EnvVariableId> for EnvVariableId {
650    fn into_id(
651        self,
652    ) -> std::pin::Pin<
653        Box<dyn core::future::Future<Output = Result<EnvVariableId, DaggerError>> + Send>,
654    > {
655        Box::pin(async move { Ok::<EnvVariableId, DaggerError>(self) })
656    }
657}
658impl EnvVariableId {
659    fn quote(&self) -> String {
660        format!("\"{}\"", self.0.clone())
661    }
662}
663#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
664pub struct ErrorId(pub String);
665impl From<&str> for ErrorId {
666    fn from(value: &str) -> Self {
667        Self(value.to_string())
668    }
669}
670impl From<String> for ErrorId {
671    fn from(value: String) -> Self {
672        Self(value)
673    }
674}
675impl IntoID<ErrorId> for Error {
676    fn into_id(
677        self,
678    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ErrorId, DaggerError>> + Send>>
679    {
680        Box::pin(async move { self.id().await })
681    }
682}
683impl IntoID<ErrorId> for ErrorId {
684    fn into_id(
685        self,
686    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ErrorId, DaggerError>> + Send>>
687    {
688        Box::pin(async move { Ok::<ErrorId, DaggerError>(self) })
689    }
690}
691impl ErrorId {
692    fn quote(&self) -> String {
693        format!("\"{}\"", self.0.clone())
694    }
695}
696#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
697pub struct ErrorValueId(pub String);
698impl From<&str> for ErrorValueId {
699    fn from(value: &str) -> Self {
700        Self(value.to_string())
701    }
702}
703impl From<String> for ErrorValueId {
704    fn from(value: String) -> Self {
705        Self(value)
706    }
707}
708impl IntoID<ErrorValueId> for ErrorValue {
709    fn into_id(
710        self,
711    ) -> std::pin::Pin<
712        Box<dyn core::future::Future<Output = Result<ErrorValueId, DaggerError>> + Send>,
713    > {
714        Box::pin(async move { self.id().await })
715    }
716}
717impl IntoID<ErrorValueId> for ErrorValueId {
718    fn into_id(
719        self,
720    ) -> std::pin::Pin<
721        Box<dyn core::future::Future<Output = Result<ErrorValueId, DaggerError>> + Send>,
722    > {
723        Box::pin(async move { Ok::<ErrorValueId, DaggerError>(self) })
724    }
725}
726impl ErrorValueId {
727    fn quote(&self) -> String {
728        format!("\"{}\"", self.0.clone())
729    }
730}
731#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
732pub struct FieldTypeDefId(pub String);
733impl From<&str> for FieldTypeDefId {
734    fn from(value: &str) -> Self {
735        Self(value.to_string())
736    }
737}
738impl From<String> for FieldTypeDefId {
739    fn from(value: String) -> Self {
740        Self(value)
741    }
742}
743impl IntoID<FieldTypeDefId> for FieldTypeDef {
744    fn into_id(
745        self,
746    ) -> std::pin::Pin<
747        Box<dyn core::future::Future<Output = Result<FieldTypeDefId, DaggerError>> + Send>,
748    > {
749        Box::pin(async move { self.id().await })
750    }
751}
752impl IntoID<FieldTypeDefId> for FieldTypeDefId {
753    fn into_id(
754        self,
755    ) -> std::pin::Pin<
756        Box<dyn core::future::Future<Output = Result<FieldTypeDefId, DaggerError>> + Send>,
757    > {
758        Box::pin(async move { Ok::<FieldTypeDefId, DaggerError>(self) })
759    }
760}
761impl FieldTypeDefId {
762    fn quote(&self) -> String {
763        format!("\"{}\"", self.0.clone())
764    }
765}
766#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
767pub struct FileId(pub String);
768impl From<&str> for FileId {
769    fn from(value: &str) -> Self {
770        Self(value.to_string())
771    }
772}
773impl From<String> for FileId {
774    fn from(value: String) -> Self {
775        Self(value)
776    }
777}
778impl IntoID<FileId> for File {
779    fn into_id(
780        self,
781    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<FileId, DaggerError>> + Send>>
782    {
783        Box::pin(async move { self.id().await })
784    }
785}
786impl IntoID<FileId> for FileId {
787    fn into_id(
788        self,
789    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<FileId, DaggerError>> + Send>>
790    {
791        Box::pin(async move { Ok::<FileId, DaggerError>(self) })
792    }
793}
794impl FileId {
795    fn quote(&self) -> String {
796        format!("\"{}\"", self.0.clone())
797    }
798}
799#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
800pub struct FunctionArgId(pub String);
801impl From<&str> for FunctionArgId {
802    fn from(value: &str) -> Self {
803        Self(value.to_string())
804    }
805}
806impl From<String> for FunctionArgId {
807    fn from(value: String) -> Self {
808        Self(value)
809    }
810}
811impl IntoID<FunctionArgId> for FunctionArg {
812    fn into_id(
813        self,
814    ) -> std::pin::Pin<
815        Box<dyn core::future::Future<Output = Result<FunctionArgId, DaggerError>> + Send>,
816    > {
817        Box::pin(async move { self.id().await })
818    }
819}
820impl IntoID<FunctionArgId> for FunctionArgId {
821    fn into_id(
822        self,
823    ) -> std::pin::Pin<
824        Box<dyn core::future::Future<Output = Result<FunctionArgId, DaggerError>> + Send>,
825    > {
826        Box::pin(async move { Ok::<FunctionArgId, DaggerError>(self) })
827    }
828}
829impl FunctionArgId {
830    fn quote(&self) -> String {
831        format!("\"{}\"", self.0.clone())
832    }
833}
834#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
835pub struct FunctionCallArgValueId(pub String);
836impl From<&str> for FunctionCallArgValueId {
837    fn from(value: &str) -> Self {
838        Self(value.to_string())
839    }
840}
841impl From<String> for FunctionCallArgValueId {
842    fn from(value: String) -> Self {
843        Self(value)
844    }
845}
846impl IntoID<FunctionCallArgValueId> for FunctionCallArgValue {
847    fn into_id(
848        self,
849    ) -> std::pin::Pin<
850        Box<dyn core::future::Future<Output = Result<FunctionCallArgValueId, DaggerError>> + Send>,
851    > {
852        Box::pin(async move { self.id().await })
853    }
854}
855impl IntoID<FunctionCallArgValueId> for FunctionCallArgValueId {
856    fn into_id(
857        self,
858    ) -> std::pin::Pin<
859        Box<dyn core::future::Future<Output = Result<FunctionCallArgValueId, DaggerError>> + Send>,
860    > {
861        Box::pin(async move { Ok::<FunctionCallArgValueId, DaggerError>(self) })
862    }
863}
864impl FunctionCallArgValueId {
865    fn quote(&self) -> String {
866        format!("\"{}\"", self.0.clone())
867    }
868}
869#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
870pub struct FunctionCallId(pub String);
871impl From<&str> for FunctionCallId {
872    fn from(value: &str) -> Self {
873        Self(value.to_string())
874    }
875}
876impl From<String> for FunctionCallId {
877    fn from(value: String) -> Self {
878        Self(value)
879    }
880}
881impl IntoID<FunctionCallId> for FunctionCall {
882    fn into_id(
883        self,
884    ) -> std::pin::Pin<
885        Box<dyn core::future::Future<Output = Result<FunctionCallId, DaggerError>> + Send>,
886    > {
887        Box::pin(async move { self.id().await })
888    }
889}
890impl IntoID<FunctionCallId> for FunctionCallId {
891    fn into_id(
892        self,
893    ) -> std::pin::Pin<
894        Box<dyn core::future::Future<Output = Result<FunctionCallId, DaggerError>> + Send>,
895    > {
896        Box::pin(async move { Ok::<FunctionCallId, DaggerError>(self) })
897    }
898}
899impl FunctionCallId {
900    fn quote(&self) -> String {
901        format!("\"{}\"", self.0.clone())
902    }
903}
904#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
905pub struct FunctionId(pub String);
906impl From<&str> for FunctionId {
907    fn from(value: &str) -> Self {
908        Self(value.to_string())
909    }
910}
911impl From<String> for FunctionId {
912    fn from(value: String) -> Self {
913        Self(value)
914    }
915}
916impl IntoID<FunctionId> for Function {
917    fn into_id(
918        self,
919    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<FunctionId, DaggerError>> + Send>>
920    {
921        Box::pin(async move { self.id().await })
922    }
923}
924impl IntoID<FunctionId> for FunctionId {
925    fn into_id(
926        self,
927    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<FunctionId, DaggerError>> + Send>>
928    {
929        Box::pin(async move { Ok::<FunctionId, DaggerError>(self) })
930    }
931}
932impl FunctionId {
933    fn quote(&self) -> String {
934        format!("\"{}\"", self.0.clone())
935    }
936}
937#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
938pub struct GeneratedCodeId(pub String);
939impl From<&str> for GeneratedCodeId {
940    fn from(value: &str) -> Self {
941        Self(value.to_string())
942    }
943}
944impl From<String> for GeneratedCodeId {
945    fn from(value: String) -> Self {
946        Self(value)
947    }
948}
949impl IntoID<GeneratedCodeId> for GeneratedCode {
950    fn into_id(
951        self,
952    ) -> std::pin::Pin<
953        Box<dyn core::future::Future<Output = Result<GeneratedCodeId, DaggerError>> + Send>,
954    > {
955        Box::pin(async move { self.id().await })
956    }
957}
958impl IntoID<GeneratedCodeId> for GeneratedCodeId {
959    fn into_id(
960        self,
961    ) -> std::pin::Pin<
962        Box<dyn core::future::Future<Output = Result<GeneratedCodeId, DaggerError>> + Send>,
963    > {
964        Box::pin(async move { Ok::<GeneratedCodeId, DaggerError>(self) })
965    }
966}
967impl GeneratedCodeId {
968    fn quote(&self) -> String {
969        format!("\"{}\"", self.0.clone())
970    }
971}
972#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
973pub struct GitRefId(pub String);
974impl From<&str> for GitRefId {
975    fn from(value: &str) -> Self {
976        Self(value.to_string())
977    }
978}
979impl From<String> for GitRefId {
980    fn from(value: String) -> Self {
981        Self(value)
982    }
983}
984impl IntoID<GitRefId> for GitRef {
985    fn into_id(
986        self,
987    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<GitRefId, DaggerError>> + Send>>
988    {
989        Box::pin(async move { self.id().await })
990    }
991}
992impl IntoID<GitRefId> for GitRefId {
993    fn into_id(
994        self,
995    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<GitRefId, DaggerError>> + Send>>
996    {
997        Box::pin(async move { Ok::<GitRefId, DaggerError>(self) })
998    }
999}
1000impl GitRefId {
1001    fn quote(&self) -> String {
1002        format!("\"{}\"", self.0.clone())
1003    }
1004}
1005#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1006pub struct GitRepositoryId(pub String);
1007impl From<&str> for GitRepositoryId {
1008    fn from(value: &str) -> Self {
1009        Self(value.to_string())
1010    }
1011}
1012impl From<String> for GitRepositoryId {
1013    fn from(value: String) -> Self {
1014        Self(value)
1015    }
1016}
1017impl IntoID<GitRepositoryId> for GitRepository {
1018    fn into_id(
1019        self,
1020    ) -> std::pin::Pin<
1021        Box<dyn core::future::Future<Output = Result<GitRepositoryId, DaggerError>> + Send>,
1022    > {
1023        Box::pin(async move { self.id().await })
1024    }
1025}
1026impl IntoID<GitRepositoryId> for GitRepositoryId {
1027    fn into_id(
1028        self,
1029    ) -> std::pin::Pin<
1030        Box<dyn core::future::Future<Output = Result<GitRepositoryId, DaggerError>> + Send>,
1031    > {
1032        Box::pin(async move { Ok::<GitRepositoryId, DaggerError>(self) })
1033    }
1034}
1035impl GitRepositoryId {
1036    fn quote(&self) -> String {
1037        format!("\"{}\"", self.0.clone())
1038    }
1039}
1040#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1041pub struct HostId(pub String);
1042impl From<&str> for HostId {
1043    fn from(value: &str) -> Self {
1044        Self(value.to_string())
1045    }
1046}
1047impl From<String> for HostId {
1048    fn from(value: String) -> Self {
1049        Self(value)
1050    }
1051}
1052impl IntoID<HostId> for Host {
1053    fn into_id(
1054        self,
1055    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<HostId, DaggerError>> + Send>>
1056    {
1057        Box::pin(async move { self.id().await })
1058    }
1059}
1060impl IntoID<HostId> for HostId {
1061    fn into_id(
1062        self,
1063    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<HostId, DaggerError>> + Send>>
1064    {
1065        Box::pin(async move { Ok::<HostId, DaggerError>(self) })
1066    }
1067}
1068impl HostId {
1069    fn quote(&self) -> String {
1070        format!("\"{}\"", self.0.clone())
1071    }
1072}
1073#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1074pub struct InputTypeDefId(pub String);
1075impl From<&str> for InputTypeDefId {
1076    fn from(value: &str) -> Self {
1077        Self(value.to_string())
1078    }
1079}
1080impl From<String> for InputTypeDefId {
1081    fn from(value: String) -> Self {
1082        Self(value)
1083    }
1084}
1085impl IntoID<InputTypeDefId> for InputTypeDef {
1086    fn into_id(
1087        self,
1088    ) -> std::pin::Pin<
1089        Box<dyn core::future::Future<Output = Result<InputTypeDefId, DaggerError>> + Send>,
1090    > {
1091        Box::pin(async move { self.id().await })
1092    }
1093}
1094impl IntoID<InputTypeDefId> for InputTypeDefId {
1095    fn into_id(
1096        self,
1097    ) -> std::pin::Pin<
1098        Box<dyn core::future::Future<Output = Result<InputTypeDefId, DaggerError>> + Send>,
1099    > {
1100        Box::pin(async move { Ok::<InputTypeDefId, DaggerError>(self) })
1101    }
1102}
1103impl InputTypeDefId {
1104    fn quote(&self) -> String {
1105        format!("\"{}\"", self.0.clone())
1106    }
1107}
1108#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1109pub struct InterfaceTypeDefId(pub String);
1110impl From<&str> for InterfaceTypeDefId {
1111    fn from(value: &str) -> Self {
1112        Self(value.to_string())
1113    }
1114}
1115impl From<String> for InterfaceTypeDefId {
1116    fn from(value: String) -> Self {
1117        Self(value)
1118    }
1119}
1120impl IntoID<InterfaceTypeDefId> for InterfaceTypeDef {
1121    fn into_id(
1122        self,
1123    ) -> std::pin::Pin<
1124        Box<dyn core::future::Future<Output = Result<InterfaceTypeDefId, DaggerError>> + Send>,
1125    > {
1126        Box::pin(async move { self.id().await })
1127    }
1128}
1129impl IntoID<InterfaceTypeDefId> for InterfaceTypeDefId {
1130    fn into_id(
1131        self,
1132    ) -> std::pin::Pin<
1133        Box<dyn core::future::Future<Output = Result<InterfaceTypeDefId, DaggerError>> + Send>,
1134    > {
1135        Box::pin(async move { Ok::<InterfaceTypeDefId, DaggerError>(self) })
1136    }
1137}
1138impl InterfaceTypeDefId {
1139    fn quote(&self) -> String {
1140        format!("\"{}\"", self.0.clone())
1141    }
1142}
1143#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1144pub struct Json(pub String);
1145impl From<&str> for Json {
1146    fn from(value: &str) -> Self {
1147        Self(value.to_string())
1148    }
1149}
1150impl From<String> for Json {
1151    fn from(value: String) -> Self {
1152        Self(value)
1153    }
1154}
1155impl Json {
1156    fn quote(&self) -> String {
1157        format!("\"{}\"", self.0.clone())
1158    }
1159}
1160#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1161pub struct JsonValueId(pub String);
1162impl From<&str> for JsonValueId {
1163    fn from(value: &str) -> Self {
1164        Self(value.to_string())
1165    }
1166}
1167impl From<String> for JsonValueId {
1168    fn from(value: String) -> Self {
1169        Self(value)
1170    }
1171}
1172impl IntoID<JsonValueId> for JsonValue {
1173    fn into_id(
1174        self,
1175    ) -> std::pin::Pin<
1176        Box<dyn core::future::Future<Output = Result<JsonValueId, DaggerError>> + Send>,
1177    > {
1178        Box::pin(async move { self.id().await })
1179    }
1180}
1181impl IntoID<JsonValueId> for JsonValueId {
1182    fn into_id(
1183        self,
1184    ) -> std::pin::Pin<
1185        Box<dyn core::future::Future<Output = Result<JsonValueId, DaggerError>> + Send>,
1186    > {
1187        Box::pin(async move { Ok::<JsonValueId, DaggerError>(self) })
1188    }
1189}
1190impl JsonValueId {
1191    fn quote(&self) -> String {
1192        format!("\"{}\"", self.0.clone())
1193    }
1194}
1195#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1196pub struct Llmid(pub String);
1197impl From<&str> for Llmid {
1198    fn from(value: &str) -> Self {
1199        Self(value.to_string())
1200    }
1201}
1202impl From<String> for Llmid {
1203    fn from(value: String) -> Self {
1204        Self(value)
1205    }
1206}
1207impl IntoID<Llmid> for Llm {
1208    fn into_id(
1209        self,
1210    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Llmid, DaggerError>> + Send>>
1211    {
1212        Box::pin(async move { self.id().await })
1213    }
1214}
1215impl IntoID<Llmid> for Llmid {
1216    fn into_id(
1217        self,
1218    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Llmid, DaggerError>> + Send>>
1219    {
1220        Box::pin(async move { Ok::<Llmid, DaggerError>(self) })
1221    }
1222}
1223impl Llmid {
1224    fn quote(&self) -> String {
1225        format!("\"{}\"", self.0.clone())
1226    }
1227}
1228#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1229pub struct LlmTokenUsageId(pub String);
1230impl From<&str> for LlmTokenUsageId {
1231    fn from(value: &str) -> Self {
1232        Self(value.to_string())
1233    }
1234}
1235impl From<String> for LlmTokenUsageId {
1236    fn from(value: String) -> Self {
1237        Self(value)
1238    }
1239}
1240impl IntoID<LlmTokenUsageId> for LlmTokenUsage {
1241    fn into_id(
1242        self,
1243    ) -> std::pin::Pin<
1244        Box<dyn core::future::Future<Output = Result<LlmTokenUsageId, DaggerError>> + Send>,
1245    > {
1246        Box::pin(async move { self.id().await })
1247    }
1248}
1249impl IntoID<LlmTokenUsageId> for LlmTokenUsageId {
1250    fn into_id(
1251        self,
1252    ) -> std::pin::Pin<
1253        Box<dyn core::future::Future<Output = Result<LlmTokenUsageId, DaggerError>> + Send>,
1254    > {
1255        Box::pin(async move { Ok::<LlmTokenUsageId, DaggerError>(self) })
1256    }
1257}
1258impl LlmTokenUsageId {
1259    fn quote(&self) -> String {
1260        format!("\"{}\"", self.0.clone())
1261    }
1262}
1263#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1264pub struct LabelId(pub String);
1265impl From<&str> for LabelId {
1266    fn from(value: &str) -> Self {
1267        Self(value.to_string())
1268    }
1269}
1270impl From<String> for LabelId {
1271    fn from(value: String) -> Self {
1272        Self(value)
1273    }
1274}
1275impl IntoID<LabelId> for Label {
1276    fn into_id(
1277        self,
1278    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<LabelId, DaggerError>> + Send>>
1279    {
1280        Box::pin(async move { self.id().await })
1281    }
1282}
1283impl IntoID<LabelId> for LabelId {
1284    fn into_id(
1285        self,
1286    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<LabelId, DaggerError>> + Send>>
1287    {
1288        Box::pin(async move { Ok::<LabelId, DaggerError>(self) })
1289    }
1290}
1291impl LabelId {
1292    fn quote(&self) -> String {
1293        format!("\"{}\"", self.0.clone())
1294    }
1295}
1296#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1297pub struct ListTypeDefId(pub String);
1298impl From<&str> for ListTypeDefId {
1299    fn from(value: &str) -> Self {
1300        Self(value.to_string())
1301    }
1302}
1303impl From<String> for ListTypeDefId {
1304    fn from(value: String) -> Self {
1305        Self(value)
1306    }
1307}
1308impl IntoID<ListTypeDefId> for ListTypeDef {
1309    fn into_id(
1310        self,
1311    ) -> std::pin::Pin<
1312        Box<dyn core::future::Future<Output = Result<ListTypeDefId, DaggerError>> + Send>,
1313    > {
1314        Box::pin(async move { self.id().await })
1315    }
1316}
1317impl IntoID<ListTypeDefId> for ListTypeDefId {
1318    fn into_id(
1319        self,
1320    ) -> std::pin::Pin<
1321        Box<dyn core::future::Future<Output = Result<ListTypeDefId, DaggerError>> + Send>,
1322    > {
1323        Box::pin(async move { Ok::<ListTypeDefId, DaggerError>(self) })
1324    }
1325}
1326impl ListTypeDefId {
1327    fn quote(&self) -> String {
1328        format!("\"{}\"", self.0.clone())
1329    }
1330}
1331#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1332pub struct ModuleConfigClientId(pub String);
1333impl From<&str> for ModuleConfigClientId {
1334    fn from(value: &str) -> Self {
1335        Self(value.to_string())
1336    }
1337}
1338impl From<String> for ModuleConfigClientId {
1339    fn from(value: String) -> Self {
1340        Self(value)
1341    }
1342}
1343impl IntoID<ModuleConfigClientId> for ModuleConfigClient {
1344    fn into_id(
1345        self,
1346    ) -> std::pin::Pin<
1347        Box<dyn core::future::Future<Output = Result<ModuleConfigClientId, DaggerError>> + Send>,
1348    > {
1349        Box::pin(async move { self.id().await })
1350    }
1351}
1352impl IntoID<ModuleConfigClientId> for ModuleConfigClientId {
1353    fn into_id(
1354        self,
1355    ) -> std::pin::Pin<
1356        Box<dyn core::future::Future<Output = Result<ModuleConfigClientId, DaggerError>> + Send>,
1357    > {
1358        Box::pin(async move { Ok::<ModuleConfigClientId, DaggerError>(self) })
1359    }
1360}
1361impl ModuleConfigClientId {
1362    fn quote(&self) -> String {
1363        format!("\"{}\"", self.0.clone())
1364    }
1365}
1366#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1367pub struct ModuleId(pub String);
1368impl From<&str> for ModuleId {
1369    fn from(value: &str) -> Self {
1370        Self(value.to_string())
1371    }
1372}
1373impl From<String> for ModuleId {
1374    fn from(value: String) -> Self {
1375        Self(value)
1376    }
1377}
1378impl IntoID<ModuleId> for Module {
1379    fn into_id(
1380        self,
1381    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ModuleId, DaggerError>> + Send>>
1382    {
1383        Box::pin(async move { self.id().await })
1384    }
1385}
1386impl IntoID<ModuleId> for ModuleId {
1387    fn into_id(
1388        self,
1389    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ModuleId, DaggerError>> + Send>>
1390    {
1391        Box::pin(async move { Ok::<ModuleId, DaggerError>(self) })
1392    }
1393}
1394impl ModuleId {
1395    fn quote(&self) -> String {
1396        format!("\"{}\"", self.0.clone())
1397    }
1398}
1399#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1400pub struct ModuleSourceId(pub String);
1401impl From<&str> for ModuleSourceId {
1402    fn from(value: &str) -> Self {
1403        Self(value.to_string())
1404    }
1405}
1406impl From<String> for ModuleSourceId {
1407    fn from(value: String) -> Self {
1408        Self(value)
1409    }
1410}
1411impl IntoID<ModuleSourceId> for ModuleSource {
1412    fn into_id(
1413        self,
1414    ) -> std::pin::Pin<
1415        Box<dyn core::future::Future<Output = Result<ModuleSourceId, DaggerError>> + Send>,
1416    > {
1417        Box::pin(async move { self.id().await })
1418    }
1419}
1420impl IntoID<ModuleSourceId> for ModuleSourceId {
1421    fn into_id(
1422        self,
1423    ) -> std::pin::Pin<
1424        Box<dyn core::future::Future<Output = Result<ModuleSourceId, DaggerError>> + Send>,
1425    > {
1426        Box::pin(async move { Ok::<ModuleSourceId, DaggerError>(self) })
1427    }
1428}
1429impl ModuleSourceId {
1430    fn quote(&self) -> String {
1431        format!("\"{}\"", self.0.clone())
1432    }
1433}
1434#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1435pub struct ObjectTypeDefId(pub String);
1436impl From<&str> for ObjectTypeDefId {
1437    fn from(value: &str) -> Self {
1438        Self(value.to_string())
1439    }
1440}
1441impl From<String> for ObjectTypeDefId {
1442    fn from(value: String) -> Self {
1443        Self(value)
1444    }
1445}
1446impl IntoID<ObjectTypeDefId> for ObjectTypeDef {
1447    fn into_id(
1448        self,
1449    ) -> std::pin::Pin<
1450        Box<dyn core::future::Future<Output = Result<ObjectTypeDefId, DaggerError>> + Send>,
1451    > {
1452        Box::pin(async move { self.id().await })
1453    }
1454}
1455impl IntoID<ObjectTypeDefId> for ObjectTypeDefId {
1456    fn into_id(
1457        self,
1458    ) -> std::pin::Pin<
1459        Box<dyn core::future::Future<Output = Result<ObjectTypeDefId, DaggerError>> + Send>,
1460    > {
1461        Box::pin(async move { Ok::<ObjectTypeDefId, DaggerError>(self) })
1462    }
1463}
1464impl ObjectTypeDefId {
1465    fn quote(&self) -> String {
1466        format!("\"{}\"", self.0.clone())
1467    }
1468}
1469#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1470pub struct Platform(pub String);
1471impl From<&str> for Platform {
1472    fn from(value: &str) -> Self {
1473        Self(value.to_string())
1474    }
1475}
1476impl From<String> for Platform {
1477    fn from(value: String) -> Self {
1478        Self(value)
1479    }
1480}
1481impl Platform {
1482    fn quote(&self) -> String {
1483        format!("\"{}\"", self.0.clone())
1484    }
1485}
1486#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1487pub struct PortId(pub String);
1488impl From<&str> for PortId {
1489    fn from(value: &str) -> Self {
1490        Self(value.to_string())
1491    }
1492}
1493impl From<String> for PortId {
1494    fn from(value: String) -> Self {
1495        Self(value)
1496    }
1497}
1498impl IntoID<PortId> for Port {
1499    fn into_id(
1500        self,
1501    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<PortId, DaggerError>> + Send>>
1502    {
1503        Box::pin(async move { self.id().await })
1504    }
1505}
1506impl IntoID<PortId> for PortId {
1507    fn into_id(
1508        self,
1509    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<PortId, DaggerError>> + Send>>
1510    {
1511        Box::pin(async move { Ok::<PortId, DaggerError>(self) })
1512    }
1513}
1514impl PortId {
1515    fn quote(&self) -> String {
1516        format!("\"{}\"", self.0.clone())
1517    }
1518}
1519#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1520pub struct SdkConfigId(pub String);
1521impl From<&str> for SdkConfigId {
1522    fn from(value: &str) -> Self {
1523        Self(value.to_string())
1524    }
1525}
1526impl From<String> for SdkConfigId {
1527    fn from(value: String) -> Self {
1528        Self(value)
1529    }
1530}
1531impl IntoID<SdkConfigId> for SdkConfig {
1532    fn into_id(
1533        self,
1534    ) -> std::pin::Pin<
1535        Box<dyn core::future::Future<Output = Result<SdkConfigId, DaggerError>> + Send>,
1536    > {
1537        Box::pin(async move { self.id().await })
1538    }
1539}
1540impl IntoID<SdkConfigId> for SdkConfigId {
1541    fn into_id(
1542        self,
1543    ) -> std::pin::Pin<
1544        Box<dyn core::future::Future<Output = Result<SdkConfigId, DaggerError>> + Send>,
1545    > {
1546        Box::pin(async move { Ok::<SdkConfigId, DaggerError>(self) })
1547    }
1548}
1549impl SdkConfigId {
1550    fn quote(&self) -> String {
1551        format!("\"{}\"", self.0.clone())
1552    }
1553}
1554#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1555pub struct ScalarTypeDefId(pub String);
1556impl From<&str> for ScalarTypeDefId {
1557    fn from(value: &str) -> Self {
1558        Self(value.to_string())
1559    }
1560}
1561impl From<String> for ScalarTypeDefId {
1562    fn from(value: String) -> Self {
1563        Self(value)
1564    }
1565}
1566impl IntoID<ScalarTypeDefId> for ScalarTypeDef {
1567    fn into_id(
1568        self,
1569    ) -> std::pin::Pin<
1570        Box<dyn core::future::Future<Output = Result<ScalarTypeDefId, DaggerError>> + Send>,
1571    > {
1572        Box::pin(async move { self.id().await })
1573    }
1574}
1575impl IntoID<ScalarTypeDefId> for ScalarTypeDefId {
1576    fn into_id(
1577        self,
1578    ) -> std::pin::Pin<
1579        Box<dyn core::future::Future<Output = Result<ScalarTypeDefId, DaggerError>> + Send>,
1580    > {
1581        Box::pin(async move { Ok::<ScalarTypeDefId, DaggerError>(self) })
1582    }
1583}
1584impl ScalarTypeDefId {
1585    fn quote(&self) -> String {
1586        format!("\"{}\"", self.0.clone())
1587    }
1588}
1589#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1590pub struct SearchResultId(pub String);
1591impl From<&str> for SearchResultId {
1592    fn from(value: &str) -> Self {
1593        Self(value.to_string())
1594    }
1595}
1596impl From<String> for SearchResultId {
1597    fn from(value: String) -> Self {
1598        Self(value)
1599    }
1600}
1601impl IntoID<SearchResultId> for SearchResult {
1602    fn into_id(
1603        self,
1604    ) -> std::pin::Pin<
1605        Box<dyn core::future::Future<Output = Result<SearchResultId, DaggerError>> + Send>,
1606    > {
1607        Box::pin(async move { self.id().await })
1608    }
1609}
1610impl IntoID<SearchResultId> for SearchResultId {
1611    fn into_id(
1612        self,
1613    ) -> std::pin::Pin<
1614        Box<dyn core::future::Future<Output = Result<SearchResultId, DaggerError>> + Send>,
1615    > {
1616        Box::pin(async move { Ok::<SearchResultId, DaggerError>(self) })
1617    }
1618}
1619impl SearchResultId {
1620    fn quote(&self) -> String {
1621        format!("\"{}\"", self.0.clone())
1622    }
1623}
1624#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1625pub struct SearchSubmatchId(pub String);
1626impl From<&str> for SearchSubmatchId {
1627    fn from(value: &str) -> Self {
1628        Self(value.to_string())
1629    }
1630}
1631impl From<String> for SearchSubmatchId {
1632    fn from(value: String) -> Self {
1633        Self(value)
1634    }
1635}
1636impl IntoID<SearchSubmatchId> for SearchSubmatch {
1637    fn into_id(
1638        self,
1639    ) -> std::pin::Pin<
1640        Box<dyn core::future::Future<Output = Result<SearchSubmatchId, DaggerError>> + Send>,
1641    > {
1642        Box::pin(async move { self.id().await })
1643    }
1644}
1645impl IntoID<SearchSubmatchId> for SearchSubmatchId {
1646    fn into_id(
1647        self,
1648    ) -> std::pin::Pin<
1649        Box<dyn core::future::Future<Output = Result<SearchSubmatchId, DaggerError>> + Send>,
1650    > {
1651        Box::pin(async move { Ok::<SearchSubmatchId, DaggerError>(self) })
1652    }
1653}
1654impl SearchSubmatchId {
1655    fn quote(&self) -> String {
1656        format!("\"{}\"", self.0.clone())
1657    }
1658}
1659#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1660pub struct SecretId(pub String);
1661impl From<&str> for SecretId {
1662    fn from(value: &str) -> Self {
1663        Self(value.to_string())
1664    }
1665}
1666impl From<String> for SecretId {
1667    fn from(value: String) -> Self {
1668        Self(value)
1669    }
1670}
1671impl IntoID<SecretId> for Secret {
1672    fn into_id(
1673        self,
1674    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SecretId, DaggerError>> + Send>>
1675    {
1676        Box::pin(async move { self.id().await })
1677    }
1678}
1679impl IntoID<SecretId> for SecretId {
1680    fn into_id(
1681        self,
1682    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SecretId, DaggerError>> + Send>>
1683    {
1684        Box::pin(async move { Ok::<SecretId, DaggerError>(self) })
1685    }
1686}
1687impl SecretId {
1688    fn quote(&self) -> String {
1689        format!("\"{}\"", self.0.clone())
1690    }
1691}
1692#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1693pub struct ServiceId(pub String);
1694impl From<&str> for ServiceId {
1695    fn from(value: &str) -> Self {
1696        Self(value.to_string())
1697    }
1698}
1699impl From<String> for ServiceId {
1700    fn from(value: String) -> Self {
1701        Self(value)
1702    }
1703}
1704impl IntoID<ServiceId> for Service {
1705    fn into_id(
1706        self,
1707    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ServiceId, DaggerError>> + Send>>
1708    {
1709        Box::pin(async move { self.id().await })
1710    }
1711}
1712impl IntoID<ServiceId> for ServiceId {
1713    fn into_id(
1714        self,
1715    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ServiceId, DaggerError>> + Send>>
1716    {
1717        Box::pin(async move { Ok::<ServiceId, DaggerError>(self) })
1718    }
1719}
1720impl ServiceId {
1721    fn quote(&self) -> String {
1722        format!("\"{}\"", self.0.clone())
1723    }
1724}
1725#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1726pub struct SocketId(pub String);
1727impl From<&str> for SocketId {
1728    fn from(value: &str) -> Self {
1729        Self(value.to_string())
1730    }
1731}
1732impl From<String> for SocketId {
1733    fn from(value: String) -> Self {
1734        Self(value)
1735    }
1736}
1737impl IntoID<SocketId> for Socket {
1738    fn into_id(
1739        self,
1740    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SocketId, DaggerError>> + Send>>
1741    {
1742        Box::pin(async move { self.id().await })
1743    }
1744}
1745impl IntoID<SocketId> for SocketId {
1746    fn into_id(
1747        self,
1748    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SocketId, DaggerError>> + Send>>
1749    {
1750        Box::pin(async move { Ok::<SocketId, DaggerError>(self) })
1751    }
1752}
1753impl SocketId {
1754    fn quote(&self) -> String {
1755        format!("\"{}\"", self.0.clone())
1756    }
1757}
1758#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1759pub struct SourceMapId(pub String);
1760impl From<&str> for SourceMapId {
1761    fn from(value: &str) -> Self {
1762        Self(value.to_string())
1763    }
1764}
1765impl From<String> for SourceMapId {
1766    fn from(value: String) -> Self {
1767        Self(value)
1768    }
1769}
1770impl IntoID<SourceMapId> for SourceMap {
1771    fn into_id(
1772        self,
1773    ) -> std::pin::Pin<
1774        Box<dyn core::future::Future<Output = Result<SourceMapId, DaggerError>> + Send>,
1775    > {
1776        Box::pin(async move { self.id().await })
1777    }
1778}
1779impl IntoID<SourceMapId> for SourceMapId {
1780    fn into_id(
1781        self,
1782    ) -> std::pin::Pin<
1783        Box<dyn core::future::Future<Output = Result<SourceMapId, DaggerError>> + Send>,
1784    > {
1785        Box::pin(async move { Ok::<SourceMapId, DaggerError>(self) })
1786    }
1787}
1788impl SourceMapId {
1789    fn quote(&self) -> String {
1790        format!("\"{}\"", self.0.clone())
1791    }
1792}
1793#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1794pub struct TerminalId(pub String);
1795impl From<&str> for TerminalId {
1796    fn from(value: &str) -> Self {
1797        Self(value.to_string())
1798    }
1799}
1800impl From<String> for TerminalId {
1801    fn from(value: String) -> Self {
1802        Self(value)
1803    }
1804}
1805impl IntoID<TerminalId> for Terminal {
1806    fn into_id(
1807        self,
1808    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TerminalId, DaggerError>> + Send>>
1809    {
1810        Box::pin(async move { self.id().await })
1811    }
1812}
1813impl IntoID<TerminalId> for TerminalId {
1814    fn into_id(
1815        self,
1816    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TerminalId, DaggerError>> + Send>>
1817    {
1818        Box::pin(async move { Ok::<TerminalId, DaggerError>(self) })
1819    }
1820}
1821impl TerminalId {
1822    fn quote(&self) -> String {
1823        format!("\"{}\"", self.0.clone())
1824    }
1825}
1826#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1827pub struct TypeDefId(pub String);
1828impl From<&str> for TypeDefId {
1829    fn from(value: &str) -> Self {
1830        Self(value.to_string())
1831    }
1832}
1833impl From<String> for TypeDefId {
1834    fn from(value: String) -> Self {
1835        Self(value)
1836    }
1837}
1838impl IntoID<TypeDefId> for TypeDef {
1839    fn into_id(
1840        self,
1841    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TypeDefId, DaggerError>> + Send>>
1842    {
1843        Box::pin(async move { self.id().await })
1844    }
1845}
1846impl IntoID<TypeDefId> for TypeDefId {
1847    fn into_id(
1848        self,
1849    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TypeDefId, DaggerError>> + Send>>
1850    {
1851        Box::pin(async move { Ok::<TypeDefId, DaggerError>(self) })
1852    }
1853}
1854impl TypeDefId {
1855    fn quote(&self) -> String {
1856        format!("\"{}\"", self.0.clone())
1857    }
1858}
1859#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1860pub struct Void(pub String);
1861impl From<&str> for Void {
1862    fn from(value: &str) -> Self {
1863        Self(value.to_string())
1864    }
1865}
1866impl From<String> for Void {
1867    fn from(value: String) -> Self {
1868        Self(value)
1869    }
1870}
1871impl Void {
1872    fn quote(&self) -> String {
1873        format!("\"{}\"", self.0.clone())
1874    }
1875}
1876#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
1877pub struct BuildArg {
1878    pub name: String,
1879    pub value: String,
1880}
1881#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
1882pub struct PipelineLabel {
1883    pub name: String,
1884    pub value: String,
1885}
1886#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
1887pub struct PortForward {
1888    pub backend: isize,
1889    pub frontend: isize,
1890    pub protocol: NetworkProtocol,
1891}
1892#[derive(Clone)]
1893pub struct Address {
1894    pub proc: Option<Arc<DaggerSessionProc>>,
1895    pub selection: Selection,
1896    pub graphql_client: DynGraphQLClient,
1897}
1898#[derive(Builder, Debug, PartialEq)]
1899pub struct AddressDirectoryOpts<'a> {
1900    #[builder(setter(into, strip_option), default)]
1901    pub exclude: Option<Vec<&'a str>>,
1902    #[builder(setter(into, strip_option), default)]
1903    pub gitignore: Option<bool>,
1904    #[builder(setter(into, strip_option), default)]
1905    pub include: Option<Vec<&'a str>>,
1906    #[builder(setter(into, strip_option), default)]
1907    pub no_cache: Option<bool>,
1908}
1909#[derive(Builder, Debug, PartialEq)]
1910pub struct AddressFileOpts<'a> {
1911    #[builder(setter(into, strip_option), default)]
1912    pub exclude: Option<Vec<&'a str>>,
1913    #[builder(setter(into, strip_option), default)]
1914    pub gitignore: Option<bool>,
1915    #[builder(setter(into, strip_option), default)]
1916    pub include: Option<Vec<&'a str>>,
1917    #[builder(setter(into, strip_option), default)]
1918    pub no_cache: Option<bool>,
1919}
1920impl Address {
1921    /// Load a container from the address.
1922    pub fn container(&self) -> Container {
1923        let query = self.selection.select("container");
1924        Container {
1925            proc: self.proc.clone(),
1926            selection: query,
1927            graphql_client: self.graphql_client.clone(),
1928        }
1929    }
1930    /// Load a directory from the address.
1931    ///
1932    /// # Arguments
1933    ///
1934    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
1935    pub fn directory(&self) -> Directory {
1936        let query = self.selection.select("directory");
1937        Directory {
1938            proc: self.proc.clone(),
1939            selection: query,
1940            graphql_client: self.graphql_client.clone(),
1941        }
1942    }
1943    /// Load a directory from the address.
1944    ///
1945    /// # Arguments
1946    ///
1947    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
1948    pub fn directory_opts<'a>(&self, opts: AddressDirectoryOpts<'a>) -> Directory {
1949        let mut query = self.selection.select("directory");
1950        if let Some(exclude) = opts.exclude {
1951            query = query.arg("exclude", exclude);
1952        }
1953        if let Some(include) = opts.include {
1954            query = query.arg("include", include);
1955        }
1956        if let Some(gitignore) = opts.gitignore {
1957            query = query.arg("gitignore", gitignore);
1958        }
1959        if let Some(no_cache) = opts.no_cache {
1960            query = query.arg("noCache", no_cache);
1961        }
1962        Directory {
1963            proc: self.proc.clone(),
1964            selection: query,
1965            graphql_client: self.graphql_client.clone(),
1966        }
1967    }
1968    /// Load a file from the address.
1969    ///
1970    /// # Arguments
1971    ///
1972    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
1973    pub fn file(&self) -> File {
1974        let query = self.selection.select("file");
1975        File {
1976            proc: self.proc.clone(),
1977            selection: query,
1978            graphql_client: self.graphql_client.clone(),
1979        }
1980    }
1981    /// Load a file from the address.
1982    ///
1983    /// # Arguments
1984    ///
1985    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
1986    pub fn file_opts<'a>(&self, opts: AddressFileOpts<'a>) -> File {
1987        let mut query = self.selection.select("file");
1988        if let Some(exclude) = opts.exclude {
1989            query = query.arg("exclude", exclude);
1990        }
1991        if let Some(include) = opts.include {
1992            query = query.arg("include", include);
1993        }
1994        if let Some(gitignore) = opts.gitignore {
1995            query = query.arg("gitignore", gitignore);
1996        }
1997        if let Some(no_cache) = opts.no_cache {
1998            query = query.arg("noCache", no_cache);
1999        }
2000        File {
2001            proc: self.proc.clone(),
2002            selection: query,
2003            graphql_client: self.graphql_client.clone(),
2004        }
2005    }
2006    /// Load a git ref (branch, tag or commit) from the address.
2007    pub fn git_ref(&self) -> GitRef {
2008        let query = self.selection.select("gitRef");
2009        GitRef {
2010            proc: self.proc.clone(),
2011            selection: query,
2012            graphql_client: self.graphql_client.clone(),
2013        }
2014    }
2015    /// Load a git repository from the address.
2016    pub fn git_repository(&self) -> GitRepository {
2017        let query = self.selection.select("gitRepository");
2018        GitRepository {
2019            proc: self.proc.clone(),
2020            selection: query,
2021            graphql_client: self.graphql_client.clone(),
2022        }
2023    }
2024    /// A unique identifier for this Address.
2025    pub async fn id(&self) -> Result<AddressId, DaggerError> {
2026        let query = self.selection.select("id");
2027        query.execute(self.graphql_client.clone()).await
2028    }
2029    /// Load a secret from the address.
2030    pub fn secret(&self) -> Secret {
2031        let query = self.selection.select("secret");
2032        Secret {
2033            proc: self.proc.clone(),
2034            selection: query,
2035            graphql_client: self.graphql_client.clone(),
2036        }
2037    }
2038    /// Load a service from the address.
2039    pub fn service(&self) -> Service {
2040        let query = self.selection.select("service");
2041        Service {
2042            proc: self.proc.clone(),
2043            selection: query,
2044            graphql_client: self.graphql_client.clone(),
2045        }
2046    }
2047    /// Load a local socket from the address.
2048    pub fn socket(&self) -> Socket {
2049        let query = self.selection.select("socket");
2050        Socket {
2051            proc: self.proc.clone(),
2052            selection: query,
2053            graphql_client: self.graphql_client.clone(),
2054        }
2055    }
2056    /// The address value
2057    pub async fn value(&self) -> Result<String, DaggerError> {
2058        let query = self.selection.select("value");
2059        query.execute(self.graphql_client.clone()).await
2060    }
2061}
2062#[derive(Clone)]
2063pub struct Binding {
2064    pub proc: Option<Arc<DaggerSessionProc>>,
2065    pub selection: Selection,
2066    pub graphql_client: DynGraphQLClient,
2067}
2068impl Binding {
2069    /// Retrieve the binding value, as type Address
2070    pub fn as_address(&self) -> Address {
2071        let query = self.selection.select("asAddress");
2072        Address {
2073            proc: self.proc.clone(),
2074            selection: query,
2075            graphql_client: self.graphql_client.clone(),
2076        }
2077    }
2078    /// Retrieve the binding value, as type CacheVolume
2079    pub fn as_cache_volume(&self) -> CacheVolume {
2080        let query = self.selection.select("asCacheVolume");
2081        CacheVolume {
2082            proc: self.proc.clone(),
2083            selection: query,
2084            graphql_client: self.graphql_client.clone(),
2085        }
2086    }
2087    /// Retrieve the binding value, as type Changeset
2088    pub fn as_changeset(&self) -> Changeset {
2089        let query = self.selection.select("asChangeset");
2090        Changeset {
2091            proc: self.proc.clone(),
2092            selection: query,
2093            graphql_client: self.graphql_client.clone(),
2094        }
2095    }
2096    /// Retrieve the binding value, as type Check
2097    pub fn as_check(&self) -> Check {
2098        let query = self.selection.select("asCheck");
2099        Check {
2100            proc: self.proc.clone(),
2101            selection: query,
2102            graphql_client: self.graphql_client.clone(),
2103        }
2104    }
2105    /// Retrieve the binding value, as type CheckGroup
2106    pub fn as_check_group(&self) -> CheckGroup {
2107        let query = self.selection.select("asCheckGroup");
2108        CheckGroup {
2109            proc: self.proc.clone(),
2110            selection: query,
2111            graphql_client: self.graphql_client.clone(),
2112        }
2113    }
2114    /// Retrieve the binding value, as type Cloud
2115    pub fn as_cloud(&self) -> Cloud {
2116        let query = self.selection.select("asCloud");
2117        Cloud {
2118            proc: self.proc.clone(),
2119            selection: query,
2120            graphql_client: self.graphql_client.clone(),
2121        }
2122    }
2123    /// Retrieve the binding value, as type Container
2124    pub fn as_container(&self) -> Container {
2125        let query = self.selection.select("asContainer");
2126        Container {
2127            proc: self.proc.clone(),
2128            selection: query,
2129            graphql_client: self.graphql_client.clone(),
2130        }
2131    }
2132    /// Retrieve the binding value, as type Directory
2133    pub fn as_directory(&self) -> Directory {
2134        let query = self.selection.select("asDirectory");
2135        Directory {
2136            proc: self.proc.clone(),
2137            selection: query,
2138            graphql_client: self.graphql_client.clone(),
2139        }
2140    }
2141    /// Retrieve the binding value, as type Env
2142    pub fn as_env(&self) -> Env {
2143        let query = self.selection.select("asEnv");
2144        Env {
2145            proc: self.proc.clone(),
2146            selection: query,
2147            graphql_client: self.graphql_client.clone(),
2148        }
2149    }
2150    /// Retrieve the binding value, as type EnvFile
2151    pub fn as_env_file(&self) -> EnvFile {
2152        let query = self.selection.select("asEnvFile");
2153        EnvFile {
2154            proc: self.proc.clone(),
2155            selection: query,
2156            graphql_client: self.graphql_client.clone(),
2157        }
2158    }
2159    /// Retrieve the binding value, as type File
2160    pub fn as_file(&self) -> File {
2161        let query = self.selection.select("asFile");
2162        File {
2163            proc: self.proc.clone(),
2164            selection: query,
2165            graphql_client: self.graphql_client.clone(),
2166        }
2167    }
2168    /// Retrieve the binding value, as type GitRef
2169    pub fn as_git_ref(&self) -> GitRef {
2170        let query = self.selection.select("asGitRef");
2171        GitRef {
2172            proc: self.proc.clone(),
2173            selection: query,
2174            graphql_client: self.graphql_client.clone(),
2175        }
2176    }
2177    /// Retrieve the binding value, as type GitRepository
2178    pub fn as_git_repository(&self) -> GitRepository {
2179        let query = self.selection.select("asGitRepository");
2180        GitRepository {
2181            proc: self.proc.clone(),
2182            selection: query,
2183            graphql_client: self.graphql_client.clone(),
2184        }
2185    }
2186    /// Retrieve the binding value, as type JSONValue
2187    pub fn as_json_value(&self) -> JsonValue {
2188        let query = self.selection.select("asJSONValue");
2189        JsonValue {
2190            proc: self.proc.clone(),
2191            selection: query,
2192            graphql_client: self.graphql_client.clone(),
2193        }
2194    }
2195    /// Retrieve the binding value, as type Module
2196    pub fn as_module(&self) -> Module {
2197        let query = self.selection.select("asModule");
2198        Module {
2199            proc: self.proc.clone(),
2200            selection: query,
2201            graphql_client: self.graphql_client.clone(),
2202        }
2203    }
2204    /// Retrieve the binding value, as type ModuleConfigClient
2205    pub fn as_module_config_client(&self) -> ModuleConfigClient {
2206        let query = self.selection.select("asModuleConfigClient");
2207        ModuleConfigClient {
2208            proc: self.proc.clone(),
2209            selection: query,
2210            graphql_client: self.graphql_client.clone(),
2211        }
2212    }
2213    /// Retrieve the binding value, as type ModuleSource
2214    pub fn as_module_source(&self) -> ModuleSource {
2215        let query = self.selection.select("asModuleSource");
2216        ModuleSource {
2217            proc: self.proc.clone(),
2218            selection: query,
2219            graphql_client: self.graphql_client.clone(),
2220        }
2221    }
2222    /// Retrieve the binding value, as type SearchResult
2223    pub fn as_search_result(&self) -> SearchResult {
2224        let query = self.selection.select("asSearchResult");
2225        SearchResult {
2226            proc: self.proc.clone(),
2227            selection: query,
2228            graphql_client: self.graphql_client.clone(),
2229        }
2230    }
2231    /// Retrieve the binding value, as type SearchSubmatch
2232    pub fn as_search_submatch(&self) -> SearchSubmatch {
2233        let query = self.selection.select("asSearchSubmatch");
2234        SearchSubmatch {
2235            proc: self.proc.clone(),
2236            selection: query,
2237            graphql_client: self.graphql_client.clone(),
2238        }
2239    }
2240    /// Retrieve the binding value, as type Secret
2241    pub fn as_secret(&self) -> Secret {
2242        let query = self.selection.select("asSecret");
2243        Secret {
2244            proc: self.proc.clone(),
2245            selection: query,
2246            graphql_client: self.graphql_client.clone(),
2247        }
2248    }
2249    /// Retrieve the binding value, as type Service
2250    pub fn as_service(&self) -> Service {
2251        let query = self.selection.select("asService");
2252        Service {
2253            proc: self.proc.clone(),
2254            selection: query,
2255            graphql_client: self.graphql_client.clone(),
2256        }
2257    }
2258    /// Retrieve the binding value, as type Socket
2259    pub fn as_socket(&self) -> Socket {
2260        let query = self.selection.select("asSocket");
2261        Socket {
2262            proc: self.proc.clone(),
2263            selection: query,
2264            graphql_client: self.graphql_client.clone(),
2265        }
2266    }
2267    /// Returns the binding's string value
2268    pub async fn as_string(&self) -> Result<String, DaggerError> {
2269        let query = self.selection.select("asString");
2270        query.execute(self.graphql_client.clone()).await
2271    }
2272    /// Returns the digest of the binding value
2273    pub async fn digest(&self) -> Result<String, DaggerError> {
2274        let query = self.selection.select("digest");
2275        query.execute(self.graphql_client.clone()).await
2276    }
2277    /// A unique identifier for this Binding.
2278    pub async fn id(&self) -> Result<BindingId, DaggerError> {
2279        let query = self.selection.select("id");
2280        query.execute(self.graphql_client.clone()).await
2281    }
2282    /// Returns true if the binding is null
2283    pub async fn is_null(&self) -> Result<bool, DaggerError> {
2284        let query = self.selection.select("isNull");
2285        query.execute(self.graphql_client.clone()).await
2286    }
2287    /// Returns the binding name
2288    pub async fn name(&self) -> Result<String, DaggerError> {
2289        let query = self.selection.select("name");
2290        query.execute(self.graphql_client.clone()).await
2291    }
2292    /// Returns the binding type
2293    pub async fn type_name(&self) -> Result<String, DaggerError> {
2294        let query = self.selection.select("typeName");
2295        query.execute(self.graphql_client.clone()).await
2296    }
2297}
2298#[derive(Clone)]
2299pub struct CacheVolume {
2300    pub proc: Option<Arc<DaggerSessionProc>>,
2301    pub selection: Selection,
2302    pub graphql_client: DynGraphQLClient,
2303}
2304impl CacheVolume {
2305    /// A unique identifier for this CacheVolume.
2306    pub async fn id(&self) -> Result<CacheVolumeId, DaggerError> {
2307        let query = self.selection.select("id");
2308        query.execute(self.graphql_client.clone()).await
2309    }
2310}
2311#[derive(Clone)]
2312pub struct Changeset {
2313    pub proc: Option<Arc<DaggerSessionProc>>,
2314    pub selection: Selection,
2315    pub graphql_client: DynGraphQLClient,
2316}
2317impl Changeset {
2318    /// Files and directories that were added in the newer directory.
2319    pub async fn added_paths(&self) -> Result<Vec<String>, DaggerError> {
2320        let query = self.selection.select("addedPaths");
2321        query.execute(self.graphql_client.clone()).await
2322    }
2323    /// The newer/upper snapshot.
2324    pub fn after(&self) -> Directory {
2325        let query = self.selection.select("after");
2326        Directory {
2327            proc: self.proc.clone(),
2328            selection: query,
2329            graphql_client: self.graphql_client.clone(),
2330        }
2331    }
2332    /// Return a Git-compatible patch of the changes
2333    pub fn as_patch(&self) -> File {
2334        let query = self.selection.select("asPatch");
2335        File {
2336            proc: self.proc.clone(),
2337            selection: query,
2338            graphql_client: self.graphql_client.clone(),
2339        }
2340    }
2341    /// The older/lower snapshot to compare against.
2342    pub fn before(&self) -> Directory {
2343        let query = self.selection.select("before");
2344        Directory {
2345            proc: self.proc.clone(),
2346            selection: query,
2347            graphql_client: self.graphql_client.clone(),
2348        }
2349    }
2350    /// Applies the diff represented by this changeset to a path on the host.
2351    ///
2352    /// # Arguments
2353    ///
2354    /// * `path` - Location of the copied directory (e.g., "logs/").
2355    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
2356        let mut query = self.selection.select("export");
2357        query = query.arg("path", path.into());
2358        query.execute(self.graphql_client.clone()).await
2359    }
2360    /// A unique identifier for this Changeset.
2361    pub async fn id(&self) -> Result<ChangesetId, DaggerError> {
2362        let query = self.selection.select("id");
2363        query.execute(self.graphql_client.clone()).await
2364    }
2365    /// Returns true if the changeset is empty (i.e. there are no changes).
2366    pub async fn is_empty(&self) -> Result<bool, DaggerError> {
2367        let query = self.selection.select("isEmpty");
2368        query.execute(self.graphql_client.clone()).await
2369    }
2370    /// Return a snapshot containing only the created and modified files
2371    pub fn layer(&self) -> Directory {
2372        let query = self.selection.select("layer");
2373        Directory {
2374            proc: self.proc.clone(),
2375            selection: query,
2376            graphql_client: self.graphql_client.clone(),
2377        }
2378    }
2379    /// Files and directories that existed before and were updated in the newer directory.
2380    pub async fn modified_paths(&self) -> Result<Vec<String>, DaggerError> {
2381        let query = self.selection.select("modifiedPaths");
2382        query.execute(self.graphql_client.clone()).await
2383    }
2384    /// Files and directories that were removed. Directories are indicated by a trailing slash, and their child paths are not included.
2385    pub async fn removed_paths(&self) -> Result<Vec<String>, DaggerError> {
2386        let query = self.selection.select("removedPaths");
2387        query.execute(self.graphql_client.clone()).await
2388    }
2389    /// Force evaluation in the engine.
2390    pub async fn sync(&self) -> Result<ChangesetId, DaggerError> {
2391        let query = self.selection.select("sync");
2392        query.execute(self.graphql_client.clone()).await
2393    }
2394}
2395#[derive(Clone)]
2396pub struct Check {
2397    pub proc: Option<Arc<DaggerSessionProc>>,
2398    pub selection: Selection,
2399    pub graphql_client: DynGraphQLClient,
2400}
2401impl Check {
2402    /// Whether the check completed
2403    pub async fn completed(&self) -> Result<bool, DaggerError> {
2404        let query = self.selection.select("completed");
2405        query.execute(self.graphql_client.clone()).await
2406    }
2407    /// The description of the check
2408    pub async fn description(&self) -> Result<String, DaggerError> {
2409        let query = self.selection.select("description");
2410        query.execute(self.graphql_client.clone()).await
2411    }
2412    /// A unique identifier for this Check.
2413    pub async fn id(&self) -> Result<CheckId, DaggerError> {
2414        let query = self.selection.select("id");
2415        query.execute(self.graphql_client.clone()).await
2416    }
2417    /// Return the fully qualified name of the check
2418    pub async fn name(&self) -> Result<String, DaggerError> {
2419        let query = self.selection.select("name");
2420        query.execute(self.graphql_client.clone()).await
2421    }
2422    /// Whether the check passed
2423    pub async fn passed(&self) -> Result<bool, DaggerError> {
2424        let query = self.selection.select("passed");
2425        query.execute(self.graphql_client.clone()).await
2426    }
2427    /// The path of the check within its module
2428    pub async fn path(&self) -> Result<Vec<String>, DaggerError> {
2429        let query = self.selection.select("path");
2430        query.execute(self.graphql_client.clone()).await
2431    }
2432    /// An emoji representing the result of the check
2433    pub async fn result_emoji(&self) -> Result<String, DaggerError> {
2434        let query = self.selection.select("resultEmoji");
2435        query.execute(self.graphql_client.clone()).await
2436    }
2437    /// Execute the check
2438    pub fn run(&self) -> Check {
2439        let query = self.selection.select("run");
2440        Check {
2441            proc: self.proc.clone(),
2442            selection: query,
2443            graphql_client: self.graphql_client.clone(),
2444        }
2445    }
2446}
2447#[derive(Clone)]
2448pub struct CheckGroup {
2449    pub proc: Option<Arc<DaggerSessionProc>>,
2450    pub selection: Selection,
2451    pub graphql_client: DynGraphQLClient,
2452}
2453impl CheckGroup {
2454    /// A unique identifier for this CheckGroup.
2455    pub async fn id(&self) -> Result<CheckGroupId, DaggerError> {
2456        let query = self.selection.select("id");
2457        query.execute(self.graphql_client.clone()).await
2458    }
2459    /// Return a list of individual checks and their details
2460    pub fn list(&self) -> Vec<Check> {
2461        let query = self.selection.select("list");
2462        vec![Check {
2463            proc: self.proc.clone(),
2464            selection: query,
2465            graphql_client: self.graphql_client.clone(),
2466        }]
2467    }
2468    /// Generate a markdown report
2469    pub fn report(&self) -> File {
2470        let query = self.selection.select("report");
2471        File {
2472            proc: self.proc.clone(),
2473            selection: query,
2474            graphql_client: self.graphql_client.clone(),
2475        }
2476    }
2477    /// Execute all selected checks
2478    pub fn run(&self) -> CheckGroup {
2479        let query = self.selection.select("run");
2480        CheckGroup {
2481            proc: self.proc.clone(),
2482            selection: query,
2483            graphql_client: self.graphql_client.clone(),
2484        }
2485    }
2486}
2487#[derive(Clone)]
2488pub struct Cloud {
2489    pub proc: Option<Arc<DaggerSessionProc>>,
2490    pub selection: Selection,
2491    pub graphql_client: DynGraphQLClient,
2492}
2493impl Cloud {
2494    /// A unique identifier for this Cloud.
2495    pub async fn id(&self) -> Result<CloudId, DaggerError> {
2496        let query = self.selection.select("id");
2497        query.execute(self.graphql_client.clone()).await
2498    }
2499    /// The trace URL for the current session
2500    pub async fn trace_url(&self) -> Result<String, DaggerError> {
2501        let query = self.selection.select("traceURL");
2502        query.execute(self.graphql_client.clone()).await
2503    }
2504}
2505#[derive(Clone)]
2506pub struct Container {
2507    pub proc: Option<Arc<DaggerSessionProc>>,
2508    pub selection: Selection,
2509    pub graphql_client: DynGraphQLClient,
2510}
2511#[derive(Builder, Debug, PartialEq)]
2512pub struct ContainerAsServiceOpts<'a> {
2513    /// Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).
2514    /// If empty, the container's default command is used.
2515    #[builder(setter(into, strip_option), default)]
2516    pub args: Option<Vec<&'a str>>,
2517    /// Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2518    #[builder(setter(into, strip_option), default)]
2519    pub expand: Option<bool>,
2520    /// Provides Dagger access to the executed command.
2521    #[builder(setter(into, strip_option), default)]
2522    pub experimental_privileged_nesting: Option<bool>,
2523    /// 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.
2524    #[builder(setter(into, strip_option), default)]
2525    pub insecure_root_capabilities: Option<bool>,
2526    /// If set, skip the automatic init process injected into containers by default.
2527    /// 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.
2528    #[builder(setter(into, strip_option), default)]
2529    pub no_init: Option<bool>,
2530    /// If the container has an entrypoint, prepend it to the args.
2531    #[builder(setter(into, strip_option), default)]
2532    pub use_entrypoint: Option<bool>,
2533}
2534#[derive(Builder, Debug, PartialEq)]
2535pub struct ContainerAsTarballOpts {
2536    /// Force each layer of the image to use the specified compression algorithm.
2537    /// 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.
2538    #[builder(setter(into, strip_option), default)]
2539    pub forced_compression: Option<ImageLayerCompression>,
2540    /// Use the specified media types for the image's layers.
2541    /// Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
2542    #[builder(setter(into, strip_option), default)]
2543    pub media_types: Option<ImageMediaTypes>,
2544    /// Identifiers for other platform specific containers.
2545    /// Used for multi-platform images.
2546    #[builder(setter(into, strip_option), default)]
2547    pub platform_variants: Option<Vec<ContainerId>>,
2548}
2549#[derive(Builder, Debug, PartialEq)]
2550pub struct ContainerDirectoryOpts {
2551    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2552    #[builder(setter(into, strip_option), default)]
2553    pub expand: Option<bool>,
2554}
2555#[derive(Builder, Debug, PartialEq)]
2556pub struct ContainerExistsOpts {
2557    /// If specified, do not follow symlinks.
2558    #[builder(setter(into, strip_option), default)]
2559    pub do_not_follow_symlinks: Option<bool>,
2560    /// If specified, also validate the type of file (e.g. "REGULAR_TYPE", "DIRECTORY_TYPE", or "SYMLINK_TYPE").
2561    #[builder(setter(into, strip_option), default)]
2562    pub expected_type: Option<ExistsType>,
2563}
2564#[derive(Builder, Debug, PartialEq)]
2565pub struct ContainerExportOpts {
2566    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2567    #[builder(setter(into, strip_option), default)]
2568    pub expand: Option<bool>,
2569    /// Force each layer of the exported image to use the specified compression algorithm.
2570    /// 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.
2571    #[builder(setter(into, strip_option), default)]
2572    pub forced_compression: Option<ImageLayerCompression>,
2573    /// Use the specified media types for the exported image's layers.
2574    /// Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
2575    #[builder(setter(into, strip_option), default)]
2576    pub media_types: Option<ImageMediaTypes>,
2577    /// Identifiers for other platform specific containers.
2578    /// Used for multi-platform image.
2579    #[builder(setter(into, strip_option), default)]
2580    pub platform_variants: Option<Vec<ContainerId>>,
2581}
2582#[derive(Builder, Debug, PartialEq)]
2583pub struct ContainerExportImageOpts {
2584    /// Force each layer of the exported image to use the specified compression algorithm.
2585    /// 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.
2586    #[builder(setter(into, strip_option), default)]
2587    pub forced_compression: Option<ImageLayerCompression>,
2588    /// Use the specified media types for the exported image's layers.
2589    /// Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
2590    #[builder(setter(into, strip_option), default)]
2591    pub media_types: Option<ImageMediaTypes>,
2592    /// Identifiers for other platform specific containers.
2593    /// Used for multi-platform image.
2594    #[builder(setter(into, strip_option), default)]
2595    pub platform_variants: Option<Vec<ContainerId>>,
2596}
2597#[derive(Builder, Debug, PartialEq)]
2598pub struct ContainerFileOpts {
2599    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2600    #[builder(setter(into, strip_option), default)]
2601    pub expand: Option<bool>,
2602}
2603#[derive(Builder, Debug, PartialEq)]
2604pub struct ContainerImportOpts<'a> {
2605    /// Identifies the tag to import from the archive, if the archive bundles multiple tags.
2606    #[builder(setter(into, strip_option), default)]
2607    pub tag: Option<&'a str>,
2608}
2609#[derive(Builder, Debug, PartialEq)]
2610pub struct ContainerPublishOpts {
2611    /// Force each layer of the published image to use the specified compression algorithm.
2612    /// 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.
2613    #[builder(setter(into, strip_option), default)]
2614    pub forced_compression: Option<ImageLayerCompression>,
2615    /// Use the specified media types for the published image's layers.
2616    /// Defaults to "OCI", which is compatible with most recent registries, but "Docker" may be needed for older registries without OCI support.
2617    #[builder(setter(into, strip_option), default)]
2618    pub media_types: Option<ImageMediaTypes>,
2619    /// Identifiers for other platform specific containers.
2620    /// Used for multi-platform image.
2621    #[builder(setter(into, strip_option), default)]
2622    pub platform_variants: Option<Vec<ContainerId>>,
2623}
2624#[derive(Builder, Debug, PartialEq)]
2625pub struct ContainerTerminalOpts<'a> {
2626    /// If set, override the container's default terminal command and invoke these command arguments instead.
2627    #[builder(setter(into, strip_option), default)]
2628    pub cmd: Option<Vec<&'a str>>,
2629    /// Provides Dagger access to the executed command.
2630    #[builder(setter(into, strip_option), default)]
2631    pub experimental_privileged_nesting: Option<bool>,
2632    /// 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.
2633    #[builder(setter(into, strip_option), default)]
2634    pub insecure_root_capabilities: Option<bool>,
2635}
2636#[derive(Builder, Debug, PartialEq)]
2637pub struct ContainerUpOpts<'a> {
2638    /// Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).
2639    /// If empty, the container's default command is used.
2640    #[builder(setter(into, strip_option), default)]
2641    pub args: Option<Vec<&'a str>>,
2642    /// Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2643    #[builder(setter(into, strip_option), default)]
2644    pub expand: Option<bool>,
2645    /// Provides Dagger access to the executed command.
2646    #[builder(setter(into, strip_option), default)]
2647    pub experimental_privileged_nesting: Option<bool>,
2648    /// 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.
2649    #[builder(setter(into, strip_option), default)]
2650    pub insecure_root_capabilities: Option<bool>,
2651    /// If set, skip the automatic init process injected into containers by default.
2652    /// 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.
2653    #[builder(setter(into, strip_option), default)]
2654    pub no_init: Option<bool>,
2655    /// List of frontend/backend port mappings to forward.
2656    /// Frontend is the port accepting traffic on the host, backend is the service port.
2657    #[builder(setter(into, strip_option), default)]
2658    pub ports: Option<Vec<PortForward>>,
2659    /// Bind each tunnel port to a random port on the host.
2660    #[builder(setter(into, strip_option), default)]
2661    pub random: Option<bool>,
2662    /// If the container has an entrypoint, prepend it to the args.
2663    #[builder(setter(into, strip_option), default)]
2664    pub use_entrypoint: Option<bool>,
2665}
2666#[derive(Builder, Debug, PartialEq)]
2667pub struct ContainerWithDefaultTerminalCmdOpts {
2668    /// Provides Dagger access to the executed command.
2669    #[builder(setter(into, strip_option), default)]
2670    pub experimental_privileged_nesting: Option<bool>,
2671    /// 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.
2672    #[builder(setter(into, strip_option), default)]
2673    pub insecure_root_capabilities: Option<bool>,
2674}
2675#[derive(Builder, Debug, PartialEq)]
2676pub struct ContainerWithDirectoryOpts<'a> {
2677    /// Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]).
2678    #[builder(setter(into, strip_option), default)]
2679    pub exclude: Option<Vec<&'a str>>,
2680    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2681    #[builder(setter(into, strip_option), default)]
2682    pub expand: Option<bool>,
2683    /// Apply .gitignore rules when writing the directory.
2684    #[builder(setter(into, strip_option), default)]
2685    pub gitignore: Option<bool>,
2686    /// Patterns to include in the written directory (e.g. ["*.go", "go.mod", "go.sum"]).
2687    #[builder(setter(into, strip_option), default)]
2688    pub include: Option<Vec<&'a str>>,
2689    /// A user:group to set for the directory and its contents.
2690    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2691    /// If the group is omitted, it defaults to the same as the user.
2692    #[builder(setter(into, strip_option), default)]
2693    pub owner: Option<&'a str>,
2694}
2695#[derive(Builder, Debug, PartialEq)]
2696pub struct ContainerWithEntrypointOpts {
2697    /// Don't reset the default arguments when setting the entrypoint. By default it is reset, since entrypoint and default args are often tightly coupled.
2698    #[builder(setter(into, strip_option), default)]
2699    pub keep_default_args: Option<bool>,
2700}
2701#[derive(Builder, Debug, PartialEq)]
2702pub struct ContainerWithEnvVariableOpts {
2703    /// Replace "${VAR}" or "$VAR" in the value according to the current environment variables defined in the container (e.g. "/opt/bin:$PATH").
2704    #[builder(setter(into, strip_option), default)]
2705    pub expand: Option<bool>,
2706}
2707#[derive(Builder, Debug, PartialEq)]
2708pub struct ContainerWithExecOpts<'a> {
2709    /// Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2710    #[builder(setter(into, strip_option), default)]
2711    pub expand: Option<bool>,
2712    /// Exit codes this command is allowed to exit with without error
2713    #[builder(setter(into, strip_option), default)]
2714    pub expect: Option<ReturnType>,
2715    /// Provides Dagger access to the executed command.
2716    #[builder(setter(into, strip_option), default)]
2717    pub experimental_privileged_nesting: Option<bool>,
2718    /// Execute the command with all root capabilities. Like --privileged in Docker
2719    /// 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.
2720    #[builder(setter(into, strip_option), default)]
2721    pub insecure_root_capabilities: Option<bool>,
2722    /// Skip the automatic init process injected into containers by default.
2723    /// 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.
2724    #[builder(setter(into, strip_option), default)]
2725    pub no_init: Option<bool>,
2726    /// Redirect the command's standard error to a file in the container. Example: "./stderr.txt"
2727    #[builder(setter(into, strip_option), default)]
2728    pub redirect_stderr: Option<&'a str>,
2729    /// Redirect the command's standard input from a file in the container. Example: "./stdin.txt"
2730    #[builder(setter(into, strip_option), default)]
2731    pub redirect_stdin: Option<&'a str>,
2732    /// Redirect the command's standard output to a file in the container. Example: "./stdout.txt"
2733    #[builder(setter(into, strip_option), default)]
2734    pub redirect_stdout: Option<&'a str>,
2735    /// Content to write to the command's standard input. Example: "Hello world")
2736    #[builder(setter(into, strip_option), default)]
2737    pub stdin: Option<&'a str>,
2738    /// Apply the OCI entrypoint, if present, by prepending it to the args. Ignored by default.
2739    #[builder(setter(into, strip_option), default)]
2740    pub use_entrypoint: Option<bool>,
2741}
2742#[derive(Builder, Debug, PartialEq)]
2743pub struct ContainerWithExposedPortOpts<'a> {
2744    /// Port description. Example: "payment API endpoint"
2745    #[builder(setter(into, strip_option), default)]
2746    pub description: Option<&'a str>,
2747    /// Skip the health check when run as a service.
2748    #[builder(setter(into, strip_option), default)]
2749    pub experimental_skip_healthcheck: Option<bool>,
2750    /// Network protocol. Example: "tcp"
2751    #[builder(setter(into, strip_option), default)]
2752    pub protocol: Option<NetworkProtocol>,
2753}
2754#[derive(Builder, Debug, PartialEq)]
2755pub struct ContainerWithFileOpts<'a> {
2756    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2757    #[builder(setter(into, strip_option), default)]
2758    pub expand: Option<bool>,
2759    /// A user:group to set for the file.
2760    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2761    /// If the group is omitted, it defaults to the same as the user.
2762    #[builder(setter(into, strip_option), default)]
2763    pub owner: Option<&'a str>,
2764    /// Permissions of the new file. Example: 0600
2765    #[builder(setter(into, strip_option), default)]
2766    pub permissions: Option<isize>,
2767}
2768#[derive(Builder, Debug, PartialEq)]
2769pub struct ContainerWithFilesOpts<'a> {
2770    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2771    #[builder(setter(into, strip_option), default)]
2772    pub expand: Option<bool>,
2773    /// A user:group to set for the files.
2774    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2775    /// If the group is omitted, it defaults to the same as the user.
2776    #[builder(setter(into, strip_option), default)]
2777    pub owner: Option<&'a str>,
2778    /// Permission given to the copied files (e.g., 0600).
2779    #[builder(setter(into, strip_option), default)]
2780    pub permissions: Option<isize>,
2781}
2782#[derive(Builder, Debug, PartialEq)]
2783pub struct ContainerWithMountedCacheOpts<'a> {
2784    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2785    #[builder(setter(into, strip_option), default)]
2786    pub expand: Option<bool>,
2787    /// A user:group to set for the mounted cache directory.
2788    /// 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.
2789    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2790    /// If the group is omitted, it defaults to the same as the user.
2791    #[builder(setter(into, strip_option), default)]
2792    pub owner: Option<&'a str>,
2793    /// Sharing mode of the cache volume.
2794    #[builder(setter(into, strip_option), default)]
2795    pub sharing: Option<CacheSharingMode>,
2796    /// Identifier of the directory to use as the cache volume's root.
2797    #[builder(setter(into, strip_option), default)]
2798    pub source: Option<DirectoryId>,
2799}
2800#[derive(Builder, Debug, PartialEq)]
2801pub struct ContainerWithMountedDirectoryOpts<'a> {
2802    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2803    #[builder(setter(into, strip_option), default)]
2804    pub expand: Option<bool>,
2805    /// A user:group to set for the mounted directory and its contents.
2806    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2807    /// If the group is omitted, it defaults to the same as the user.
2808    #[builder(setter(into, strip_option), default)]
2809    pub owner: Option<&'a str>,
2810}
2811#[derive(Builder, Debug, PartialEq)]
2812pub struct ContainerWithMountedFileOpts<'a> {
2813    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2814    #[builder(setter(into, strip_option), default)]
2815    pub expand: Option<bool>,
2816    /// A user or user:group to set for the mounted file.
2817    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2818    /// If the group is omitted, it defaults to the same as the user.
2819    #[builder(setter(into, strip_option), default)]
2820    pub owner: Option<&'a str>,
2821}
2822#[derive(Builder, Debug, PartialEq)]
2823pub struct ContainerWithMountedSecretOpts<'a> {
2824    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2825    #[builder(setter(into, strip_option), default)]
2826    pub expand: Option<bool>,
2827    /// Permission given to the mounted secret (e.g., 0600).
2828    /// This option requires an owner to be set to be active.
2829    #[builder(setter(into, strip_option), default)]
2830    pub mode: Option<isize>,
2831    /// A user:group to set for the mounted secret.
2832    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2833    /// If the group is omitted, it defaults to the same as the user.
2834    #[builder(setter(into, strip_option), default)]
2835    pub owner: Option<&'a str>,
2836}
2837#[derive(Builder, Debug, PartialEq)]
2838pub struct ContainerWithMountedTempOpts {
2839    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2840    #[builder(setter(into, strip_option), default)]
2841    pub expand: Option<bool>,
2842    /// Size of the temporary directory in bytes.
2843    #[builder(setter(into, strip_option), default)]
2844    pub size: Option<isize>,
2845}
2846#[derive(Builder, Debug, PartialEq)]
2847pub struct ContainerWithNewFileOpts<'a> {
2848    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2849    #[builder(setter(into, strip_option), default)]
2850    pub expand: Option<bool>,
2851    /// A user:group to set for the file.
2852    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2853    /// If the group is omitted, it defaults to the same as the user.
2854    #[builder(setter(into, strip_option), default)]
2855    pub owner: Option<&'a str>,
2856    /// Permissions of the new file. Example: 0600
2857    #[builder(setter(into, strip_option), default)]
2858    pub permissions: Option<isize>,
2859}
2860#[derive(Builder, Debug, PartialEq)]
2861pub struct ContainerWithSymlinkOpts {
2862    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2863    #[builder(setter(into, strip_option), default)]
2864    pub expand: Option<bool>,
2865}
2866#[derive(Builder, Debug, PartialEq)]
2867pub struct ContainerWithUnixSocketOpts<'a> {
2868    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2869    #[builder(setter(into, strip_option), default)]
2870    pub expand: Option<bool>,
2871    /// A user:group to set for the mounted socket.
2872    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2873    /// If the group is omitted, it defaults to the same as the user.
2874    #[builder(setter(into, strip_option), default)]
2875    pub owner: Option<&'a str>,
2876}
2877#[derive(Builder, Debug, PartialEq)]
2878pub struct ContainerWithWorkdirOpts {
2879    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2880    #[builder(setter(into, strip_option), default)]
2881    pub expand: Option<bool>,
2882}
2883#[derive(Builder, Debug, PartialEq)]
2884pub struct ContainerWithoutDirectoryOpts {
2885    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2886    #[builder(setter(into, strip_option), default)]
2887    pub expand: Option<bool>,
2888}
2889#[derive(Builder, Debug, PartialEq)]
2890pub struct ContainerWithoutEntrypointOpts {
2891    /// Don't remove the default arguments when unsetting the entrypoint.
2892    #[builder(setter(into, strip_option), default)]
2893    pub keep_default_args: Option<bool>,
2894}
2895#[derive(Builder, Debug, PartialEq)]
2896pub struct ContainerWithoutExposedPortOpts {
2897    /// Port protocol to unexpose
2898    #[builder(setter(into, strip_option), default)]
2899    pub protocol: Option<NetworkProtocol>,
2900}
2901#[derive(Builder, Debug, PartialEq)]
2902pub struct ContainerWithoutFileOpts {
2903    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2904    #[builder(setter(into, strip_option), default)]
2905    pub expand: Option<bool>,
2906}
2907#[derive(Builder, Debug, PartialEq)]
2908pub struct ContainerWithoutFilesOpts {
2909    /// Replace "${VAR}" or "$VAR" in the value of paths according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2910    #[builder(setter(into, strip_option), default)]
2911    pub expand: Option<bool>,
2912}
2913#[derive(Builder, Debug, PartialEq)]
2914pub struct ContainerWithoutMountOpts {
2915    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2916    #[builder(setter(into, strip_option), default)]
2917    pub expand: Option<bool>,
2918}
2919#[derive(Builder, Debug, PartialEq)]
2920pub struct ContainerWithoutUnixSocketOpts {
2921    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2922    #[builder(setter(into, strip_option), default)]
2923    pub expand: Option<bool>,
2924}
2925impl Container {
2926    /// Turn the container into a Service.
2927    /// Be sure to set any exposed ports before this conversion.
2928    ///
2929    /// # Arguments
2930    ///
2931    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2932    pub fn as_service(&self) -> Service {
2933        let query = self.selection.select("asService");
2934        Service {
2935            proc: self.proc.clone(),
2936            selection: query,
2937            graphql_client: self.graphql_client.clone(),
2938        }
2939    }
2940    /// Turn the container into a Service.
2941    /// Be sure to set any exposed ports before this conversion.
2942    ///
2943    /// # Arguments
2944    ///
2945    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2946    pub fn as_service_opts<'a>(&self, opts: ContainerAsServiceOpts<'a>) -> Service {
2947        let mut query = self.selection.select("asService");
2948        if let Some(args) = opts.args {
2949            query = query.arg("args", args);
2950        }
2951        if let Some(use_entrypoint) = opts.use_entrypoint {
2952            query = query.arg("useEntrypoint", use_entrypoint);
2953        }
2954        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
2955            query = query.arg(
2956                "experimentalPrivilegedNesting",
2957                experimental_privileged_nesting,
2958            );
2959        }
2960        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
2961            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
2962        }
2963        if let Some(expand) = opts.expand {
2964            query = query.arg("expand", expand);
2965        }
2966        if let Some(no_init) = opts.no_init {
2967            query = query.arg("noInit", no_init);
2968        }
2969        Service {
2970            proc: self.proc.clone(),
2971            selection: query,
2972            graphql_client: self.graphql_client.clone(),
2973        }
2974    }
2975    /// Package the container state as an OCI image, and return it as a tar archive
2976    ///
2977    /// # Arguments
2978    ///
2979    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2980    pub fn as_tarball(&self) -> File {
2981        let query = self.selection.select("asTarball");
2982        File {
2983            proc: self.proc.clone(),
2984            selection: query,
2985            graphql_client: self.graphql_client.clone(),
2986        }
2987    }
2988    /// Package the container state as an OCI image, and return it as a tar archive
2989    ///
2990    /// # Arguments
2991    ///
2992    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2993    pub fn as_tarball_opts(&self, opts: ContainerAsTarballOpts) -> File {
2994        let mut query = self.selection.select("asTarball");
2995        if let Some(platform_variants) = opts.platform_variants {
2996            query = query.arg("platformVariants", platform_variants);
2997        }
2998        if let Some(forced_compression) = opts.forced_compression {
2999            query = query.arg("forcedCompression", forced_compression);
3000        }
3001        if let Some(media_types) = opts.media_types {
3002            query = query.arg("mediaTypes", media_types);
3003        }
3004        File {
3005            proc: self.proc.clone(),
3006            selection: query,
3007            graphql_client: self.graphql_client.clone(),
3008        }
3009    }
3010    /// The combined buffered standard output and standard error stream of the last executed command
3011    /// Returns an error if no command was executed
3012    pub async fn combined_output(&self) -> Result<String, DaggerError> {
3013        let query = self.selection.select("combinedOutput");
3014        query.execute(self.graphql_client.clone()).await
3015    }
3016    /// Return the container's default arguments.
3017    pub async fn default_args(&self) -> Result<Vec<String>, DaggerError> {
3018        let query = self.selection.select("defaultArgs");
3019        query.execute(self.graphql_client.clone()).await
3020    }
3021    /// Retrieve a directory from the container's root filesystem
3022    /// Mounts are included.
3023    ///
3024    /// # Arguments
3025    ///
3026    /// * `path` - The path of the directory to retrieve (e.g., "./src").
3027    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3028    pub fn directory(&self, path: impl Into<String>) -> Directory {
3029        let mut query = self.selection.select("directory");
3030        query = query.arg("path", path.into());
3031        Directory {
3032            proc: self.proc.clone(),
3033            selection: query,
3034            graphql_client: self.graphql_client.clone(),
3035        }
3036    }
3037    /// Retrieve a directory from the container's root filesystem
3038    /// Mounts are included.
3039    ///
3040    /// # Arguments
3041    ///
3042    /// * `path` - The path of the directory to retrieve (e.g., "./src").
3043    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3044    pub fn directory_opts(
3045        &self,
3046        path: impl Into<String>,
3047        opts: ContainerDirectoryOpts,
3048    ) -> Directory {
3049        let mut query = self.selection.select("directory");
3050        query = query.arg("path", path.into());
3051        if let Some(expand) = opts.expand {
3052            query = query.arg("expand", expand);
3053        }
3054        Directory {
3055            proc: self.proc.clone(),
3056            selection: query,
3057            graphql_client: self.graphql_client.clone(),
3058        }
3059    }
3060    /// Return the container's OCI entrypoint.
3061    pub async fn entrypoint(&self) -> Result<Vec<String>, DaggerError> {
3062        let query = self.selection.select("entrypoint");
3063        query.execute(self.graphql_client.clone()).await
3064    }
3065    /// Retrieves the value of the specified environment variable.
3066    ///
3067    /// # Arguments
3068    ///
3069    /// * `name` - The name of the environment variable to retrieve (e.g., "PATH").
3070    pub async fn env_variable(&self, name: impl Into<String>) -> Result<String, DaggerError> {
3071        let mut query = self.selection.select("envVariable");
3072        query = query.arg("name", name.into());
3073        query.execute(self.graphql_client.clone()).await
3074    }
3075    /// Retrieves the list of environment variables passed to commands.
3076    pub fn env_variables(&self) -> Vec<EnvVariable> {
3077        let query = self.selection.select("envVariables");
3078        vec![EnvVariable {
3079            proc: self.proc.clone(),
3080            selection: query,
3081            graphql_client: self.graphql_client.clone(),
3082        }]
3083    }
3084    /// check if a file or directory exists
3085    ///
3086    /// # Arguments
3087    ///
3088    /// * `path` - Path to check (e.g., "/file.txt").
3089    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3090    pub async fn exists(&self, path: impl Into<String>) -> Result<bool, DaggerError> {
3091        let mut query = self.selection.select("exists");
3092        query = query.arg("path", path.into());
3093        query.execute(self.graphql_client.clone()).await
3094    }
3095    /// check if a file or directory exists
3096    ///
3097    /// # Arguments
3098    ///
3099    /// * `path` - Path to check (e.g., "/file.txt").
3100    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3101    pub async fn exists_opts(
3102        &self,
3103        path: impl Into<String>,
3104        opts: ContainerExistsOpts,
3105    ) -> Result<bool, DaggerError> {
3106        let mut query = self.selection.select("exists");
3107        query = query.arg("path", path.into());
3108        if let Some(expected_type) = opts.expected_type {
3109            query = query.arg("expectedType", expected_type);
3110        }
3111        if let Some(do_not_follow_symlinks) = opts.do_not_follow_symlinks {
3112            query = query.arg("doNotFollowSymlinks", do_not_follow_symlinks);
3113        }
3114        query.execute(self.graphql_client.clone()).await
3115    }
3116    /// The exit code of the last executed command
3117    /// Returns an error if no command was executed
3118    pub async fn exit_code(&self) -> Result<isize, DaggerError> {
3119        let query = self.selection.select("exitCode");
3120        query.execute(self.graphql_client.clone()).await
3121    }
3122    /// EXPERIMENTAL API! Subject to change/removal at any time.
3123    /// Configures all available GPUs on the host to be accessible to this container.
3124    /// This currently works for Nvidia devices only.
3125    pub fn experimental_with_all_gp_us(&self) -> Container {
3126        let query = self.selection.select("experimentalWithAllGPUs");
3127        Container {
3128            proc: self.proc.clone(),
3129            selection: query,
3130            graphql_client: self.graphql_client.clone(),
3131        }
3132    }
3133    /// EXPERIMENTAL API! Subject to change/removal at any time.
3134    /// Configures the provided list of devices to be accessible to this container.
3135    /// This currently works for Nvidia devices only.
3136    ///
3137    /// # Arguments
3138    ///
3139    /// * `devices` - List of devices to be accessible to this container.
3140    pub fn experimental_with_gpu(&self, devices: Vec<impl Into<String>>) -> Container {
3141        let mut query = self.selection.select("experimentalWithGPU");
3142        query = query.arg(
3143            "devices",
3144            devices
3145                .into_iter()
3146                .map(|i| i.into())
3147                .collect::<Vec<String>>(),
3148        );
3149        Container {
3150            proc: self.proc.clone(),
3151            selection: query,
3152            graphql_client: self.graphql_client.clone(),
3153        }
3154    }
3155    /// Writes the container as an OCI tarball to the destination file path on the host.
3156    /// It can also export platform variants.
3157    ///
3158    /// # Arguments
3159    ///
3160    /// * `path` - Host's destination path (e.g., "./tarball").
3161    ///
3162    /// Path can be relative to the engine's workdir or absolute.
3163    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3164    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
3165        let mut query = self.selection.select("export");
3166        query = query.arg("path", path.into());
3167        query.execute(self.graphql_client.clone()).await
3168    }
3169    /// Writes the container as an OCI tarball to the destination file path on the host.
3170    /// It can also export platform variants.
3171    ///
3172    /// # Arguments
3173    ///
3174    /// * `path` - Host's destination path (e.g., "./tarball").
3175    ///
3176    /// Path can be relative to the engine's workdir or absolute.
3177    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3178    pub async fn export_opts(
3179        &self,
3180        path: impl Into<String>,
3181        opts: ContainerExportOpts,
3182    ) -> Result<String, DaggerError> {
3183        let mut query = self.selection.select("export");
3184        query = query.arg("path", path.into());
3185        if let Some(platform_variants) = opts.platform_variants {
3186            query = query.arg("platformVariants", platform_variants);
3187        }
3188        if let Some(forced_compression) = opts.forced_compression {
3189            query = query.arg("forcedCompression", forced_compression);
3190        }
3191        if let Some(media_types) = opts.media_types {
3192            query = query.arg("mediaTypes", media_types);
3193        }
3194        if let Some(expand) = opts.expand {
3195            query = query.arg("expand", expand);
3196        }
3197        query.execute(self.graphql_client.clone()).await
3198    }
3199    /// Exports the container as an image to the host's container image store.
3200    ///
3201    /// # Arguments
3202    ///
3203    /// * `name` - Name of image to export to in the host's store
3204    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3205    pub async fn export_image(&self, name: impl Into<String>) -> Result<Void, DaggerError> {
3206        let mut query = self.selection.select("exportImage");
3207        query = query.arg("name", name.into());
3208        query.execute(self.graphql_client.clone()).await
3209    }
3210    /// Exports the container as an image to the host's container image store.
3211    ///
3212    /// # Arguments
3213    ///
3214    /// * `name` - Name of image to export to in the host's store
3215    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3216    pub async fn export_image_opts(
3217        &self,
3218        name: impl Into<String>,
3219        opts: ContainerExportImageOpts,
3220    ) -> Result<Void, DaggerError> {
3221        let mut query = self.selection.select("exportImage");
3222        query = query.arg("name", name.into());
3223        if let Some(platform_variants) = opts.platform_variants {
3224            query = query.arg("platformVariants", platform_variants);
3225        }
3226        if let Some(forced_compression) = opts.forced_compression {
3227            query = query.arg("forcedCompression", forced_compression);
3228        }
3229        if let Some(media_types) = opts.media_types {
3230            query = query.arg("mediaTypes", media_types);
3231        }
3232        query.execute(self.graphql_client.clone()).await
3233    }
3234    /// Retrieves the list of exposed ports.
3235    /// This includes ports already exposed by the image, even if not explicitly added with dagger.
3236    pub fn exposed_ports(&self) -> Vec<Port> {
3237        let query = self.selection.select("exposedPorts");
3238        vec![Port {
3239            proc: self.proc.clone(),
3240            selection: query,
3241            graphql_client: self.graphql_client.clone(),
3242        }]
3243    }
3244    /// Retrieves a file at the given path.
3245    /// Mounts are included.
3246    ///
3247    /// # Arguments
3248    ///
3249    /// * `path` - The path of the file to retrieve (e.g., "./README.md").
3250    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3251    pub fn file(&self, path: impl Into<String>) -> File {
3252        let mut query = self.selection.select("file");
3253        query = query.arg("path", path.into());
3254        File {
3255            proc: self.proc.clone(),
3256            selection: query,
3257            graphql_client: self.graphql_client.clone(),
3258        }
3259    }
3260    /// Retrieves a file at the given path.
3261    /// Mounts are included.
3262    ///
3263    /// # Arguments
3264    ///
3265    /// * `path` - The path of the file to retrieve (e.g., "./README.md").
3266    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3267    pub fn file_opts(&self, path: impl Into<String>, opts: ContainerFileOpts) -> File {
3268        let mut query = self.selection.select("file");
3269        query = query.arg("path", path.into());
3270        if let Some(expand) = opts.expand {
3271            query = query.arg("expand", expand);
3272        }
3273        File {
3274            proc: self.proc.clone(),
3275            selection: query,
3276            graphql_client: self.graphql_client.clone(),
3277        }
3278    }
3279    /// Download a container image, and apply it to the container state. All previous state will be lost.
3280    ///
3281    /// # Arguments
3282    ///
3283    /// * `address` - Address of the container image to download, in standard OCI ref format. Example:"registry.dagger.io/engine:latest"
3284    pub fn from(&self, address: impl Into<String>) -> Container {
3285        let mut query = self.selection.select("from");
3286        query = query.arg("address", address.into());
3287        Container {
3288            proc: self.proc.clone(),
3289            selection: query,
3290            graphql_client: self.graphql_client.clone(),
3291        }
3292    }
3293    /// A unique identifier for this Container.
3294    pub async fn id(&self) -> Result<ContainerId, DaggerError> {
3295        let query = self.selection.select("id");
3296        query.execute(self.graphql_client.clone()).await
3297    }
3298    /// The unique image reference which can only be retrieved immediately after the 'Container.From' call.
3299    pub async fn image_ref(&self) -> Result<String, DaggerError> {
3300        let query = self.selection.select("imageRef");
3301        query.execute(self.graphql_client.clone()).await
3302    }
3303    /// Reads the container from an OCI tarball.
3304    ///
3305    /// # Arguments
3306    ///
3307    /// * `source` - File to read the container from.
3308    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3309    pub fn import(&self, source: impl IntoID<FileId>) -> Container {
3310        let mut query = self.selection.select("import");
3311        query = query.arg_lazy(
3312            "source",
3313            Box::new(move || {
3314                let source = source.clone();
3315                Box::pin(async move { source.into_id().await.unwrap().quote() })
3316            }),
3317        );
3318        Container {
3319            proc: self.proc.clone(),
3320            selection: query,
3321            graphql_client: self.graphql_client.clone(),
3322        }
3323    }
3324    /// Reads the container from an OCI tarball.
3325    ///
3326    /// # Arguments
3327    ///
3328    /// * `source` - File to read the container from.
3329    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3330    pub fn import_opts<'a>(
3331        &self,
3332        source: impl IntoID<FileId>,
3333        opts: ContainerImportOpts<'a>,
3334    ) -> Container {
3335        let mut query = self.selection.select("import");
3336        query = query.arg_lazy(
3337            "source",
3338            Box::new(move || {
3339                let source = source.clone();
3340                Box::pin(async move { source.into_id().await.unwrap().quote() })
3341            }),
3342        );
3343        if let Some(tag) = opts.tag {
3344            query = query.arg("tag", tag);
3345        }
3346        Container {
3347            proc: self.proc.clone(),
3348            selection: query,
3349            graphql_client: self.graphql_client.clone(),
3350        }
3351    }
3352    /// Retrieves the value of the specified label.
3353    ///
3354    /// # Arguments
3355    ///
3356    /// * `name` - The name of the label (e.g., "org.opencontainers.artifact.created").
3357    pub async fn label(&self, name: impl Into<String>) -> Result<String, DaggerError> {
3358        let mut query = self.selection.select("label");
3359        query = query.arg("name", name.into());
3360        query.execute(self.graphql_client.clone()).await
3361    }
3362    /// Retrieves the list of labels passed to container.
3363    pub fn labels(&self) -> Vec<Label> {
3364        let query = self.selection.select("labels");
3365        vec![Label {
3366            proc: self.proc.clone(),
3367            selection: query,
3368            graphql_client: self.graphql_client.clone(),
3369        }]
3370    }
3371    /// Retrieves the list of paths where a directory is mounted.
3372    pub async fn mounts(&self) -> Result<Vec<String>, DaggerError> {
3373        let query = self.selection.select("mounts");
3374        query.execute(self.graphql_client.clone()).await
3375    }
3376    /// The platform this container executes and publishes as.
3377    pub async fn platform(&self) -> Result<Platform, DaggerError> {
3378        let query = self.selection.select("platform");
3379        query.execute(self.graphql_client.clone()).await
3380    }
3381    /// Package the container state as an OCI image, and publish it to a registry
3382    /// Returns the fully qualified address of the published image, with digest
3383    ///
3384    /// # Arguments
3385    ///
3386    /// * `address` - The OCI address to publish to
3387    ///
3388    /// Same format as "docker push". Example: "registry.example.com/user/repo:tag"
3389    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3390    pub async fn publish(&self, address: impl Into<String>) -> Result<String, DaggerError> {
3391        let mut query = self.selection.select("publish");
3392        query = query.arg("address", address.into());
3393        query.execute(self.graphql_client.clone()).await
3394    }
3395    /// Package the container state as an OCI image, and publish it to a registry
3396    /// Returns the fully qualified address of the published image, with digest
3397    ///
3398    /// # Arguments
3399    ///
3400    /// * `address` - The OCI address to publish to
3401    ///
3402    /// Same format as "docker push". Example: "registry.example.com/user/repo:tag"
3403    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3404    pub async fn publish_opts(
3405        &self,
3406        address: impl Into<String>,
3407        opts: ContainerPublishOpts,
3408    ) -> Result<String, DaggerError> {
3409        let mut query = self.selection.select("publish");
3410        query = query.arg("address", address.into());
3411        if let Some(platform_variants) = opts.platform_variants {
3412            query = query.arg("platformVariants", platform_variants);
3413        }
3414        if let Some(forced_compression) = opts.forced_compression {
3415            query = query.arg("forcedCompression", forced_compression);
3416        }
3417        if let Some(media_types) = opts.media_types {
3418            query = query.arg("mediaTypes", media_types);
3419        }
3420        query.execute(self.graphql_client.clone()).await
3421    }
3422    /// 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.
3423    pub fn rootfs(&self) -> Directory {
3424        let query = self.selection.select("rootfs");
3425        Directory {
3426            proc: self.proc.clone(),
3427            selection: query,
3428            graphql_client: self.graphql_client.clone(),
3429        }
3430    }
3431    /// The buffered standard error stream of the last executed command
3432    /// Returns an error if no command was executed
3433    pub async fn stderr(&self) -> Result<String, DaggerError> {
3434        let query = self.selection.select("stderr");
3435        query.execute(self.graphql_client.clone()).await
3436    }
3437    /// The buffered standard output stream of the last executed command
3438    /// Returns an error if no command was executed
3439    pub async fn stdout(&self) -> Result<String, DaggerError> {
3440        let query = self.selection.select("stdout");
3441        query.execute(self.graphql_client.clone()).await
3442    }
3443    /// Forces evaluation of the pipeline in the engine.
3444    /// It doesn't run the default command if no exec has been set.
3445    pub async fn sync(&self) -> Result<ContainerId, DaggerError> {
3446        let query = self.selection.select("sync");
3447        query.execute(self.graphql_client.clone()).await
3448    }
3449    /// Opens an interactive terminal for this container using its configured default terminal command if not overridden by args (or sh as a fallback default).
3450    ///
3451    /// # Arguments
3452    ///
3453    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3454    pub fn terminal(&self) -> Container {
3455        let query = self.selection.select("terminal");
3456        Container {
3457            proc: self.proc.clone(),
3458            selection: query,
3459            graphql_client: self.graphql_client.clone(),
3460        }
3461    }
3462    /// Opens an interactive terminal for this container using its configured default terminal command if not overridden by args (or sh as a fallback default).
3463    ///
3464    /// # Arguments
3465    ///
3466    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3467    pub fn terminal_opts<'a>(&self, opts: ContainerTerminalOpts<'a>) -> Container {
3468        let mut query = self.selection.select("terminal");
3469        if let Some(cmd) = opts.cmd {
3470            query = query.arg("cmd", cmd);
3471        }
3472        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
3473            query = query.arg(
3474                "experimentalPrivilegedNesting",
3475                experimental_privileged_nesting,
3476            );
3477        }
3478        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
3479            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
3480        }
3481        Container {
3482            proc: self.proc.clone(),
3483            selection: query,
3484            graphql_client: self.graphql_client.clone(),
3485        }
3486    }
3487    /// Starts a Service and creates a tunnel that forwards traffic from the caller's network to that service.
3488    /// Be sure to set any exposed ports before calling this api.
3489    ///
3490    /// # Arguments
3491    ///
3492    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3493    pub async fn up(&self) -> Result<Void, DaggerError> {
3494        let query = self.selection.select("up");
3495        query.execute(self.graphql_client.clone()).await
3496    }
3497    /// Starts a Service and creates a tunnel that forwards traffic from the caller's network to that service.
3498    /// Be sure to set any exposed ports before calling this api.
3499    ///
3500    /// # Arguments
3501    ///
3502    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3503    pub async fn up_opts<'a>(&self, opts: ContainerUpOpts<'a>) -> Result<Void, DaggerError> {
3504        let mut query = self.selection.select("up");
3505        if let Some(random) = opts.random {
3506            query = query.arg("random", random);
3507        }
3508        if let Some(ports) = opts.ports {
3509            query = query.arg("ports", ports);
3510        }
3511        if let Some(args) = opts.args {
3512            query = query.arg("args", args);
3513        }
3514        if let Some(use_entrypoint) = opts.use_entrypoint {
3515            query = query.arg("useEntrypoint", use_entrypoint);
3516        }
3517        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
3518            query = query.arg(
3519                "experimentalPrivilegedNesting",
3520                experimental_privileged_nesting,
3521            );
3522        }
3523        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
3524            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
3525        }
3526        if let Some(expand) = opts.expand {
3527            query = query.arg("expand", expand);
3528        }
3529        if let Some(no_init) = opts.no_init {
3530            query = query.arg("noInit", no_init);
3531        }
3532        query.execute(self.graphql_client.clone()).await
3533    }
3534    /// Retrieves the user to be set for all commands.
3535    pub async fn user(&self) -> Result<String, DaggerError> {
3536        let query = self.selection.select("user");
3537        query.execute(self.graphql_client.clone()).await
3538    }
3539    /// Retrieves this container plus the given OCI anotation.
3540    ///
3541    /// # Arguments
3542    ///
3543    /// * `name` - The name of the annotation.
3544    /// * `value` - The value of the annotation.
3545    pub fn with_annotation(&self, name: impl Into<String>, value: impl Into<String>) -> Container {
3546        let mut query = self.selection.select("withAnnotation");
3547        query = query.arg("name", name.into());
3548        query = query.arg("value", value.into());
3549        Container {
3550            proc: self.proc.clone(),
3551            selection: query,
3552            graphql_client: self.graphql_client.clone(),
3553        }
3554    }
3555    /// Configures default arguments for future commands. Like CMD in Dockerfile.
3556    ///
3557    /// # Arguments
3558    ///
3559    /// * `args` - Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]).
3560    pub fn with_default_args(&self, args: Vec<impl Into<String>>) -> Container {
3561        let mut query = self.selection.select("withDefaultArgs");
3562        query = query.arg(
3563            "args",
3564            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3565        );
3566        Container {
3567            proc: self.proc.clone(),
3568            selection: query,
3569            graphql_client: self.graphql_client.clone(),
3570        }
3571    }
3572    /// Set the default command to invoke for the container's terminal API.
3573    ///
3574    /// # Arguments
3575    ///
3576    /// * `args` - The args of the command.
3577    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3578    pub fn with_default_terminal_cmd(&self, args: Vec<impl Into<String>>) -> Container {
3579        let mut query = self.selection.select("withDefaultTerminalCmd");
3580        query = query.arg(
3581            "args",
3582            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3583        );
3584        Container {
3585            proc: self.proc.clone(),
3586            selection: query,
3587            graphql_client: self.graphql_client.clone(),
3588        }
3589    }
3590    /// Set the default command to invoke for the container's terminal API.
3591    ///
3592    /// # Arguments
3593    ///
3594    /// * `args` - The args of the command.
3595    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3596    pub fn with_default_terminal_cmd_opts(
3597        &self,
3598        args: Vec<impl Into<String>>,
3599        opts: ContainerWithDefaultTerminalCmdOpts,
3600    ) -> Container {
3601        let mut query = self.selection.select("withDefaultTerminalCmd");
3602        query = query.arg(
3603            "args",
3604            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3605        );
3606        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
3607            query = query.arg(
3608                "experimentalPrivilegedNesting",
3609                experimental_privileged_nesting,
3610            );
3611        }
3612        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
3613            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
3614        }
3615        Container {
3616            proc: self.proc.clone(),
3617            selection: query,
3618            graphql_client: self.graphql_client.clone(),
3619        }
3620    }
3621    /// Return a new container snapshot, with a directory added to its filesystem
3622    ///
3623    /// # Arguments
3624    ///
3625    /// * `path` - Location of the written directory (e.g., "/tmp/directory").
3626    /// * `source` - Identifier of the directory to write
3627    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3628    pub fn with_directory(
3629        &self,
3630        path: impl Into<String>,
3631        source: impl IntoID<DirectoryId>,
3632    ) -> Container {
3633        let mut query = self.selection.select("withDirectory");
3634        query = query.arg("path", path.into());
3635        query = query.arg_lazy(
3636            "source",
3637            Box::new(move || {
3638                let source = source.clone();
3639                Box::pin(async move { source.into_id().await.unwrap().quote() })
3640            }),
3641        );
3642        Container {
3643            proc: self.proc.clone(),
3644            selection: query,
3645            graphql_client: self.graphql_client.clone(),
3646        }
3647    }
3648    /// Return a new container snapshot, with a directory added to its filesystem
3649    ///
3650    /// # Arguments
3651    ///
3652    /// * `path` - Location of the written directory (e.g., "/tmp/directory").
3653    /// * `source` - Identifier of the directory to write
3654    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3655    pub fn with_directory_opts<'a>(
3656        &self,
3657        path: impl Into<String>,
3658        source: impl IntoID<DirectoryId>,
3659        opts: ContainerWithDirectoryOpts<'a>,
3660    ) -> Container {
3661        let mut query = self.selection.select("withDirectory");
3662        query = query.arg("path", path.into());
3663        query = query.arg_lazy(
3664            "source",
3665            Box::new(move || {
3666                let source = source.clone();
3667                Box::pin(async move { source.into_id().await.unwrap().quote() })
3668            }),
3669        );
3670        if let Some(exclude) = opts.exclude {
3671            query = query.arg("exclude", exclude);
3672        }
3673        if let Some(include) = opts.include {
3674            query = query.arg("include", include);
3675        }
3676        if let Some(gitignore) = opts.gitignore {
3677            query = query.arg("gitignore", gitignore);
3678        }
3679        if let Some(owner) = opts.owner {
3680            query = query.arg("owner", owner);
3681        }
3682        if let Some(expand) = opts.expand {
3683            query = query.arg("expand", expand);
3684        }
3685        Container {
3686            proc: self.proc.clone(),
3687            selection: query,
3688            graphql_client: self.graphql_client.clone(),
3689        }
3690    }
3691    /// Set an OCI-style entrypoint. It will be included in the container's OCI configuration. Note, withExec ignores the entrypoint by default.
3692    ///
3693    /// # Arguments
3694    ///
3695    /// * `args` - Arguments of the entrypoint. Example: ["go", "run"].
3696    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3697    pub fn with_entrypoint(&self, args: Vec<impl Into<String>>) -> Container {
3698        let mut query = self.selection.select("withEntrypoint");
3699        query = query.arg(
3700            "args",
3701            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3702        );
3703        Container {
3704            proc: self.proc.clone(),
3705            selection: query,
3706            graphql_client: self.graphql_client.clone(),
3707        }
3708    }
3709    /// Set an OCI-style entrypoint. It will be included in the container's OCI configuration. Note, withExec ignores the entrypoint by default.
3710    ///
3711    /// # Arguments
3712    ///
3713    /// * `args` - Arguments of the entrypoint. Example: ["go", "run"].
3714    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3715    pub fn with_entrypoint_opts(
3716        &self,
3717        args: Vec<impl Into<String>>,
3718        opts: ContainerWithEntrypointOpts,
3719    ) -> Container {
3720        let mut query = self.selection.select("withEntrypoint");
3721        query = query.arg(
3722            "args",
3723            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3724        );
3725        if let Some(keep_default_args) = opts.keep_default_args {
3726            query = query.arg("keepDefaultArgs", keep_default_args);
3727        }
3728        Container {
3729            proc: self.proc.clone(),
3730            selection: query,
3731            graphql_client: self.graphql_client.clone(),
3732        }
3733    }
3734    /// Set a new environment variable in the container.
3735    ///
3736    /// # Arguments
3737    ///
3738    /// * `name` - Name of the environment variable (e.g., "HOST").
3739    /// * `value` - Value of the environment variable. (e.g., "localhost").
3740    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3741    pub fn with_env_variable(
3742        &self,
3743        name: impl Into<String>,
3744        value: impl Into<String>,
3745    ) -> Container {
3746        let mut query = self.selection.select("withEnvVariable");
3747        query = query.arg("name", name.into());
3748        query = query.arg("value", value.into());
3749        Container {
3750            proc: self.proc.clone(),
3751            selection: query,
3752            graphql_client: self.graphql_client.clone(),
3753        }
3754    }
3755    /// Set a new environment variable in the container.
3756    ///
3757    /// # Arguments
3758    ///
3759    /// * `name` - Name of the environment variable (e.g., "HOST").
3760    /// * `value` - Value of the environment variable. (e.g., "localhost").
3761    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3762    pub fn with_env_variable_opts(
3763        &self,
3764        name: impl Into<String>,
3765        value: impl Into<String>,
3766        opts: ContainerWithEnvVariableOpts,
3767    ) -> Container {
3768        let mut query = self.selection.select("withEnvVariable");
3769        query = query.arg("name", name.into());
3770        query = query.arg("value", value.into());
3771        if let Some(expand) = opts.expand {
3772            query = query.arg("expand", expand);
3773        }
3774        Container {
3775            proc: self.proc.clone(),
3776            selection: query,
3777            graphql_client: self.graphql_client.clone(),
3778        }
3779    }
3780    /// Raise an error.
3781    ///
3782    /// # Arguments
3783    ///
3784    /// * `err` - Message of the error to raise. If empty, the error will be ignored.
3785    pub fn with_error(&self, err: impl Into<String>) -> Container {
3786        let mut query = self.selection.select("withError");
3787        query = query.arg("err", err.into());
3788        Container {
3789            proc: self.proc.clone(),
3790            selection: query,
3791            graphql_client: self.graphql_client.clone(),
3792        }
3793    }
3794    /// Execute a command in the container, and return a new snapshot of the container state after execution.
3795    ///
3796    /// # Arguments
3797    ///
3798    /// * `args` - Command to execute. Must be valid exec() arguments, not a shell command. Example: ["go", "run", "main.go"].
3799    ///
3800    /// To run a shell command, execute the shell and pass the shell command as argument. Example: ["sh", "-c", "ls -l | grep foo"]
3801    ///
3802    /// Defaults to the container's default arguments (see "defaultArgs" and "withDefaultArgs").
3803    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3804    pub fn with_exec(&self, args: Vec<impl Into<String>>) -> Container {
3805        let mut query = self.selection.select("withExec");
3806        query = query.arg(
3807            "args",
3808            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3809        );
3810        Container {
3811            proc: self.proc.clone(),
3812            selection: query,
3813            graphql_client: self.graphql_client.clone(),
3814        }
3815    }
3816    /// Execute a command in the container, and return a new snapshot of the container state after execution.
3817    ///
3818    /// # Arguments
3819    ///
3820    /// * `args` - Command to execute. Must be valid exec() arguments, not a shell command. Example: ["go", "run", "main.go"].
3821    ///
3822    /// To run a shell command, execute the shell and pass the shell command as argument. Example: ["sh", "-c", "ls -l | grep foo"]
3823    ///
3824    /// Defaults to the container's default arguments (see "defaultArgs" and "withDefaultArgs").
3825    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3826    pub fn with_exec_opts<'a>(
3827        &self,
3828        args: Vec<impl Into<String>>,
3829        opts: ContainerWithExecOpts<'a>,
3830    ) -> Container {
3831        let mut query = self.selection.select("withExec");
3832        query = query.arg(
3833            "args",
3834            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3835        );
3836        if let Some(use_entrypoint) = opts.use_entrypoint {
3837            query = query.arg("useEntrypoint", use_entrypoint);
3838        }
3839        if let Some(stdin) = opts.stdin {
3840            query = query.arg("stdin", stdin);
3841        }
3842        if let Some(redirect_stdin) = opts.redirect_stdin {
3843            query = query.arg("redirectStdin", redirect_stdin);
3844        }
3845        if let Some(redirect_stdout) = opts.redirect_stdout {
3846            query = query.arg("redirectStdout", redirect_stdout);
3847        }
3848        if let Some(redirect_stderr) = opts.redirect_stderr {
3849            query = query.arg("redirectStderr", redirect_stderr);
3850        }
3851        if let Some(expect) = opts.expect {
3852            query = query.arg("expect", expect);
3853        }
3854        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
3855            query = query.arg(
3856                "experimentalPrivilegedNesting",
3857                experimental_privileged_nesting,
3858            );
3859        }
3860        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
3861            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
3862        }
3863        if let Some(expand) = opts.expand {
3864            query = query.arg("expand", expand);
3865        }
3866        if let Some(no_init) = opts.no_init {
3867            query = query.arg("noInit", no_init);
3868        }
3869        Container {
3870            proc: self.proc.clone(),
3871            selection: query,
3872            graphql_client: self.graphql_client.clone(),
3873        }
3874    }
3875    /// Expose a network port. Like EXPOSE in Dockerfile (but with healthcheck support)
3876    /// Exposed ports serve two purposes:
3877    /// - For health checks and introspection, when running services
3878    /// - For setting the EXPOSE OCI field when publishing the container
3879    ///
3880    /// # Arguments
3881    ///
3882    /// * `port` - Port number to expose. Example: 8080
3883    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3884    pub fn with_exposed_port(&self, port: isize) -> Container {
3885        let mut query = self.selection.select("withExposedPort");
3886        query = query.arg("port", port);
3887        Container {
3888            proc: self.proc.clone(),
3889            selection: query,
3890            graphql_client: self.graphql_client.clone(),
3891        }
3892    }
3893    /// Expose a network port. Like EXPOSE in Dockerfile (but with healthcheck support)
3894    /// Exposed ports serve two purposes:
3895    /// - For health checks and introspection, when running services
3896    /// - For setting the EXPOSE OCI field when publishing the container
3897    ///
3898    /// # Arguments
3899    ///
3900    /// * `port` - Port number to expose. Example: 8080
3901    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3902    pub fn with_exposed_port_opts<'a>(
3903        &self,
3904        port: isize,
3905        opts: ContainerWithExposedPortOpts<'a>,
3906    ) -> Container {
3907        let mut query = self.selection.select("withExposedPort");
3908        query = query.arg("port", port);
3909        if let Some(protocol) = opts.protocol {
3910            query = query.arg("protocol", protocol);
3911        }
3912        if let Some(description) = opts.description {
3913            query = query.arg("description", description);
3914        }
3915        if let Some(experimental_skip_healthcheck) = opts.experimental_skip_healthcheck {
3916            query = query.arg("experimentalSkipHealthcheck", experimental_skip_healthcheck);
3917        }
3918        Container {
3919            proc: self.proc.clone(),
3920            selection: query,
3921            graphql_client: self.graphql_client.clone(),
3922        }
3923    }
3924    /// Return a container snapshot with a file added
3925    ///
3926    /// # Arguments
3927    ///
3928    /// * `path` - Path of the new file. Example: "/path/to/new-file.txt"
3929    /// * `source` - File to add
3930    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3931    pub fn with_file(&self, path: impl Into<String>, source: impl IntoID<FileId>) -> Container {
3932        let mut query = self.selection.select("withFile");
3933        query = query.arg("path", path.into());
3934        query = query.arg_lazy(
3935            "source",
3936            Box::new(move || {
3937                let source = source.clone();
3938                Box::pin(async move { source.into_id().await.unwrap().quote() })
3939            }),
3940        );
3941        Container {
3942            proc: self.proc.clone(),
3943            selection: query,
3944            graphql_client: self.graphql_client.clone(),
3945        }
3946    }
3947    /// Return a container snapshot with a file added
3948    ///
3949    /// # Arguments
3950    ///
3951    /// * `path` - Path of the new file. Example: "/path/to/new-file.txt"
3952    /// * `source` - File to add
3953    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3954    pub fn with_file_opts<'a>(
3955        &self,
3956        path: impl Into<String>,
3957        source: impl IntoID<FileId>,
3958        opts: ContainerWithFileOpts<'a>,
3959    ) -> Container {
3960        let mut query = self.selection.select("withFile");
3961        query = query.arg("path", path.into());
3962        query = query.arg_lazy(
3963            "source",
3964            Box::new(move || {
3965                let source = source.clone();
3966                Box::pin(async move { source.into_id().await.unwrap().quote() })
3967            }),
3968        );
3969        if let Some(permissions) = opts.permissions {
3970            query = query.arg("permissions", permissions);
3971        }
3972        if let Some(owner) = opts.owner {
3973            query = query.arg("owner", owner);
3974        }
3975        if let Some(expand) = opts.expand {
3976            query = query.arg("expand", expand);
3977        }
3978        Container {
3979            proc: self.proc.clone(),
3980            selection: query,
3981            graphql_client: self.graphql_client.clone(),
3982        }
3983    }
3984    /// Retrieves this container plus the contents of the given files copied to the given path.
3985    ///
3986    /// # Arguments
3987    ///
3988    /// * `path` - Location where copied files should be placed (e.g., "/src").
3989    /// * `sources` - Identifiers of the files to copy.
3990    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3991    pub fn with_files(&self, path: impl Into<String>, sources: Vec<FileId>) -> Container {
3992        let mut query = self.selection.select("withFiles");
3993        query = query.arg("path", path.into());
3994        query = query.arg("sources", sources);
3995        Container {
3996            proc: self.proc.clone(),
3997            selection: query,
3998            graphql_client: self.graphql_client.clone(),
3999        }
4000    }
4001    /// Retrieves this container plus the contents of the given files copied to the given path.
4002    ///
4003    /// # Arguments
4004    ///
4005    /// * `path` - Location where copied files should be placed (e.g., "/src").
4006    /// * `sources` - Identifiers of the files to copy.
4007    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4008    pub fn with_files_opts<'a>(
4009        &self,
4010        path: impl Into<String>,
4011        sources: Vec<FileId>,
4012        opts: ContainerWithFilesOpts<'a>,
4013    ) -> Container {
4014        let mut query = self.selection.select("withFiles");
4015        query = query.arg("path", path.into());
4016        query = query.arg("sources", sources);
4017        if let Some(permissions) = opts.permissions {
4018            query = query.arg("permissions", permissions);
4019        }
4020        if let Some(owner) = opts.owner {
4021            query = query.arg("owner", owner);
4022        }
4023        if let Some(expand) = opts.expand {
4024            query = query.arg("expand", expand);
4025        }
4026        Container {
4027            proc: self.proc.clone(),
4028            selection: query,
4029            graphql_client: self.graphql_client.clone(),
4030        }
4031    }
4032    /// Retrieves this container plus the given label.
4033    ///
4034    /// # Arguments
4035    ///
4036    /// * `name` - The name of the label (e.g., "org.opencontainers.artifact.created").
4037    /// * `value` - The value of the label (e.g., "2023-01-01T00:00:00Z").
4038    pub fn with_label(&self, name: impl Into<String>, value: impl Into<String>) -> Container {
4039        let mut query = self.selection.select("withLabel");
4040        query = query.arg("name", name.into());
4041        query = query.arg("value", value.into());
4042        Container {
4043            proc: self.proc.clone(),
4044            selection: query,
4045            graphql_client: self.graphql_client.clone(),
4046        }
4047    }
4048    /// Retrieves this container plus a cache volume mounted at the given path.
4049    ///
4050    /// # Arguments
4051    ///
4052    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
4053    /// * `cache` - Identifier of the cache volume to mount.
4054    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4055    pub fn with_mounted_cache(
4056        &self,
4057        path: impl Into<String>,
4058        cache: impl IntoID<CacheVolumeId>,
4059    ) -> Container {
4060        let mut query = self.selection.select("withMountedCache");
4061        query = query.arg("path", path.into());
4062        query = query.arg_lazy(
4063            "cache",
4064            Box::new(move || {
4065                let cache = cache.clone();
4066                Box::pin(async move { cache.into_id().await.unwrap().quote() })
4067            }),
4068        );
4069        Container {
4070            proc: self.proc.clone(),
4071            selection: query,
4072            graphql_client: self.graphql_client.clone(),
4073        }
4074    }
4075    /// Retrieves this container plus a cache volume mounted at the given path.
4076    ///
4077    /// # Arguments
4078    ///
4079    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
4080    /// * `cache` - Identifier of the cache volume to mount.
4081    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4082    pub fn with_mounted_cache_opts<'a>(
4083        &self,
4084        path: impl Into<String>,
4085        cache: impl IntoID<CacheVolumeId>,
4086        opts: ContainerWithMountedCacheOpts<'a>,
4087    ) -> Container {
4088        let mut query = self.selection.select("withMountedCache");
4089        query = query.arg("path", path.into());
4090        query = query.arg_lazy(
4091            "cache",
4092            Box::new(move || {
4093                let cache = cache.clone();
4094                Box::pin(async move { cache.into_id().await.unwrap().quote() })
4095            }),
4096        );
4097        if let Some(source) = opts.source {
4098            query = query.arg("source", source);
4099        }
4100        if let Some(sharing) = opts.sharing {
4101            query = query.arg("sharing", sharing);
4102        }
4103        if let Some(owner) = opts.owner {
4104            query = query.arg("owner", owner);
4105        }
4106        if let Some(expand) = opts.expand {
4107            query = query.arg("expand", expand);
4108        }
4109        Container {
4110            proc: self.proc.clone(),
4111            selection: query,
4112            graphql_client: self.graphql_client.clone(),
4113        }
4114    }
4115    /// Retrieves this container plus a directory mounted at the given path.
4116    ///
4117    /// # Arguments
4118    ///
4119    /// * `path` - Location of the mounted directory (e.g., "/mnt/directory").
4120    /// * `source` - Identifier of the mounted directory.
4121    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4122    pub fn with_mounted_directory(
4123        &self,
4124        path: impl Into<String>,
4125        source: impl IntoID<DirectoryId>,
4126    ) -> Container {
4127        let mut query = self.selection.select("withMountedDirectory");
4128        query = query.arg("path", path.into());
4129        query = query.arg_lazy(
4130            "source",
4131            Box::new(move || {
4132                let source = source.clone();
4133                Box::pin(async move { source.into_id().await.unwrap().quote() })
4134            }),
4135        );
4136        Container {
4137            proc: self.proc.clone(),
4138            selection: query,
4139            graphql_client: self.graphql_client.clone(),
4140        }
4141    }
4142    /// Retrieves this container plus a directory mounted at the given path.
4143    ///
4144    /// # Arguments
4145    ///
4146    /// * `path` - Location of the mounted directory (e.g., "/mnt/directory").
4147    /// * `source` - Identifier of the mounted directory.
4148    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4149    pub fn with_mounted_directory_opts<'a>(
4150        &self,
4151        path: impl Into<String>,
4152        source: impl IntoID<DirectoryId>,
4153        opts: ContainerWithMountedDirectoryOpts<'a>,
4154    ) -> Container {
4155        let mut query = self.selection.select("withMountedDirectory");
4156        query = query.arg("path", path.into());
4157        query = query.arg_lazy(
4158            "source",
4159            Box::new(move || {
4160                let source = source.clone();
4161                Box::pin(async move { source.into_id().await.unwrap().quote() })
4162            }),
4163        );
4164        if let Some(owner) = opts.owner {
4165            query = query.arg("owner", owner);
4166        }
4167        if let Some(expand) = opts.expand {
4168            query = query.arg("expand", expand);
4169        }
4170        Container {
4171            proc: self.proc.clone(),
4172            selection: query,
4173            graphql_client: self.graphql_client.clone(),
4174        }
4175    }
4176    /// Retrieves this container plus a file mounted at the given path.
4177    ///
4178    /// # Arguments
4179    ///
4180    /// * `path` - Location of the mounted file (e.g., "/tmp/file.txt").
4181    /// * `source` - Identifier of the mounted file.
4182    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4183    pub fn with_mounted_file(
4184        &self,
4185        path: impl Into<String>,
4186        source: impl IntoID<FileId>,
4187    ) -> Container {
4188        let mut query = self.selection.select("withMountedFile");
4189        query = query.arg("path", path.into());
4190        query = query.arg_lazy(
4191            "source",
4192            Box::new(move || {
4193                let source = source.clone();
4194                Box::pin(async move { source.into_id().await.unwrap().quote() })
4195            }),
4196        );
4197        Container {
4198            proc: self.proc.clone(),
4199            selection: query,
4200            graphql_client: self.graphql_client.clone(),
4201        }
4202    }
4203    /// Retrieves this container plus a file mounted at the given path.
4204    ///
4205    /// # Arguments
4206    ///
4207    /// * `path` - Location of the mounted file (e.g., "/tmp/file.txt").
4208    /// * `source` - Identifier of the mounted file.
4209    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4210    pub fn with_mounted_file_opts<'a>(
4211        &self,
4212        path: impl Into<String>,
4213        source: impl IntoID<FileId>,
4214        opts: ContainerWithMountedFileOpts<'a>,
4215    ) -> Container {
4216        let mut query = self.selection.select("withMountedFile");
4217        query = query.arg("path", path.into());
4218        query = query.arg_lazy(
4219            "source",
4220            Box::new(move || {
4221                let source = source.clone();
4222                Box::pin(async move { source.into_id().await.unwrap().quote() })
4223            }),
4224        );
4225        if let Some(owner) = opts.owner {
4226            query = query.arg("owner", owner);
4227        }
4228        if let Some(expand) = opts.expand {
4229            query = query.arg("expand", expand);
4230        }
4231        Container {
4232            proc: self.proc.clone(),
4233            selection: query,
4234            graphql_client: self.graphql_client.clone(),
4235        }
4236    }
4237    /// Retrieves this container plus a secret mounted into a file at the given path.
4238    ///
4239    /// # Arguments
4240    ///
4241    /// * `path` - Location of the secret file (e.g., "/tmp/secret.txt").
4242    /// * `source` - Identifier of the secret to mount.
4243    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4244    pub fn with_mounted_secret(
4245        &self,
4246        path: impl Into<String>,
4247        source: impl IntoID<SecretId>,
4248    ) -> Container {
4249        let mut query = self.selection.select("withMountedSecret");
4250        query = query.arg("path", path.into());
4251        query = query.arg_lazy(
4252            "source",
4253            Box::new(move || {
4254                let source = source.clone();
4255                Box::pin(async move { source.into_id().await.unwrap().quote() })
4256            }),
4257        );
4258        Container {
4259            proc: self.proc.clone(),
4260            selection: query,
4261            graphql_client: self.graphql_client.clone(),
4262        }
4263    }
4264    /// Retrieves this container plus a secret mounted into a file at the given path.
4265    ///
4266    /// # Arguments
4267    ///
4268    /// * `path` - Location of the secret file (e.g., "/tmp/secret.txt").
4269    /// * `source` - Identifier of the secret to mount.
4270    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4271    pub fn with_mounted_secret_opts<'a>(
4272        &self,
4273        path: impl Into<String>,
4274        source: impl IntoID<SecretId>,
4275        opts: ContainerWithMountedSecretOpts<'a>,
4276    ) -> Container {
4277        let mut query = self.selection.select("withMountedSecret");
4278        query = query.arg("path", path.into());
4279        query = query.arg_lazy(
4280            "source",
4281            Box::new(move || {
4282                let source = source.clone();
4283                Box::pin(async move { source.into_id().await.unwrap().quote() })
4284            }),
4285        );
4286        if let Some(owner) = opts.owner {
4287            query = query.arg("owner", owner);
4288        }
4289        if let Some(mode) = opts.mode {
4290            query = query.arg("mode", mode);
4291        }
4292        if let Some(expand) = opts.expand {
4293            query = query.arg("expand", expand);
4294        }
4295        Container {
4296            proc: self.proc.clone(),
4297            selection: query,
4298            graphql_client: self.graphql_client.clone(),
4299        }
4300    }
4301    /// 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.
4302    ///
4303    /// # Arguments
4304    ///
4305    /// * `path` - Location of the temporary directory (e.g., "/tmp/temp_dir").
4306    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4307    pub fn with_mounted_temp(&self, path: impl Into<String>) -> Container {
4308        let mut query = self.selection.select("withMountedTemp");
4309        query = query.arg("path", path.into());
4310        Container {
4311            proc: self.proc.clone(),
4312            selection: query,
4313            graphql_client: self.graphql_client.clone(),
4314        }
4315    }
4316    /// 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.
4317    ///
4318    /// # Arguments
4319    ///
4320    /// * `path` - Location of the temporary directory (e.g., "/tmp/temp_dir").
4321    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4322    pub fn with_mounted_temp_opts(
4323        &self,
4324        path: impl Into<String>,
4325        opts: ContainerWithMountedTempOpts,
4326    ) -> Container {
4327        let mut query = self.selection.select("withMountedTemp");
4328        query = query.arg("path", path.into());
4329        if let Some(size) = opts.size {
4330            query = query.arg("size", size);
4331        }
4332        if let Some(expand) = opts.expand {
4333            query = query.arg("expand", expand);
4334        }
4335        Container {
4336            proc: self.proc.clone(),
4337            selection: query,
4338            graphql_client: self.graphql_client.clone(),
4339        }
4340    }
4341    /// Return a new container snapshot, with a file added to its filesystem with text content
4342    ///
4343    /// # Arguments
4344    ///
4345    /// * `path` - Path of the new file. May be relative or absolute. Example: "README.md" or "/etc/profile"
4346    /// * `contents` - Contents of the new file. Example: "Hello world!"
4347    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4348    pub fn with_new_file(&self, path: impl Into<String>, contents: impl Into<String>) -> Container {
4349        let mut query = self.selection.select("withNewFile");
4350        query = query.arg("path", path.into());
4351        query = query.arg("contents", contents.into());
4352        Container {
4353            proc: self.proc.clone(),
4354            selection: query,
4355            graphql_client: self.graphql_client.clone(),
4356        }
4357    }
4358    /// Return a new container snapshot, with a file added to its filesystem with text content
4359    ///
4360    /// # Arguments
4361    ///
4362    /// * `path` - Path of the new file. May be relative or absolute. Example: "README.md" or "/etc/profile"
4363    /// * `contents` - Contents of the new file. Example: "Hello world!"
4364    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4365    pub fn with_new_file_opts<'a>(
4366        &self,
4367        path: impl Into<String>,
4368        contents: impl Into<String>,
4369        opts: ContainerWithNewFileOpts<'a>,
4370    ) -> Container {
4371        let mut query = self.selection.select("withNewFile");
4372        query = query.arg("path", path.into());
4373        query = query.arg("contents", contents.into());
4374        if let Some(permissions) = opts.permissions {
4375            query = query.arg("permissions", permissions);
4376        }
4377        if let Some(owner) = opts.owner {
4378            query = query.arg("owner", owner);
4379        }
4380        if let Some(expand) = opts.expand {
4381            query = query.arg("expand", expand);
4382        }
4383        Container {
4384            proc: self.proc.clone(),
4385            selection: query,
4386            graphql_client: self.graphql_client.clone(),
4387        }
4388    }
4389    /// Attach credentials for future publishing to a registry. Use in combination with publish
4390    ///
4391    /// # Arguments
4392    ///
4393    /// * `address` - The image address that needs authentication. Same format as "docker push". Example: "registry.dagger.io/dagger:latest"
4394    /// * `username` - The username to authenticate with. Example: "alice"
4395    /// * `secret` - The API key, password or token to authenticate to this registry
4396    pub fn with_registry_auth(
4397        &self,
4398        address: impl Into<String>,
4399        username: impl Into<String>,
4400        secret: impl IntoID<SecretId>,
4401    ) -> Container {
4402        let mut query = self.selection.select("withRegistryAuth");
4403        query = query.arg("address", address.into());
4404        query = query.arg("username", username.into());
4405        query = query.arg_lazy(
4406            "secret",
4407            Box::new(move || {
4408                let secret = secret.clone();
4409                Box::pin(async move { secret.into_id().await.unwrap().quote() })
4410            }),
4411        );
4412        Container {
4413            proc: self.proc.clone(),
4414            selection: query,
4415            graphql_client: self.graphql_client.clone(),
4416        }
4417    }
4418    /// Change the container's root filesystem. The previous root filesystem will be lost.
4419    ///
4420    /// # Arguments
4421    ///
4422    /// * `directory` - The new root filesystem.
4423    pub fn with_rootfs(&self, directory: impl IntoID<DirectoryId>) -> Container {
4424        let mut query = self.selection.select("withRootfs");
4425        query = query.arg_lazy(
4426            "directory",
4427            Box::new(move || {
4428                let directory = directory.clone();
4429                Box::pin(async move { directory.into_id().await.unwrap().quote() })
4430            }),
4431        );
4432        Container {
4433            proc: self.proc.clone(),
4434            selection: query,
4435            graphql_client: self.graphql_client.clone(),
4436        }
4437    }
4438    /// Set a new environment variable, using a secret value
4439    ///
4440    /// # Arguments
4441    ///
4442    /// * `name` - Name of the secret variable (e.g., "API_SECRET").
4443    /// * `secret` - Identifier of the secret value.
4444    pub fn with_secret_variable(
4445        &self,
4446        name: impl Into<String>,
4447        secret: impl IntoID<SecretId>,
4448    ) -> Container {
4449        let mut query = self.selection.select("withSecretVariable");
4450        query = query.arg("name", name.into());
4451        query = query.arg_lazy(
4452            "secret",
4453            Box::new(move || {
4454                let secret = secret.clone();
4455                Box::pin(async move { secret.into_id().await.unwrap().quote() })
4456            }),
4457        );
4458        Container {
4459            proc: self.proc.clone(),
4460            selection: query,
4461            graphql_client: self.graphql_client.clone(),
4462        }
4463    }
4464    /// Establish a runtime dependency from a container to a network service.
4465    /// The service will be started automatically when needed and detached when it is no longer needed, executing the default command if none is set.
4466    /// The service will be reachable from the container via the provided hostname alias.
4467    /// The service dependency will also convey to any files or directories produced by the container.
4468    ///
4469    /// # Arguments
4470    ///
4471    /// * `alias` - Hostname that will resolve to the target service (only accessible from within this container)
4472    /// * `service` - The target service
4473    pub fn with_service_binding(
4474        &self,
4475        alias: impl Into<String>,
4476        service: impl IntoID<ServiceId>,
4477    ) -> Container {
4478        let mut query = self.selection.select("withServiceBinding");
4479        query = query.arg("alias", alias.into());
4480        query = query.arg_lazy(
4481            "service",
4482            Box::new(move || {
4483                let service = service.clone();
4484                Box::pin(async move { service.into_id().await.unwrap().quote() })
4485            }),
4486        );
4487        Container {
4488            proc: self.proc.clone(),
4489            selection: query,
4490            graphql_client: self.graphql_client.clone(),
4491        }
4492    }
4493    /// Return a snapshot with a symlink
4494    ///
4495    /// # Arguments
4496    ///
4497    /// * `target` - Location of the file or directory to link to (e.g., "/existing/file").
4498    /// * `link_name` - Location where the symbolic link will be created (e.g., "/new-file-link").
4499    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4500    pub fn with_symlink(
4501        &self,
4502        target: impl Into<String>,
4503        link_name: impl Into<String>,
4504    ) -> Container {
4505        let mut query = self.selection.select("withSymlink");
4506        query = query.arg("target", target.into());
4507        query = query.arg("linkName", link_name.into());
4508        Container {
4509            proc: self.proc.clone(),
4510            selection: query,
4511            graphql_client: self.graphql_client.clone(),
4512        }
4513    }
4514    /// Return a snapshot with a symlink
4515    ///
4516    /// # Arguments
4517    ///
4518    /// * `target` - Location of the file or directory to link to (e.g., "/existing/file").
4519    /// * `link_name` - Location where the symbolic link will be created (e.g., "/new-file-link").
4520    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4521    pub fn with_symlink_opts(
4522        &self,
4523        target: impl Into<String>,
4524        link_name: impl Into<String>,
4525        opts: ContainerWithSymlinkOpts,
4526    ) -> Container {
4527        let mut query = self.selection.select("withSymlink");
4528        query = query.arg("target", target.into());
4529        query = query.arg("linkName", link_name.into());
4530        if let Some(expand) = opts.expand {
4531            query = query.arg("expand", expand);
4532        }
4533        Container {
4534            proc: self.proc.clone(),
4535            selection: query,
4536            graphql_client: self.graphql_client.clone(),
4537        }
4538    }
4539    /// Retrieves this container plus a socket forwarded to the given Unix socket path.
4540    ///
4541    /// # Arguments
4542    ///
4543    /// * `path` - Location of the forwarded Unix socket (e.g., "/tmp/socket").
4544    /// * `source` - Identifier of the socket to forward.
4545    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4546    pub fn with_unix_socket(
4547        &self,
4548        path: impl Into<String>,
4549        source: impl IntoID<SocketId>,
4550    ) -> Container {
4551        let mut query = self.selection.select("withUnixSocket");
4552        query = query.arg("path", path.into());
4553        query = query.arg_lazy(
4554            "source",
4555            Box::new(move || {
4556                let source = source.clone();
4557                Box::pin(async move { source.into_id().await.unwrap().quote() })
4558            }),
4559        );
4560        Container {
4561            proc: self.proc.clone(),
4562            selection: query,
4563            graphql_client: self.graphql_client.clone(),
4564        }
4565    }
4566    /// Retrieves this container plus a socket forwarded to the given Unix socket path.
4567    ///
4568    /// # Arguments
4569    ///
4570    /// * `path` - Location of the forwarded Unix socket (e.g., "/tmp/socket").
4571    /// * `source` - Identifier of the socket to forward.
4572    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4573    pub fn with_unix_socket_opts<'a>(
4574        &self,
4575        path: impl Into<String>,
4576        source: impl IntoID<SocketId>,
4577        opts: ContainerWithUnixSocketOpts<'a>,
4578    ) -> Container {
4579        let mut query = self.selection.select("withUnixSocket");
4580        query = query.arg("path", path.into());
4581        query = query.arg_lazy(
4582            "source",
4583            Box::new(move || {
4584                let source = source.clone();
4585                Box::pin(async move { source.into_id().await.unwrap().quote() })
4586            }),
4587        );
4588        if let Some(owner) = opts.owner {
4589            query = query.arg("owner", owner);
4590        }
4591        if let Some(expand) = opts.expand {
4592            query = query.arg("expand", expand);
4593        }
4594        Container {
4595            proc: self.proc.clone(),
4596            selection: query,
4597            graphql_client: self.graphql_client.clone(),
4598        }
4599    }
4600    /// Retrieves this container with a different command user.
4601    ///
4602    /// # Arguments
4603    ///
4604    /// * `name` - The user to set (e.g., "root").
4605    pub fn with_user(&self, name: impl Into<String>) -> Container {
4606        let mut query = self.selection.select("withUser");
4607        query = query.arg("name", name.into());
4608        Container {
4609            proc: self.proc.clone(),
4610            selection: query,
4611            graphql_client: self.graphql_client.clone(),
4612        }
4613    }
4614    /// Change the container's working directory. Like WORKDIR in Dockerfile.
4615    ///
4616    /// # Arguments
4617    ///
4618    /// * `path` - The path to set as the working directory (e.g., "/app").
4619    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4620    pub fn with_workdir(&self, path: impl Into<String>) -> Container {
4621        let mut query = self.selection.select("withWorkdir");
4622        query = query.arg("path", path.into());
4623        Container {
4624            proc: self.proc.clone(),
4625            selection: query,
4626            graphql_client: self.graphql_client.clone(),
4627        }
4628    }
4629    /// Change the container's working directory. Like WORKDIR in Dockerfile.
4630    ///
4631    /// # Arguments
4632    ///
4633    /// * `path` - The path to set as the working directory (e.g., "/app").
4634    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4635    pub fn with_workdir_opts(
4636        &self,
4637        path: impl Into<String>,
4638        opts: ContainerWithWorkdirOpts,
4639    ) -> Container {
4640        let mut query = self.selection.select("withWorkdir");
4641        query = query.arg("path", path.into());
4642        if let Some(expand) = opts.expand {
4643            query = query.arg("expand", expand);
4644        }
4645        Container {
4646            proc: self.proc.clone(),
4647            selection: query,
4648            graphql_client: self.graphql_client.clone(),
4649        }
4650    }
4651    /// Retrieves this container minus the given OCI annotation.
4652    ///
4653    /// # Arguments
4654    ///
4655    /// * `name` - The name of the annotation.
4656    pub fn without_annotation(&self, name: impl Into<String>) -> Container {
4657        let mut query = self.selection.select("withoutAnnotation");
4658        query = query.arg("name", name.into());
4659        Container {
4660            proc: self.proc.clone(),
4661            selection: query,
4662            graphql_client: self.graphql_client.clone(),
4663        }
4664    }
4665    /// Remove the container's default arguments.
4666    pub fn without_default_args(&self) -> Container {
4667        let query = self.selection.select("withoutDefaultArgs");
4668        Container {
4669            proc: self.proc.clone(),
4670            selection: query,
4671            graphql_client: self.graphql_client.clone(),
4672        }
4673    }
4674    /// Return a new container snapshot, with a directory removed from its filesystem
4675    ///
4676    /// # Arguments
4677    ///
4678    /// * `path` - Location of the directory to remove (e.g., ".github/").
4679    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4680    pub fn without_directory(&self, path: impl Into<String>) -> Container {
4681        let mut query = self.selection.select("withoutDirectory");
4682        query = query.arg("path", path.into());
4683        Container {
4684            proc: self.proc.clone(),
4685            selection: query,
4686            graphql_client: self.graphql_client.clone(),
4687        }
4688    }
4689    /// Return a new container snapshot, with a directory removed from its filesystem
4690    ///
4691    /// # Arguments
4692    ///
4693    /// * `path` - Location of the directory to remove (e.g., ".github/").
4694    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4695    pub fn without_directory_opts(
4696        &self,
4697        path: impl Into<String>,
4698        opts: ContainerWithoutDirectoryOpts,
4699    ) -> Container {
4700        let mut query = self.selection.select("withoutDirectory");
4701        query = query.arg("path", path.into());
4702        if let Some(expand) = opts.expand {
4703            query = query.arg("expand", expand);
4704        }
4705        Container {
4706            proc: self.proc.clone(),
4707            selection: query,
4708            graphql_client: self.graphql_client.clone(),
4709        }
4710    }
4711    /// Reset the container's OCI entrypoint.
4712    ///
4713    /// # Arguments
4714    ///
4715    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4716    pub fn without_entrypoint(&self) -> Container {
4717        let query = self.selection.select("withoutEntrypoint");
4718        Container {
4719            proc: self.proc.clone(),
4720            selection: query,
4721            graphql_client: self.graphql_client.clone(),
4722        }
4723    }
4724    /// Reset the container's OCI entrypoint.
4725    ///
4726    /// # Arguments
4727    ///
4728    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4729    pub fn without_entrypoint_opts(&self, opts: ContainerWithoutEntrypointOpts) -> Container {
4730        let mut query = self.selection.select("withoutEntrypoint");
4731        if let Some(keep_default_args) = opts.keep_default_args {
4732            query = query.arg("keepDefaultArgs", keep_default_args);
4733        }
4734        Container {
4735            proc: self.proc.clone(),
4736            selection: query,
4737            graphql_client: self.graphql_client.clone(),
4738        }
4739    }
4740    /// Retrieves this container minus the given environment variable.
4741    ///
4742    /// # Arguments
4743    ///
4744    /// * `name` - The name of the environment variable (e.g., "HOST").
4745    pub fn without_env_variable(&self, name: impl Into<String>) -> Container {
4746        let mut query = self.selection.select("withoutEnvVariable");
4747        query = query.arg("name", name.into());
4748        Container {
4749            proc: self.proc.clone(),
4750            selection: query,
4751            graphql_client: self.graphql_client.clone(),
4752        }
4753    }
4754    /// Unexpose a previously exposed port.
4755    ///
4756    /// # Arguments
4757    ///
4758    /// * `port` - Port number to unexpose
4759    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4760    pub fn without_exposed_port(&self, port: isize) -> Container {
4761        let mut query = self.selection.select("withoutExposedPort");
4762        query = query.arg("port", port);
4763        Container {
4764            proc: self.proc.clone(),
4765            selection: query,
4766            graphql_client: self.graphql_client.clone(),
4767        }
4768    }
4769    /// Unexpose a previously exposed port.
4770    ///
4771    /// # Arguments
4772    ///
4773    /// * `port` - Port number to unexpose
4774    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4775    pub fn without_exposed_port_opts(
4776        &self,
4777        port: isize,
4778        opts: ContainerWithoutExposedPortOpts,
4779    ) -> Container {
4780        let mut query = self.selection.select("withoutExposedPort");
4781        query = query.arg("port", port);
4782        if let Some(protocol) = opts.protocol {
4783            query = query.arg("protocol", protocol);
4784        }
4785        Container {
4786            proc: self.proc.clone(),
4787            selection: query,
4788            graphql_client: self.graphql_client.clone(),
4789        }
4790    }
4791    /// Retrieves this container with the file at the given path removed.
4792    ///
4793    /// # Arguments
4794    ///
4795    /// * `path` - Location of the file to remove (e.g., "/file.txt").
4796    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4797    pub fn without_file(&self, path: impl Into<String>) -> Container {
4798        let mut query = self.selection.select("withoutFile");
4799        query = query.arg("path", path.into());
4800        Container {
4801            proc: self.proc.clone(),
4802            selection: query,
4803            graphql_client: self.graphql_client.clone(),
4804        }
4805    }
4806    /// Retrieves this container with the file at the given path removed.
4807    ///
4808    /// # Arguments
4809    ///
4810    /// * `path` - Location of the file to remove (e.g., "/file.txt").
4811    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4812    pub fn without_file_opts(
4813        &self,
4814        path: impl Into<String>,
4815        opts: ContainerWithoutFileOpts,
4816    ) -> Container {
4817        let mut query = self.selection.select("withoutFile");
4818        query = query.arg("path", path.into());
4819        if let Some(expand) = opts.expand {
4820            query = query.arg("expand", expand);
4821        }
4822        Container {
4823            proc: self.proc.clone(),
4824            selection: query,
4825            graphql_client: self.graphql_client.clone(),
4826        }
4827    }
4828    /// Return a new container spanshot with specified files removed
4829    ///
4830    /// # Arguments
4831    ///
4832    /// * `paths` - Paths of the files to remove. Example: ["foo.txt, "/root/.ssh/config"
4833    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4834    pub fn without_files(&self, paths: Vec<impl Into<String>>) -> Container {
4835        let mut query = self.selection.select("withoutFiles");
4836        query = query.arg(
4837            "paths",
4838            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
4839        );
4840        Container {
4841            proc: self.proc.clone(),
4842            selection: query,
4843            graphql_client: self.graphql_client.clone(),
4844        }
4845    }
4846    /// Return a new container spanshot with specified files removed
4847    ///
4848    /// # Arguments
4849    ///
4850    /// * `paths` - Paths of the files to remove. Example: ["foo.txt, "/root/.ssh/config"
4851    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4852    pub fn without_files_opts(
4853        &self,
4854        paths: Vec<impl Into<String>>,
4855        opts: ContainerWithoutFilesOpts,
4856    ) -> Container {
4857        let mut query = self.selection.select("withoutFiles");
4858        query = query.arg(
4859            "paths",
4860            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
4861        );
4862        if let Some(expand) = opts.expand {
4863            query = query.arg("expand", expand);
4864        }
4865        Container {
4866            proc: self.proc.clone(),
4867            selection: query,
4868            graphql_client: self.graphql_client.clone(),
4869        }
4870    }
4871    /// Retrieves this container minus the given environment label.
4872    ///
4873    /// # Arguments
4874    ///
4875    /// * `name` - The name of the label to remove (e.g., "org.opencontainers.artifact.created").
4876    pub fn without_label(&self, name: impl Into<String>) -> Container {
4877        let mut query = self.selection.select("withoutLabel");
4878        query = query.arg("name", name.into());
4879        Container {
4880            proc: self.proc.clone(),
4881            selection: query,
4882            graphql_client: self.graphql_client.clone(),
4883        }
4884    }
4885    /// Retrieves this container after unmounting everything at the given path.
4886    ///
4887    /// # Arguments
4888    ///
4889    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
4890    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4891    pub fn without_mount(&self, path: impl Into<String>) -> Container {
4892        let mut query = self.selection.select("withoutMount");
4893        query = query.arg("path", path.into());
4894        Container {
4895            proc: self.proc.clone(),
4896            selection: query,
4897            graphql_client: self.graphql_client.clone(),
4898        }
4899    }
4900    /// Retrieves this container after unmounting everything at the given path.
4901    ///
4902    /// # Arguments
4903    ///
4904    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
4905    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4906    pub fn without_mount_opts(
4907        &self,
4908        path: impl Into<String>,
4909        opts: ContainerWithoutMountOpts,
4910    ) -> Container {
4911        let mut query = self.selection.select("withoutMount");
4912        query = query.arg("path", path.into());
4913        if let Some(expand) = opts.expand {
4914            query = query.arg("expand", expand);
4915        }
4916        Container {
4917            proc: self.proc.clone(),
4918            selection: query,
4919            graphql_client: self.graphql_client.clone(),
4920        }
4921    }
4922    /// Retrieves this container without the registry authentication of a given address.
4923    ///
4924    /// # Arguments
4925    ///
4926    /// * `address` - Registry's address to remove the authentication from.
4927    ///
4928    /// Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
4929    pub fn without_registry_auth(&self, address: impl Into<String>) -> Container {
4930        let mut query = self.selection.select("withoutRegistryAuth");
4931        query = query.arg("address", address.into());
4932        Container {
4933            proc: self.proc.clone(),
4934            selection: query,
4935            graphql_client: self.graphql_client.clone(),
4936        }
4937    }
4938    /// Retrieves this container minus the given environment variable containing the secret.
4939    ///
4940    /// # Arguments
4941    ///
4942    /// * `name` - The name of the environment variable (e.g., "HOST").
4943    pub fn without_secret_variable(&self, name: impl Into<String>) -> Container {
4944        let mut query = self.selection.select("withoutSecretVariable");
4945        query = query.arg("name", name.into());
4946        Container {
4947            proc: self.proc.clone(),
4948            selection: query,
4949            graphql_client: self.graphql_client.clone(),
4950        }
4951    }
4952    /// Retrieves this container with a previously added Unix socket removed.
4953    ///
4954    /// # Arguments
4955    ///
4956    /// * `path` - Location of the socket to remove (e.g., "/tmp/socket").
4957    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4958    pub fn without_unix_socket(&self, path: impl Into<String>) -> Container {
4959        let mut query = self.selection.select("withoutUnixSocket");
4960        query = query.arg("path", path.into());
4961        Container {
4962            proc: self.proc.clone(),
4963            selection: query,
4964            graphql_client: self.graphql_client.clone(),
4965        }
4966    }
4967    /// Retrieves this container with a previously added Unix socket removed.
4968    ///
4969    /// # Arguments
4970    ///
4971    /// * `path` - Location of the socket to remove (e.g., "/tmp/socket").
4972    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4973    pub fn without_unix_socket_opts(
4974        &self,
4975        path: impl Into<String>,
4976        opts: ContainerWithoutUnixSocketOpts,
4977    ) -> Container {
4978        let mut query = self.selection.select("withoutUnixSocket");
4979        query = query.arg("path", path.into());
4980        if let Some(expand) = opts.expand {
4981            query = query.arg("expand", expand);
4982        }
4983        Container {
4984            proc: self.proc.clone(),
4985            selection: query,
4986            graphql_client: self.graphql_client.clone(),
4987        }
4988    }
4989    /// Retrieves this container with an unset command user.
4990    /// Should default to root.
4991    pub fn without_user(&self) -> Container {
4992        let query = self.selection.select("withoutUser");
4993        Container {
4994            proc: self.proc.clone(),
4995            selection: query,
4996            graphql_client: self.graphql_client.clone(),
4997        }
4998    }
4999    /// Unset the container's working directory.
5000    /// Should default to "/".
5001    pub fn without_workdir(&self) -> Container {
5002        let query = self.selection.select("withoutWorkdir");
5003        Container {
5004            proc: self.proc.clone(),
5005            selection: query,
5006            graphql_client: self.graphql_client.clone(),
5007        }
5008    }
5009    /// Retrieves the working directory for all commands.
5010    pub async fn workdir(&self) -> Result<String, DaggerError> {
5011        let query = self.selection.select("workdir");
5012        query.execute(self.graphql_client.clone()).await
5013    }
5014}
5015#[derive(Clone)]
5016pub struct CurrentModule {
5017    pub proc: Option<Arc<DaggerSessionProc>>,
5018    pub selection: Selection,
5019    pub graphql_client: DynGraphQLClient,
5020}
5021#[derive(Builder, Debug, PartialEq)]
5022pub struct CurrentModuleWorkdirOpts<'a> {
5023    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
5024    #[builder(setter(into, strip_option), default)]
5025    pub exclude: Option<Vec<&'a str>>,
5026    /// Apply .gitignore filter rules inside the directory
5027    #[builder(setter(into, strip_option), default)]
5028    pub gitignore: Option<bool>,
5029    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
5030    #[builder(setter(into, strip_option), default)]
5031    pub include: Option<Vec<&'a str>>,
5032}
5033impl CurrentModule {
5034    /// The dependencies of the module.
5035    pub fn dependencies(&self) -> Vec<Module> {
5036        let query = self.selection.select("dependencies");
5037        vec![Module {
5038            proc: self.proc.clone(),
5039            selection: query,
5040            graphql_client: self.graphql_client.clone(),
5041        }]
5042    }
5043    /// The generated files and directories made on top of the module source's context directory.
5044    pub fn generated_context_directory(&self) -> Directory {
5045        let query = self.selection.select("generatedContextDirectory");
5046        Directory {
5047            proc: self.proc.clone(),
5048            selection: query,
5049            graphql_client: self.graphql_client.clone(),
5050        }
5051    }
5052    /// A unique identifier for this CurrentModule.
5053    pub async fn id(&self) -> Result<CurrentModuleId, DaggerError> {
5054        let query = self.selection.select("id");
5055        query.execute(self.graphql_client.clone()).await
5056    }
5057    /// The name of the module being executed in
5058    pub async fn name(&self) -> Result<String, DaggerError> {
5059        let query = self.selection.select("name");
5060        query.execute(self.graphql_client.clone()).await
5061    }
5062    /// The directory containing the module's source code loaded into the engine (plus any generated code that may have been created).
5063    pub fn source(&self) -> Directory {
5064        let query = self.selection.select("source");
5065        Directory {
5066            proc: self.proc.clone(),
5067            selection: query,
5068            graphql_client: self.graphql_client.clone(),
5069        }
5070    }
5071    /// Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.
5072    ///
5073    /// # Arguments
5074    ///
5075    /// * `path` - Location of the directory to access (e.g., ".").
5076    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5077    pub fn workdir(&self, path: impl Into<String>) -> Directory {
5078        let mut query = self.selection.select("workdir");
5079        query = query.arg("path", path.into());
5080        Directory {
5081            proc: self.proc.clone(),
5082            selection: query,
5083            graphql_client: self.graphql_client.clone(),
5084        }
5085    }
5086    /// Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.
5087    ///
5088    /// # Arguments
5089    ///
5090    /// * `path` - Location of the directory to access (e.g., ".").
5091    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5092    pub fn workdir_opts<'a>(
5093        &self,
5094        path: impl Into<String>,
5095        opts: CurrentModuleWorkdirOpts<'a>,
5096    ) -> Directory {
5097        let mut query = self.selection.select("workdir");
5098        query = query.arg("path", path.into());
5099        if let Some(exclude) = opts.exclude {
5100            query = query.arg("exclude", exclude);
5101        }
5102        if let Some(include) = opts.include {
5103            query = query.arg("include", include);
5104        }
5105        if let Some(gitignore) = opts.gitignore {
5106            query = query.arg("gitignore", gitignore);
5107        }
5108        Directory {
5109            proc: self.proc.clone(),
5110            selection: query,
5111            graphql_client: self.graphql_client.clone(),
5112        }
5113    }
5114    /// 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.
5115    ///
5116    /// # Arguments
5117    ///
5118    /// * `path` - Location of the file to retrieve (e.g., "README.md").
5119    pub fn workdir_file(&self, path: impl Into<String>) -> File {
5120        let mut query = self.selection.select("workdirFile");
5121        query = query.arg("path", path.into());
5122        File {
5123            proc: self.proc.clone(),
5124            selection: query,
5125            graphql_client: self.graphql_client.clone(),
5126        }
5127    }
5128}
5129#[derive(Clone)]
5130pub struct Directory {
5131    pub proc: Option<Arc<DaggerSessionProc>>,
5132    pub selection: Selection,
5133    pub graphql_client: DynGraphQLClient,
5134}
5135#[derive(Builder, Debug, PartialEq)]
5136pub struct DirectoryAsModuleOpts<'a> {
5137    /// An optional subpath of the directory which contains the module's configuration file.
5138    /// If not set, the module source code is loaded from the root of the directory.
5139    #[builder(setter(into, strip_option), default)]
5140    pub source_root_path: Option<&'a str>,
5141}
5142#[derive(Builder, Debug, PartialEq)]
5143pub struct DirectoryAsModuleSourceOpts<'a> {
5144    /// An optional subpath of the directory which contains the module's configuration file.
5145    /// If not set, the module source code is loaded from the root of the directory.
5146    #[builder(setter(into, strip_option), default)]
5147    pub source_root_path: Option<&'a str>,
5148}
5149#[derive(Builder, Debug, PartialEq)]
5150pub struct DirectoryDockerBuildOpts<'a> {
5151    /// Build arguments to use in the build.
5152    #[builder(setter(into, strip_option), default)]
5153    pub build_args: Option<Vec<BuildArg>>,
5154    /// Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
5155    #[builder(setter(into, strip_option), default)]
5156    pub dockerfile: Option<&'a str>,
5157    /// If set, skip the automatic init process injected into containers created by RUN statements.
5158    /// 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.
5159    #[builder(setter(into, strip_option), default)]
5160    pub no_init: Option<bool>,
5161    /// The platform to build.
5162    #[builder(setter(into, strip_option), default)]
5163    pub platform: Option<Platform>,
5164    /// Secrets to pass to the build.
5165    /// They will be mounted at /run/secrets/[secret-name].
5166    #[builder(setter(into, strip_option), default)]
5167    pub secrets: Option<Vec<SecretId>>,
5168    /// Target build stage to build.
5169    #[builder(setter(into, strip_option), default)]
5170    pub target: Option<&'a str>,
5171}
5172#[derive(Builder, Debug, PartialEq)]
5173pub struct DirectoryEntriesOpts<'a> {
5174    /// Location of the directory to look at (e.g., "/src").
5175    #[builder(setter(into, strip_option), default)]
5176    pub path: Option<&'a str>,
5177}
5178#[derive(Builder, Debug, PartialEq)]
5179pub struct DirectoryExistsOpts {
5180    /// If specified, do not follow symlinks.
5181    #[builder(setter(into, strip_option), default)]
5182    pub do_not_follow_symlinks: Option<bool>,
5183    /// If specified, also validate the type of file (e.g. "REGULAR_TYPE", "DIRECTORY_TYPE", or "SYMLINK_TYPE").
5184    #[builder(setter(into, strip_option), default)]
5185    pub expected_type: Option<ExistsType>,
5186}
5187#[derive(Builder, Debug, PartialEq)]
5188pub struct DirectoryExportOpts {
5189    /// 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.
5190    #[builder(setter(into, strip_option), default)]
5191    pub wipe: Option<bool>,
5192}
5193#[derive(Builder, Debug, PartialEq)]
5194pub struct DirectoryFilterOpts<'a> {
5195    /// If set, paths matching one of these glob patterns is excluded from the new snapshot. Example: ["node_modules/", ".git*", ".env"]
5196    #[builder(setter(into, strip_option), default)]
5197    pub exclude: Option<Vec<&'a str>>,
5198    /// If set, apply .gitignore rules when filtering the directory.
5199    #[builder(setter(into, strip_option), default)]
5200    pub gitignore: Option<bool>,
5201    /// If set, only paths matching one of these glob patterns is included in the new snapshot. Example: (e.g., ["app/", "package.*"]).
5202    #[builder(setter(into, strip_option), default)]
5203    pub include: Option<Vec<&'a str>>,
5204}
5205#[derive(Builder, Debug, PartialEq)]
5206pub struct DirectorySearchOpts<'a> {
5207    /// Allow the . pattern to match newlines in multiline mode.
5208    #[builder(setter(into, strip_option), default)]
5209    pub dotall: Option<bool>,
5210    /// Only return matching files, not lines and content
5211    #[builder(setter(into, strip_option), default)]
5212    pub files_only: Option<bool>,
5213    /// Glob patterns to match (e.g., "*.md")
5214    #[builder(setter(into, strip_option), default)]
5215    pub globs: Option<Vec<&'a str>>,
5216    /// Enable case-insensitive matching.
5217    #[builder(setter(into, strip_option), default)]
5218    pub insensitive: Option<bool>,
5219    /// Limit the number of results to return
5220    #[builder(setter(into, strip_option), default)]
5221    pub limit: Option<isize>,
5222    /// Interpret the pattern as a literal string instead of a regular expression.
5223    #[builder(setter(into, strip_option), default)]
5224    pub literal: Option<bool>,
5225    /// Enable searching across multiple lines.
5226    #[builder(setter(into, strip_option), default)]
5227    pub multiline: Option<bool>,
5228    /// Directory or file paths to search
5229    #[builder(setter(into, strip_option), default)]
5230    pub paths: Option<Vec<&'a str>>,
5231    /// Skip hidden files (files starting with .).
5232    #[builder(setter(into, strip_option), default)]
5233    pub skip_hidden: Option<bool>,
5234    /// Honor .gitignore, .ignore, and .rgignore files.
5235    #[builder(setter(into, strip_option), default)]
5236    pub skip_ignored: Option<bool>,
5237}
5238#[derive(Builder, Debug, PartialEq)]
5239pub struct DirectoryTerminalOpts<'a> {
5240    /// If set, override the container's default terminal command and invoke these command arguments instead.
5241    #[builder(setter(into, strip_option), default)]
5242    pub cmd: Option<Vec<&'a str>>,
5243    /// If set, override the default container used for the terminal.
5244    #[builder(setter(into, strip_option), default)]
5245    pub container: Option<ContainerId>,
5246    /// Provides Dagger access to the executed command.
5247    #[builder(setter(into, strip_option), default)]
5248    pub experimental_privileged_nesting: Option<bool>,
5249    /// 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.
5250    #[builder(setter(into, strip_option), default)]
5251    pub insecure_root_capabilities: Option<bool>,
5252}
5253#[derive(Builder, Debug, PartialEq)]
5254pub struct DirectoryWithDirectoryOpts<'a> {
5255    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
5256    #[builder(setter(into, strip_option), default)]
5257    pub exclude: Option<Vec<&'a str>>,
5258    /// Apply .gitignore filter rules inside the directory
5259    #[builder(setter(into, strip_option), default)]
5260    pub gitignore: Option<bool>,
5261    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
5262    #[builder(setter(into, strip_option), default)]
5263    pub include: Option<Vec<&'a str>>,
5264    /// A user:group to set for the copied directory and its contents.
5265    /// The user and group must be an ID (1000:1000), not a name (foo:bar).
5266    /// If the group is omitted, it defaults to the same as the user.
5267    #[builder(setter(into, strip_option), default)]
5268    pub owner: Option<&'a str>,
5269}
5270#[derive(Builder, Debug, PartialEq)]
5271pub struct DirectoryWithFileOpts<'a> {
5272    /// A user:group to set for the copied directory and its contents.
5273    /// The user and group must be an ID (1000:1000), not a name (foo:bar).
5274    /// If the group is omitted, it defaults to the same as the user.
5275    #[builder(setter(into, strip_option), default)]
5276    pub owner: Option<&'a str>,
5277    /// Permission given to the copied file (e.g., 0600).
5278    #[builder(setter(into, strip_option), default)]
5279    pub permissions: Option<isize>,
5280}
5281#[derive(Builder, Debug, PartialEq)]
5282pub struct DirectoryWithFilesOpts {
5283    /// Permission given to the copied files (e.g., 0600).
5284    #[builder(setter(into, strip_option), default)]
5285    pub permissions: Option<isize>,
5286}
5287#[derive(Builder, Debug, PartialEq)]
5288pub struct DirectoryWithNewDirectoryOpts {
5289    /// Permission granted to the created directory (e.g., 0777).
5290    #[builder(setter(into, strip_option), default)]
5291    pub permissions: Option<isize>,
5292}
5293#[derive(Builder, Debug, PartialEq)]
5294pub struct DirectoryWithNewFileOpts {
5295    /// Permissions of the new file. Example: 0600
5296    #[builder(setter(into, strip_option), default)]
5297    pub permissions: Option<isize>,
5298}
5299impl Directory {
5300    /// Converts this directory to a local git repository
5301    pub fn as_git(&self) -> GitRepository {
5302        let query = self.selection.select("asGit");
5303        GitRepository {
5304            proc: self.proc.clone(),
5305            selection: query,
5306            graphql_client: self.graphql_client.clone(),
5307        }
5308    }
5309    /// Load the directory as a Dagger module source
5310    ///
5311    /// # Arguments
5312    ///
5313    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5314    pub fn as_module(&self) -> Module {
5315        let query = self.selection.select("asModule");
5316        Module {
5317            proc: self.proc.clone(),
5318            selection: query,
5319            graphql_client: self.graphql_client.clone(),
5320        }
5321    }
5322    /// Load the directory as a Dagger module source
5323    ///
5324    /// # Arguments
5325    ///
5326    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5327    pub fn as_module_opts<'a>(&self, opts: DirectoryAsModuleOpts<'a>) -> Module {
5328        let mut query = self.selection.select("asModule");
5329        if let Some(source_root_path) = opts.source_root_path {
5330            query = query.arg("sourceRootPath", source_root_path);
5331        }
5332        Module {
5333            proc: self.proc.clone(),
5334            selection: query,
5335            graphql_client: self.graphql_client.clone(),
5336        }
5337    }
5338    /// Load the directory as a Dagger module source
5339    ///
5340    /// # Arguments
5341    ///
5342    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5343    pub fn as_module_source(&self) -> ModuleSource {
5344        let query = self.selection.select("asModuleSource");
5345        ModuleSource {
5346            proc: self.proc.clone(),
5347            selection: query,
5348            graphql_client: self.graphql_client.clone(),
5349        }
5350    }
5351    /// Load the directory as a Dagger module source
5352    ///
5353    /// # Arguments
5354    ///
5355    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5356    pub fn as_module_source_opts<'a>(&self, opts: DirectoryAsModuleSourceOpts<'a>) -> ModuleSource {
5357        let mut query = self.selection.select("asModuleSource");
5358        if let Some(source_root_path) = opts.source_root_path {
5359            query = query.arg("sourceRootPath", source_root_path);
5360        }
5361        ModuleSource {
5362            proc: self.proc.clone(),
5363            selection: query,
5364            graphql_client: self.graphql_client.clone(),
5365        }
5366    }
5367    /// Return the difference between this directory and another directory, typically an older snapshot.
5368    /// The difference is encoded as a changeset, which also tracks removed files, and can be applied to other directories.
5369    ///
5370    /// # Arguments
5371    ///
5372    /// * `from` - The base directory snapshot to compare against
5373    pub fn changes(&self, from: impl IntoID<DirectoryId>) -> Changeset {
5374        let mut query = self.selection.select("changes");
5375        query = query.arg_lazy(
5376            "from",
5377            Box::new(move || {
5378                let from = from.clone();
5379                Box::pin(async move { from.into_id().await.unwrap().quote() })
5380            }),
5381        );
5382        Changeset {
5383            proc: self.proc.clone(),
5384            selection: query,
5385            graphql_client: self.graphql_client.clone(),
5386        }
5387    }
5388    /// Change the owner of the directory contents recursively.
5389    ///
5390    /// # Arguments
5391    ///
5392    /// * `path` - Path of the directory to change ownership of (e.g., "/").
5393    /// * `owner` - A user:group to set for the mounted directory and its contents.
5394    ///
5395    /// The user and group must be an ID (1000:1000), not a name (foo:bar).
5396    ///
5397    /// If the group is omitted, it defaults to the same as the user.
5398    pub fn chown(&self, path: impl Into<String>, owner: impl Into<String>) -> Directory {
5399        let mut query = self.selection.select("chown");
5400        query = query.arg("path", path.into());
5401        query = query.arg("owner", owner.into());
5402        Directory {
5403            proc: self.proc.clone(),
5404            selection: query,
5405            graphql_client: self.graphql_client.clone(),
5406        }
5407    }
5408    /// Return the difference between this directory and an another directory. The difference is encoded as a directory.
5409    ///
5410    /// # Arguments
5411    ///
5412    /// * `other` - The directory to compare against
5413    pub fn diff(&self, other: impl IntoID<DirectoryId>) -> Directory {
5414        let mut query = self.selection.select("diff");
5415        query = query.arg_lazy(
5416            "other",
5417            Box::new(move || {
5418                let other = other.clone();
5419                Box::pin(async move { other.into_id().await.unwrap().quote() })
5420            }),
5421        );
5422        Directory {
5423            proc: self.proc.clone(),
5424            selection: query,
5425            graphql_client: self.graphql_client.clone(),
5426        }
5427    }
5428    /// 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.
5429    pub async fn digest(&self) -> Result<String, DaggerError> {
5430        let query = self.selection.select("digest");
5431        query.execute(self.graphql_client.clone()).await
5432    }
5433    /// Retrieves a directory at the given path.
5434    ///
5435    /// # Arguments
5436    ///
5437    /// * `path` - Location of the directory to retrieve. Example: "/src"
5438    pub fn directory(&self, path: impl Into<String>) -> Directory {
5439        let mut query = self.selection.select("directory");
5440        query = query.arg("path", path.into());
5441        Directory {
5442            proc: self.proc.clone(),
5443            selection: query,
5444            graphql_client: self.graphql_client.clone(),
5445        }
5446    }
5447    /// 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.
5448    ///
5449    /// # Arguments
5450    ///
5451    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5452    pub fn docker_build(&self) -> Container {
5453        let query = self.selection.select("dockerBuild");
5454        Container {
5455            proc: self.proc.clone(),
5456            selection: query,
5457            graphql_client: self.graphql_client.clone(),
5458        }
5459    }
5460    /// 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.
5461    ///
5462    /// # Arguments
5463    ///
5464    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5465    pub fn docker_build_opts<'a>(&self, opts: DirectoryDockerBuildOpts<'a>) -> Container {
5466        let mut query = self.selection.select("dockerBuild");
5467        if let Some(dockerfile) = opts.dockerfile {
5468            query = query.arg("dockerfile", dockerfile);
5469        }
5470        if let Some(platform) = opts.platform {
5471            query = query.arg("platform", platform);
5472        }
5473        if let Some(build_args) = opts.build_args {
5474            query = query.arg("buildArgs", build_args);
5475        }
5476        if let Some(target) = opts.target {
5477            query = query.arg("target", target);
5478        }
5479        if let Some(secrets) = opts.secrets {
5480            query = query.arg("secrets", secrets);
5481        }
5482        if let Some(no_init) = opts.no_init {
5483            query = query.arg("noInit", no_init);
5484        }
5485        Container {
5486            proc: self.proc.clone(),
5487            selection: query,
5488            graphql_client: self.graphql_client.clone(),
5489        }
5490    }
5491    /// Returns a list of files and directories at the given path.
5492    ///
5493    /// # Arguments
5494    ///
5495    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5496    pub async fn entries(&self) -> Result<Vec<String>, DaggerError> {
5497        let query = self.selection.select("entries");
5498        query.execute(self.graphql_client.clone()).await
5499    }
5500    /// Returns a list of files and directories at the given path.
5501    ///
5502    /// # Arguments
5503    ///
5504    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5505    pub async fn entries_opts<'a>(
5506        &self,
5507        opts: DirectoryEntriesOpts<'a>,
5508    ) -> Result<Vec<String>, DaggerError> {
5509        let mut query = self.selection.select("entries");
5510        if let Some(path) = opts.path {
5511            query = query.arg("path", path);
5512        }
5513        query.execute(self.graphql_client.clone()).await
5514    }
5515    /// check if a file or directory exists
5516    ///
5517    /// # Arguments
5518    ///
5519    /// * `path` - Path to check (e.g., "/file.txt").
5520    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5521    pub async fn exists(&self, path: impl Into<String>) -> Result<bool, DaggerError> {
5522        let mut query = self.selection.select("exists");
5523        query = query.arg("path", path.into());
5524        query.execute(self.graphql_client.clone()).await
5525    }
5526    /// check if a file or directory exists
5527    ///
5528    /// # Arguments
5529    ///
5530    /// * `path` - Path to check (e.g., "/file.txt").
5531    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5532    pub async fn exists_opts(
5533        &self,
5534        path: impl Into<String>,
5535        opts: DirectoryExistsOpts,
5536    ) -> Result<bool, DaggerError> {
5537        let mut query = self.selection.select("exists");
5538        query = query.arg("path", path.into());
5539        if let Some(expected_type) = opts.expected_type {
5540            query = query.arg("expectedType", expected_type);
5541        }
5542        if let Some(do_not_follow_symlinks) = opts.do_not_follow_symlinks {
5543            query = query.arg("doNotFollowSymlinks", do_not_follow_symlinks);
5544        }
5545        query.execute(self.graphql_client.clone()).await
5546    }
5547    /// Writes the contents of the directory to a path on the host.
5548    ///
5549    /// # Arguments
5550    ///
5551    /// * `path` - Location of the copied directory (e.g., "logs/").
5552    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5553    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
5554        let mut query = self.selection.select("export");
5555        query = query.arg("path", path.into());
5556        query.execute(self.graphql_client.clone()).await
5557    }
5558    /// Writes the contents of the directory to a path on the host.
5559    ///
5560    /// # Arguments
5561    ///
5562    /// * `path` - Location of the copied directory (e.g., "logs/").
5563    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5564    pub async fn export_opts(
5565        &self,
5566        path: impl Into<String>,
5567        opts: DirectoryExportOpts,
5568    ) -> Result<String, DaggerError> {
5569        let mut query = self.selection.select("export");
5570        query = query.arg("path", path.into());
5571        if let Some(wipe) = opts.wipe {
5572            query = query.arg("wipe", wipe);
5573        }
5574        query.execute(self.graphql_client.clone()).await
5575    }
5576    /// Retrieve a file at the given path.
5577    ///
5578    /// # Arguments
5579    ///
5580    /// * `path` - Location of the file to retrieve (e.g., "README.md").
5581    pub fn file(&self, path: impl Into<String>) -> File {
5582        let mut query = self.selection.select("file");
5583        query = query.arg("path", path.into());
5584        File {
5585            proc: self.proc.clone(),
5586            selection: query,
5587            graphql_client: self.graphql_client.clone(),
5588        }
5589    }
5590    /// Return a snapshot with some paths included or excluded
5591    ///
5592    /// # Arguments
5593    ///
5594    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5595    pub fn filter(&self) -> Directory {
5596        let query = self.selection.select("filter");
5597        Directory {
5598            proc: self.proc.clone(),
5599            selection: query,
5600            graphql_client: self.graphql_client.clone(),
5601        }
5602    }
5603    /// Return a snapshot with some paths included or excluded
5604    ///
5605    /// # Arguments
5606    ///
5607    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5608    pub fn filter_opts<'a>(&self, opts: DirectoryFilterOpts<'a>) -> Directory {
5609        let mut query = self.selection.select("filter");
5610        if let Some(exclude) = opts.exclude {
5611            query = query.arg("exclude", exclude);
5612        }
5613        if let Some(include) = opts.include {
5614            query = query.arg("include", include);
5615        }
5616        if let Some(gitignore) = opts.gitignore {
5617            query = query.arg("gitignore", gitignore);
5618        }
5619        Directory {
5620            proc: self.proc.clone(),
5621            selection: query,
5622            graphql_client: self.graphql_client.clone(),
5623        }
5624    }
5625    /// Search up the directory tree for a file or directory, and return its path. If no match, return null
5626    ///
5627    /// # Arguments
5628    ///
5629    /// * `name` - The name of the file or directory to search for
5630    /// * `start` - The path to start the search from
5631    pub async fn find_up(
5632        &self,
5633        name: impl Into<String>,
5634        start: impl Into<String>,
5635    ) -> Result<String, DaggerError> {
5636        let mut query = self.selection.select("findUp");
5637        query = query.arg("name", name.into());
5638        query = query.arg("start", start.into());
5639        query.execute(self.graphql_client.clone()).await
5640    }
5641    /// Returns a list of files and directories that matche the given pattern.
5642    ///
5643    /// # Arguments
5644    ///
5645    /// * `pattern` - Pattern to match (e.g., "*.md").
5646    pub async fn glob(&self, pattern: impl Into<String>) -> Result<Vec<String>, DaggerError> {
5647        let mut query = self.selection.select("glob");
5648        query = query.arg("pattern", pattern.into());
5649        query.execute(self.graphql_client.clone()).await
5650    }
5651    /// A unique identifier for this Directory.
5652    pub async fn id(&self) -> Result<DirectoryId, DaggerError> {
5653        let query = self.selection.select("id");
5654        query.execute(self.graphql_client.clone()).await
5655    }
5656    /// Returns the name of the directory.
5657    pub async fn name(&self) -> Result<String, DaggerError> {
5658        let query = self.selection.select("name");
5659        query.execute(self.graphql_client.clone()).await
5660    }
5661    /// Searches for content matching the given regular expression or literal string.
5662    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
5663    ///
5664    /// # Arguments
5665    ///
5666    /// * `pattern` - The text to match.
5667    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5668    pub fn search(&self, pattern: impl Into<String>) -> Vec<SearchResult> {
5669        let mut query = self.selection.select("search");
5670        query = query.arg("pattern", pattern.into());
5671        vec![SearchResult {
5672            proc: self.proc.clone(),
5673            selection: query,
5674            graphql_client: self.graphql_client.clone(),
5675        }]
5676    }
5677    /// Searches for content matching the given regular expression or literal string.
5678    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
5679    ///
5680    /// # Arguments
5681    ///
5682    /// * `pattern` - The text to match.
5683    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5684    pub fn search_opts<'a>(
5685        &self,
5686        pattern: impl Into<String>,
5687        opts: DirectorySearchOpts<'a>,
5688    ) -> Vec<SearchResult> {
5689        let mut query = self.selection.select("search");
5690        query = query.arg("pattern", pattern.into());
5691        if let Some(paths) = opts.paths {
5692            query = query.arg("paths", paths);
5693        }
5694        if let Some(globs) = opts.globs {
5695            query = query.arg("globs", globs);
5696        }
5697        if let Some(literal) = opts.literal {
5698            query = query.arg("literal", literal);
5699        }
5700        if let Some(multiline) = opts.multiline {
5701            query = query.arg("multiline", multiline);
5702        }
5703        if let Some(dotall) = opts.dotall {
5704            query = query.arg("dotall", dotall);
5705        }
5706        if let Some(insensitive) = opts.insensitive {
5707            query = query.arg("insensitive", insensitive);
5708        }
5709        if let Some(skip_ignored) = opts.skip_ignored {
5710            query = query.arg("skipIgnored", skip_ignored);
5711        }
5712        if let Some(skip_hidden) = opts.skip_hidden {
5713            query = query.arg("skipHidden", skip_hidden);
5714        }
5715        if let Some(files_only) = opts.files_only {
5716            query = query.arg("filesOnly", files_only);
5717        }
5718        if let Some(limit) = opts.limit {
5719            query = query.arg("limit", limit);
5720        }
5721        vec![SearchResult {
5722            proc: self.proc.clone(),
5723            selection: query,
5724            graphql_client: self.graphql_client.clone(),
5725        }]
5726    }
5727    /// Force evaluation in the engine.
5728    pub async fn sync(&self) -> Result<DirectoryId, DaggerError> {
5729        let query = self.selection.select("sync");
5730        query.execute(self.graphql_client.clone()).await
5731    }
5732    /// Opens an interactive terminal in new container with this directory mounted inside.
5733    ///
5734    /// # Arguments
5735    ///
5736    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5737    pub fn terminal(&self) -> Directory {
5738        let query = self.selection.select("terminal");
5739        Directory {
5740            proc: self.proc.clone(),
5741            selection: query,
5742            graphql_client: self.graphql_client.clone(),
5743        }
5744    }
5745    /// Opens an interactive terminal in new container with this directory mounted inside.
5746    ///
5747    /// # Arguments
5748    ///
5749    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5750    pub fn terminal_opts<'a>(&self, opts: DirectoryTerminalOpts<'a>) -> Directory {
5751        let mut query = self.selection.select("terminal");
5752        if let Some(container) = opts.container {
5753            query = query.arg("container", container);
5754        }
5755        if let Some(cmd) = opts.cmd {
5756            query = query.arg("cmd", cmd);
5757        }
5758        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
5759            query = query.arg(
5760                "experimentalPrivilegedNesting",
5761                experimental_privileged_nesting,
5762            );
5763        }
5764        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
5765            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
5766        }
5767        Directory {
5768            proc: self.proc.clone(),
5769            selection: query,
5770            graphql_client: self.graphql_client.clone(),
5771        }
5772    }
5773    /// Return a directory with changes from another directory applied to it.
5774    ///
5775    /// # Arguments
5776    ///
5777    /// * `changes` - Changes to apply to the directory
5778    pub fn with_changes(&self, changes: impl IntoID<ChangesetId>) -> Directory {
5779        let mut query = self.selection.select("withChanges");
5780        query = query.arg_lazy(
5781            "changes",
5782            Box::new(move || {
5783                let changes = changes.clone();
5784                Box::pin(async move { changes.into_id().await.unwrap().quote() })
5785            }),
5786        );
5787        Directory {
5788            proc: self.proc.clone(),
5789            selection: query,
5790            graphql_client: self.graphql_client.clone(),
5791        }
5792    }
5793    /// Return a snapshot with a directory added
5794    ///
5795    /// # Arguments
5796    ///
5797    /// * `path` - Location of the written directory (e.g., "/src/").
5798    /// * `source` - Identifier of the directory to copy.
5799    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5800    pub fn with_directory(
5801        &self,
5802        path: impl Into<String>,
5803        source: impl IntoID<DirectoryId>,
5804    ) -> Directory {
5805        let mut query = self.selection.select("withDirectory");
5806        query = query.arg("path", path.into());
5807        query = query.arg_lazy(
5808            "source",
5809            Box::new(move || {
5810                let source = source.clone();
5811                Box::pin(async move { source.into_id().await.unwrap().quote() })
5812            }),
5813        );
5814        Directory {
5815            proc: self.proc.clone(),
5816            selection: query,
5817            graphql_client: self.graphql_client.clone(),
5818        }
5819    }
5820    /// Return a snapshot with a directory added
5821    ///
5822    /// # Arguments
5823    ///
5824    /// * `path` - Location of the written directory (e.g., "/src/").
5825    /// * `source` - Identifier of the directory to copy.
5826    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5827    pub fn with_directory_opts<'a>(
5828        &self,
5829        path: impl Into<String>,
5830        source: impl IntoID<DirectoryId>,
5831        opts: DirectoryWithDirectoryOpts<'a>,
5832    ) -> Directory {
5833        let mut query = self.selection.select("withDirectory");
5834        query = query.arg("path", path.into());
5835        query = query.arg_lazy(
5836            "source",
5837            Box::new(move || {
5838                let source = source.clone();
5839                Box::pin(async move { source.into_id().await.unwrap().quote() })
5840            }),
5841        );
5842        if let Some(exclude) = opts.exclude {
5843            query = query.arg("exclude", exclude);
5844        }
5845        if let Some(include) = opts.include {
5846            query = query.arg("include", include);
5847        }
5848        if let Some(gitignore) = opts.gitignore {
5849            query = query.arg("gitignore", gitignore);
5850        }
5851        if let Some(owner) = opts.owner {
5852            query = query.arg("owner", owner);
5853        }
5854        Directory {
5855            proc: self.proc.clone(),
5856            selection: query,
5857            graphql_client: self.graphql_client.clone(),
5858        }
5859    }
5860    /// Raise an error.
5861    ///
5862    /// # Arguments
5863    ///
5864    /// * `err` - Message of the error to raise. If empty, the error will be ignored.
5865    pub fn with_error(&self, err: impl Into<String>) -> Directory {
5866        let mut query = self.selection.select("withError");
5867        query = query.arg("err", err.into());
5868        Directory {
5869            proc: self.proc.clone(),
5870            selection: query,
5871            graphql_client: self.graphql_client.clone(),
5872        }
5873    }
5874    /// Retrieves this directory plus the contents of the given file copied to the given path.
5875    ///
5876    /// # Arguments
5877    ///
5878    /// * `path` - Location of the copied file (e.g., "/file.txt").
5879    /// * `source` - Identifier of the file to copy.
5880    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5881    pub fn with_file(&self, path: impl Into<String>, source: impl IntoID<FileId>) -> Directory {
5882        let mut query = self.selection.select("withFile");
5883        query = query.arg("path", path.into());
5884        query = query.arg_lazy(
5885            "source",
5886            Box::new(move || {
5887                let source = source.clone();
5888                Box::pin(async move { source.into_id().await.unwrap().quote() })
5889            }),
5890        );
5891        Directory {
5892            proc: self.proc.clone(),
5893            selection: query,
5894            graphql_client: self.graphql_client.clone(),
5895        }
5896    }
5897    /// Retrieves this directory plus the contents of the given file copied to the given path.
5898    ///
5899    /// # Arguments
5900    ///
5901    /// * `path` - Location of the copied file (e.g., "/file.txt").
5902    /// * `source` - Identifier of the file to copy.
5903    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5904    pub fn with_file_opts<'a>(
5905        &self,
5906        path: impl Into<String>,
5907        source: impl IntoID<FileId>,
5908        opts: DirectoryWithFileOpts<'a>,
5909    ) -> Directory {
5910        let mut query = self.selection.select("withFile");
5911        query = query.arg("path", path.into());
5912        query = query.arg_lazy(
5913            "source",
5914            Box::new(move || {
5915                let source = source.clone();
5916                Box::pin(async move { source.into_id().await.unwrap().quote() })
5917            }),
5918        );
5919        if let Some(permissions) = opts.permissions {
5920            query = query.arg("permissions", permissions);
5921        }
5922        if let Some(owner) = opts.owner {
5923            query = query.arg("owner", owner);
5924        }
5925        Directory {
5926            proc: self.proc.clone(),
5927            selection: query,
5928            graphql_client: self.graphql_client.clone(),
5929        }
5930    }
5931    /// Retrieves this directory plus the contents of the given files copied to the given path.
5932    ///
5933    /// # Arguments
5934    ///
5935    /// * `path` - Location where copied files should be placed (e.g., "/src").
5936    /// * `sources` - Identifiers of the files to copy.
5937    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5938    pub fn with_files(&self, path: impl Into<String>, sources: Vec<FileId>) -> Directory {
5939        let mut query = self.selection.select("withFiles");
5940        query = query.arg("path", path.into());
5941        query = query.arg("sources", sources);
5942        Directory {
5943            proc: self.proc.clone(),
5944            selection: query,
5945            graphql_client: self.graphql_client.clone(),
5946        }
5947    }
5948    /// Retrieves this directory plus the contents of the given files copied to the given path.
5949    ///
5950    /// # Arguments
5951    ///
5952    /// * `path` - Location where copied files should be placed (e.g., "/src").
5953    /// * `sources` - Identifiers of the files to copy.
5954    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5955    pub fn with_files_opts(
5956        &self,
5957        path: impl Into<String>,
5958        sources: Vec<FileId>,
5959        opts: DirectoryWithFilesOpts,
5960    ) -> Directory {
5961        let mut query = self.selection.select("withFiles");
5962        query = query.arg("path", path.into());
5963        query = query.arg("sources", sources);
5964        if let Some(permissions) = opts.permissions {
5965            query = query.arg("permissions", permissions);
5966        }
5967        Directory {
5968            proc: self.proc.clone(),
5969            selection: query,
5970            graphql_client: self.graphql_client.clone(),
5971        }
5972    }
5973    /// Retrieves this directory plus a new directory created at the given path.
5974    ///
5975    /// # Arguments
5976    ///
5977    /// * `path` - Location of the directory created (e.g., "/logs").
5978    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5979    pub fn with_new_directory(&self, path: impl Into<String>) -> Directory {
5980        let mut query = self.selection.select("withNewDirectory");
5981        query = query.arg("path", path.into());
5982        Directory {
5983            proc: self.proc.clone(),
5984            selection: query,
5985            graphql_client: self.graphql_client.clone(),
5986        }
5987    }
5988    /// Retrieves this directory plus a new directory created at the given path.
5989    ///
5990    /// # Arguments
5991    ///
5992    /// * `path` - Location of the directory created (e.g., "/logs").
5993    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5994    pub fn with_new_directory_opts(
5995        &self,
5996        path: impl Into<String>,
5997        opts: DirectoryWithNewDirectoryOpts,
5998    ) -> Directory {
5999        let mut query = self.selection.select("withNewDirectory");
6000        query = query.arg("path", path.into());
6001        if let Some(permissions) = opts.permissions {
6002            query = query.arg("permissions", permissions);
6003        }
6004        Directory {
6005            proc: self.proc.clone(),
6006            selection: query,
6007            graphql_client: self.graphql_client.clone(),
6008        }
6009    }
6010    /// Return a snapshot with a new file added
6011    ///
6012    /// # Arguments
6013    ///
6014    /// * `path` - Path of the new file. Example: "foo/bar.txt"
6015    /// * `contents` - Contents of the new file. Example: "Hello world!"
6016    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6017    pub fn with_new_file(&self, path: impl Into<String>, contents: impl Into<String>) -> Directory {
6018        let mut query = self.selection.select("withNewFile");
6019        query = query.arg("path", path.into());
6020        query = query.arg("contents", contents.into());
6021        Directory {
6022            proc: self.proc.clone(),
6023            selection: query,
6024            graphql_client: self.graphql_client.clone(),
6025        }
6026    }
6027    /// Return a snapshot with a new file added
6028    ///
6029    /// # Arguments
6030    ///
6031    /// * `path` - Path of the new file. Example: "foo/bar.txt"
6032    /// * `contents` - Contents of the new file. Example: "Hello world!"
6033    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6034    pub fn with_new_file_opts(
6035        &self,
6036        path: impl Into<String>,
6037        contents: impl Into<String>,
6038        opts: DirectoryWithNewFileOpts,
6039    ) -> Directory {
6040        let mut query = self.selection.select("withNewFile");
6041        query = query.arg("path", path.into());
6042        query = query.arg("contents", contents.into());
6043        if let Some(permissions) = opts.permissions {
6044            query = query.arg("permissions", permissions);
6045        }
6046        Directory {
6047            proc: self.proc.clone(),
6048            selection: query,
6049            graphql_client: self.graphql_client.clone(),
6050        }
6051    }
6052    /// Retrieves this directory with the given Git-compatible patch applied.
6053    ///
6054    /// # Arguments
6055    ///
6056    /// * `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").
6057    pub fn with_patch(&self, patch: impl Into<String>) -> Directory {
6058        let mut query = self.selection.select("withPatch");
6059        query = query.arg("patch", patch.into());
6060        Directory {
6061            proc: self.proc.clone(),
6062            selection: query,
6063            graphql_client: self.graphql_client.clone(),
6064        }
6065    }
6066    /// Retrieves this directory with the given Git-compatible patch file applied.
6067    ///
6068    /// # Arguments
6069    ///
6070    /// * `patch` - File containing the patch to apply
6071    pub fn with_patch_file(&self, patch: impl IntoID<FileId>) -> Directory {
6072        let mut query = self.selection.select("withPatchFile");
6073        query = query.arg_lazy(
6074            "patch",
6075            Box::new(move || {
6076                let patch = patch.clone();
6077                Box::pin(async move { patch.into_id().await.unwrap().quote() })
6078            }),
6079        );
6080        Directory {
6081            proc: self.proc.clone(),
6082            selection: query,
6083            graphql_client: self.graphql_client.clone(),
6084        }
6085    }
6086    /// Return a snapshot with a symlink
6087    ///
6088    /// # Arguments
6089    ///
6090    /// * `target` - Location of the file or directory to link to (e.g., "/existing/file").
6091    /// * `link_name` - Location where the symbolic link will be created (e.g., "/new-file-link").
6092    pub fn with_symlink(
6093        &self,
6094        target: impl Into<String>,
6095        link_name: impl Into<String>,
6096    ) -> Directory {
6097        let mut query = self.selection.select("withSymlink");
6098        query = query.arg("target", target.into());
6099        query = query.arg("linkName", link_name.into());
6100        Directory {
6101            proc: self.proc.clone(),
6102            selection: query,
6103            graphql_client: self.graphql_client.clone(),
6104        }
6105    }
6106    /// Retrieves this directory with all file/dir timestamps set to the given time.
6107    ///
6108    /// # Arguments
6109    ///
6110    /// * `timestamp` - Timestamp to set dir/files in.
6111    ///
6112    /// Formatted in seconds following Unix epoch (e.g., 1672531199).
6113    pub fn with_timestamps(&self, timestamp: isize) -> Directory {
6114        let mut query = self.selection.select("withTimestamps");
6115        query = query.arg("timestamp", timestamp);
6116        Directory {
6117            proc: self.proc.clone(),
6118            selection: query,
6119            graphql_client: self.graphql_client.clone(),
6120        }
6121    }
6122    /// Return a snapshot with a subdirectory removed
6123    ///
6124    /// # Arguments
6125    ///
6126    /// * `path` - Path of the subdirectory to remove. Example: ".github/workflows"
6127    pub fn without_directory(&self, path: impl Into<String>) -> Directory {
6128        let mut query = self.selection.select("withoutDirectory");
6129        query = query.arg("path", path.into());
6130        Directory {
6131            proc: self.proc.clone(),
6132            selection: query,
6133            graphql_client: self.graphql_client.clone(),
6134        }
6135    }
6136    /// Return a snapshot with a file removed
6137    ///
6138    /// # Arguments
6139    ///
6140    /// * `path` - Path of the file to remove (e.g., "/file.txt").
6141    pub fn without_file(&self, path: impl Into<String>) -> Directory {
6142        let mut query = self.selection.select("withoutFile");
6143        query = query.arg("path", path.into());
6144        Directory {
6145            proc: self.proc.clone(),
6146            selection: query,
6147            graphql_client: self.graphql_client.clone(),
6148        }
6149    }
6150    /// Return a snapshot with files removed
6151    ///
6152    /// # Arguments
6153    ///
6154    /// * `paths` - Paths of the files to remove (e.g., ["/file.txt"]).
6155    pub fn without_files(&self, paths: Vec<impl Into<String>>) -> Directory {
6156        let mut query = self.selection.select("withoutFiles");
6157        query = query.arg(
6158            "paths",
6159            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
6160        );
6161        Directory {
6162            proc: self.proc.clone(),
6163            selection: query,
6164            graphql_client: self.graphql_client.clone(),
6165        }
6166    }
6167}
6168#[derive(Clone)]
6169pub struct Engine {
6170    pub proc: Option<Arc<DaggerSessionProc>>,
6171    pub selection: Selection,
6172    pub graphql_client: DynGraphQLClient,
6173}
6174impl Engine {
6175    /// The list of connected client IDs
6176    pub async fn clients(&self) -> Result<Vec<String>, DaggerError> {
6177        let query = self.selection.select("clients");
6178        query.execute(self.graphql_client.clone()).await
6179    }
6180    /// A unique identifier for this Engine.
6181    pub async fn id(&self) -> Result<EngineId, DaggerError> {
6182        let query = self.selection.select("id");
6183        query.execute(self.graphql_client.clone()).await
6184    }
6185    /// The local (on-disk) cache for the Dagger engine
6186    pub fn local_cache(&self) -> EngineCache {
6187        let query = self.selection.select("localCache");
6188        EngineCache {
6189            proc: self.proc.clone(),
6190            selection: query,
6191            graphql_client: self.graphql_client.clone(),
6192        }
6193    }
6194    /// The name of the engine instance.
6195    pub async fn name(&self) -> Result<String, DaggerError> {
6196        let query = self.selection.select("name");
6197        query.execute(self.graphql_client.clone()).await
6198    }
6199}
6200#[derive(Clone)]
6201pub struct EngineCache {
6202    pub proc: Option<Arc<DaggerSessionProc>>,
6203    pub selection: Selection,
6204    pub graphql_client: DynGraphQLClient,
6205}
6206#[derive(Builder, Debug, PartialEq)]
6207pub struct EngineCacheEntrySetOpts<'a> {
6208    #[builder(setter(into, strip_option), default)]
6209    pub key: Option<&'a str>,
6210}
6211#[derive(Builder, Debug, PartialEq)]
6212pub struct EngineCachePruneOpts {
6213    /// Use the engine-wide default pruning policy if true, otherwise prune the whole cache of any releasable entries.
6214    #[builder(setter(into, strip_option), default)]
6215    pub use_default_policy: Option<bool>,
6216}
6217impl EngineCache {
6218    /// The current set of entries in the cache
6219    ///
6220    /// # Arguments
6221    ///
6222    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6223    pub fn entry_set(&self) -> EngineCacheEntrySet {
6224        let query = self.selection.select("entrySet");
6225        EngineCacheEntrySet {
6226            proc: self.proc.clone(),
6227            selection: query,
6228            graphql_client: self.graphql_client.clone(),
6229        }
6230    }
6231    /// The current set of entries in the cache
6232    ///
6233    /// # Arguments
6234    ///
6235    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6236    pub fn entry_set_opts<'a>(&self, opts: EngineCacheEntrySetOpts<'a>) -> EngineCacheEntrySet {
6237        let mut query = self.selection.select("entrySet");
6238        if let Some(key) = opts.key {
6239            query = query.arg("key", key);
6240        }
6241        EngineCacheEntrySet {
6242            proc: self.proc.clone(),
6243            selection: query,
6244            graphql_client: self.graphql_client.clone(),
6245        }
6246    }
6247    /// A unique identifier for this EngineCache.
6248    pub async fn id(&self) -> Result<EngineCacheId, DaggerError> {
6249        let query = self.selection.select("id");
6250        query.execute(self.graphql_client.clone()).await
6251    }
6252    /// The maximum bytes to keep in the cache without pruning.
6253    pub async fn max_used_space(&self) -> Result<isize, DaggerError> {
6254        let query = self.selection.select("maxUsedSpace");
6255        query.execute(self.graphql_client.clone()).await
6256    }
6257    /// The target amount of free disk space the garbage collector will attempt to leave.
6258    pub async fn min_free_space(&self) -> Result<isize, DaggerError> {
6259        let query = self.selection.select("minFreeSpace");
6260        query.execute(self.graphql_client.clone()).await
6261    }
6262    /// Prune the cache of releaseable entries
6263    ///
6264    /// # Arguments
6265    ///
6266    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6267    pub async fn prune(&self) -> Result<Void, DaggerError> {
6268        let query = self.selection.select("prune");
6269        query.execute(self.graphql_client.clone()).await
6270    }
6271    /// Prune the cache of releaseable entries
6272    ///
6273    /// # Arguments
6274    ///
6275    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6276    pub async fn prune_opts(&self, opts: EngineCachePruneOpts) -> Result<Void, DaggerError> {
6277        let mut query = self.selection.select("prune");
6278        if let Some(use_default_policy) = opts.use_default_policy {
6279            query = query.arg("useDefaultPolicy", use_default_policy);
6280        }
6281        query.execute(self.graphql_client.clone()).await
6282    }
6283    /// The minimum amount of disk space this policy is guaranteed to retain.
6284    pub async fn reserved_space(&self) -> Result<isize, DaggerError> {
6285        let query = self.selection.select("reservedSpace");
6286        query.execute(self.graphql_client.clone()).await
6287    }
6288    /// The target number of bytes to keep when pruning.
6289    pub async fn target_space(&self) -> Result<isize, DaggerError> {
6290        let query = self.selection.select("targetSpace");
6291        query.execute(self.graphql_client.clone()).await
6292    }
6293}
6294#[derive(Clone)]
6295pub struct EngineCacheEntry {
6296    pub proc: Option<Arc<DaggerSessionProc>>,
6297    pub selection: Selection,
6298    pub graphql_client: DynGraphQLClient,
6299}
6300impl EngineCacheEntry {
6301    /// Whether the cache entry is actively being used.
6302    pub async fn actively_used(&self) -> Result<bool, DaggerError> {
6303        let query = self.selection.select("activelyUsed");
6304        query.execute(self.graphql_client.clone()).await
6305    }
6306    /// The time the cache entry was created, in Unix nanoseconds.
6307    pub async fn created_time_unix_nano(&self) -> Result<isize, DaggerError> {
6308        let query = self.selection.select("createdTimeUnixNano");
6309        query.execute(self.graphql_client.clone()).await
6310    }
6311    /// The description of the cache entry.
6312    pub async fn description(&self) -> Result<String, DaggerError> {
6313        let query = self.selection.select("description");
6314        query.execute(self.graphql_client.clone()).await
6315    }
6316    /// The disk space used by the cache entry.
6317    pub async fn disk_space_bytes(&self) -> Result<isize, DaggerError> {
6318        let query = self.selection.select("diskSpaceBytes");
6319        query.execute(self.graphql_client.clone()).await
6320    }
6321    /// A unique identifier for this EngineCacheEntry.
6322    pub async fn id(&self) -> Result<EngineCacheEntryId, DaggerError> {
6323        let query = self.selection.select("id");
6324        query.execute(self.graphql_client.clone()).await
6325    }
6326    /// The most recent time the cache entry was used, in Unix nanoseconds.
6327    pub async fn most_recent_use_time_unix_nano(&self) -> Result<isize, DaggerError> {
6328        let query = self.selection.select("mostRecentUseTimeUnixNano");
6329        query.execute(self.graphql_client.clone()).await
6330    }
6331}
6332#[derive(Clone)]
6333pub struct EngineCacheEntrySet {
6334    pub proc: Option<Arc<DaggerSessionProc>>,
6335    pub selection: Selection,
6336    pub graphql_client: DynGraphQLClient,
6337}
6338impl EngineCacheEntrySet {
6339    /// The total disk space used by the cache entries in this set.
6340    pub async fn disk_space_bytes(&self) -> Result<isize, DaggerError> {
6341        let query = self.selection.select("diskSpaceBytes");
6342        query.execute(self.graphql_client.clone()).await
6343    }
6344    /// The list of individual cache entries in the set
6345    pub fn entries(&self) -> Vec<EngineCacheEntry> {
6346        let query = self.selection.select("entries");
6347        vec![EngineCacheEntry {
6348            proc: self.proc.clone(),
6349            selection: query,
6350            graphql_client: self.graphql_client.clone(),
6351        }]
6352    }
6353    /// The number of cache entries in this set.
6354    pub async fn entry_count(&self) -> Result<isize, DaggerError> {
6355        let query = self.selection.select("entryCount");
6356        query.execute(self.graphql_client.clone()).await
6357    }
6358    /// A unique identifier for this EngineCacheEntrySet.
6359    pub async fn id(&self) -> Result<EngineCacheEntrySetId, DaggerError> {
6360        let query = self.selection.select("id");
6361        query.execute(self.graphql_client.clone()).await
6362    }
6363}
6364#[derive(Clone)]
6365pub struct EnumTypeDef {
6366    pub proc: Option<Arc<DaggerSessionProc>>,
6367    pub selection: Selection,
6368    pub graphql_client: DynGraphQLClient,
6369}
6370impl EnumTypeDef {
6371    /// A doc string for the enum, if any.
6372    pub async fn description(&self) -> Result<String, DaggerError> {
6373        let query = self.selection.select("description");
6374        query.execute(self.graphql_client.clone()).await
6375    }
6376    /// A unique identifier for this EnumTypeDef.
6377    pub async fn id(&self) -> Result<EnumTypeDefId, DaggerError> {
6378        let query = self.selection.select("id");
6379        query.execute(self.graphql_client.clone()).await
6380    }
6381    /// The members of the enum.
6382    pub fn members(&self) -> Vec<EnumValueTypeDef> {
6383        let query = self.selection.select("members");
6384        vec![EnumValueTypeDef {
6385            proc: self.proc.clone(),
6386            selection: query,
6387            graphql_client: self.graphql_client.clone(),
6388        }]
6389    }
6390    /// The name of the enum.
6391    pub async fn name(&self) -> Result<String, DaggerError> {
6392        let query = self.selection.select("name");
6393        query.execute(self.graphql_client.clone()).await
6394    }
6395    /// The location of this enum declaration.
6396    pub fn source_map(&self) -> SourceMap {
6397        let query = self.selection.select("sourceMap");
6398        SourceMap {
6399            proc: self.proc.clone(),
6400            selection: query,
6401            graphql_client: self.graphql_client.clone(),
6402        }
6403    }
6404    /// If this EnumTypeDef is associated with a Module, the name of the module. Unset otherwise.
6405    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
6406        let query = self.selection.select("sourceModuleName");
6407        query.execute(self.graphql_client.clone()).await
6408    }
6409    pub fn values(&self) -> Vec<EnumValueTypeDef> {
6410        let query = self.selection.select("values");
6411        vec![EnumValueTypeDef {
6412            proc: self.proc.clone(),
6413            selection: query,
6414            graphql_client: self.graphql_client.clone(),
6415        }]
6416    }
6417}
6418#[derive(Clone)]
6419pub struct EnumValueTypeDef {
6420    pub proc: Option<Arc<DaggerSessionProc>>,
6421    pub selection: Selection,
6422    pub graphql_client: DynGraphQLClient,
6423}
6424impl EnumValueTypeDef {
6425    /// The reason this enum member is deprecated, if any.
6426    pub async fn deprecated(&self) -> Result<String, DaggerError> {
6427        let query = self.selection.select("deprecated");
6428        query.execute(self.graphql_client.clone()).await
6429    }
6430    /// A doc string for the enum member, if any.
6431    pub async fn description(&self) -> Result<String, DaggerError> {
6432        let query = self.selection.select("description");
6433        query.execute(self.graphql_client.clone()).await
6434    }
6435    /// A unique identifier for this EnumValueTypeDef.
6436    pub async fn id(&self) -> Result<EnumValueTypeDefId, DaggerError> {
6437        let query = self.selection.select("id");
6438        query.execute(self.graphql_client.clone()).await
6439    }
6440    /// The name of the enum member.
6441    pub async fn name(&self) -> Result<String, DaggerError> {
6442        let query = self.selection.select("name");
6443        query.execute(self.graphql_client.clone()).await
6444    }
6445    /// The location of this enum member declaration.
6446    pub fn source_map(&self) -> SourceMap {
6447        let query = self.selection.select("sourceMap");
6448        SourceMap {
6449            proc: self.proc.clone(),
6450            selection: query,
6451            graphql_client: self.graphql_client.clone(),
6452        }
6453    }
6454    /// The value of the enum member
6455    pub async fn value(&self) -> Result<String, DaggerError> {
6456        let query = self.selection.select("value");
6457        query.execute(self.graphql_client.clone()).await
6458    }
6459}
6460#[derive(Clone)]
6461pub struct Env {
6462    pub proc: Option<Arc<DaggerSessionProc>>,
6463    pub selection: Selection,
6464    pub graphql_client: DynGraphQLClient,
6465}
6466impl Env {
6467    /// A unique identifier for this Env.
6468    pub async fn id(&self) -> Result<EnvId, DaggerError> {
6469        let query = self.selection.select("id");
6470        query.execute(self.graphql_client.clone()).await
6471    }
6472    /// Retrieves an input binding by name
6473    pub fn input(&self, name: impl Into<String>) -> Binding {
6474        let mut query = self.selection.select("input");
6475        query = query.arg("name", name.into());
6476        Binding {
6477            proc: self.proc.clone(),
6478            selection: query,
6479            graphql_client: self.graphql_client.clone(),
6480        }
6481    }
6482    /// Returns all input bindings provided to the environment
6483    pub fn inputs(&self) -> Vec<Binding> {
6484        let query = self.selection.select("inputs");
6485        vec![Binding {
6486            proc: self.proc.clone(),
6487            selection: query,
6488            graphql_client: self.graphql_client.clone(),
6489        }]
6490    }
6491    /// Retrieves an output binding by name
6492    pub fn output(&self, name: impl Into<String>) -> Binding {
6493        let mut query = self.selection.select("output");
6494        query = query.arg("name", name.into());
6495        Binding {
6496            proc: self.proc.clone(),
6497            selection: query,
6498            graphql_client: self.graphql_client.clone(),
6499        }
6500    }
6501    /// Returns all declared output bindings for the environment
6502    pub fn outputs(&self) -> Vec<Binding> {
6503        let query = self.selection.select("outputs");
6504        vec![Binding {
6505            proc: self.proc.clone(),
6506            selection: query,
6507            graphql_client: self.graphql_client.clone(),
6508        }]
6509    }
6510    /// Create or update a binding of type Address in the environment
6511    ///
6512    /// # Arguments
6513    ///
6514    /// * `name` - The name of the binding
6515    /// * `value` - The Address value to assign to the binding
6516    /// * `description` - The purpose of the input
6517    pub fn with_address_input(
6518        &self,
6519        name: impl Into<String>,
6520        value: impl IntoID<AddressId>,
6521        description: impl Into<String>,
6522    ) -> Env {
6523        let mut query = self.selection.select("withAddressInput");
6524        query = query.arg("name", name.into());
6525        query = query.arg_lazy(
6526            "value",
6527            Box::new(move || {
6528                let value = value.clone();
6529                Box::pin(async move { value.into_id().await.unwrap().quote() })
6530            }),
6531        );
6532        query = query.arg("description", description.into());
6533        Env {
6534            proc: self.proc.clone(),
6535            selection: query,
6536            graphql_client: self.graphql_client.clone(),
6537        }
6538    }
6539    /// Declare a desired Address output to be assigned in the environment
6540    ///
6541    /// # Arguments
6542    ///
6543    /// * `name` - The name of the binding
6544    /// * `description` - A description of the desired value of the binding
6545    pub fn with_address_output(
6546        &self,
6547        name: impl Into<String>,
6548        description: impl Into<String>,
6549    ) -> Env {
6550        let mut query = self.selection.select("withAddressOutput");
6551        query = query.arg("name", name.into());
6552        query = query.arg("description", description.into());
6553        Env {
6554            proc: self.proc.clone(),
6555            selection: query,
6556            graphql_client: self.graphql_client.clone(),
6557        }
6558    }
6559    /// Create or update a binding of type CacheVolume in the environment
6560    ///
6561    /// # Arguments
6562    ///
6563    /// * `name` - The name of the binding
6564    /// * `value` - The CacheVolume value to assign to the binding
6565    /// * `description` - The purpose of the input
6566    pub fn with_cache_volume_input(
6567        &self,
6568        name: impl Into<String>,
6569        value: impl IntoID<CacheVolumeId>,
6570        description: impl Into<String>,
6571    ) -> Env {
6572        let mut query = self.selection.select("withCacheVolumeInput");
6573        query = query.arg("name", name.into());
6574        query = query.arg_lazy(
6575            "value",
6576            Box::new(move || {
6577                let value = value.clone();
6578                Box::pin(async move { value.into_id().await.unwrap().quote() })
6579            }),
6580        );
6581        query = query.arg("description", description.into());
6582        Env {
6583            proc: self.proc.clone(),
6584            selection: query,
6585            graphql_client: self.graphql_client.clone(),
6586        }
6587    }
6588    /// Declare a desired CacheVolume output to be assigned in the environment
6589    ///
6590    /// # Arguments
6591    ///
6592    /// * `name` - The name of the binding
6593    /// * `description` - A description of the desired value of the binding
6594    pub fn with_cache_volume_output(
6595        &self,
6596        name: impl Into<String>,
6597        description: impl Into<String>,
6598    ) -> Env {
6599        let mut query = self.selection.select("withCacheVolumeOutput");
6600        query = query.arg("name", name.into());
6601        query = query.arg("description", description.into());
6602        Env {
6603            proc: self.proc.clone(),
6604            selection: query,
6605            graphql_client: self.graphql_client.clone(),
6606        }
6607    }
6608    /// Create or update a binding of type Changeset in the environment
6609    ///
6610    /// # Arguments
6611    ///
6612    /// * `name` - The name of the binding
6613    /// * `value` - The Changeset value to assign to the binding
6614    /// * `description` - The purpose of the input
6615    pub fn with_changeset_input(
6616        &self,
6617        name: impl Into<String>,
6618        value: impl IntoID<ChangesetId>,
6619        description: impl Into<String>,
6620    ) -> Env {
6621        let mut query = self.selection.select("withChangesetInput");
6622        query = query.arg("name", name.into());
6623        query = query.arg_lazy(
6624            "value",
6625            Box::new(move || {
6626                let value = value.clone();
6627                Box::pin(async move { value.into_id().await.unwrap().quote() })
6628            }),
6629        );
6630        query = query.arg("description", description.into());
6631        Env {
6632            proc: self.proc.clone(),
6633            selection: query,
6634            graphql_client: self.graphql_client.clone(),
6635        }
6636    }
6637    /// Declare a desired Changeset output to be assigned in the environment
6638    ///
6639    /// # Arguments
6640    ///
6641    /// * `name` - The name of the binding
6642    /// * `description` - A description of the desired value of the binding
6643    pub fn with_changeset_output(
6644        &self,
6645        name: impl Into<String>,
6646        description: impl Into<String>,
6647    ) -> Env {
6648        let mut query = self.selection.select("withChangesetOutput");
6649        query = query.arg("name", name.into());
6650        query = query.arg("description", description.into());
6651        Env {
6652            proc: self.proc.clone(),
6653            selection: query,
6654            graphql_client: self.graphql_client.clone(),
6655        }
6656    }
6657    /// Create or update a binding of type CheckGroup in the environment
6658    ///
6659    /// # Arguments
6660    ///
6661    /// * `name` - The name of the binding
6662    /// * `value` - The CheckGroup value to assign to the binding
6663    /// * `description` - The purpose of the input
6664    pub fn with_check_group_input(
6665        &self,
6666        name: impl Into<String>,
6667        value: impl IntoID<CheckGroupId>,
6668        description: impl Into<String>,
6669    ) -> Env {
6670        let mut query = self.selection.select("withCheckGroupInput");
6671        query = query.arg("name", name.into());
6672        query = query.arg_lazy(
6673            "value",
6674            Box::new(move || {
6675                let value = value.clone();
6676                Box::pin(async move { value.into_id().await.unwrap().quote() })
6677            }),
6678        );
6679        query = query.arg("description", description.into());
6680        Env {
6681            proc: self.proc.clone(),
6682            selection: query,
6683            graphql_client: self.graphql_client.clone(),
6684        }
6685    }
6686    /// Declare a desired CheckGroup output to be assigned in the environment
6687    ///
6688    /// # Arguments
6689    ///
6690    /// * `name` - The name of the binding
6691    /// * `description` - A description of the desired value of the binding
6692    pub fn with_check_group_output(
6693        &self,
6694        name: impl Into<String>,
6695        description: impl Into<String>,
6696    ) -> Env {
6697        let mut query = self.selection.select("withCheckGroupOutput");
6698        query = query.arg("name", name.into());
6699        query = query.arg("description", description.into());
6700        Env {
6701            proc: self.proc.clone(),
6702            selection: query,
6703            graphql_client: self.graphql_client.clone(),
6704        }
6705    }
6706    /// Create or update a binding of type Check in the environment
6707    ///
6708    /// # Arguments
6709    ///
6710    /// * `name` - The name of the binding
6711    /// * `value` - The Check value to assign to the binding
6712    /// * `description` - The purpose of the input
6713    pub fn with_check_input(
6714        &self,
6715        name: impl Into<String>,
6716        value: impl IntoID<CheckId>,
6717        description: impl Into<String>,
6718    ) -> Env {
6719        let mut query = self.selection.select("withCheckInput");
6720        query = query.arg("name", name.into());
6721        query = query.arg_lazy(
6722            "value",
6723            Box::new(move || {
6724                let value = value.clone();
6725                Box::pin(async move { value.into_id().await.unwrap().quote() })
6726            }),
6727        );
6728        query = query.arg("description", description.into());
6729        Env {
6730            proc: self.proc.clone(),
6731            selection: query,
6732            graphql_client: self.graphql_client.clone(),
6733        }
6734    }
6735    /// Declare a desired Check output to be assigned in the environment
6736    ///
6737    /// # Arguments
6738    ///
6739    /// * `name` - The name of the binding
6740    /// * `description` - A description of the desired value of the binding
6741    pub fn with_check_output(
6742        &self,
6743        name: impl Into<String>,
6744        description: impl Into<String>,
6745    ) -> Env {
6746        let mut query = self.selection.select("withCheckOutput");
6747        query = query.arg("name", name.into());
6748        query = query.arg("description", description.into());
6749        Env {
6750            proc: self.proc.clone(),
6751            selection: query,
6752            graphql_client: self.graphql_client.clone(),
6753        }
6754    }
6755    /// Create or update a binding of type Cloud in the environment
6756    ///
6757    /// # Arguments
6758    ///
6759    /// * `name` - The name of the binding
6760    /// * `value` - The Cloud value to assign to the binding
6761    /// * `description` - The purpose of the input
6762    pub fn with_cloud_input(
6763        &self,
6764        name: impl Into<String>,
6765        value: impl IntoID<CloudId>,
6766        description: impl Into<String>,
6767    ) -> Env {
6768        let mut query = self.selection.select("withCloudInput");
6769        query = query.arg("name", name.into());
6770        query = query.arg_lazy(
6771            "value",
6772            Box::new(move || {
6773                let value = value.clone();
6774                Box::pin(async move { value.into_id().await.unwrap().quote() })
6775            }),
6776        );
6777        query = query.arg("description", description.into());
6778        Env {
6779            proc: self.proc.clone(),
6780            selection: query,
6781            graphql_client: self.graphql_client.clone(),
6782        }
6783    }
6784    /// Declare a desired Cloud output to be assigned in the environment
6785    ///
6786    /// # Arguments
6787    ///
6788    /// * `name` - The name of the binding
6789    /// * `description` - A description of the desired value of the binding
6790    pub fn with_cloud_output(
6791        &self,
6792        name: impl Into<String>,
6793        description: impl Into<String>,
6794    ) -> Env {
6795        let mut query = self.selection.select("withCloudOutput");
6796        query = query.arg("name", name.into());
6797        query = query.arg("description", description.into());
6798        Env {
6799            proc: self.proc.clone(),
6800            selection: query,
6801            graphql_client: self.graphql_client.clone(),
6802        }
6803    }
6804    /// Create or update a binding of type Container in the environment
6805    ///
6806    /// # Arguments
6807    ///
6808    /// * `name` - The name of the binding
6809    /// * `value` - The Container value to assign to the binding
6810    /// * `description` - The purpose of the input
6811    pub fn with_container_input(
6812        &self,
6813        name: impl Into<String>,
6814        value: impl IntoID<ContainerId>,
6815        description: impl Into<String>,
6816    ) -> Env {
6817        let mut query = self.selection.select("withContainerInput");
6818        query = query.arg("name", name.into());
6819        query = query.arg_lazy(
6820            "value",
6821            Box::new(move || {
6822                let value = value.clone();
6823                Box::pin(async move { value.into_id().await.unwrap().quote() })
6824            }),
6825        );
6826        query = query.arg("description", description.into());
6827        Env {
6828            proc: self.proc.clone(),
6829            selection: query,
6830            graphql_client: self.graphql_client.clone(),
6831        }
6832    }
6833    /// Declare a desired Container output to be assigned in the environment
6834    ///
6835    /// # Arguments
6836    ///
6837    /// * `name` - The name of the binding
6838    /// * `description` - A description of the desired value of the binding
6839    pub fn with_container_output(
6840        &self,
6841        name: impl Into<String>,
6842        description: impl Into<String>,
6843    ) -> Env {
6844        let mut query = self.selection.select("withContainerOutput");
6845        query = query.arg("name", name.into());
6846        query = query.arg("description", description.into());
6847        Env {
6848            proc: self.proc.clone(),
6849            selection: query,
6850            graphql_client: self.graphql_client.clone(),
6851        }
6852    }
6853    /// Installs the current module into the environment, exposing its functions to the model
6854    /// Contextual path arguments will be populated using the environment's workspace.
6855    pub fn with_current_module(&self) -> Env {
6856        let query = self.selection.select("withCurrentModule");
6857        Env {
6858            proc: self.proc.clone(),
6859            selection: query,
6860            graphql_client: self.graphql_client.clone(),
6861        }
6862    }
6863    /// Create or update a binding of type Directory in the environment
6864    ///
6865    /// # Arguments
6866    ///
6867    /// * `name` - The name of the binding
6868    /// * `value` - The Directory value to assign to the binding
6869    /// * `description` - The purpose of the input
6870    pub fn with_directory_input(
6871        &self,
6872        name: impl Into<String>,
6873        value: impl IntoID<DirectoryId>,
6874        description: impl Into<String>,
6875    ) -> Env {
6876        let mut query = self.selection.select("withDirectoryInput");
6877        query = query.arg("name", name.into());
6878        query = query.arg_lazy(
6879            "value",
6880            Box::new(move || {
6881                let value = value.clone();
6882                Box::pin(async move { value.into_id().await.unwrap().quote() })
6883            }),
6884        );
6885        query = query.arg("description", description.into());
6886        Env {
6887            proc: self.proc.clone(),
6888            selection: query,
6889            graphql_client: self.graphql_client.clone(),
6890        }
6891    }
6892    /// Declare a desired Directory output to be assigned in the environment
6893    ///
6894    /// # Arguments
6895    ///
6896    /// * `name` - The name of the binding
6897    /// * `description` - A description of the desired value of the binding
6898    pub fn with_directory_output(
6899        &self,
6900        name: impl Into<String>,
6901        description: impl Into<String>,
6902    ) -> Env {
6903        let mut query = self.selection.select("withDirectoryOutput");
6904        query = query.arg("name", name.into());
6905        query = query.arg("description", description.into());
6906        Env {
6907            proc: self.proc.clone(),
6908            selection: query,
6909            graphql_client: self.graphql_client.clone(),
6910        }
6911    }
6912    /// Create or update a binding of type EnvFile in the environment
6913    ///
6914    /// # Arguments
6915    ///
6916    /// * `name` - The name of the binding
6917    /// * `value` - The EnvFile value to assign to the binding
6918    /// * `description` - The purpose of the input
6919    pub fn with_env_file_input(
6920        &self,
6921        name: impl Into<String>,
6922        value: impl IntoID<EnvFileId>,
6923        description: impl Into<String>,
6924    ) -> Env {
6925        let mut query = self.selection.select("withEnvFileInput");
6926        query = query.arg("name", name.into());
6927        query = query.arg_lazy(
6928            "value",
6929            Box::new(move || {
6930                let value = value.clone();
6931                Box::pin(async move { value.into_id().await.unwrap().quote() })
6932            }),
6933        );
6934        query = query.arg("description", description.into());
6935        Env {
6936            proc: self.proc.clone(),
6937            selection: query,
6938            graphql_client: self.graphql_client.clone(),
6939        }
6940    }
6941    /// Declare a desired EnvFile output to be assigned in the environment
6942    ///
6943    /// # Arguments
6944    ///
6945    /// * `name` - The name of the binding
6946    /// * `description` - A description of the desired value of the binding
6947    pub fn with_env_file_output(
6948        &self,
6949        name: impl Into<String>,
6950        description: impl Into<String>,
6951    ) -> Env {
6952        let mut query = self.selection.select("withEnvFileOutput");
6953        query = query.arg("name", name.into());
6954        query = query.arg("description", description.into());
6955        Env {
6956            proc: self.proc.clone(),
6957            selection: query,
6958            graphql_client: self.graphql_client.clone(),
6959        }
6960    }
6961    /// Create or update a binding of type Env in the environment
6962    ///
6963    /// # Arguments
6964    ///
6965    /// * `name` - The name of the binding
6966    /// * `value` - The Env value to assign to the binding
6967    /// * `description` - The purpose of the input
6968    pub fn with_env_input(
6969        &self,
6970        name: impl Into<String>,
6971        value: impl IntoID<EnvId>,
6972        description: impl Into<String>,
6973    ) -> Env {
6974        let mut query = self.selection.select("withEnvInput");
6975        query = query.arg("name", name.into());
6976        query = query.arg_lazy(
6977            "value",
6978            Box::new(move || {
6979                let value = value.clone();
6980                Box::pin(async move { value.into_id().await.unwrap().quote() })
6981            }),
6982        );
6983        query = query.arg("description", description.into());
6984        Env {
6985            proc: self.proc.clone(),
6986            selection: query,
6987            graphql_client: self.graphql_client.clone(),
6988        }
6989    }
6990    /// Declare a desired Env output to be assigned in the environment
6991    ///
6992    /// # Arguments
6993    ///
6994    /// * `name` - The name of the binding
6995    /// * `description` - A description of the desired value of the binding
6996    pub fn with_env_output(&self, name: impl Into<String>, description: impl Into<String>) -> Env {
6997        let mut query = self.selection.select("withEnvOutput");
6998        query = query.arg("name", name.into());
6999        query = query.arg("description", description.into());
7000        Env {
7001            proc: self.proc.clone(),
7002            selection: query,
7003            graphql_client: self.graphql_client.clone(),
7004        }
7005    }
7006    /// Create or update a binding of type File in the environment
7007    ///
7008    /// # Arguments
7009    ///
7010    /// * `name` - The name of the binding
7011    /// * `value` - The File value to assign to the binding
7012    /// * `description` - The purpose of the input
7013    pub fn with_file_input(
7014        &self,
7015        name: impl Into<String>,
7016        value: impl IntoID<FileId>,
7017        description: impl Into<String>,
7018    ) -> Env {
7019        let mut query = self.selection.select("withFileInput");
7020        query = query.arg("name", name.into());
7021        query = query.arg_lazy(
7022            "value",
7023            Box::new(move || {
7024                let value = value.clone();
7025                Box::pin(async move { value.into_id().await.unwrap().quote() })
7026            }),
7027        );
7028        query = query.arg("description", description.into());
7029        Env {
7030            proc: self.proc.clone(),
7031            selection: query,
7032            graphql_client: self.graphql_client.clone(),
7033        }
7034    }
7035    /// Declare a desired File output to be assigned in the environment
7036    ///
7037    /// # Arguments
7038    ///
7039    /// * `name` - The name of the binding
7040    /// * `description` - A description of the desired value of the binding
7041    pub fn with_file_output(&self, name: impl Into<String>, description: impl Into<String>) -> Env {
7042        let mut query = self.selection.select("withFileOutput");
7043        query = query.arg("name", name.into());
7044        query = query.arg("description", description.into());
7045        Env {
7046            proc: self.proc.clone(),
7047            selection: query,
7048            graphql_client: self.graphql_client.clone(),
7049        }
7050    }
7051    /// Create or update a binding of type GitRef in the environment
7052    ///
7053    /// # Arguments
7054    ///
7055    /// * `name` - The name of the binding
7056    /// * `value` - The GitRef value to assign to the binding
7057    /// * `description` - The purpose of the input
7058    pub fn with_git_ref_input(
7059        &self,
7060        name: impl Into<String>,
7061        value: impl IntoID<GitRefId>,
7062        description: impl Into<String>,
7063    ) -> Env {
7064        let mut query = self.selection.select("withGitRefInput");
7065        query = query.arg("name", name.into());
7066        query = query.arg_lazy(
7067            "value",
7068            Box::new(move || {
7069                let value = value.clone();
7070                Box::pin(async move { value.into_id().await.unwrap().quote() })
7071            }),
7072        );
7073        query = query.arg("description", description.into());
7074        Env {
7075            proc: self.proc.clone(),
7076            selection: query,
7077            graphql_client: self.graphql_client.clone(),
7078        }
7079    }
7080    /// Declare a desired GitRef output to be assigned in the environment
7081    ///
7082    /// # Arguments
7083    ///
7084    /// * `name` - The name of the binding
7085    /// * `description` - A description of the desired value of the binding
7086    pub fn with_git_ref_output(
7087        &self,
7088        name: impl Into<String>,
7089        description: impl Into<String>,
7090    ) -> Env {
7091        let mut query = self.selection.select("withGitRefOutput");
7092        query = query.arg("name", name.into());
7093        query = query.arg("description", description.into());
7094        Env {
7095            proc: self.proc.clone(),
7096            selection: query,
7097            graphql_client: self.graphql_client.clone(),
7098        }
7099    }
7100    /// Create or update a binding of type GitRepository in the environment
7101    ///
7102    /// # Arguments
7103    ///
7104    /// * `name` - The name of the binding
7105    /// * `value` - The GitRepository value to assign to the binding
7106    /// * `description` - The purpose of the input
7107    pub fn with_git_repository_input(
7108        &self,
7109        name: impl Into<String>,
7110        value: impl IntoID<GitRepositoryId>,
7111        description: impl Into<String>,
7112    ) -> Env {
7113        let mut query = self.selection.select("withGitRepositoryInput");
7114        query = query.arg("name", name.into());
7115        query = query.arg_lazy(
7116            "value",
7117            Box::new(move || {
7118                let value = value.clone();
7119                Box::pin(async move { value.into_id().await.unwrap().quote() })
7120            }),
7121        );
7122        query = query.arg("description", description.into());
7123        Env {
7124            proc: self.proc.clone(),
7125            selection: query,
7126            graphql_client: self.graphql_client.clone(),
7127        }
7128    }
7129    /// Declare a desired GitRepository output to be assigned in the environment
7130    ///
7131    /// # Arguments
7132    ///
7133    /// * `name` - The name of the binding
7134    /// * `description` - A description of the desired value of the binding
7135    pub fn with_git_repository_output(
7136        &self,
7137        name: impl Into<String>,
7138        description: impl Into<String>,
7139    ) -> Env {
7140        let mut query = self.selection.select("withGitRepositoryOutput");
7141        query = query.arg("name", name.into());
7142        query = query.arg("description", description.into());
7143        Env {
7144            proc: self.proc.clone(),
7145            selection: query,
7146            graphql_client: self.graphql_client.clone(),
7147        }
7148    }
7149    /// Create or update a binding of type JSONValue in the environment
7150    ///
7151    /// # Arguments
7152    ///
7153    /// * `name` - The name of the binding
7154    /// * `value` - The JSONValue value to assign to the binding
7155    /// * `description` - The purpose of the input
7156    pub fn with_json_value_input(
7157        &self,
7158        name: impl Into<String>,
7159        value: impl IntoID<JsonValueId>,
7160        description: impl Into<String>,
7161    ) -> Env {
7162        let mut query = self.selection.select("withJSONValueInput");
7163        query = query.arg("name", name.into());
7164        query = query.arg_lazy(
7165            "value",
7166            Box::new(move || {
7167                let value = value.clone();
7168                Box::pin(async move { value.into_id().await.unwrap().quote() })
7169            }),
7170        );
7171        query = query.arg("description", description.into());
7172        Env {
7173            proc: self.proc.clone(),
7174            selection: query,
7175            graphql_client: self.graphql_client.clone(),
7176        }
7177    }
7178    /// Declare a desired JSONValue output to be assigned in the environment
7179    ///
7180    /// # Arguments
7181    ///
7182    /// * `name` - The name of the binding
7183    /// * `description` - A description of the desired value of the binding
7184    pub fn with_json_value_output(
7185        &self,
7186        name: impl Into<String>,
7187        description: impl Into<String>,
7188    ) -> Env {
7189        let mut query = self.selection.select("withJSONValueOutput");
7190        query = query.arg("name", name.into());
7191        query = query.arg("description", description.into());
7192        Env {
7193            proc: self.proc.clone(),
7194            selection: query,
7195            graphql_client: self.graphql_client.clone(),
7196        }
7197    }
7198    /// Installs a module into the environment, exposing its functions to the model
7199    /// Contextual path arguments will be populated using the environment's workspace.
7200    pub fn with_module(&self, module: impl IntoID<ModuleId>) -> Env {
7201        let mut query = self.selection.select("withModule");
7202        query = query.arg_lazy(
7203            "module",
7204            Box::new(move || {
7205                let module = module.clone();
7206                Box::pin(async move { module.into_id().await.unwrap().quote() })
7207            }),
7208        );
7209        Env {
7210            proc: self.proc.clone(),
7211            selection: query,
7212            graphql_client: self.graphql_client.clone(),
7213        }
7214    }
7215    /// Create or update a binding of type ModuleConfigClient in the environment
7216    ///
7217    /// # Arguments
7218    ///
7219    /// * `name` - The name of the binding
7220    /// * `value` - The ModuleConfigClient value to assign to the binding
7221    /// * `description` - The purpose of the input
7222    pub fn with_module_config_client_input(
7223        &self,
7224        name: impl Into<String>,
7225        value: impl IntoID<ModuleConfigClientId>,
7226        description: impl Into<String>,
7227    ) -> Env {
7228        let mut query = self.selection.select("withModuleConfigClientInput");
7229        query = query.arg("name", name.into());
7230        query = query.arg_lazy(
7231            "value",
7232            Box::new(move || {
7233                let value = value.clone();
7234                Box::pin(async move { value.into_id().await.unwrap().quote() })
7235            }),
7236        );
7237        query = query.arg("description", description.into());
7238        Env {
7239            proc: self.proc.clone(),
7240            selection: query,
7241            graphql_client: self.graphql_client.clone(),
7242        }
7243    }
7244    /// Declare a desired ModuleConfigClient output to be assigned in the environment
7245    ///
7246    /// # Arguments
7247    ///
7248    /// * `name` - The name of the binding
7249    /// * `description` - A description of the desired value of the binding
7250    pub fn with_module_config_client_output(
7251        &self,
7252        name: impl Into<String>,
7253        description: impl Into<String>,
7254    ) -> Env {
7255        let mut query = self.selection.select("withModuleConfigClientOutput");
7256        query = query.arg("name", name.into());
7257        query = query.arg("description", description.into());
7258        Env {
7259            proc: self.proc.clone(),
7260            selection: query,
7261            graphql_client: self.graphql_client.clone(),
7262        }
7263    }
7264    /// Create or update a binding of type Module in the environment
7265    ///
7266    /// # Arguments
7267    ///
7268    /// * `name` - The name of the binding
7269    /// * `value` - The Module value to assign to the binding
7270    /// * `description` - The purpose of the input
7271    pub fn with_module_input(
7272        &self,
7273        name: impl Into<String>,
7274        value: impl IntoID<ModuleId>,
7275        description: impl Into<String>,
7276    ) -> Env {
7277        let mut query = self.selection.select("withModuleInput");
7278        query = query.arg("name", name.into());
7279        query = query.arg_lazy(
7280            "value",
7281            Box::new(move || {
7282                let value = value.clone();
7283                Box::pin(async move { value.into_id().await.unwrap().quote() })
7284            }),
7285        );
7286        query = query.arg("description", description.into());
7287        Env {
7288            proc: self.proc.clone(),
7289            selection: query,
7290            graphql_client: self.graphql_client.clone(),
7291        }
7292    }
7293    /// Declare a desired Module output to be assigned in the environment
7294    ///
7295    /// # Arguments
7296    ///
7297    /// * `name` - The name of the binding
7298    /// * `description` - A description of the desired value of the binding
7299    pub fn with_module_output(
7300        &self,
7301        name: impl Into<String>,
7302        description: impl Into<String>,
7303    ) -> Env {
7304        let mut query = self.selection.select("withModuleOutput");
7305        query = query.arg("name", name.into());
7306        query = query.arg("description", description.into());
7307        Env {
7308            proc: self.proc.clone(),
7309            selection: query,
7310            graphql_client: self.graphql_client.clone(),
7311        }
7312    }
7313    /// Create or update a binding of type ModuleSource in the environment
7314    ///
7315    /// # Arguments
7316    ///
7317    /// * `name` - The name of the binding
7318    /// * `value` - The ModuleSource value to assign to the binding
7319    /// * `description` - The purpose of the input
7320    pub fn with_module_source_input(
7321        &self,
7322        name: impl Into<String>,
7323        value: impl IntoID<ModuleSourceId>,
7324        description: impl Into<String>,
7325    ) -> Env {
7326        let mut query = self.selection.select("withModuleSourceInput");
7327        query = query.arg("name", name.into());
7328        query = query.arg_lazy(
7329            "value",
7330            Box::new(move || {
7331                let value = value.clone();
7332                Box::pin(async move { value.into_id().await.unwrap().quote() })
7333            }),
7334        );
7335        query = query.arg("description", description.into());
7336        Env {
7337            proc: self.proc.clone(),
7338            selection: query,
7339            graphql_client: self.graphql_client.clone(),
7340        }
7341    }
7342    /// Declare a desired ModuleSource output to be assigned in the environment
7343    ///
7344    /// # Arguments
7345    ///
7346    /// * `name` - The name of the binding
7347    /// * `description` - A description of the desired value of the binding
7348    pub fn with_module_source_output(
7349        &self,
7350        name: impl Into<String>,
7351        description: impl Into<String>,
7352    ) -> Env {
7353        let mut query = self.selection.select("withModuleSourceOutput");
7354        query = query.arg("name", name.into());
7355        query = query.arg("description", description.into());
7356        Env {
7357            proc: self.proc.clone(),
7358            selection: query,
7359            graphql_client: self.graphql_client.clone(),
7360        }
7361    }
7362    /// Create or update a binding of type SearchResult in the environment
7363    ///
7364    /// # Arguments
7365    ///
7366    /// * `name` - The name of the binding
7367    /// * `value` - The SearchResult value to assign to the binding
7368    /// * `description` - The purpose of the input
7369    pub fn with_search_result_input(
7370        &self,
7371        name: impl Into<String>,
7372        value: impl IntoID<SearchResultId>,
7373        description: impl Into<String>,
7374    ) -> Env {
7375        let mut query = self.selection.select("withSearchResultInput");
7376        query = query.arg("name", name.into());
7377        query = query.arg_lazy(
7378            "value",
7379            Box::new(move || {
7380                let value = value.clone();
7381                Box::pin(async move { value.into_id().await.unwrap().quote() })
7382            }),
7383        );
7384        query = query.arg("description", description.into());
7385        Env {
7386            proc: self.proc.clone(),
7387            selection: query,
7388            graphql_client: self.graphql_client.clone(),
7389        }
7390    }
7391    /// Declare a desired SearchResult output to be assigned in the environment
7392    ///
7393    /// # Arguments
7394    ///
7395    /// * `name` - The name of the binding
7396    /// * `description` - A description of the desired value of the binding
7397    pub fn with_search_result_output(
7398        &self,
7399        name: impl Into<String>,
7400        description: impl Into<String>,
7401    ) -> Env {
7402        let mut query = self.selection.select("withSearchResultOutput");
7403        query = query.arg("name", name.into());
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    /// Create or update a binding of type SearchSubmatch in the environment
7412    ///
7413    /// # Arguments
7414    ///
7415    /// * `name` - The name of the binding
7416    /// * `value` - The SearchSubmatch value to assign to the binding
7417    /// * `description` - The purpose of the input
7418    pub fn with_search_submatch_input(
7419        &self,
7420        name: impl Into<String>,
7421        value: impl IntoID<SearchSubmatchId>,
7422        description: impl Into<String>,
7423    ) -> Env {
7424        let mut query = self.selection.select("withSearchSubmatchInput");
7425        query = query.arg("name", name.into());
7426        query = query.arg_lazy(
7427            "value",
7428            Box::new(move || {
7429                let value = value.clone();
7430                Box::pin(async move { value.into_id().await.unwrap().quote() })
7431            }),
7432        );
7433        query = query.arg("description", description.into());
7434        Env {
7435            proc: self.proc.clone(),
7436            selection: query,
7437            graphql_client: self.graphql_client.clone(),
7438        }
7439    }
7440    /// Declare a desired SearchSubmatch output to be assigned in the environment
7441    ///
7442    /// # Arguments
7443    ///
7444    /// * `name` - The name of the binding
7445    /// * `description` - A description of the desired value of the binding
7446    pub fn with_search_submatch_output(
7447        &self,
7448        name: impl Into<String>,
7449        description: impl Into<String>,
7450    ) -> Env {
7451        let mut query = self.selection.select("withSearchSubmatchOutput");
7452        query = query.arg("name", name.into());
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    /// Create or update a binding of type Secret in the environment
7461    ///
7462    /// # Arguments
7463    ///
7464    /// * `name` - The name of the binding
7465    /// * `value` - The Secret value to assign to the binding
7466    /// * `description` - The purpose of the input
7467    pub fn with_secret_input(
7468        &self,
7469        name: impl Into<String>,
7470        value: impl IntoID<SecretId>,
7471        description: impl Into<String>,
7472    ) -> Env {
7473        let mut query = self.selection.select("withSecretInput");
7474        query = query.arg("name", name.into());
7475        query = query.arg_lazy(
7476            "value",
7477            Box::new(move || {
7478                let value = value.clone();
7479                Box::pin(async move { value.into_id().await.unwrap().quote() })
7480            }),
7481        );
7482        query = query.arg("description", description.into());
7483        Env {
7484            proc: self.proc.clone(),
7485            selection: query,
7486            graphql_client: self.graphql_client.clone(),
7487        }
7488    }
7489    /// Declare a desired Secret output to be assigned in the environment
7490    ///
7491    /// # Arguments
7492    ///
7493    /// * `name` - The name of the binding
7494    /// * `description` - A description of the desired value of the binding
7495    pub fn with_secret_output(
7496        &self,
7497        name: impl Into<String>,
7498        description: impl Into<String>,
7499    ) -> Env {
7500        let mut query = self.selection.select("withSecretOutput");
7501        query = query.arg("name", name.into());
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    /// Create or update a binding of type Service in the environment
7510    ///
7511    /// # Arguments
7512    ///
7513    /// * `name` - The name of the binding
7514    /// * `value` - The Service value to assign to the binding
7515    /// * `description` - The purpose of the input
7516    pub fn with_service_input(
7517        &self,
7518        name: impl Into<String>,
7519        value: impl IntoID<ServiceId>,
7520        description: impl Into<String>,
7521    ) -> Env {
7522        let mut query = self.selection.select("withServiceInput");
7523        query = query.arg("name", name.into());
7524        query = query.arg_lazy(
7525            "value",
7526            Box::new(move || {
7527                let value = value.clone();
7528                Box::pin(async move { value.into_id().await.unwrap().quote() })
7529            }),
7530        );
7531        query = query.arg("description", description.into());
7532        Env {
7533            proc: self.proc.clone(),
7534            selection: query,
7535            graphql_client: self.graphql_client.clone(),
7536        }
7537    }
7538    /// Declare a desired Service output to be assigned in the environment
7539    ///
7540    /// # Arguments
7541    ///
7542    /// * `name` - The name of the binding
7543    /// * `description` - A description of the desired value of the binding
7544    pub fn with_service_output(
7545        &self,
7546        name: impl Into<String>,
7547        description: impl Into<String>,
7548    ) -> Env {
7549        let mut query = self.selection.select("withServiceOutput");
7550        query = query.arg("name", name.into());
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    /// Create or update a binding of type Socket in the environment
7559    ///
7560    /// # Arguments
7561    ///
7562    /// * `name` - The name of the binding
7563    /// * `value` - The Socket value to assign to the binding
7564    /// * `description` - The purpose of the input
7565    pub fn with_socket_input(
7566        &self,
7567        name: impl Into<String>,
7568        value: impl IntoID<SocketId>,
7569        description: impl Into<String>,
7570    ) -> Env {
7571        let mut query = self.selection.select("withSocketInput");
7572        query = query.arg("name", name.into());
7573        query = query.arg_lazy(
7574            "value",
7575            Box::new(move || {
7576                let value = value.clone();
7577                Box::pin(async move { value.into_id().await.unwrap().quote() })
7578            }),
7579        );
7580        query = query.arg("description", description.into());
7581        Env {
7582            proc: self.proc.clone(),
7583            selection: query,
7584            graphql_client: self.graphql_client.clone(),
7585        }
7586    }
7587    /// Declare a desired Socket output to be assigned in the environment
7588    ///
7589    /// # Arguments
7590    ///
7591    /// * `name` - The name of the binding
7592    /// * `description` - A description of the desired value of the binding
7593    pub fn with_socket_output(
7594        &self,
7595        name: impl Into<String>,
7596        description: impl Into<String>,
7597    ) -> Env {
7598        let mut query = self.selection.select("withSocketOutput");
7599        query = query.arg("name", name.into());
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    /// Provides a string input binding to the environment
7608    ///
7609    /// # Arguments
7610    ///
7611    /// * `name` - The name of the binding
7612    /// * `value` - The string value to assign to the binding
7613    /// * `description` - The description of the input
7614    pub fn with_string_input(
7615        &self,
7616        name: impl Into<String>,
7617        value: impl Into<String>,
7618        description: impl Into<String>,
7619    ) -> Env {
7620        let mut query = self.selection.select("withStringInput");
7621        query = query.arg("name", name.into());
7622        query = query.arg("value", value.into());
7623        query = query.arg("description", description.into());
7624        Env {
7625            proc: self.proc.clone(),
7626            selection: query,
7627            graphql_client: self.graphql_client.clone(),
7628        }
7629    }
7630    /// Declares a desired string output binding
7631    ///
7632    /// # Arguments
7633    ///
7634    /// * `name` - The name of the binding
7635    /// * `description` - The description of the output
7636    pub fn with_string_output(
7637        &self,
7638        name: impl Into<String>,
7639        description: impl Into<String>,
7640    ) -> Env {
7641        let mut query = self.selection.select("withStringOutput");
7642        query = query.arg("name", name.into());
7643        query = query.arg("description", description.into());
7644        Env {
7645            proc: self.proc.clone(),
7646            selection: query,
7647            graphql_client: self.graphql_client.clone(),
7648        }
7649    }
7650    /// Returns a new environment with the provided workspace
7651    ///
7652    /// # Arguments
7653    ///
7654    /// * `workspace` - The directory to set as the host filesystem
7655    pub fn with_workspace(&self, workspace: impl IntoID<DirectoryId>) -> Env {
7656        let mut query = self.selection.select("withWorkspace");
7657        query = query.arg_lazy(
7658            "workspace",
7659            Box::new(move || {
7660                let workspace = workspace.clone();
7661                Box::pin(async move { workspace.into_id().await.unwrap().quote() })
7662            }),
7663        );
7664        Env {
7665            proc: self.proc.clone(),
7666            selection: query,
7667            graphql_client: self.graphql_client.clone(),
7668        }
7669    }
7670    /// Returns a new environment without any outputs
7671    pub fn without_outputs(&self) -> Env {
7672        let query = self.selection.select("withoutOutputs");
7673        Env {
7674            proc: self.proc.clone(),
7675            selection: query,
7676            graphql_client: self.graphql_client.clone(),
7677        }
7678    }
7679    pub fn workspace(&self) -> Directory {
7680        let query = self.selection.select("workspace");
7681        Directory {
7682            proc: self.proc.clone(),
7683            selection: query,
7684            graphql_client: self.graphql_client.clone(),
7685        }
7686    }
7687}
7688#[derive(Clone)]
7689pub struct EnvFile {
7690    pub proc: Option<Arc<DaggerSessionProc>>,
7691    pub selection: Selection,
7692    pub graphql_client: DynGraphQLClient,
7693}
7694#[derive(Builder, Debug, PartialEq)]
7695pub struct EnvFileGetOpts {
7696    /// Return the value exactly as written to the file. No quote removal or variable expansion
7697    #[builder(setter(into, strip_option), default)]
7698    pub raw: Option<bool>,
7699}
7700#[derive(Builder, Debug, PartialEq)]
7701pub struct EnvFileVariablesOpts {
7702    /// Return values exactly as written to the file. No quote removal or variable expansion
7703    #[builder(setter(into, strip_option), default)]
7704    pub raw: Option<bool>,
7705}
7706impl EnvFile {
7707    /// Return as a file
7708    pub fn as_file(&self) -> File {
7709        let query = self.selection.select("asFile");
7710        File {
7711            proc: self.proc.clone(),
7712            selection: query,
7713            graphql_client: self.graphql_client.clone(),
7714        }
7715    }
7716    /// Check if a variable exists
7717    ///
7718    /// # Arguments
7719    ///
7720    /// * `name` - Variable name
7721    pub async fn exists(&self, name: impl Into<String>) -> Result<bool, DaggerError> {
7722        let mut query = self.selection.select("exists");
7723        query = query.arg("name", name.into());
7724        query.execute(self.graphql_client.clone()).await
7725    }
7726    /// Lookup a variable (last occurrence wins) and return its value, or an empty string
7727    ///
7728    /// # Arguments
7729    ///
7730    /// * `name` - Variable name
7731    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7732    pub async fn get(&self, name: impl Into<String>) -> Result<String, DaggerError> {
7733        let mut query = self.selection.select("get");
7734        query = query.arg("name", name.into());
7735        query.execute(self.graphql_client.clone()).await
7736    }
7737    /// Lookup a variable (last occurrence wins) and return its value, or an empty string
7738    ///
7739    /// # Arguments
7740    ///
7741    /// * `name` - Variable name
7742    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7743    pub async fn get_opts(
7744        &self,
7745        name: impl Into<String>,
7746        opts: EnvFileGetOpts,
7747    ) -> Result<String, DaggerError> {
7748        let mut query = self.selection.select("get");
7749        query = query.arg("name", name.into());
7750        if let Some(raw) = opts.raw {
7751            query = query.arg("raw", raw);
7752        }
7753        query.execute(self.graphql_client.clone()).await
7754    }
7755    /// A unique identifier for this EnvFile.
7756    pub async fn id(&self) -> Result<EnvFileId, DaggerError> {
7757        let query = self.selection.select("id");
7758        query.execute(self.graphql_client.clone()).await
7759    }
7760    /// 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
7761    ///
7762    /// # Arguments
7763    ///
7764    /// * `prefix` - The prefix to filter by
7765    pub fn namespace(&self, prefix: impl Into<String>) -> EnvFile {
7766        let mut query = self.selection.select("namespace");
7767        query = query.arg("prefix", prefix.into());
7768        EnvFile {
7769            proc: self.proc.clone(),
7770            selection: query,
7771            graphql_client: self.graphql_client.clone(),
7772        }
7773    }
7774    /// Return all variables
7775    ///
7776    /// # Arguments
7777    ///
7778    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7779    pub fn variables(&self) -> Vec<EnvVariable> {
7780        let query = self.selection.select("variables");
7781        vec![EnvVariable {
7782            proc: self.proc.clone(),
7783            selection: query,
7784            graphql_client: self.graphql_client.clone(),
7785        }]
7786    }
7787    /// Return all variables
7788    ///
7789    /// # Arguments
7790    ///
7791    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7792    pub fn variables_opts(&self, opts: EnvFileVariablesOpts) -> Vec<EnvVariable> {
7793        let mut query = self.selection.select("variables");
7794        if let Some(raw) = opts.raw {
7795            query = query.arg("raw", raw);
7796        }
7797        vec![EnvVariable {
7798            proc: self.proc.clone(),
7799            selection: query,
7800            graphql_client: self.graphql_client.clone(),
7801        }]
7802    }
7803    /// Add a variable
7804    ///
7805    /// # Arguments
7806    ///
7807    /// * `name` - Variable name
7808    /// * `value` - Variable value
7809    pub fn with_variable(&self, name: impl Into<String>, value: impl Into<String>) -> EnvFile {
7810        let mut query = self.selection.select("withVariable");
7811        query = query.arg("name", name.into());
7812        query = query.arg("value", value.into());
7813        EnvFile {
7814            proc: self.proc.clone(),
7815            selection: query,
7816            graphql_client: self.graphql_client.clone(),
7817        }
7818    }
7819    /// Remove all occurrences of the named variable
7820    ///
7821    /// # Arguments
7822    ///
7823    /// * `name` - Variable name
7824    pub fn without_variable(&self, name: impl Into<String>) -> EnvFile {
7825        let mut query = self.selection.select("withoutVariable");
7826        query = query.arg("name", name.into());
7827        EnvFile {
7828            proc: self.proc.clone(),
7829            selection: query,
7830            graphql_client: self.graphql_client.clone(),
7831        }
7832    }
7833}
7834#[derive(Clone)]
7835pub struct EnvVariable {
7836    pub proc: Option<Arc<DaggerSessionProc>>,
7837    pub selection: Selection,
7838    pub graphql_client: DynGraphQLClient,
7839}
7840impl EnvVariable {
7841    /// A unique identifier for this EnvVariable.
7842    pub async fn id(&self) -> Result<EnvVariableId, DaggerError> {
7843        let query = self.selection.select("id");
7844        query.execute(self.graphql_client.clone()).await
7845    }
7846    /// The environment variable name.
7847    pub async fn name(&self) -> Result<String, DaggerError> {
7848        let query = self.selection.select("name");
7849        query.execute(self.graphql_client.clone()).await
7850    }
7851    /// The environment variable value.
7852    pub async fn value(&self) -> Result<String, DaggerError> {
7853        let query = self.selection.select("value");
7854        query.execute(self.graphql_client.clone()).await
7855    }
7856}
7857#[derive(Clone)]
7858pub struct Error {
7859    pub proc: Option<Arc<DaggerSessionProc>>,
7860    pub selection: Selection,
7861    pub graphql_client: DynGraphQLClient,
7862}
7863impl Error {
7864    /// A unique identifier for this Error.
7865    pub async fn id(&self) -> Result<ErrorId, DaggerError> {
7866        let query = self.selection.select("id");
7867        query.execute(self.graphql_client.clone()).await
7868    }
7869    /// A description of the error.
7870    pub async fn message(&self) -> Result<String, DaggerError> {
7871        let query = self.selection.select("message");
7872        query.execute(self.graphql_client.clone()).await
7873    }
7874    /// The extensions of the error.
7875    pub fn values(&self) -> Vec<ErrorValue> {
7876        let query = self.selection.select("values");
7877        vec![ErrorValue {
7878            proc: self.proc.clone(),
7879            selection: query,
7880            graphql_client: self.graphql_client.clone(),
7881        }]
7882    }
7883    /// Add a value to the error.
7884    ///
7885    /// # Arguments
7886    ///
7887    /// * `name` - The name of the value.
7888    /// * `value` - The value to store on the error.
7889    pub fn with_value(&self, name: impl Into<String>, value: Json) -> Error {
7890        let mut query = self.selection.select("withValue");
7891        query = query.arg("name", name.into());
7892        query = query.arg("value", value);
7893        Error {
7894            proc: self.proc.clone(),
7895            selection: query,
7896            graphql_client: self.graphql_client.clone(),
7897        }
7898    }
7899}
7900#[derive(Clone)]
7901pub struct ErrorValue {
7902    pub proc: Option<Arc<DaggerSessionProc>>,
7903    pub selection: Selection,
7904    pub graphql_client: DynGraphQLClient,
7905}
7906impl ErrorValue {
7907    /// A unique identifier for this ErrorValue.
7908    pub async fn id(&self) -> Result<ErrorValueId, DaggerError> {
7909        let query = self.selection.select("id");
7910        query.execute(self.graphql_client.clone()).await
7911    }
7912    /// The name of the value.
7913    pub async fn name(&self) -> Result<String, DaggerError> {
7914        let query = self.selection.select("name");
7915        query.execute(self.graphql_client.clone()).await
7916    }
7917    /// The value.
7918    pub async fn value(&self) -> Result<Json, DaggerError> {
7919        let query = self.selection.select("value");
7920        query.execute(self.graphql_client.clone()).await
7921    }
7922}
7923#[derive(Clone)]
7924pub struct FieldTypeDef {
7925    pub proc: Option<Arc<DaggerSessionProc>>,
7926    pub selection: Selection,
7927    pub graphql_client: DynGraphQLClient,
7928}
7929impl FieldTypeDef {
7930    /// The reason this enum member is deprecated, if any.
7931    pub async fn deprecated(&self) -> Result<String, DaggerError> {
7932        let query = self.selection.select("deprecated");
7933        query.execute(self.graphql_client.clone()).await
7934    }
7935    /// A doc string for the field, if any.
7936    pub async fn description(&self) -> Result<String, DaggerError> {
7937        let query = self.selection.select("description");
7938        query.execute(self.graphql_client.clone()).await
7939    }
7940    /// A unique identifier for this FieldTypeDef.
7941    pub async fn id(&self) -> Result<FieldTypeDefId, DaggerError> {
7942        let query = self.selection.select("id");
7943        query.execute(self.graphql_client.clone()).await
7944    }
7945    /// The name of the field in lowerCamelCase format.
7946    pub async fn name(&self) -> Result<String, DaggerError> {
7947        let query = self.selection.select("name");
7948        query.execute(self.graphql_client.clone()).await
7949    }
7950    /// The location of this field declaration.
7951    pub fn source_map(&self) -> SourceMap {
7952        let query = self.selection.select("sourceMap");
7953        SourceMap {
7954            proc: self.proc.clone(),
7955            selection: query,
7956            graphql_client: self.graphql_client.clone(),
7957        }
7958    }
7959    /// The type of the field.
7960    pub fn type_def(&self) -> TypeDef {
7961        let query = self.selection.select("typeDef");
7962        TypeDef {
7963            proc: self.proc.clone(),
7964            selection: query,
7965            graphql_client: self.graphql_client.clone(),
7966        }
7967    }
7968}
7969#[derive(Clone)]
7970pub struct File {
7971    pub proc: Option<Arc<DaggerSessionProc>>,
7972    pub selection: Selection,
7973    pub graphql_client: DynGraphQLClient,
7974}
7975#[derive(Builder, Debug, PartialEq)]
7976pub struct FileAsEnvFileOpts {
7977    /// Replace "${VAR}" or "$VAR" with the value of other vars
7978    #[builder(setter(into, strip_option), default)]
7979    pub expand: Option<bool>,
7980}
7981#[derive(Builder, Debug, PartialEq)]
7982pub struct FileContentsOpts {
7983    /// Maximum number of lines to read
7984    #[builder(setter(into, strip_option), default)]
7985    pub limit_lines: Option<isize>,
7986    /// Start reading after this line
7987    #[builder(setter(into, strip_option), default)]
7988    pub offset_lines: Option<isize>,
7989}
7990#[derive(Builder, Debug, PartialEq)]
7991pub struct FileDigestOpts {
7992    /// If true, exclude metadata from the digest.
7993    #[builder(setter(into, strip_option), default)]
7994    pub exclude_metadata: Option<bool>,
7995}
7996#[derive(Builder, Debug, PartialEq)]
7997pub struct FileExportOpts {
7998    /// If allowParentDirPath is true, the path argument can be a directory path, in which case the file will be created in that directory.
7999    #[builder(setter(into, strip_option), default)]
8000    pub allow_parent_dir_path: Option<bool>,
8001}
8002#[derive(Builder, Debug, PartialEq)]
8003pub struct FileSearchOpts<'a> {
8004    /// Allow the . pattern to match newlines in multiline mode.
8005    #[builder(setter(into, strip_option), default)]
8006    pub dotall: Option<bool>,
8007    /// Only return matching files, not lines and content
8008    #[builder(setter(into, strip_option), default)]
8009    pub files_only: Option<bool>,
8010    #[builder(setter(into, strip_option), default)]
8011    pub globs: Option<Vec<&'a str>>,
8012    /// Enable case-insensitive matching.
8013    #[builder(setter(into, strip_option), default)]
8014    pub insensitive: Option<bool>,
8015    /// Limit the number of results to return
8016    #[builder(setter(into, strip_option), default)]
8017    pub limit: Option<isize>,
8018    /// Interpret the pattern as a literal string instead of a regular expression.
8019    #[builder(setter(into, strip_option), default)]
8020    pub literal: Option<bool>,
8021    /// Enable searching across multiple lines.
8022    #[builder(setter(into, strip_option), default)]
8023    pub multiline: Option<bool>,
8024    #[builder(setter(into, strip_option), default)]
8025    pub paths: Option<Vec<&'a str>>,
8026    /// Skip hidden files (files starting with .).
8027    #[builder(setter(into, strip_option), default)]
8028    pub skip_hidden: Option<bool>,
8029    /// Honor .gitignore, .ignore, and .rgignore files.
8030    #[builder(setter(into, strip_option), default)]
8031    pub skip_ignored: Option<bool>,
8032}
8033#[derive(Builder, Debug, PartialEq)]
8034pub struct FileWithReplacedOpts {
8035    /// Replace all occurrences of the pattern.
8036    #[builder(setter(into, strip_option), default)]
8037    pub all: Option<bool>,
8038    /// Replace the first match starting from the specified line.
8039    #[builder(setter(into, strip_option), default)]
8040    pub first_from: Option<isize>,
8041}
8042impl File {
8043    /// Parse as an env file
8044    ///
8045    /// # Arguments
8046    ///
8047    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8048    pub fn as_env_file(&self) -> EnvFile {
8049        let query = self.selection.select("asEnvFile");
8050        EnvFile {
8051            proc: self.proc.clone(),
8052            selection: query,
8053            graphql_client: self.graphql_client.clone(),
8054        }
8055    }
8056    /// Parse as an env file
8057    ///
8058    /// # Arguments
8059    ///
8060    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8061    pub fn as_env_file_opts(&self, opts: FileAsEnvFileOpts) -> EnvFile {
8062        let mut query = self.selection.select("asEnvFile");
8063        if let Some(expand) = opts.expand {
8064            query = query.arg("expand", expand);
8065        }
8066        EnvFile {
8067            proc: self.proc.clone(),
8068            selection: query,
8069            graphql_client: self.graphql_client.clone(),
8070        }
8071    }
8072    /// Change the owner of the file recursively.
8073    ///
8074    /// # Arguments
8075    ///
8076    /// * `owner` - A user:group to set for the file.
8077    ///
8078    /// The user and group must be an ID (1000:1000), not a name (foo:bar).
8079    ///
8080    /// If the group is omitted, it defaults to the same as the user.
8081    pub fn chown(&self, owner: impl Into<String>) -> File {
8082        let mut query = self.selection.select("chown");
8083        query = query.arg("owner", owner.into());
8084        File {
8085            proc: self.proc.clone(),
8086            selection: query,
8087            graphql_client: self.graphql_client.clone(),
8088        }
8089    }
8090    /// Retrieves the contents of the file.
8091    ///
8092    /// # Arguments
8093    ///
8094    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8095    pub async fn contents(&self) -> Result<String, DaggerError> {
8096        let query = self.selection.select("contents");
8097        query.execute(self.graphql_client.clone()).await
8098    }
8099    /// Retrieves the contents of the file.
8100    ///
8101    /// # Arguments
8102    ///
8103    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8104    pub async fn contents_opts(&self, opts: FileContentsOpts) -> Result<String, DaggerError> {
8105        let mut query = self.selection.select("contents");
8106        if let Some(offset_lines) = opts.offset_lines {
8107            query = query.arg("offsetLines", offset_lines);
8108        }
8109        if let Some(limit_lines) = opts.limit_lines {
8110            query = query.arg("limitLines", limit_lines);
8111        }
8112        query.execute(self.graphql_client.clone()).await
8113    }
8114    /// 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.
8115    ///
8116    /// # Arguments
8117    ///
8118    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8119    pub async fn digest(&self) -> Result<String, DaggerError> {
8120        let query = self.selection.select("digest");
8121        query.execute(self.graphql_client.clone()).await
8122    }
8123    /// 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.
8124    ///
8125    /// # Arguments
8126    ///
8127    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8128    pub async fn digest_opts(&self, opts: FileDigestOpts) -> Result<String, DaggerError> {
8129        let mut query = self.selection.select("digest");
8130        if let Some(exclude_metadata) = opts.exclude_metadata {
8131            query = query.arg("excludeMetadata", exclude_metadata);
8132        }
8133        query.execute(self.graphql_client.clone()).await
8134    }
8135    /// Writes the file to a file path on the host.
8136    ///
8137    /// # Arguments
8138    ///
8139    /// * `path` - Location of the written directory (e.g., "output.txt").
8140    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8141    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
8142        let mut query = self.selection.select("export");
8143        query = query.arg("path", path.into());
8144        query.execute(self.graphql_client.clone()).await
8145    }
8146    /// Writes the file to a file path on the host.
8147    ///
8148    /// # Arguments
8149    ///
8150    /// * `path` - Location of the written directory (e.g., "output.txt").
8151    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8152    pub async fn export_opts(
8153        &self,
8154        path: impl Into<String>,
8155        opts: FileExportOpts,
8156    ) -> Result<String, DaggerError> {
8157        let mut query = self.selection.select("export");
8158        query = query.arg("path", path.into());
8159        if let Some(allow_parent_dir_path) = opts.allow_parent_dir_path {
8160            query = query.arg("allowParentDirPath", allow_parent_dir_path);
8161        }
8162        query.execute(self.graphql_client.clone()).await
8163    }
8164    /// A unique identifier for this File.
8165    pub async fn id(&self) -> Result<FileId, DaggerError> {
8166        let query = self.selection.select("id");
8167        query.execute(self.graphql_client.clone()).await
8168    }
8169    /// Retrieves the name of the file.
8170    pub async fn name(&self) -> Result<String, DaggerError> {
8171        let query = self.selection.select("name");
8172        query.execute(self.graphql_client.clone()).await
8173    }
8174    /// Searches for content matching the given regular expression or literal string.
8175    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
8176    ///
8177    /// # Arguments
8178    ///
8179    /// * `pattern` - The text to match.
8180    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8181    pub fn search(&self, pattern: impl Into<String>) -> Vec<SearchResult> {
8182        let mut query = self.selection.select("search");
8183        query = query.arg("pattern", pattern.into());
8184        vec![SearchResult {
8185            proc: self.proc.clone(),
8186            selection: query,
8187            graphql_client: self.graphql_client.clone(),
8188        }]
8189    }
8190    /// Searches for content matching the given regular expression or literal string.
8191    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
8192    ///
8193    /// # Arguments
8194    ///
8195    /// * `pattern` - The text to match.
8196    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8197    pub fn search_opts<'a>(
8198        &self,
8199        pattern: impl Into<String>,
8200        opts: FileSearchOpts<'a>,
8201    ) -> Vec<SearchResult> {
8202        let mut query = self.selection.select("search");
8203        query = query.arg("pattern", pattern.into());
8204        if let Some(literal) = opts.literal {
8205            query = query.arg("literal", literal);
8206        }
8207        if let Some(multiline) = opts.multiline {
8208            query = query.arg("multiline", multiline);
8209        }
8210        if let Some(dotall) = opts.dotall {
8211            query = query.arg("dotall", dotall);
8212        }
8213        if let Some(insensitive) = opts.insensitive {
8214            query = query.arg("insensitive", insensitive);
8215        }
8216        if let Some(skip_ignored) = opts.skip_ignored {
8217            query = query.arg("skipIgnored", skip_ignored);
8218        }
8219        if let Some(skip_hidden) = opts.skip_hidden {
8220            query = query.arg("skipHidden", skip_hidden);
8221        }
8222        if let Some(files_only) = opts.files_only {
8223            query = query.arg("filesOnly", files_only);
8224        }
8225        if let Some(limit) = opts.limit {
8226            query = query.arg("limit", limit);
8227        }
8228        if let Some(paths) = opts.paths {
8229            query = query.arg("paths", paths);
8230        }
8231        if let Some(globs) = opts.globs {
8232            query = query.arg("globs", globs);
8233        }
8234        vec![SearchResult {
8235            proc: self.proc.clone(),
8236            selection: query,
8237            graphql_client: self.graphql_client.clone(),
8238        }]
8239    }
8240    /// Retrieves the size of the file, in bytes.
8241    pub async fn size(&self) -> Result<isize, DaggerError> {
8242        let query = self.selection.select("size");
8243        query.execute(self.graphql_client.clone()).await
8244    }
8245    /// Force evaluation in the engine.
8246    pub async fn sync(&self) -> Result<FileId, DaggerError> {
8247        let query = self.selection.select("sync");
8248        query.execute(self.graphql_client.clone()).await
8249    }
8250    /// Retrieves this file with its name set to the given name.
8251    ///
8252    /// # Arguments
8253    ///
8254    /// * `name` - Name to set file to.
8255    pub fn with_name(&self, name: impl Into<String>) -> File {
8256        let mut query = self.selection.select("withName");
8257        query = query.arg("name", name.into());
8258        File {
8259            proc: self.proc.clone(),
8260            selection: query,
8261            graphql_client: self.graphql_client.clone(),
8262        }
8263    }
8264    /// Retrieves the file with content replaced with the given text.
8265    /// If 'all' is true, all occurrences of the pattern will be replaced.
8266    /// If 'firstAfter' is specified, only the first match starting at the specified line will be replaced.
8267    /// If neither are specified, and there are multiple matches for the pattern, this will error.
8268    /// If there are no matches for the pattern, this will error.
8269    ///
8270    /// # Arguments
8271    ///
8272    /// * `search` - The text to match.
8273    /// * `replacement` - The text to match.
8274    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8275    pub fn with_replaced(&self, search: impl Into<String>, replacement: impl Into<String>) -> File {
8276        let mut query = self.selection.select("withReplaced");
8277        query = query.arg("search", search.into());
8278        query = query.arg("replacement", replacement.into());
8279        File {
8280            proc: self.proc.clone(),
8281            selection: query,
8282            graphql_client: self.graphql_client.clone(),
8283        }
8284    }
8285    /// Retrieves the file with content replaced with the given text.
8286    /// If 'all' is true, all occurrences of the pattern will be replaced.
8287    /// If 'firstAfter' is specified, only the first match starting at the specified line will be replaced.
8288    /// If neither are specified, and there are multiple matches for the pattern, this will error.
8289    /// If there are no matches for the pattern, this will error.
8290    ///
8291    /// # Arguments
8292    ///
8293    /// * `search` - The text to match.
8294    /// * `replacement` - The text to match.
8295    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8296    pub fn with_replaced_opts(
8297        &self,
8298        search: impl Into<String>,
8299        replacement: impl Into<String>,
8300        opts: FileWithReplacedOpts,
8301    ) -> File {
8302        let mut query = self.selection.select("withReplaced");
8303        query = query.arg("search", search.into());
8304        query = query.arg("replacement", replacement.into());
8305        if let Some(all) = opts.all {
8306            query = query.arg("all", all);
8307        }
8308        if let Some(first_from) = opts.first_from {
8309            query = query.arg("firstFrom", first_from);
8310        }
8311        File {
8312            proc: self.proc.clone(),
8313            selection: query,
8314            graphql_client: self.graphql_client.clone(),
8315        }
8316    }
8317    /// Retrieves this file with its created/modified timestamps set to the given time.
8318    ///
8319    /// # Arguments
8320    ///
8321    /// * `timestamp` - Timestamp to set dir/files in.
8322    ///
8323    /// Formatted in seconds following Unix epoch (e.g., 1672531199).
8324    pub fn with_timestamps(&self, timestamp: isize) -> File {
8325        let mut query = self.selection.select("withTimestamps");
8326        query = query.arg("timestamp", timestamp);
8327        File {
8328            proc: self.proc.clone(),
8329            selection: query,
8330            graphql_client: self.graphql_client.clone(),
8331        }
8332    }
8333}
8334#[derive(Clone)]
8335pub struct Function {
8336    pub proc: Option<Arc<DaggerSessionProc>>,
8337    pub selection: Selection,
8338    pub graphql_client: DynGraphQLClient,
8339}
8340#[derive(Builder, Debug, PartialEq)]
8341pub struct FunctionWithArgOpts<'a> {
8342    /// If the argument is a Directory or File type, default to load path from context directory, relative to root directory.
8343    #[builder(setter(into, strip_option), default)]
8344    pub default_path: Option<&'a str>,
8345    /// A default value to use for this argument if not explicitly set by the caller, if any
8346    #[builder(setter(into, strip_option), default)]
8347    pub default_value: Option<Json>,
8348    /// If deprecated, the reason or migration path.
8349    #[builder(setter(into, strip_option), default)]
8350    pub deprecated: Option<&'a str>,
8351    /// A doc string for the argument, if any
8352    #[builder(setter(into, strip_option), default)]
8353    pub description: Option<&'a str>,
8354    /// Patterns to ignore when loading the contextual argument value.
8355    #[builder(setter(into, strip_option), default)]
8356    pub ignore: Option<Vec<&'a str>>,
8357    /// The source map for the argument definition.
8358    #[builder(setter(into, strip_option), default)]
8359    pub source_map: Option<SourceMapId>,
8360}
8361#[derive(Builder, Debug, PartialEq)]
8362pub struct FunctionWithCachePolicyOpts<'a> {
8363    /// The TTL for the cache policy, if applicable. Provided as a duration string, e.g. "5m", "1h30s".
8364    #[builder(setter(into, strip_option), default)]
8365    pub time_to_live: Option<&'a str>,
8366}
8367#[derive(Builder, Debug, PartialEq)]
8368pub struct FunctionWithDeprecatedOpts<'a> {
8369    /// Reason or migration path describing the deprecation.
8370    #[builder(setter(into, strip_option), default)]
8371    pub reason: Option<&'a str>,
8372}
8373impl Function {
8374    /// Arguments accepted by the function, if any.
8375    pub fn args(&self) -> Vec<FunctionArg> {
8376        let query = self.selection.select("args");
8377        vec![FunctionArg {
8378            proc: self.proc.clone(),
8379            selection: query,
8380            graphql_client: self.graphql_client.clone(),
8381        }]
8382    }
8383    /// The reason this function is deprecated, if any.
8384    pub async fn deprecated(&self) -> Result<String, DaggerError> {
8385        let query = self.selection.select("deprecated");
8386        query.execute(self.graphql_client.clone()).await
8387    }
8388    /// A doc string for the function, if any.
8389    pub async fn description(&self) -> Result<String, DaggerError> {
8390        let query = self.selection.select("description");
8391        query.execute(self.graphql_client.clone()).await
8392    }
8393    /// A unique identifier for this Function.
8394    pub async fn id(&self) -> Result<FunctionId, DaggerError> {
8395        let query = self.selection.select("id");
8396        query.execute(self.graphql_client.clone()).await
8397    }
8398    /// The name of the function.
8399    pub async fn name(&self) -> Result<String, DaggerError> {
8400        let query = self.selection.select("name");
8401        query.execute(self.graphql_client.clone()).await
8402    }
8403    /// The type returned by the function.
8404    pub fn return_type(&self) -> TypeDef {
8405        let query = self.selection.select("returnType");
8406        TypeDef {
8407            proc: self.proc.clone(),
8408            selection: query,
8409            graphql_client: self.graphql_client.clone(),
8410        }
8411    }
8412    /// The location of this function declaration.
8413    pub fn source_map(&self) -> SourceMap {
8414        let query = self.selection.select("sourceMap");
8415        SourceMap {
8416            proc: self.proc.clone(),
8417            selection: query,
8418            graphql_client: self.graphql_client.clone(),
8419        }
8420    }
8421    /// Returns the function with the provided argument
8422    ///
8423    /// # Arguments
8424    ///
8425    /// * `name` - The name of the argument
8426    /// * `type_def` - The type of the argument
8427    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8428    pub fn with_arg(&self, name: impl Into<String>, type_def: impl IntoID<TypeDefId>) -> Function {
8429        let mut query = self.selection.select("withArg");
8430        query = query.arg("name", name.into());
8431        query = query.arg_lazy(
8432            "typeDef",
8433            Box::new(move || {
8434                let type_def = type_def.clone();
8435                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
8436            }),
8437        );
8438        Function {
8439            proc: self.proc.clone(),
8440            selection: query,
8441            graphql_client: self.graphql_client.clone(),
8442        }
8443    }
8444    /// Returns the function with the provided argument
8445    ///
8446    /// # Arguments
8447    ///
8448    /// * `name` - The name of the argument
8449    /// * `type_def` - The type of the argument
8450    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8451    pub fn with_arg_opts<'a>(
8452        &self,
8453        name: impl Into<String>,
8454        type_def: impl IntoID<TypeDefId>,
8455        opts: FunctionWithArgOpts<'a>,
8456    ) -> Function {
8457        let mut query = self.selection.select("withArg");
8458        query = query.arg("name", name.into());
8459        query = query.arg_lazy(
8460            "typeDef",
8461            Box::new(move || {
8462                let type_def = type_def.clone();
8463                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
8464            }),
8465        );
8466        if let Some(description) = opts.description {
8467            query = query.arg("description", description);
8468        }
8469        if let Some(default_value) = opts.default_value {
8470            query = query.arg("defaultValue", default_value);
8471        }
8472        if let Some(default_path) = opts.default_path {
8473            query = query.arg("defaultPath", default_path);
8474        }
8475        if let Some(ignore) = opts.ignore {
8476            query = query.arg("ignore", ignore);
8477        }
8478        if let Some(source_map) = opts.source_map {
8479            query = query.arg("sourceMap", source_map);
8480        }
8481        if let Some(deprecated) = opts.deprecated {
8482            query = query.arg("deprecated", deprecated);
8483        }
8484        Function {
8485            proc: self.proc.clone(),
8486            selection: query,
8487            graphql_client: self.graphql_client.clone(),
8488        }
8489    }
8490    /// Returns the function updated to use the provided cache policy.
8491    ///
8492    /// # Arguments
8493    ///
8494    /// * `policy` - The cache policy to use.
8495    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8496    pub fn with_cache_policy(&self, policy: FunctionCachePolicy) -> Function {
8497        let mut query = self.selection.select("withCachePolicy");
8498        query = query.arg("policy", policy);
8499        Function {
8500            proc: self.proc.clone(),
8501            selection: query,
8502            graphql_client: self.graphql_client.clone(),
8503        }
8504    }
8505    /// Returns the function updated to use the provided cache policy.
8506    ///
8507    /// # Arguments
8508    ///
8509    /// * `policy` - The cache policy to use.
8510    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8511    pub fn with_cache_policy_opts<'a>(
8512        &self,
8513        policy: FunctionCachePolicy,
8514        opts: FunctionWithCachePolicyOpts<'a>,
8515    ) -> Function {
8516        let mut query = self.selection.select("withCachePolicy");
8517        query = query.arg("policy", policy);
8518        if let Some(time_to_live) = opts.time_to_live {
8519            query = query.arg("timeToLive", time_to_live);
8520        }
8521        Function {
8522            proc: self.proc.clone(),
8523            selection: query,
8524            graphql_client: self.graphql_client.clone(),
8525        }
8526    }
8527    /// Returns the function with a flag indicating it's a check.
8528    pub fn with_check(&self) -> Function {
8529        let query = self.selection.select("withCheck");
8530        Function {
8531            proc: self.proc.clone(),
8532            selection: query,
8533            graphql_client: self.graphql_client.clone(),
8534        }
8535    }
8536    /// Returns the function with the provided deprecation reason.
8537    ///
8538    /// # Arguments
8539    ///
8540    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8541    pub fn with_deprecated(&self) -> Function {
8542        let query = self.selection.select("withDeprecated");
8543        Function {
8544            proc: self.proc.clone(),
8545            selection: query,
8546            graphql_client: self.graphql_client.clone(),
8547        }
8548    }
8549    /// Returns the function with the provided deprecation reason.
8550    ///
8551    /// # Arguments
8552    ///
8553    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8554    pub fn with_deprecated_opts<'a>(&self, opts: FunctionWithDeprecatedOpts<'a>) -> Function {
8555        let mut query = self.selection.select("withDeprecated");
8556        if let Some(reason) = opts.reason {
8557            query = query.arg("reason", reason);
8558        }
8559        Function {
8560            proc: self.proc.clone(),
8561            selection: query,
8562            graphql_client: self.graphql_client.clone(),
8563        }
8564    }
8565    /// Returns the function with the given doc string.
8566    ///
8567    /// # Arguments
8568    ///
8569    /// * `description` - The doc string to set.
8570    pub fn with_description(&self, description: impl Into<String>) -> Function {
8571        let mut query = self.selection.select("withDescription");
8572        query = query.arg("description", description.into());
8573        Function {
8574            proc: self.proc.clone(),
8575            selection: query,
8576            graphql_client: self.graphql_client.clone(),
8577        }
8578    }
8579    /// Returns the function with the given source map.
8580    ///
8581    /// # Arguments
8582    ///
8583    /// * `source_map` - The source map for the function definition.
8584    pub fn with_source_map(&self, source_map: impl IntoID<SourceMapId>) -> Function {
8585        let mut query = self.selection.select("withSourceMap");
8586        query = query.arg_lazy(
8587            "sourceMap",
8588            Box::new(move || {
8589                let source_map = source_map.clone();
8590                Box::pin(async move { source_map.into_id().await.unwrap().quote() })
8591            }),
8592        );
8593        Function {
8594            proc: self.proc.clone(),
8595            selection: query,
8596            graphql_client: self.graphql_client.clone(),
8597        }
8598    }
8599}
8600#[derive(Clone)]
8601pub struct FunctionArg {
8602    pub proc: Option<Arc<DaggerSessionProc>>,
8603    pub selection: Selection,
8604    pub graphql_client: DynGraphQLClient,
8605}
8606impl FunctionArg {
8607    /// 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
8608    pub async fn default_path(&self) -> Result<String, DaggerError> {
8609        let query = self.selection.select("defaultPath");
8610        query.execute(self.graphql_client.clone()).await
8611    }
8612    /// A default value to use for this argument when not explicitly set by the caller, if any.
8613    pub async fn default_value(&self) -> Result<Json, DaggerError> {
8614        let query = self.selection.select("defaultValue");
8615        query.execute(self.graphql_client.clone()).await
8616    }
8617    /// The reason this function is deprecated, if any.
8618    pub async fn deprecated(&self) -> Result<String, DaggerError> {
8619        let query = self.selection.select("deprecated");
8620        query.execute(self.graphql_client.clone()).await
8621    }
8622    /// A doc string for the argument, if any.
8623    pub async fn description(&self) -> Result<String, DaggerError> {
8624        let query = self.selection.select("description");
8625        query.execute(self.graphql_client.clone()).await
8626    }
8627    /// A unique identifier for this FunctionArg.
8628    pub async fn id(&self) -> Result<FunctionArgId, DaggerError> {
8629        let query = self.selection.select("id");
8630        query.execute(self.graphql_client.clone()).await
8631    }
8632    /// 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.
8633    pub async fn ignore(&self) -> Result<Vec<String>, DaggerError> {
8634        let query = self.selection.select("ignore");
8635        query.execute(self.graphql_client.clone()).await
8636    }
8637    /// The name of the argument in lowerCamelCase format.
8638    pub async fn name(&self) -> Result<String, DaggerError> {
8639        let query = self.selection.select("name");
8640        query.execute(self.graphql_client.clone()).await
8641    }
8642    /// The location of this arg declaration.
8643    pub fn source_map(&self) -> SourceMap {
8644        let query = self.selection.select("sourceMap");
8645        SourceMap {
8646            proc: self.proc.clone(),
8647            selection: query,
8648            graphql_client: self.graphql_client.clone(),
8649        }
8650    }
8651    /// The type of the argument.
8652    pub fn type_def(&self) -> TypeDef {
8653        let query = self.selection.select("typeDef");
8654        TypeDef {
8655            proc: self.proc.clone(),
8656            selection: query,
8657            graphql_client: self.graphql_client.clone(),
8658        }
8659    }
8660}
8661#[derive(Clone)]
8662pub struct FunctionCall {
8663    pub proc: Option<Arc<DaggerSessionProc>>,
8664    pub selection: Selection,
8665    pub graphql_client: DynGraphQLClient,
8666}
8667impl FunctionCall {
8668    /// A unique identifier for this FunctionCall.
8669    pub async fn id(&self) -> Result<FunctionCallId, DaggerError> {
8670        let query = self.selection.select("id");
8671        query.execute(self.graphql_client.clone()).await
8672    }
8673    /// The argument values the function is being invoked with.
8674    pub fn input_args(&self) -> Vec<FunctionCallArgValue> {
8675        let query = self.selection.select("inputArgs");
8676        vec![FunctionCallArgValue {
8677            proc: self.proc.clone(),
8678            selection: query,
8679            graphql_client: self.graphql_client.clone(),
8680        }]
8681    }
8682    /// The name of the function being called.
8683    pub async fn name(&self) -> Result<String, DaggerError> {
8684        let query = self.selection.select("name");
8685        query.execute(self.graphql_client.clone()).await
8686    }
8687    /// 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.
8688    pub async fn parent(&self) -> Result<Json, DaggerError> {
8689        let query = self.selection.select("parent");
8690        query.execute(self.graphql_client.clone()).await
8691    }
8692    /// 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.
8693    pub async fn parent_name(&self) -> Result<String, DaggerError> {
8694        let query = self.selection.select("parentName");
8695        query.execute(self.graphql_client.clone()).await
8696    }
8697    /// Return an error from the function.
8698    ///
8699    /// # Arguments
8700    ///
8701    /// * `error` - The error to return.
8702    pub async fn return_error(&self, error: impl IntoID<ErrorId>) -> Result<Void, DaggerError> {
8703        let mut query = self.selection.select("returnError");
8704        query = query.arg_lazy(
8705            "error",
8706            Box::new(move || {
8707                let error = error.clone();
8708                Box::pin(async move { error.into_id().await.unwrap().quote() })
8709            }),
8710        );
8711        query.execute(self.graphql_client.clone()).await
8712    }
8713    /// Set the return value of the function call to the provided value.
8714    ///
8715    /// # Arguments
8716    ///
8717    /// * `value` - JSON serialization of the return value.
8718    pub async fn return_value(&self, value: Json) -> Result<Void, DaggerError> {
8719        let mut query = self.selection.select("returnValue");
8720        query = query.arg("value", value);
8721        query.execute(self.graphql_client.clone()).await
8722    }
8723}
8724#[derive(Clone)]
8725pub struct FunctionCallArgValue {
8726    pub proc: Option<Arc<DaggerSessionProc>>,
8727    pub selection: Selection,
8728    pub graphql_client: DynGraphQLClient,
8729}
8730impl FunctionCallArgValue {
8731    /// A unique identifier for this FunctionCallArgValue.
8732    pub async fn id(&self) -> Result<FunctionCallArgValueId, DaggerError> {
8733        let query = self.selection.select("id");
8734        query.execute(self.graphql_client.clone()).await
8735    }
8736    /// The name of the argument.
8737    pub async fn name(&self) -> Result<String, DaggerError> {
8738        let query = self.selection.select("name");
8739        query.execute(self.graphql_client.clone()).await
8740    }
8741    /// The value of the argument represented as a JSON serialized string.
8742    pub async fn value(&self) -> Result<Json, DaggerError> {
8743        let query = self.selection.select("value");
8744        query.execute(self.graphql_client.clone()).await
8745    }
8746}
8747#[derive(Clone)]
8748pub struct GeneratedCode {
8749    pub proc: Option<Arc<DaggerSessionProc>>,
8750    pub selection: Selection,
8751    pub graphql_client: DynGraphQLClient,
8752}
8753impl GeneratedCode {
8754    /// The directory containing the generated code.
8755    pub fn code(&self) -> Directory {
8756        let query = self.selection.select("code");
8757        Directory {
8758            proc: self.proc.clone(),
8759            selection: query,
8760            graphql_client: self.graphql_client.clone(),
8761        }
8762    }
8763    /// A unique identifier for this GeneratedCode.
8764    pub async fn id(&self) -> Result<GeneratedCodeId, DaggerError> {
8765        let query = self.selection.select("id");
8766        query.execute(self.graphql_client.clone()).await
8767    }
8768    /// List of paths to mark generated in version control (i.e. .gitattributes).
8769    pub async fn vcs_generated_paths(&self) -> Result<Vec<String>, DaggerError> {
8770        let query = self.selection.select("vcsGeneratedPaths");
8771        query.execute(self.graphql_client.clone()).await
8772    }
8773    /// List of paths to ignore in version control (i.e. .gitignore).
8774    pub async fn vcs_ignored_paths(&self) -> Result<Vec<String>, DaggerError> {
8775        let query = self.selection.select("vcsIgnoredPaths");
8776        query.execute(self.graphql_client.clone()).await
8777    }
8778    /// Set the list of paths to mark generated in version control.
8779    pub fn with_vcs_generated_paths(&self, paths: Vec<impl Into<String>>) -> GeneratedCode {
8780        let mut query = self.selection.select("withVCSGeneratedPaths");
8781        query = query.arg(
8782            "paths",
8783            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
8784        );
8785        GeneratedCode {
8786            proc: self.proc.clone(),
8787            selection: query,
8788            graphql_client: self.graphql_client.clone(),
8789        }
8790    }
8791    /// Set the list of paths to ignore in version control.
8792    pub fn with_vcs_ignored_paths(&self, paths: Vec<impl Into<String>>) -> GeneratedCode {
8793        let mut query = self.selection.select("withVCSIgnoredPaths");
8794        query = query.arg(
8795            "paths",
8796            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
8797        );
8798        GeneratedCode {
8799            proc: self.proc.clone(),
8800            selection: query,
8801            graphql_client: self.graphql_client.clone(),
8802        }
8803    }
8804}
8805#[derive(Clone)]
8806pub struct GitRef {
8807    pub proc: Option<Arc<DaggerSessionProc>>,
8808    pub selection: Selection,
8809    pub graphql_client: DynGraphQLClient,
8810}
8811#[derive(Builder, Debug, PartialEq)]
8812pub struct GitRefTreeOpts {
8813    /// The depth of the tree to fetch.
8814    #[builder(setter(into, strip_option), default)]
8815    pub depth: Option<isize>,
8816    /// Set to true to discard .git directory.
8817    #[builder(setter(into, strip_option), default)]
8818    pub discard_git_dir: Option<bool>,
8819}
8820impl GitRef {
8821    /// The resolved commit id at this ref.
8822    pub async fn commit(&self) -> Result<String, DaggerError> {
8823        let query = self.selection.select("commit");
8824        query.execute(self.graphql_client.clone()).await
8825    }
8826    /// Find the best common ancestor between this ref and another ref.
8827    ///
8828    /// # Arguments
8829    ///
8830    /// * `other` - The other ref to compare against.
8831    pub fn common_ancestor(&self, other: impl IntoID<GitRefId>) -> GitRef {
8832        let mut query = self.selection.select("commonAncestor");
8833        query = query.arg_lazy(
8834            "other",
8835            Box::new(move || {
8836                let other = other.clone();
8837                Box::pin(async move { other.into_id().await.unwrap().quote() })
8838            }),
8839        );
8840        GitRef {
8841            proc: self.proc.clone(),
8842            selection: query,
8843            graphql_client: self.graphql_client.clone(),
8844        }
8845    }
8846    /// A unique identifier for this GitRef.
8847    pub async fn id(&self) -> Result<GitRefId, DaggerError> {
8848        let query = self.selection.select("id");
8849        query.execute(self.graphql_client.clone()).await
8850    }
8851    /// The resolved ref name at this ref.
8852    pub async fn r#ref(&self) -> Result<String, DaggerError> {
8853        let query = self.selection.select("ref");
8854        query.execute(self.graphql_client.clone()).await
8855    }
8856    /// The filesystem tree at this ref.
8857    ///
8858    /// # Arguments
8859    ///
8860    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8861    pub fn tree(&self) -> Directory {
8862        let query = self.selection.select("tree");
8863        Directory {
8864            proc: self.proc.clone(),
8865            selection: query,
8866            graphql_client: self.graphql_client.clone(),
8867        }
8868    }
8869    /// The filesystem tree at this ref.
8870    ///
8871    /// # Arguments
8872    ///
8873    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8874    pub fn tree_opts(&self, opts: GitRefTreeOpts) -> Directory {
8875        let mut query = self.selection.select("tree");
8876        if let Some(discard_git_dir) = opts.discard_git_dir {
8877            query = query.arg("discardGitDir", discard_git_dir);
8878        }
8879        if let Some(depth) = opts.depth {
8880            query = query.arg("depth", depth);
8881        }
8882        Directory {
8883            proc: self.proc.clone(),
8884            selection: query,
8885            graphql_client: self.graphql_client.clone(),
8886        }
8887    }
8888}
8889#[derive(Clone)]
8890pub struct GitRepository {
8891    pub proc: Option<Arc<DaggerSessionProc>>,
8892    pub selection: Selection,
8893    pub graphql_client: DynGraphQLClient,
8894}
8895#[derive(Builder, Debug, PartialEq)]
8896pub struct GitRepositoryBranchesOpts<'a> {
8897    /// Glob patterns (e.g., "refs/tags/v*").
8898    #[builder(setter(into, strip_option), default)]
8899    pub patterns: Option<Vec<&'a str>>,
8900}
8901#[derive(Builder, Debug, PartialEq)]
8902pub struct GitRepositoryTagsOpts<'a> {
8903    /// Glob patterns (e.g., "refs/tags/v*").
8904    #[builder(setter(into, strip_option), default)]
8905    pub patterns: Option<Vec<&'a str>>,
8906}
8907impl GitRepository {
8908    /// Returns details of a branch.
8909    ///
8910    /// # Arguments
8911    ///
8912    /// * `name` - Branch's name (e.g., "main").
8913    pub fn branch(&self, name: impl Into<String>) -> GitRef {
8914        let mut query = self.selection.select("branch");
8915        query = query.arg("name", name.into());
8916        GitRef {
8917            proc: self.proc.clone(),
8918            selection: query,
8919            graphql_client: self.graphql_client.clone(),
8920        }
8921    }
8922    /// branches that match any of the given glob patterns.
8923    ///
8924    /// # Arguments
8925    ///
8926    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8927    pub async fn branches(&self) -> Result<Vec<String>, DaggerError> {
8928        let query = self.selection.select("branches");
8929        query.execute(self.graphql_client.clone()).await
8930    }
8931    /// branches that match any of the given glob patterns.
8932    ///
8933    /// # Arguments
8934    ///
8935    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8936    pub async fn branches_opts<'a>(
8937        &self,
8938        opts: GitRepositoryBranchesOpts<'a>,
8939    ) -> Result<Vec<String>, DaggerError> {
8940        let mut query = self.selection.select("branches");
8941        if let Some(patterns) = opts.patterns {
8942            query = query.arg("patterns", patterns);
8943        }
8944        query.execute(self.graphql_client.clone()).await
8945    }
8946    /// Returns details of a commit.
8947    ///
8948    /// # Arguments
8949    ///
8950    /// * `id` - Identifier of the commit (e.g., "b6315d8f2810962c601af73f86831f6866ea798b").
8951    pub fn commit(&self, id: impl Into<String>) -> GitRef {
8952        let mut query = self.selection.select("commit");
8953        query = query.arg("id", id.into());
8954        GitRef {
8955            proc: self.proc.clone(),
8956            selection: query,
8957            graphql_client: self.graphql_client.clone(),
8958        }
8959    }
8960    /// Returns details for HEAD.
8961    pub fn head(&self) -> GitRef {
8962        let query = self.selection.select("head");
8963        GitRef {
8964            proc: self.proc.clone(),
8965            selection: query,
8966            graphql_client: self.graphql_client.clone(),
8967        }
8968    }
8969    /// A unique identifier for this GitRepository.
8970    pub async fn id(&self) -> Result<GitRepositoryId, DaggerError> {
8971        let query = self.selection.select("id");
8972        query.execute(self.graphql_client.clone()).await
8973    }
8974    /// Returns details for the latest semver tag.
8975    pub fn latest_version(&self) -> GitRef {
8976        let query = self.selection.select("latestVersion");
8977        GitRef {
8978            proc: self.proc.clone(),
8979            selection: query,
8980            graphql_client: self.graphql_client.clone(),
8981        }
8982    }
8983    /// Returns details of a ref.
8984    ///
8985    /// # Arguments
8986    ///
8987    /// * `name` - Ref's name (can be a commit identifier, a tag name, a branch name, or a fully-qualified ref).
8988    pub fn r#ref(&self, name: impl Into<String>) -> GitRef {
8989        let mut query = self.selection.select("ref");
8990        query = query.arg("name", name.into());
8991        GitRef {
8992            proc: self.proc.clone(),
8993            selection: query,
8994            graphql_client: self.graphql_client.clone(),
8995        }
8996    }
8997    /// Returns details of a tag.
8998    ///
8999    /// # Arguments
9000    ///
9001    /// * `name` - Tag's name (e.g., "v0.3.9").
9002    pub fn tag(&self, name: impl Into<String>) -> GitRef {
9003        let mut query = self.selection.select("tag");
9004        query = query.arg("name", name.into());
9005        GitRef {
9006            proc: self.proc.clone(),
9007            selection: query,
9008            graphql_client: self.graphql_client.clone(),
9009        }
9010    }
9011    /// tags that match any of the given glob patterns.
9012    ///
9013    /// # Arguments
9014    ///
9015    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9016    pub async fn tags(&self) -> Result<Vec<String>, DaggerError> {
9017        let query = self.selection.select("tags");
9018        query.execute(self.graphql_client.clone()).await
9019    }
9020    /// tags that match any of the given glob patterns.
9021    ///
9022    /// # Arguments
9023    ///
9024    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9025    pub async fn tags_opts<'a>(
9026        &self,
9027        opts: GitRepositoryTagsOpts<'a>,
9028    ) -> Result<Vec<String>, DaggerError> {
9029        let mut query = self.selection.select("tags");
9030        if let Some(patterns) = opts.patterns {
9031            query = query.arg("patterns", patterns);
9032        }
9033        query.execute(self.graphql_client.clone()).await
9034    }
9035    /// Returns the changeset of uncommitted changes in the git repository.
9036    pub fn uncommitted(&self) -> Changeset {
9037        let query = self.selection.select("uncommitted");
9038        Changeset {
9039            proc: self.proc.clone(),
9040            selection: query,
9041            graphql_client: self.graphql_client.clone(),
9042        }
9043    }
9044    /// The URL of the git repository.
9045    pub async fn url(&self) -> Result<String, DaggerError> {
9046        let query = self.selection.select("url");
9047        query.execute(self.graphql_client.clone()).await
9048    }
9049}
9050#[derive(Clone)]
9051pub struct Host {
9052    pub proc: Option<Arc<DaggerSessionProc>>,
9053    pub selection: Selection,
9054    pub graphql_client: DynGraphQLClient,
9055}
9056#[derive(Builder, Debug, PartialEq)]
9057pub struct HostDirectoryOpts<'a> {
9058    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
9059    #[builder(setter(into, strip_option), default)]
9060    pub exclude: Option<Vec<&'a str>>,
9061    /// Apply .gitignore filter rules inside the directory
9062    #[builder(setter(into, strip_option), default)]
9063    pub gitignore: Option<bool>,
9064    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
9065    #[builder(setter(into, strip_option), default)]
9066    pub include: Option<Vec<&'a str>>,
9067    /// If true, the directory will always be reloaded from the host.
9068    #[builder(setter(into, strip_option), default)]
9069    pub no_cache: Option<bool>,
9070}
9071#[derive(Builder, Debug, PartialEq)]
9072pub struct HostFileOpts {
9073    /// If true, the file will always be reloaded from the host.
9074    #[builder(setter(into, strip_option), default)]
9075    pub no_cache: Option<bool>,
9076}
9077#[derive(Builder, Debug, PartialEq)]
9078pub struct HostFindUpOpts {
9079    #[builder(setter(into, strip_option), default)]
9080    pub no_cache: Option<bool>,
9081}
9082#[derive(Builder, Debug, PartialEq)]
9083pub struct HostServiceOpts<'a> {
9084    /// Upstream host to forward traffic to.
9085    #[builder(setter(into, strip_option), default)]
9086    pub host: Option<&'a str>,
9087}
9088#[derive(Builder, Debug, PartialEq)]
9089pub struct HostTunnelOpts {
9090    /// Map each service port to the same port on the host, as if the service were running natively.
9091    /// Note: enabling may result in port conflicts.
9092    #[builder(setter(into, strip_option), default)]
9093    pub native: Option<bool>,
9094    /// Configure explicit port forwarding rules for the tunnel.
9095    /// If a port's frontend is unspecified or 0, a random port will be chosen by the host.
9096    /// 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.
9097    /// If ports are given and native is true, the ports are additive.
9098    #[builder(setter(into, strip_option), default)]
9099    pub ports: Option<Vec<PortForward>>,
9100}
9101impl Host {
9102    /// Accesses a container image on the host.
9103    ///
9104    /// # Arguments
9105    ///
9106    /// * `name` - Name of the image to access.
9107    pub fn container_image(&self, name: impl Into<String>) -> Container {
9108        let mut query = self.selection.select("containerImage");
9109        query = query.arg("name", name.into());
9110        Container {
9111            proc: self.proc.clone(),
9112            selection: query,
9113            graphql_client: self.graphql_client.clone(),
9114        }
9115    }
9116    /// Accesses a directory on the host.
9117    ///
9118    /// # Arguments
9119    ///
9120    /// * `path` - Location of the directory to access (e.g., ".").
9121    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9122    pub fn directory(&self, path: impl Into<String>) -> Directory {
9123        let mut query = self.selection.select("directory");
9124        query = query.arg("path", path.into());
9125        Directory {
9126            proc: self.proc.clone(),
9127            selection: query,
9128            graphql_client: self.graphql_client.clone(),
9129        }
9130    }
9131    /// Accesses a directory on the host.
9132    ///
9133    /// # Arguments
9134    ///
9135    /// * `path` - Location of the directory to access (e.g., ".").
9136    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9137    pub fn directory_opts<'a>(
9138        &self,
9139        path: impl Into<String>,
9140        opts: HostDirectoryOpts<'a>,
9141    ) -> Directory {
9142        let mut query = self.selection.select("directory");
9143        query = query.arg("path", path.into());
9144        if let Some(exclude) = opts.exclude {
9145            query = query.arg("exclude", exclude);
9146        }
9147        if let Some(include) = opts.include {
9148            query = query.arg("include", include);
9149        }
9150        if let Some(no_cache) = opts.no_cache {
9151            query = query.arg("noCache", no_cache);
9152        }
9153        if let Some(gitignore) = opts.gitignore {
9154            query = query.arg("gitignore", gitignore);
9155        }
9156        Directory {
9157            proc: self.proc.clone(),
9158            selection: query,
9159            graphql_client: self.graphql_client.clone(),
9160        }
9161    }
9162    /// Accesses a file on the host.
9163    ///
9164    /// # Arguments
9165    ///
9166    /// * `path` - Location of the file to retrieve (e.g., "README.md").
9167    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9168    pub fn file(&self, path: impl Into<String>) -> File {
9169        let mut query = self.selection.select("file");
9170        query = query.arg("path", path.into());
9171        File {
9172            proc: self.proc.clone(),
9173            selection: query,
9174            graphql_client: self.graphql_client.clone(),
9175        }
9176    }
9177    /// Accesses a file on the host.
9178    ///
9179    /// # Arguments
9180    ///
9181    /// * `path` - Location of the file to retrieve (e.g., "README.md").
9182    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9183    pub fn file_opts(&self, path: impl Into<String>, opts: HostFileOpts) -> File {
9184        let mut query = self.selection.select("file");
9185        query = query.arg("path", path.into());
9186        if let Some(no_cache) = opts.no_cache {
9187            query = query.arg("noCache", no_cache);
9188        }
9189        File {
9190            proc: self.proc.clone(),
9191            selection: query,
9192            graphql_client: self.graphql_client.clone(),
9193        }
9194    }
9195    /// Search for a file or directory by walking up the tree from system workdir. Return its relative path. If no match, return null
9196    ///
9197    /// # Arguments
9198    ///
9199    /// * `name` - name of the file or directory to search for
9200    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9201    pub async fn find_up(&self, name: impl Into<String>) -> Result<String, DaggerError> {
9202        let mut query = self.selection.select("findUp");
9203        query = query.arg("name", name.into());
9204        query.execute(self.graphql_client.clone()).await
9205    }
9206    /// Search for a file or directory by walking up the tree from system workdir. Return its relative path. If no match, return null
9207    ///
9208    /// # Arguments
9209    ///
9210    /// * `name` - name of the file or directory to search for
9211    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9212    pub async fn find_up_opts(
9213        &self,
9214        name: impl Into<String>,
9215        opts: HostFindUpOpts,
9216    ) -> Result<String, DaggerError> {
9217        let mut query = self.selection.select("findUp");
9218        query = query.arg("name", name.into());
9219        if let Some(no_cache) = opts.no_cache {
9220            query = query.arg("noCache", no_cache);
9221        }
9222        query.execute(self.graphql_client.clone()).await
9223    }
9224    /// A unique identifier for this Host.
9225    pub async fn id(&self) -> Result<HostId, DaggerError> {
9226        let query = self.selection.select("id");
9227        query.execute(self.graphql_client.clone()).await
9228    }
9229    /// Creates a service that forwards traffic to a specified address via the host.
9230    ///
9231    /// # Arguments
9232    ///
9233    /// * `ports` - Ports to expose via the service, forwarding through the host network.
9234    ///
9235    /// If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
9236    ///
9237    /// An empty set of ports is not valid; an error will be returned.
9238    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9239    pub fn service(&self, ports: Vec<PortForward>) -> Service {
9240        let mut query = self.selection.select("service");
9241        query = query.arg("ports", ports);
9242        Service {
9243            proc: self.proc.clone(),
9244            selection: query,
9245            graphql_client: self.graphql_client.clone(),
9246        }
9247    }
9248    /// Creates a service that forwards traffic to a specified address via the host.
9249    ///
9250    /// # Arguments
9251    ///
9252    /// * `ports` - Ports to expose via the service, forwarding through the host network.
9253    ///
9254    /// If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
9255    ///
9256    /// An empty set of ports is not valid; an error will be returned.
9257    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9258    pub fn service_opts<'a>(&self, ports: Vec<PortForward>, opts: HostServiceOpts<'a>) -> Service {
9259        let mut query = self.selection.select("service");
9260        query = query.arg("ports", ports);
9261        if let Some(host) = opts.host {
9262            query = query.arg("host", host);
9263        }
9264        Service {
9265            proc: self.proc.clone(),
9266            selection: query,
9267            graphql_client: self.graphql_client.clone(),
9268        }
9269    }
9270    /// Creates a tunnel that forwards traffic from the host to a service.
9271    ///
9272    /// # Arguments
9273    ///
9274    /// * `service` - Service to send traffic from the tunnel.
9275    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9276    pub fn tunnel(&self, service: impl IntoID<ServiceId>) -> Service {
9277        let mut query = self.selection.select("tunnel");
9278        query = query.arg_lazy(
9279            "service",
9280            Box::new(move || {
9281                let service = service.clone();
9282                Box::pin(async move { service.into_id().await.unwrap().quote() })
9283            }),
9284        );
9285        Service {
9286            proc: self.proc.clone(),
9287            selection: query,
9288            graphql_client: self.graphql_client.clone(),
9289        }
9290    }
9291    /// Creates a tunnel that forwards traffic from the host to a service.
9292    ///
9293    /// # Arguments
9294    ///
9295    /// * `service` - Service to send traffic from the tunnel.
9296    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9297    pub fn tunnel_opts(&self, service: impl IntoID<ServiceId>, opts: HostTunnelOpts) -> Service {
9298        let mut query = self.selection.select("tunnel");
9299        query = query.arg_lazy(
9300            "service",
9301            Box::new(move || {
9302                let service = service.clone();
9303                Box::pin(async move { service.into_id().await.unwrap().quote() })
9304            }),
9305        );
9306        if let Some(native) = opts.native {
9307            query = query.arg("native", native);
9308        }
9309        if let Some(ports) = opts.ports {
9310            query = query.arg("ports", ports);
9311        }
9312        Service {
9313            proc: self.proc.clone(),
9314            selection: query,
9315            graphql_client: self.graphql_client.clone(),
9316        }
9317    }
9318    /// Accesses a Unix socket on the host.
9319    ///
9320    /// # Arguments
9321    ///
9322    /// * `path` - Location of the Unix socket (e.g., "/var/run/docker.sock").
9323    pub fn unix_socket(&self, path: impl Into<String>) -> Socket {
9324        let mut query = self.selection.select("unixSocket");
9325        query = query.arg("path", path.into());
9326        Socket {
9327            proc: self.proc.clone(),
9328            selection: query,
9329            graphql_client: self.graphql_client.clone(),
9330        }
9331    }
9332}
9333#[derive(Clone)]
9334pub struct InputTypeDef {
9335    pub proc: Option<Arc<DaggerSessionProc>>,
9336    pub selection: Selection,
9337    pub graphql_client: DynGraphQLClient,
9338}
9339impl InputTypeDef {
9340    /// Static fields defined on this input object, if any.
9341    pub fn fields(&self) -> Vec<FieldTypeDef> {
9342        let query = self.selection.select("fields");
9343        vec![FieldTypeDef {
9344            proc: self.proc.clone(),
9345            selection: query,
9346            graphql_client: self.graphql_client.clone(),
9347        }]
9348    }
9349    /// A unique identifier for this InputTypeDef.
9350    pub async fn id(&self) -> Result<InputTypeDefId, DaggerError> {
9351        let query = self.selection.select("id");
9352        query.execute(self.graphql_client.clone()).await
9353    }
9354    /// The name of the input object.
9355    pub async fn name(&self) -> Result<String, DaggerError> {
9356        let query = self.selection.select("name");
9357        query.execute(self.graphql_client.clone()).await
9358    }
9359}
9360#[derive(Clone)]
9361pub struct InterfaceTypeDef {
9362    pub proc: Option<Arc<DaggerSessionProc>>,
9363    pub selection: Selection,
9364    pub graphql_client: DynGraphQLClient,
9365}
9366impl InterfaceTypeDef {
9367    /// The doc string for the interface, if any.
9368    pub async fn description(&self) -> Result<String, DaggerError> {
9369        let query = self.selection.select("description");
9370        query.execute(self.graphql_client.clone()).await
9371    }
9372    /// Functions defined on this interface, if any.
9373    pub fn functions(&self) -> Vec<Function> {
9374        let query = self.selection.select("functions");
9375        vec![Function {
9376            proc: self.proc.clone(),
9377            selection: query,
9378            graphql_client: self.graphql_client.clone(),
9379        }]
9380    }
9381    /// A unique identifier for this InterfaceTypeDef.
9382    pub async fn id(&self) -> Result<InterfaceTypeDefId, DaggerError> {
9383        let query = self.selection.select("id");
9384        query.execute(self.graphql_client.clone()).await
9385    }
9386    /// The name of the interface.
9387    pub async fn name(&self) -> Result<String, DaggerError> {
9388        let query = self.selection.select("name");
9389        query.execute(self.graphql_client.clone()).await
9390    }
9391    /// The location of this interface declaration.
9392    pub fn source_map(&self) -> SourceMap {
9393        let query = self.selection.select("sourceMap");
9394        SourceMap {
9395            proc: self.proc.clone(),
9396            selection: query,
9397            graphql_client: self.graphql_client.clone(),
9398        }
9399    }
9400    /// If this InterfaceTypeDef is associated with a Module, the name of the module. Unset otherwise.
9401    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
9402        let query = self.selection.select("sourceModuleName");
9403        query.execute(self.graphql_client.clone()).await
9404    }
9405}
9406#[derive(Clone)]
9407pub struct JsonValue {
9408    pub proc: Option<Arc<DaggerSessionProc>>,
9409    pub selection: Selection,
9410    pub graphql_client: DynGraphQLClient,
9411}
9412#[derive(Builder, Debug, PartialEq)]
9413pub struct JsonValueContentsOpts<'a> {
9414    /// Optional line prefix
9415    #[builder(setter(into, strip_option), default)]
9416    pub indent: Option<&'a str>,
9417    /// Pretty-print
9418    #[builder(setter(into, strip_option), default)]
9419    pub pretty: Option<bool>,
9420}
9421impl JsonValue {
9422    /// Decode an array from json
9423    pub fn as_array(&self) -> Vec<JsonValue> {
9424        let query = self.selection.select("asArray");
9425        vec![JsonValue {
9426            proc: self.proc.clone(),
9427            selection: query,
9428            graphql_client: self.graphql_client.clone(),
9429        }]
9430    }
9431    /// Decode a boolean from json
9432    pub async fn as_boolean(&self) -> Result<bool, DaggerError> {
9433        let query = self.selection.select("asBoolean");
9434        query.execute(self.graphql_client.clone()).await
9435    }
9436    /// Decode an integer from json
9437    pub async fn as_integer(&self) -> Result<isize, DaggerError> {
9438        let query = self.selection.select("asInteger");
9439        query.execute(self.graphql_client.clone()).await
9440    }
9441    /// Decode a string from json
9442    pub async fn as_string(&self) -> Result<String, DaggerError> {
9443        let query = self.selection.select("asString");
9444        query.execute(self.graphql_client.clone()).await
9445    }
9446    /// Return the value encoded as json
9447    ///
9448    /// # Arguments
9449    ///
9450    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9451    pub async fn contents(&self) -> Result<Json, DaggerError> {
9452        let query = self.selection.select("contents");
9453        query.execute(self.graphql_client.clone()).await
9454    }
9455    /// Return the value encoded as json
9456    ///
9457    /// # Arguments
9458    ///
9459    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9460    pub async fn contents_opts<'a>(
9461        &self,
9462        opts: JsonValueContentsOpts<'a>,
9463    ) -> Result<Json, DaggerError> {
9464        let mut query = self.selection.select("contents");
9465        if let Some(pretty) = opts.pretty {
9466            query = query.arg("pretty", pretty);
9467        }
9468        if let Some(indent) = opts.indent {
9469            query = query.arg("indent", indent);
9470        }
9471        query.execute(self.graphql_client.clone()).await
9472    }
9473    /// Lookup the field at the given path, and return its value.
9474    ///
9475    /// # Arguments
9476    ///
9477    /// * `path` - Path of the field to lookup, encoded as an array of field names
9478    pub fn field(&self, path: Vec<impl Into<String>>) -> JsonValue {
9479        let mut query = self.selection.select("field");
9480        query = query.arg(
9481            "path",
9482            path.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
9483        );
9484        JsonValue {
9485            proc: self.proc.clone(),
9486            selection: query,
9487            graphql_client: self.graphql_client.clone(),
9488        }
9489    }
9490    /// List fields of the encoded object
9491    pub async fn fields(&self) -> Result<Vec<String>, DaggerError> {
9492        let query = self.selection.select("fields");
9493        query.execute(self.graphql_client.clone()).await
9494    }
9495    /// A unique identifier for this JSONValue.
9496    pub async fn id(&self) -> Result<JsonValueId, DaggerError> {
9497        let query = self.selection.select("id");
9498        query.execute(self.graphql_client.clone()).await
9499    }
9500    /// Encode a boolean to json
9501    ///
9502    /// # Arguments
9503    ///
9504    /// * `value` - New boolean value
9505    pub fn new_boolean(&self, value: bool) -> JsonValue {
9506        let mut query = self.selection.select("newBoolean");
9507        query = query.arg("value", value);
9508        JsonValue {
9509            proc: self.proc.clone(),
9510            selection: query,
9511            graphql_client: self.graphql_client.clone(),
9512        }
9513    }
9514    /// Encode an integer to json
9515    ///
9516    /// # Arguments
9517    ///
9518    /// * `value` - New integer value
9519    pub fn new_integer(&self, value: isize) -> JsonValue {
9520        let mut query = self.selection.select("newInteger");
9521        query = query.arg("value", value);
9522        JsonValue {
9523            proc: self.proc.clone(),
9524            selection: query,
9525            graphql_client: self.graphql_client.clone(),
9526        }
9527    }
9528    /// Encode a string to json
9529    ///
9530    /// # Arguments
9531    ///
9532    /// * `value` - New string value
9533    pub fn new_string(&self, value: impl Into<String>) -> JsonValue {
9534        let mut query = self.selection.select("newString");
9535        query = query.arg("value", value.into());
9536        JsonValue {
9537            proc: self.proc.clone(),
9538            selection: query,
9539            graphql_client: self.graphql_client.clone(),
9540        }
9541    }
9542    /// Return a new json value, decoded from the given content
9543    ///
9544    /// # Arguments
9545    ///
9546    /// * `contents` - New JSON-encoded contents
9547    pub fn with_contents(&self, contents: Json) -> JsonValue {
9548        let mut query = self.selection.select("withContents");
9549        query = query.arg("contents", contents);
9550        JsonValue {
9551            proc: self.proc.clone(),
9552            selection: query,
9553            graphql_client: self.graphql_client.clone(),
9554        }
9555    }
9556    /// Set a new field at the given path
9557    ///
9558    /// # Arguments
9559    ///
9560    /// * `path` - Path of the field to set, encoded as an array of field names
9561    /// * `value` - The new value of the field
9562    pub fn with_field(
9563        &self,
9564        path: Vec<impl Into<String>>,
9565        value: impl IntoID<JsonValueId>,
9566    ) -> JsonValue {
9567        let mut query = self.selection.select("withField");
9568        query = query.arg(
9569            "path",
9570            path.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
9571        );
9572        query = query.arg_lazy(
9573            "value",
9574            Box::new(move || {
9575                let value = value.clone();
9576                Box::pin(async move { value.into_id().await.unwrap().quote() })
9577            }),
9578        );
9579        JsonValue {
9580            proc: self.proc.clone(),
9581            selection: query,
9582            graphql_client: self.graphql_client.clone(),
9583        }
9584    }
9585}
9586#[derive(Clone)]
9587pub struct Llm {
9588    pub proc: Option<Arc<DaggerSessionProc>>,
9589    pub selection: Selection,
9590    pub graphql_client: DynGraphQLClient,
9591}
9592impl Llm {
9593    /// create a branch in the LLM's history
9594    pub fn attempt(&self, number: isize) -> Llm {
9595        let mut query = self.selection.select("attempt");
9596        query = query.arg("number", number);
9597        Llm {
9598            proc: self.proc.clone(),
9599            selection: query,
9600            graphql_client: self.graphql_client.clone(),
9601        }
9602    }
9603    /// returns the type of the current state
9604    pub fn bind_result(&self, name: impl Into<String>) -> Binding {
9605        let mut query = self.selection.select("bindResult");
9606        query = query.arg("name", name.into());
9607        Binding {
9608            proc: self.proc.clone(),
9609            selection: query,
9610            graphql_client: self.graphql_client.clone(),
9611        }
9612    }
9613    /// return the LLM's current environment
9614    pub fn env(&self) -> Env {
9615        let query = self.selection.select("env");
9616        Env {
9617            proc: self.proc.clone(),
9618            selection: query,
9619            graphql_client: self.graphql_client.clone(),
9620        }
9621    }
9622    /// Indicates whether there are any queued prompts or tool results to send to the model
9623    pub async fn has_prompt(&self) -> Result<bool, DaggerError> {
9624        let query = self.selection.select("hasPrompt");
9625        query.execute(self.graphql_client.clone()).await
9626    }
9627    /// return the llm message history
9628    pub async fn history(&self) -> Result<Vec<String>, DaggerError> {
9629        let query = self.selection.select("history");
9630        query.execute(self.graphql_client.clone()).await
9631    }
9632    /// return the raw llm message history as json
9633    pub async fn history_json(&self) -> Result<Json, DaggerError> {
9634        let query = self.selection.select("historyJSON");
9635        query.execute(self.graphql_client.clone()).await
9636    }
9637    /// A unique identifier for this LLM.
9638    pub async fn id(&self) -> Result<Llmid, DaggerError> {
9639        let query = self.selection.select("id");
9640        query.execute(self.graphql_client.clone()).await
9641    }
9642    /// return the last llm reply from the history
9643    pub async fn last_reply(&self) -> Result<String, DaggerError> {
9644        let query = self.selection.select("lastReply");
9645        query.execute(self.graphql_client.clone()).await
9646    }
9647    /// Submit the queued prompt, evaluate any tool calls, queue their results, and keep going until the model ends its turn
9648    pub fn r#loop(&self) -> Llm {
9649        let query = self.selection.select("loop");
9650        Llm {
9651            proc: self.proc.clone(),
9652            selection: query,
9653            graphql_client: self.graphql_client.clone(),
9654        }
9655    }
9656    /// return the model used by the llm
9657    pub async fn model(&self) -> Result<String, DaggerError> {
9658        let query = self.selection.select("model");
9659        query.execute(self.graphql_client.clone()).await
9660    }
9661    /// return the provider used by the llm
9662    pub async fn provider(&self) -> Result<String, DaggerError> {
9663        let query = self.selection.select("provider");
9664        query.execute(self.graphql_client.clone()).await
9665    }
9666    /// Submit the queued prompt or tool call results, evaluate any tool calls, and queue their results
9667    pub async fn step(&self) -> Result<Llmid, DaggerError> {
9668        let query = self.selection.select("step");
9669        query.execute(self.graphql_client.clone()).await
9670    }
9671    /// synchronize LLM state
9672    pub async fn sync(&self) -> Result<Llmid, DaggerError> {
9673        let query = self.selection.select("sync");
9674        query.execute(self.graphql_client.clone()).await
9675    }
9676    /// returns the token usage of the current state
9677    pub fn token_usage(&self) -> LlmTokenUsage {
9678        let query = self.selection.select("tokenUsage");
9679        LlmTokenUsage {
9680            proc: self.proc.clone(),
9681            selection: query,
9682            graphql_client: self.graphql_client.clone(),
9683        }
9684    }
9685    /// print documentation for available tools
9686    pub async fn tools(&self) -> Result<String, DaggerError> {
9687        let query = self.selection.select("tools");
9688        query.execute(self.graphql_client.clone()).await
9689    }
9690    /// Return a new LLM with the specified function no longer exposed as a tool
9691    ///
9692    /// # Arguments
9693    ///
9694    /// * `type_name` - The type name whose function will be blocked
9695    /// * `function` - The function to block
9696    ///
9697    /// Will be converted to lowerCamelCase if necessary.
9698    pub fn with_blocked_function(
9699        &self,
9700        type_name: impl Into<String>,
9701        function: impl Into<String>,
9702    ) -> Llm {
9703        let mut query = self.selection.select("withBlockedFunction");
9704        query = query.arg("typeName", type_name.into());
9705        query = query.arg("function", function.into());
9706        Llm {
9707            proc: self.proc.clone(),
9708            selection: query,
9709            graphql_client: self.graphql_client.clone(),
9710        }
9711    }
9712    /// allow the LLM to interact with an environment via MCP
9713    pub fn with_env(&self, env: impl IntoID<EnvId>) -> Llm {
9714        let mut query = self.selection.select("withEnv");
9715        query = query.arg_lazy(
9716            "env",
9717            Box::new(move || {
9718                let env = env.clone();
9719                Box::pin(async move { env.into_id().await.unwrap().quote() })
9720            }),
9721        );
9722        Llm {
9723            proc: self.proc.clone(),
9724            selection: query,
9725            graphql_client: self.graphql_client.clone(),
9726        }
9727    }
9728    /// Add an external MCP server to the LLM
9729    ///
9730    /// # Arguments
9731    ///
9732    /// * `name` - The name of the MCP server
9733    /// * `service` - The MCP service to run and communicate with over stdio
9734    pub fn with_mcp_server(&self, name: impl Into<String>, service: impl IntoID<ServiceId>) -> Llm {
9735        let mut query = self.selection.select("withMCPServer");
9736        query = query.arg("name", name.into());
9737        query = query.arg_lazy(
9738            "service",
9739            Box::new(move || {
9740                let service = service.clone();
9741                Box::pin(async move { service.into_id().await.unwrap().quote() })
9742            }),
9743        );
9744        Llm {
9745            proc: self.proc.clone(),
9746            selection: query,
9747            graphql_client: self.graphql_client.clone(),
9748        }
9749    }
9750    /// swap out the llm model
9751    ///
9752    /// # Arguments
9753    ///
9754    /// * `model` - The model to use
9755    pub fn with_model(&self, model: impl Into<String>) -> Llm {
9756        let mut query = self.selection.select("withModel");
9757        query = query.arg("model", model.into());
9758        Llm {
9759            proc: self.proc.clone(),
9760            selection: query,
9761            graphql_client: self.graphql_client.clone(),
9762        }
9763    }
9764    /// append a prompt to the llm context
9765    ///
9766    /// # Arguments
9767    ///
9768    /// * `prompt` - The prompt to send
9769    pub fn with_prompt(&self, prompt: impl Into<String>) -> Llm {
9770        let mut query = self.selection.select("withPrompt");
9771        query = query.arg("prompt", prompt.into());
9772        Llm {
9773            proc: self.proc.clone(),
9774            selection: query,
9775            graphql_client: self.graphql_client.clone(),
9776        }
9777    }
9778    /// append the contents of a file to the llm context
9779    ///
9780    /// # Arguments
9781    ///
9782    /// * `file` - The file to read the prompt from
9783    pub fn with_prompt_file(&self, file: impl IntoID<FileId>) -> Llm {
9784        let mut query = self.selection.select("withPromptFile");
9785        query = query.arg_lazy(
9786            "file",
9787            Box::new(move || {
9788                let file = file.clone();
9789                Box::pin(async move { file.into_id().await.unwrap().quote() })
9790            }),
9791        );
9792        Llm {
9793            proc: self.proc.clone(),
9794            selection: query,
9795            graphql_client: self.graphql_client.clone(),
9796        }
9797    }
9798    /// Use a static set of tools for method calls, e.g. for MCP clients that do not support dynamic tool registration
9799    pub fn with_static_tools(&self) -> Llm {
9800        let query = self.selection.select("withStaticTools");
9801        Llm {
9802            proc: self.proc.clone(),
9803            selection: query,
9804            graphql_client: self.graphql_client.clone(),
9805        }
9806    }
9807    /// Add a system prompt to the LLM's environment
9808    ///
9809    /// # Arguments
9810    ///
9811    /// * `prompt` - The system prompt to send
9812    pub fn with_system_prompt(&self, prompt: impl Into<String>) -> Llm {
9813        let mut query = self.selection.select("withSystemPrompt");
9814        query = query.arg("prompt", prompt.into());
9815        Llm {
9816            proc: self.proc.clone(),
9817            selection: query,
9818            graphql_client: self.graphql_client.clone(),
9819        }
9820    }
9821    /// Disable the default system prompt
9822    pub fn without_default_system_prompt(&self) -> Llm {
9823        let query = self.selection.select("withoutDefaultSystemPrompt");
9824        Llm {
9825            proc: self.proc.clone(),
9826            selection: query,
9827            graphql_client: self.graphql_client.clone(),
9828        }
9829    }
9830    /// Clear the message history, leaving only the system prompts
9831    pub fn without_message_history(&self) -> Llm {
9832        let query = self.selection.select("withoutMessageHistory");
9833        Llm {
9834            proc: self.proc.clone(),
9835            selection: query,
9836            graphql_client: self.graphql_client.clone(),
9837        }
9838    }
9839    /// Clear the system prompts, leaving only the default system prompt
9840    pub fn without_system_prompts(&self) -> Llm {
9841        let query = self.selection.select("withoutSystemPrompts");
9842        Llm {
9843            proc: self.proc.clone(),
9844            selection: query,
9845            graphql_client: self.graphql_client.clone(),
9846        }
9847    }
9848}
9849#[derive(Clone)]
9850pub struct LlmTokenUsage {
9851    pub proc: Option<Arc<DaggerSessionProc>>,
9852    pub selection: Selection,
9853    pub graphql_client: DynGraphQLClient,
9854}
9855impl LlmTokenUsage {
9856    pub async fn cached_token_reads(&self) -> Result<isize, DaggerError> {
9857        let query = self.selection.select("cachedTokenReads");
9858        query.execute(self.graphql_client.clone()).await
9859    }
9860    pub async fn cached_token_writes(&self) -> Result<isize, DaggerError> {
9861        let query = self.selection.select("cachedTokenWrites");
9862        query.execute(self.graphql_client.clone()).await
9863    }
9864    /// A unique identifier for this LLMTokenUsage.
9865    pub async fn id(&self) -> Result<LlmTokenUsageId, DaggerError> {
9866        let query = self.selection.select("id");
9867        query.execute(self.graphql_client.clone()).await
9868    }
9869    pub async fn input_tokens(&self) -> Result<isize, DaggerError> {
9870        let query = self.selection.select("inputTokens");
9871        query.execute(self.graphql_client.clone()).await
9872    }
9873    pub async fn output_tokens(&self) -> Result<isize, DaggerError> {
9874        let query = self.selection.select("outputTokens");
9875        query.execute(self.graphql_client.clone()).await
9876    }
9877    pub async fn total_tokens(&self) -> Result<isize, DaggerError> {
9878        let query = self.selection.select("totalTokens");
9879        query.execute(self.graphql_client.clone()).await
9880    }
9881}
9882#[derive(Clone)]
9883pub struct Label {
9884    pub proc: Option<Arc<DaggerSessionProc>>,
9885    pub selection: Selection,
9886    pub graphql_client: DynGraphQLClient,
9887}
9888impl Label {
9889    /// A unique identifier for this Label.
9890    pub async fn id(&self) -> Result<LabelId, DaggerError> {
9891        let query = self.selection.select("id");
9892        query.execute(self.graphql_client.clone()).await
9893    }
9894    /// The label name.
9895    pub async fn name(&self) -> Result<String, DaggerError> {
9896        let query = self.selection.select("name");
9897        query.execute(self.graphql_client.clone()).await
9898    }
9899    /// The label value.
9900    pub async fn value(&self) -> Result<String, DaggerError> {
9901        let query = self.selection.select("value");
9902        query.execute(self.graphql_client.clone()).await
9903    }
9904}
9905#[derive(Clone)]
9906pub struct ListTypeDef {
9907    pub proc: Option<Arc<DaggerSessionProc>>,
9908    pub selection: Selection,
9909    pub graphql_client: DynGraphQLClient,
9910}
9911impl ListTypeDef {
9912    /// The type of the elements in the list.
9913    pub fn element_type_def(&self) -> TypeDef {
9914        let query = self.selection.select("elementTypeDef");
9915        TypeDef {
9916            proc: self.proc.clone(),
9917            selection: query,
9918            graphql_client: self.graphql_client.clone(),
9919        }
9920    }
9921    /// A unique identifier for this ListTypeDef.
9922    pub async fn id(&self) -> Result<ListTypeDefId, DaggerError> {
9923        let query = self.selection.select("id");
9924        query.execute(self.graphql_client.clone()).await
9925    }
9926}
9927#[derive(Clone)]
9928pub struct Module {
9929    pub proc: Option<Arc<DaggerSessionProc>>,
9930    pub selection: Selection,
9931    pub graphql_client: DynGraphQLClient,
9932}
9933#[derive(Builder, Debug, PartialEq)]
9934pub struct ModuleChecksOpts<'a> {
9935    /// Only include checks matching the specified patterns
9936    #[builder(setter(into, strip_option), default)]
9937    pub include: Option<Vec<&'a str>>,
9938}
9939#[derive(Builder, Debug, PartialEq)]
9940pub struct ModuleServeOpts {
9941    /// Expose the dependencies of this module to the client
9942    #[builder(setter(into, strip_option), default)]
9943    pub include_dependencies: Option<bool>,
9944}
9945impl Module {
9946    /// Return the check defined by the module with the given name. Must match to exactly one check.
9947    ///
9948    /// # Arguments
9949    ///
9950    /// * `name` - The name of the check to retrieve
9951    pub fn check(&self, name: impl Into<String>) -> Check {
9952        let mut query = self.selection.select("check");
9953        query = query.arg("name", name.into());
9954        Check {
9955            proc: self.proc.clone(),
9956            selection: query,
9957            graphql_client: self.graphql_client.clone(),
9958        }
9959    }
9960    /// Return all checks defined by the module
9961    ///
9962    /// # Arguments
9963    ///
9964    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9965    pub fn checks(&self) -> CheckGroup {
9966        let query = self.selection.select("checks");
9967        CheckGroup {
9968            proc: self.proc.clone(),
9969            selection: query,
9970            graphql_client: self.graphql_client.clone(),
9971        }
9972    }
9973    /// Return all checks defined by the module
9974    ///
9975    /// # Arguments
9976    ///
9977    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9978    pub fn checks_opts<'a>(&self, opts: ModuleChecksOpts<'a>) -> CheckGroup {
9979        let mut query = self.selection.select("checks");
9980        if let Some(include) = opts.include {
9981            query = query.arg("include", include);
9982        }
9983        CheckGroup {
9984            proc: self.proc.clone(),
9985            selection: query,
9986            graphql_client: self.graphql_client.clone(),
9987        }
9988    }
9989    /// The dependencies of the module.
9990    pub fn dependencies(&self) -> Vec<Module> {
9991        let query = self.selection.select("dependencies");
9992        vec![Module {
9993            proc: self.proc.clone(),
9994            selection: query,
9995            graphql_client: self.graphql_client.clone(),
9996        }]
9997    }
9998    /// The doc string of the module, if any
9999    pub async fn description(&self) -> Result<String, DaggerError> {
10000        let query = self.selection.select("description");
10001        query.execute(self.graphql_client.clone()).await
10002    }
10003    /// Enumerations served by this module.
10004    pub fn enums(&self) -> Vec<TypeDef> {
10005        let query = self.selection.select("enums");
10006        vec![TypeDef {
10007            proc: self.proc.clone(),
10008            selection: query,
10009            graphql_client: self.graphql_client.clone(),
10010        }]
10011    }
10012    /// The generated files and directories made on top of the module source's context directory.
10013    pub fn generated_context_directory(&self) -> Directory {
10014        let query = self.selection.select("generatedContextDirectory");
10015        Directory {
10016            proc: self.proc.clone(),
10017            selection: query,
10018            graphql_client: self.graphql_client.clone(),
10019        }
10020    }
10021    /// A unique identifier for this Module.
10022    pub async fn id(&self) -> Result<ModuleId, DaggerError> {
10023        let query = self.selection.select("id");
10024        query.execute(self.graphql_client.clone()).await
10025    }
10026    /// Interfaces served by this module.
10027    pub fn interfaces(&self) -> Vec<TypeDef> {
10028        let query = self.selection.select("interfaces");
10029        vec![TypeDef {
10030            proc: self.proc.clone(),
10031            selection: query,
10032            graphql_client: self.graphql_client.clone(),
10033        }]
10034    }
10035    /// The introspection schema JSON file for this module.
10036    /// This file represents the schema visible to the module's source code, including all core types and those from the dependencies.
10037    /// Note: this is in the context of a module, so some core types may be hidden.
10038    pub fn introspection_schema_json(&self) -> File {
10039        let query = self.selection.select("introspectionSchemaJSON");
10040        File {
10041            proc: self.proc.clone(),
10042            selection: query,
10043            graphql_client: self.graphql_client.clone(),
10044        }
10045    }
10046    /// The name of the module
10047    pub async fn name(&self) -> Result<String, DaggerError> {
10048        let query = self.selection.select("name");
10049        query.execute(self.graphql_client.clone()).await
10050    }
10051    /// Objects served by this module.
10052    pub fn objects(&self) -> Vec<TypeDef> {
10053        let query = self.selection.select("objects");
10054        vec![TypeDef {
10055            proc: self.proc.clone(),
10056            selection: query,
10057            graphql_client: self.graphql_client.clone(),
10058        }]
10059    }
10060    /// The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile.
10061    pub fn runtime(&self) -> Container {
10062        let query = self.selection.select("runtime");
10063        Container {
10064            proc: self.proc.clone(),
10065            selection: query,
10066            graphql_client: self.graphql_client.clone(),
10067        }
10068    }
10069    /// The SDK config used by this module.
10070    pub fn sdk(&self) -> SdkConfig {
10071        let query = self.selection.select("sdk");
10072        SdkConfig {
10073            proc: self.proc.clone(),
10074            selection: query,
10075            graphql_client: self.graphql_client.clone(),
10076        }
10077    }
10078    /// Serve a module's API in the current session.
10079    /// Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
10080    ///
10081    /// # Arguments
10082    ///
10083    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10084    pub async fn serve(&self) -> Result<Void, DaggerError> {
10085        let query = self.selection.select("serve");
10086        query.execute(self.graphql_client.clone()).await
10087    }
10088    /// Serve a module's API in the current session.
10089    /// Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
10090    ///
10091    /// # Arguments
10092    ///
10093    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10094    pub async fn serve_opts(&self, opts: ModuleServeOpts) -> Result<Void, DaggerError> {
10095        let mut query = self.selection.select("serve");
10096        if let Some(include_dependencies) = opts.include_dependencies {
10097            query = query.arg("includeDependencies", include_dependencies);
10098        }
10099        query.execute(self.graphql_client.clone()).await
10100    }
10101    /// The source for the module.
10102    pub fn source(&self) -> ModuleSource {
10103        let query = self.selection.select("source");
10104        ModuleSource {
10105            proc: self.proc.clone(),
10106            selection: query,
10107            graphql_client: self.graphql_client.clone(),
10108        }
10109    }
10110    /// Forces evaluation of the module, including any loading into the engine and associated validation.
10111    pub async fn sync(&self) -> Result<ModuleId, DaggerError> {
10112        let query = self.selection.select("sync");
10113        query.execute(self.graphql_client.clone()).await
10114    }
10115    /// User-defined default values, loaded from local .env files.
10116    pub fn user_defaults(&self) -> EnvFile {
10117        let query = self.selection.select("userDefaults");
10118        EnvFile {
10119            proc: self.proc.clone(),
10120            selection: query,
10121            graphql_client: self.graphql_client.clone(),
10122        }
10123    }
10124    /// Retrieves the module with the given description
10125    ///
10126    /// # Arguments
10127    ///
10128    /// * `description` - The description to set
10129    pub fn with_description(&self, description: impl Into<String>) -> Module {
10130        let mut query = self.selection.select("withDescription");
10131        query = query.arg("description", description.into());
10132        Module {
10133            proc: self.proc.clone(),
10134            selection: query,
10135            graphql_client: self.graphql_client.clone(),
10136        }
10137    }
10138    /// This module plus the given Enum type and associated values
10139    pub fn with_enum(&self, r#enum: impl IntoID<TypeDefId>) -> Module {
10140        let mut query = self.selection.select("withEnum");
10141        query = query.arg_lazy(
10142            "enum",
10143            Box::new(move || {
10144                let r#enum = r#enum.clone();
10145                Box::pin(async move { r#enum.into_id().await.unwrap().quote() })
10146            }),
10147        );
10148        Module {
10149            proc: self.proc.clone(),
10150            selection: query,
10151            graphql_client: self.graphql_client.clone(),
10152        }
10153    }
10154    /// This module plus the given Interface type and associated functions
10155    pub fn with_interface(&self, iface: impl IntoID<TypeDefId>) -> Module {
10156        let mut query = self.selection.select("withInterface");
10157        query = query.arg_lazy(
10158            "iface",
10159            Box::new(move || {
10160                let iface = iface.clone();
10161                Box::pin(async move { iface.into_id().await.unwrap().quote() })
10162            }),
10163        );
10164        Module {
10165            proc: self.proc.clone(),
10166            selection: query,
10167            graphql_client: self.graphql_client.clone(),
10168        }
10169    }
10170    /// This module plus the given Object type and associated functions.
10171    pub fn with_object(&self, object: impl IntoID<TypeDefId>) -> Module {
10172        let mut query = self.selection.select("withObject");
10173        query = query.arg_lazy(
10174            "object",
10175            Box::new(move || {
10176                let object = object.clone();
10177                Box::pin(async move { object.into_id().await.unwrap().quote() })
10178            }),
10179        );
10180        Module {
10181            proc: self.proc.clone(),
10182            selection: query,
10183            graphql_client: self.graphql_client.clone(),
10184        }
10185    }
10186}
10187#[derive(Clone)]
10188pub struct ModuleConfigClient {
10189    pub proc: Option<Arc<DaggerSessionProc>>,
10190    pub selection: Selection,
10191    pub graphql_client: DynGraphQLClient,
10192}
10193impl ModuleConfigClient {
10194    /// The directory the client is generated in.
10195    pub async fn directory(&self) -> Result<String, DaggerError> {
10196        let query = self.selection.select("directory");
10197        query.execute(self.graphql_client.clone()).await
10198    }
10199    /// The generator to use
10200    pub async fn generator(&self) -> Result<String, DaggerError> {
10201        let query = self.selection.select("generator");
10202        query.execute(self.graphql_client.clone()).await
10203    }
10204    /// A unique identifier for this ModuleConfigClient.
10205    pub async fn id(&self) -> Result<ModuleConfigClientId, DaggerError> {
10206        let query = self.selection.select("id");
10207        query.execute(self.graphql_client.clone()).await
10208    }
10209}
10210#[derive(Clone)]
10211pub struct ModuleSource {
10212    pub proc: Option<Arc<DaggerSessionProc>>,
10213    pub selection: Selection,
10214    pub graphql_client: DynGraphQLClient,
10215}
10216impl ModuleSource {
10217    /// Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation
10218    pub fn as_module(&self) -> Module {
10219        let query = self.selection.select("asModule");
10220        Module {
10221            proc: self.proc.clone(),
10222            selection: query,
10223            graphql_client: self.graphql_client.clone(),
10224        }
10225    }
10226    /// A human readable ref string representation of this module source.
10227    pub async fn as_string(&self) -> Result<String, DaggerError> {
10228        let query = self.selection.select("asString");
10229        query.execute(self.graphql_client.clone()).await
10230    }
10231    /// The blueprint referenced by the module source.
10232    pub fn blueprint(&self) -> ModuleSource {
10233        let query = self.selection.select("blueprint");
10234        ModuleSource {
10235            proc: self.proc.clone(),
10236            selection: query,
10237            graphql_client: self.graphql_client.clone(),
10238        }
10239    }
10240    /// The ref to clone the root of the git repo from. Only valid for git sources.
10241    pub async fn clone_ref(&self) -> Result<String, DaggerError> {
10242        let query = self.selection.select("cloneRef");
10243        query.execute(self.graphql_client.clone()).await
10244    }
10245    /// The resolved commit of the git repo this source points to.
10246    pub async fn commit(&self) -> Result<String, DaggerError> {
10247        let query = self.selection.select("commit");
10248        query.execute(self.graphql_client.clone()).await
10249    }
10250    /// The clients generated for the module.
10251    pub fn config_clients(&self) -> Vec<ModuleConfigClient> {
10252        let query = self.selection.select("configClients");
10253        vec![ModuleConfigClient {
10254            proc: self.proc.clone(),
10255            selection: query,
10256            graphql_client: self.graphql_client.clone(),
10257        }]
10258    }
10259    /// Whether an existing dagger.json for the module was found.
10260    pub async fn config_exists(&self) -> Result<bool, DaggerError> {
10261        let query = self.selection.select("configExists");
10262        query.execute(self.graphql_client.clone()).await
10263    }
10264    /// The full directory loaded for the module source, including the source code as a subdirectory.
10265    pub fn context_directory(&self) -> Directory {
10266        let query = self.selection.select("contextDirectory");
10267        Directory {
10268            proc: self.proc.clone(),
10269            selection: query,
10270            graphql_client: self.graphql_client.clone(),
10271        }
10272    }
10273    /// The dependencies of the module source.
10274    pub fn dependencies(&self) -> Vec<ModuleSource> {
10275        let query = self.selection.select("dependencies");
10276        vec![ModuleSource {
10277            proc: self.proc.clone(),
10278            selection: query,
10279            graphql_client: self.graphql_client.clone(),
10280        }]
10281    }
10282    /// 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.
10283    pub async fn digest(&self) -> Result<String, DaggerError> {
10284        let query = self.selection.select("digest");
10285        query.execute(self.graphql_client.clone()).await
10286    }
10287    /// The directory containing the module configuration and source code (source code may be in a subdir).
10288    ///
10289    /// # Arguments
10290    ///
10291    /// * `path` - A subpath from the source directory to select.
10292    pub fn directory(&self, path: impl Into<String>) -> Directory {
10293        let mut query = self.selection.select("directory");
10294        query = query.arg("path", path.into());
10295        Directory {
10296            proc: self.proc.clone(),
10297            selection: query,
10298            graphql_client: self.graphql_client.clone(),
10299        }
10300    }
10301    /// The engine version of the module.
10302    pub async fn engine_version(&self) -> Result<String, DaggerError> {
10303        let query = self.selection.select("engineVersion");
10304        query.execute(self.graphql_client.clone()).await
10305    }
10306    /// The generated files and directories made on top of the module source's context directory.
10307    pub fn generated_context_directory(&self) -> Directory {
10308        let query = self.selection.select("generatedContextDirectory");
10309        Directory {
10310            proc: self.proc.clone(),
10311            selection: query,
10312            graphql_client: self.graphql_client.clone(),
10313        }
10314    }
10315    /// The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket).
10316    pub async fn html_repo_url(&self) -> Result<String, DaggerError> {
10317        let query = self.selection.select("htmlRepoURL");
10318        query.execute(self.graphql_client.clone()).await
10319    }
10320    /// The URL to the source's git repo in a web browser. Only valid for git sources.
10321    pub async fn html_url(&self) -> Result<String, DaggerError> {
10322        let query = self.selection.select("htmlURL");
10323        query.execute(self.graphql_client.clone()).await
10324    }
10325    /// A unique identifier for this ModuleSource.
10326    pub async fn id(&self) -> Result<ModuleSourceId, DaggerError> {
10327        let query = self.selection.select("id");
10328        query.execute(self.graphql_client.clone()).await
10329    }
10330    /// The introspection schema JSON file for this module source.
10331    /// This file represents the schema visible to the module's source code, including all core types and those from the dependencies.
10332    /// Note: this is in the context of a module, so some core types may be hidden.
10333    pub fn introspection_schema_json(&self) -> File {
10334        let query = self.selection.select("introspectionSchemaJSON");
10335        File {
10336            proc: self.proc.clone(),
10337            selection: query,
10338            graphql_client: self.graphql_client.clone(),
10339        }
10340    }
10341    /// The kind of module source (currently local, git or dir).
10342    pub async fn kind(&self) -> Result<ModuleSourceKind, DaggerError> {
10343        let query = self.selection.select("kind");
10344        query.execute(self.graphql_client.clone()).await
10345    }
10346    /// 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.
10347    pub async fn local_context_directory_path(&self) -> Result<String, DaggerError> {
10348        let query = self.selection.select("localContextDirectoryPath");
10349        query.execute(self.graphql_client.clone()).await
10350    }
10351    /// The name of the module, including any setting via the withName API.
10352    pub async fn module_name(&self) -> Result<String, DaggerError> {
10353        let query = self.selection.select("moduleName");
10354        query.execute(self.graphql_client.clone()).await
10355    }
10356    /// The original name of the module as read from the module's dagger.json (or set for the first time with the withName API).
10357    pub async fn module_original_name(&self) -> Result<String, DaggerError> {
10358        let query = self.selection.select("moduleOriginalName");
10359        query.execute(self.graphql_client.clone()).await
10360    }
10361    /// The original subpath used when instantiating this module source, relative to the context directory.
10362    pub async fn original_subpath(&self) -> Result<String, DaggerError> {
10363        let query = self.selection.select("originalSubpath");
10364        query.execute(self.graphql_client.clone()).await
10365    }
10366    /// The pinned version of this module source.
10367    pub async fn pin(&self) -> Result<String, DaggerError> {
10368        let query = self.selection.select("pin");
10369        query.execute(self.graphql_client.clone()).await
10370    }
10371    /// The import path corresponding to the root of the git repo this source points to. Only valid for git sources.
10372    pub async fn repo_root_path(&self) -> Result<String, DaggerError> {
10373        let query = self.selection.select("repoRootPath");
10374        query.execute(self.graphql_client.clone()).await
10375    }
10376    /// The SDK configuration of the module.
10377    pub fn sdk(&self) -> SdkConfig {
10378        let query = self.selection.select("sdk");
10379        SdkConfig {
10380            proc: self.proc.clone(),
10381            selection: query,
10382            graphql_client: self.graphql_client.clone(),
10383        }
10384    }
10385    /// The path, relative to the context directory, that contains the module's dagger.json.
10386    pub async fn source_root_subpath(&self) -> Result<String, DaggerError> {
10387        let query = self.selection.select("sourceRootSubpath");
10388        query.execute(self.graphql_client.clone()).await
10389    }
10390    /// The path to the directory containing the module's source code, relative to the context directory.
10391    pub async fn source_subpath(&self) -> Result<String, DaggerError> {
10392        let query = self.selection.select("sourceSubpath");
10393        query.execute(self.graphql_client.clone()).await
10394    }
10395    /// Forces evaluation of the module source, including any loading into the engine and associated validation.
10396    pub async fn sync(&self) -> Result<ModuleSourceId, DaggerError> {
10397        let query = self.selection.select("sync");
10398        query.execute(self.graphql_client.clone()).await
10399    }
10400    /// The toolchains referenced by the module source.
10401    pub fn toolchains(&self) -> Vec<ModuleSource> {
10402        let query = self.selection.select("toolchains");
10403        vec![ModuleSource {
10404            proc: self.proc.clone(),
10405            selection: query,
10406            graphql_client: self.graphql_client.clone(),
10407        }]
10408    }
10409    /// User-defined defaults read from local .env files
10410    pub fn user_defaults(&self) -> EnvFile {
10411        let query = self.selection.select("userDefaults");
10412        EnvFile {
10413            proc: self.proc.clone(),
10414            selection: query,
10415            graphql_client: self.graphql_client.clone(),
10416        }
10417    }
10418    /// The specified version of the git repo this source points to.
10419    pub async fn version(&self) -> Result<String, DaggerError> {
10420        let query = self.selection.select("version");
10421        query.execute(self.graphql_client.clone()).await
10422    }
10423    /// Set a blueprint for the module source.
10424    ///
10425    /// # Arguments
10426    ///
10427    /// * `blueprint` - The blueprint module to set.
10428    pub fn with_blueprint(&self, blueprint: impl IntoID<ModuleSourceId>) -> ModuleSource {
10429        let mut query = self.selection.select("withBlueprint");
10430        query = query.arg_lazy(
10431            "blueprint",
10432            Box::new(move || {
10433                let blueprint = blueprint.clone();
10434                Box::pin(async move { blueprint.into_id().await.unwrap().quote() })
10435            }),
10436        );
10437        ModuleSource {
10438            proc: self.proc.clone(),
10439            selection: query,
10440            graphql_client: self.graphql_client.clone(),
10441        }
10442    }
10443    /// Update the module source with a new client to generate.
10444    ///
10445    /// # Arguments
10446    ///
10447    /// * `generator` - The generator to use
10448    /// * `output_dir` - The output directory for the generated client.
10449    pub fn with_client(
10450        &self,
10451        generator: impl Into<String>,
10452        output_dir: impl Into<String>,
10453    ) -> ModuleSource {
10454        let mut query = self.selection.select("withClient");
10455        query = query.arg("generator", generator.into());
10456        query = query.arg("outputDir", output_dir.into());
10457        ModuleSource {
10458            proc: self.proc.clone(),
10459            selection: query,
10460            graphql_client: self.graphql_client.clone(),
10461        }
10462    }
10463    /// Append the provided dependencies to the module source's dependency list.
10464    ///
10465    /// # Arguments
10466    ///
10467    /// * `dependencies` - The dependencies to append.
10468    pub fn with_dependencies(&self, dependencies: Vec<ModuleSourceId>) -> ModuleSource {
10469        let mut query = self.selection.select("withDependencies");
10470        query = query.arg("dependencies", dependencies);
10471        ModuleSource {
10472            proc: self.proc.clone(),
10473            selection: query,
10474            graphql_client: self.graphql_client.clone(),
10475        }
10476    }
10477    /// Upgrade the engine version of the module to the given value.
10478    ///
10479    /// # Arguments
10480    ///
10481    /// * `version` - The engine version to upgrade to.
10482    pub fn with_engine_version(&self, version: impl Into<String>) -> ModuleSource {
10483        let mut query = self.selection.select("withEngineVersion");
10484        query = query.arg("version", version.into());
10485        ModuleSource {
10486            proc: self.proc.clone(),
10487            selection: query,
10488            graphql_client: self.graphql_client.clone(),
10489        }
10490    }
10491    /// Enable the experimental features for the module source.
10492    ///
10493    /// # Arguments
10494    ///
10495    /// * `features` - The experimental features to enable.
10496    pub fn with_experimental_features(
10497        &self,
10498        features: Vec<ModuleSourceExperimentalFeature>,
10499    ) -> ModuleSource {
10500        let mut query = self.selection.select("withExperimentalFeatures");
10501        query = query.arg("features", features);
10502        ModuleSource {
10503            proc: self.proc.clone(),
10504            selection: query,
10505            graphql_client: self.graphql_client.clone(),
10506        }
10507    }
10508    /// Update the module source with additional include patterns for files+directories from its context that are required for building it
10509    ///
10510    /// # Arguments
10511    ///
10512    /// * `patterns` - The new additional include patterns.
10513    pub fn with_includes(&self, patterns: Vec<impl Into<String>>) -> ModuleSource {
10514        let mut query = self.selection.select("withIncludes");
10515        query = query.arg(
10516            "patterns",
10517            patterns
10518                .into_iter()
10519                .map(|i| i.into())
10520                .collect::<Vec<String>>(),
10521        );
10522        ModuleSource {
10523            proc: self.proc.clone(),
10524            selection: query,
10525            graphql_client: self.graphql_client.clone(),
10526        }
10527    }
10528    /// Update the module source with a new name.
10529    ///
10530    /// # Arguments
10531    ///
10532    /// * `name` - The name to set.
10533    pub fn with_name(&self, name: impl Into<String>) -> ModuleSource {
10534        let mut query = self.selection.select("withName");
10535        query = query.arg("name", name.into());
10536        ModuleSource {
10537            proc: self.proc.clone(),
10538            selection: query,
10539            graphql_client: self.graphql_client.clone(),
10540        }
10541    }
10542    /// Update the module source with a new SDK.
10543    ///
10544    /// # Arguments
10545    ///
10546    /// * `source` - The SDK source to set.
10547    pub fn with_sdk(&self, source: impl Into<String>) -> ModuleSource {
10548        let mut query = self.selection.select("withSDK");
10549        query = query.arg("source", source.into());
10550        ModuleSource {
10551            proc: self.proc.clone(),
10552            selection: query,
10553            graphql_client: self.graphql_client.clone(),
10554        }
10555    }
10556    /// Update the module source with a new source subpath.
10557    ///
10558    /// # Arguments
10559    ///
10560    /// * `path` - The path to set as the source subpath. Must be relative to the module source's source root directory.
10561    pub fn with_source_subpath(&self, path: impl Into<String>) -> ModuleSource {
10562        let mut query = self.selection.select("withSourceSubpath");
10563        query = query.arg("path", path.into());
10564        ModuleSource {
10565            proc: self.proc.clone(),
10566            selection: query,
10567            graphql_client: self.graphql_client.clone(),
10568        }
10569    }
10570    /// Add toolchains to the module source.
10571    ///
10572    /// # Arguments
10573    ///
10574    /// * `toolchains` - The toolchain modules to add.
10575    pub fn with_toolchains(&self, toolchains: Vec<ModuleSourceId>) -> ModuleSource {
10576        let mut query = self.selection.select("withToolchains");
10577        query = query.arg("toolchains", toolchains);
10578        ModuleSource {
10579            proc: self.proc.clone(),
10580            selection: query,
10581            graphql_client: self.graphql_client.clone(),
10582        }
10583    }
10584    /// Update the blueprint module to the latest version.
10585    pub fn with_update_blueprint(&self) -> ModuleSource {
10586        let query = self.selection.select("withUpdateBlueprint");
10587        ModuleSource {
10588            proc: self.proc.clone(),
10589            selection: query,
10590            graphql_client: self.graphql_client.clone(),
10591        }
10592    }
10593    /// Update one or more module dependencies.
10594    ///
10595    /// # Arguments
10596    ///
10597    /// * `dependencies` - The dependencies to update.
10598    pub fn with_update_dependencies(&self, dependencies: Vec<impl Into<String>>) -> ModuleSource {
10599        let mut query = self.selection.select("withUpdateDependencies");
10600        query = query.arg(
10601            "dependencies",
10602            dependencies
10603                .into_iter()
10604                .map(|i| i.into())
10605                .collect::<Vec<String>>(),
10606        );
10607        ModuleSource {
10608            proc: self.proc.clone(),
10609            selection: query,
10610            graphql_client: self.graphql_client.clone(),
10611        }
10612    }
10613    /// Update one or more toolchains.
10614    ///
10615    /// # Arguments
10616    ///
10617    /// * `toolchains` - The toolchains to update.
10618    pub fn with_update_toolchains(&self, toolchains: Vec<impl Into<String>>) -> ModuleSource {
10619        let mut query = self.selection.select("withUpdateToolchains");
10620        query = query.arg(
10621            "toolchains",
10622            toolchains
10623                .into_iter()
10624                .map(|i| i.into())
10625                .collect::<Vec<String>>(),
10626        );
10627        ModuleSource {
10628            proc: self.proc.clone(),
10629            selection: query,
10630            graphql_client: self.graphql_client.clone(),
10631        }
10632    }
10633    /// Update one or more clients.
10634    ///
10635    /// # Arguments
10636    ///
10637    /// * `clients` - The clients to update
10638    pub fn with_updated_clients(&self, clients: Vec<impl Into<String>>) -> ModuleSource {
10639        let mut query = self.selection.select("withUpdatedClients");
10640        query = query.arg(
10641            "clients",
10642            clients
10643                .into_iter()
10644                .map(|i| i.into())
10645                .collect::<Vec<String>>(),
10646        );
10647        ModuleSource {
10648            proc: self.proc.clone(),
10649            selection: query,
10650            graphql_client: self.graphql_client.clone(),
10651        }
10652    }
10653    /// Remove the current blueprint from the module source.
10654    pub fn without_blueprint(&self) -> ModuleSource {
10655        let query = self.selection.select("withoutBlueprint");
10656        ModuleSource {
10657            proc: self.proc.clone(),
10658            selection: query,
10659            graphql_client: self.graphql_client.clone(),
10660        }
10661    }
10662    /// Remove a client from the module source.
10663    ///
10664    /// # Arguments
10665    ///
10666    /// * `path` - The path of the client to remove.
10667    pub fn without_client(&self, path: impl Into<String>) -> ModuleSource {
10668        let mut query = self.selection.select("withoutClient");
10669        query = query.arg("path", path.into());
10670        ModuleSource {
10671            proc: self.proc.clone(),
10672            selection: query,
10673            graphql_client: self.graphql_client.clone(),
10674        }
10675    }
10676    /// Remove the provided dependencies from the module source's dependency list.
10677    ///
10678    /// # Arguments
10679    ///
10680    /// * `dependencies` - The dependencies to remove.
10681    pub fn without_dependencies(&self, dependencies: Vec<impl Into<String>>) -> ModuleSource {
10682        let mut query = self.selection.select("withoutDependencies");
10683        query = query.arg(
10684            "dependencies",
10685            dependencies
10686                .into_iter()
10687                .map(|i| i.into())
10688                .collect::<Vec<String>>(),
10689        );
10690        ModuleSource {
10691            proc: self.proc.clone(),
10692            selection: query,
10693            graphql_client: self.graphql_client.clone(),
10694        }
10695    }
10696    /// Disable experimental features for the module source.
10697    ///
10698    /// # Arguments
10699    ///
10700    /// * `features` - The experimental features to disable.
10701    pub fn without_experimental_features(
10702        &self,
10703        features: Vec<ModuleSourceExperimentalFeature>,
10704    ) -> ModuleSource {
10705        let mut query = self.selection.select("withoutExperimentalFeatures");
10706        query = query.arg("features", features);
10707        ModuleSource {
10708            proc: self.proc.clone(),
10709            selection: query,
10710            graphql_client: self.graphql_client.clone(),
10711        }
10712    }
10713    /// Remove the provided toolchains from the module source.
10714    ///
10715    /// # Arguments
10716    ///
10717    /// * `toolchains` - The toolchains to remove.
10718    pub fn without_toolchains(&self, toolchains: Vec<impl Into<String>>) -> ModuleSource {
10719        let mut query = self.selection.select("withoutToolchains");
10720        query = query.arg(
10721            "toolchains",
10722            toolchains
10723                .into_iter()
10724                .map(|i| i.into())
10725                .collect::<Vec<String>>(),
10726        );
10727        ModuleSource {
10728            proc: self.proc.clone(),
10729            selection: query,
10730            graphql_client: self.graphql_client.clone(),
10731        }
10732    }
10733}
10734#[derive(Clone)]
10735pub struct ObjectTypeDef {
10736    pub proc: Option<Arc<DaggerSessionProc>>,
10737    pub selection: Selection,
10738    pub graphql_client: DynGraphQLClient,
10739}
10740impl ObjectTypeDef {
10741    /// The function used to construct new instances of this object, if any
10742    pub fn constructor(&self) -> Function {
10743        let query = self.selection.select("constructor");
10744        Function {
10745            proc: self.proc.clone(),
10746            selection: query,
10747            graphql_client: self.graphql_client.clone(),
10748        }
10749    }
10750    /// The reason this enum member is deprecated, if any.
10751    pub async fn deprecated(&self) -> Result<String, DaggerError> {
10752        let query = self.selection.select("deprecated");
10753        query.execute(self.graphql_client.clone()).await
10754    }
10755    /// The doc string for the object, if any.
10756    pub async fn description(&self) -> Result<String, DaggerError> {
10757        let query = self.selection.select("description");
10758        query.execute(self.graphql_client.clone()).await
10759    }
10760    /// Static fields defined on this object, if any.
10761    pub fn fields(&self) -> Vec<FieldTypeDef> {
10762        let query = self.selection.select("fields");
10763        vec![FieldTypeDef {
10764            proc: self.proc.clone(),
10765            selection: query,
10766            graphql_client: self.graphql_client.clone(),
10767        }]
10768    }
10769    /// Functions defined on this object, if any.
10770    pub fn functions(&self) -> Vec<Function> {
10771        let query = self.selection.select("functions");
10772        vec![Function {
10773            proc: self.proc.clone(),
10774            selection: query,
10775            graphql_client: self.graphql_client.clone(),
10776        }]
10777    }
10778    /// A unique identifier for this ObjectTypeDef.
10779    pub async fn id(&self) -> Result<ObjectTypeDefId, DaggerError> {
10780        let query = self.selection.select("id");
10781        query.execute(self.graphql_client.clone()).await
10782    }
10783    /// The name of the object.
10784    pub async fn name(&self) -> Result<String, DaggerError> {
10785        let query = self.selection.select("name");
10786        query.execute(self.graphql_client.clone()).await
10787    }
10788    /// The location of this object declaration.
10789    pub fn source_map(&self) -> SourceMap {
10790        let query = self.selection.select("sourceMap");
10791        SourceMap {
10792            proc: self.proc.clone(),
10793            selection: query,
10794            graphql_client: self.graphql_client.clone(),
10795        }
10796    }
10797    /// If this ObjectTypeDef is associated with a Module, the name of the module. Unset otherwise.
10798    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
10799        let query = self.selection.select("sourceModuleName");
10800        query.execute(self.graphql_client.clone()).await
10801    }
10802}
10803#[derive(Clone)]
10804pub struct Port {
10805    pub proc: Option<Arc<DaggerSessionProc>>,
10806    pub selection: Selection,
10807    pub graphql_client: DynGraphQLClient,
10808}
10809impl Port {
10810    /// The port description.
10811    pub async fn description(&self) -> Result<String, DaggerError> {
10812        let query = self.selection.select("description");
10813        query.execute(self.graphql_client.clone()).await
10814    }
10815    /// Skip the health check when run as a service.
10816    pub async fn experimental_skip_healthcheck(&self) -> Result<bool, DaggerError> {
10817        let query = self.selection.select("experimentalSkipHealthcheck");
10818        query.execute(self.graphql_client.clone()).await
10819    }
10820    /// A unique identifier for this Port.
10821    pub async fn id(&self) -> Result<PortId, DaggerError> {
10822        let query = self.selection.select("id");
10823        query.execute(self.graphql_client.clone()).await
10824    }
10825    /// The port number.
10826    pub async fn port(&self) -> Result<isize, DaggerError> {
10827        let query = self.selection.select("port");
10828        query.execute(self.graphql_client.clone()).await
10829    }
10830    /// The transport layer protocol.
10831    pub async fn protocol(&self) -> Result<NetworkProtocol, DaggerError> {
10832        let query = self.selection.select("protocol");
10833        query.execute(self.graphql_client.clone()).await
10834    }
10835}
10836#[derive(Clone)]
10837pub struct Query {
10838    pub proc: Option<Arc<DaggerSessionProc>>,
10839    pub selection: Selection,
10840    pub graphql_client: DynGraphQLClient,
10841}
10842#[derive(Builder, Debug, PartialEq)]
10843pub struct QueryContainerOpts {
10844    /// Platform to initialize the container with. Defaults to the native platform of the current engine
10845    #[builder(setter(into, strip_option), default)]
10846    pub platform: Option<Platform>,
10847}
10848#[derive(Builder, Debug, PartialEq)]
10849pub struct QueryEnvOpts {
10850    /// Give the environment the same privileges as the caller: core API including host access, current module, and dependencies
10851    #[builder(setter(into, strip_option), default)]
10852    pub privileged: Option<bool>,
10853    /// Allow new outputs to be declared and saved in the environment
10854    #[builder(setter(into, strip_option), default)]
10855    pub writable: Option<bool>,
10856}
10857#[derive(Builder, Debug, PartialEq)]
10858pub struct QueryEnvFileOpts {
10859    /// Replace "${VAR}" or "$VAR" with the value of other vars
10860    #[builder(setter(into, strip_option), default)]
10861    pub expand: Option<bool>,
10862}
10863#[derive(Builder, Debug, PartialEq)]
10864pub struct QueryFileOpts {
10865    /// Permissions of the new file. Example: 0600
10866    #[builder(setter(into, strip_option), default)]
10867    pub permissions: Option<isize>,
10868}
10869#[derive(Builder, Debug, PartialEq)]
10870pub struct QueryGitOpts<'a> {
10871    /// A service which must be started before the repo is fetched.
10872    #[builder(setter(into, strip_option), default)]
10873    pub experimental_service_host: Option<ServiceId>,
10874    /// Secret used to populate the Authorization HTTP header
10875    #[builder(setter(into, strip_option), default)]
10876    pub http_auth_header: Option<SecretId>,
10877    /// Secret used to populate the password during basic HTTP Authorization
10878    #[builder(setter(into, strip_option), default)]
10879    pub http_auth_token: Option<SecretId>,
10880    /// Username used to populate the password during basic HTTP Authorization
10881    #[builder(setter(into, strip_option), default)]
10882    pub http_auth_username: Option<&'a str>,
10883    /// DEPRECATED: Set to true to keep .git directory.
10884    #[builder(setter(into, strip_option), default)]
10885    pub keep_git_dir: Option<bool>,
10886    /// Set SSH auth socket
10887    #[builder(setter(into, strip_option), default)]
10888    pub ssh_auth_socket: Option<SocketId>,
10889    /// Set SSH known hosts
10890    #[builder(setter(into, strip_option), default)]
10891    pub ssh_known_hosts: Option<&'a str>,
10892}
10893#[derive(Builder, Debug, PartialEq)]
10894pub struct QueryHttpOpts<'a> {
10895    /// Secret used to populate the Authorization HTTP header
10896    #[builder(setter(into, strip_option), default)]
10897    pub auth_header: Option<SecretId>,
10898    /// A service which must be started before the URL is fetched.
10899    #[builder(setter(into, strip_option), default)]
10900    pub experimental_service_host: Option<ServiceId>,
10901    /// File name to use for the file. Defaults to the last part of the URL.
10902    #[builder(setter(into, strip_option), default)]
10903    pub name: Option<&'a str>,
10904    /// Permissions to set on the file.
10905    #[builder(setter(into, strip_option), default)]
10906    pub permissions: Option<isize>,
10907}
10908#[derive(Builder, Debug, PartialEq)]
10909pub struct QueryLlmOpts<'a> {
10910    /// Cap the number of API calls for this LLM
10911    #[builder(setter(into, strip_option), default)]
10912    pub max_api_calls: Option<isize>,
10913    /// Model to use
10914    #[builder(setter(into, strip_option), default)]
10915    pub model: Option<&'a str>,
10916}
10917#[derive(Builder, Debug, PartialEq)]
10918pub struct QueryModuleSourceOpts<'a> {
10919    /// 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.
10920    #[builder(setter(into, strip_option), default)]
10921    pub allow_not_exists: Option<bool>,
10922    /// If true, do not attempt to find dagger.json in a parent directory of the provided path. Only relevant for local module sources.
10923    #[builder(setter(into, strip_option), default)]
10924    pub disable_find_up: Option<bool>,
10925    /// The pinned version of the module source
10926    #[builder(setter(into, strip_option), default)]
10927    pub ref_pin: Option<&'a str>,
10928    /// If set, error out if the ref string is not of the provided requireKind.
10929    #[builder(setter(into, strip_option), default)]
10930    pub require_kind: Option<ModuleSourceKind>,
10931}
10932#[derive(Builder, Debug, PartialEq)]
10933pub struct QuerySecretOpts<'a> {
10934    /// 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.
10935    /// 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.
10936    /// If not set, the cache key for the secret will be derived from its plaintext value as looked up when the secret is constructed.
10937    #[builder(setter(into, strip_option), default)]
10938    pub cache_key: Option<&'a str>,
10939}
10940impl Query {
10941    /// initialize an address to load directories, containers, secrets or other object types.
10942    pub fn address(&self, value: impl Into<String>) -> Address {
10943        let mut query = self.selection.select("address");
10944        query = query.arg("value", value.into());
10945        Address {
10946            proc: self.proc.clone(),
10947            selection: query,
10948            graphql_client: self.graphql_client.clone(),
10949        }
10950    }
10951    /// Constructs a cache volume for a given cache key.
10952    ///
10953    /// # Arguments
10954    ///
10955    /// * `key` - A string identifier to target this cache volume (e.g., "modules-cache").
10956    pub fn cache_volume(&self, key: impl Into<String>) -> CacheVolume {
10957        let mut query = self.selection.select("cacheVolume");
10958        query = query.arg("key", key.into());
10959        CacheVolume {
10960            proc: self.proc.clone(),
10961            selection: query,
10962            graphql_client: self.graphql_client.clone(),
10963        }
10964    }
10965    /// Dagger Cloud configuration and state
10966    pub fn cloud(&self) -> Cloud {
10967        let query = self.selection.select("cloud");
10968        Cloud {
10969            proc: self.proc.clone(),
10970            selection: query,
10971            graphql_client: self.graphql_client.clone(),
10972        }
10973    }
10974    /// Creates a scratch container, with no image or metadata.
10975    /// To pull an image, follow up with the "from" function.
10976    ///
10977    /// # Arguments
10978    ///
10979    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10980    pub fn container(&self) -> Container {
10981        let query = self.selection.select("container");
10982        Container {
10983            proc: self.proc.clone(),
10984            selection: query,
10985            graphql_client: self.graphql_client.clone(),
10986        }
10987    }
10988    /// Creates a scratch container, with no image or metadata.
10989    /// To pull an image, follow up with the "from" function.
10990    ///
10991    /// # Arguments
10992    ///
10993    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10994    pub fn container_opts(&self, opts: QueryContainerOpts) -> Container {
10995        let mut query = self.selection.select("container");
10996        if let Some(platform) = opts.platform {
10997            query = query.arg("platform", platform);
10998        }
10999        Container {
11000            proc: self.proc.clone(),
11001            selection: query,
11002            graphql_client: self.graphql_client.clone(),
11003        }
11004    }
11005    /// Returns the current environment
11006    /// 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.
11007    /// 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.
11008    pub fn current_env(&self) -> Env {
11009        let query = self.selection.select("currentEnv");
11010        Env {
11011            proc: self.proc.clone(),
11012            selection: query,
11013            graphql_client: self.graphql_client.clone(),
11014        }
11015    }
11016    /// The FunctionCall context that the SDK caller is currently executing in.
11017    /// If the caller is not currently executing in a function, this will return an error.
11018    pub fn current_function_call(&self) -> FunctionCall {
11019        let query = self.selection.select("currentFunctionCall");
11020        FunctionCall {
11021            proc: self.proc.clone(),
11022            selection: query,
11023            graphql_client: self.graphql_client.clone(),
11024        }
11025    }
11026    /// The module currently being served in the session, if any.
11027    pub fn current_module(&self) -> CurrentModule {
11028        let query = self.selection.select("currentModule");
11029        CurrentModule {
11030            proc: self.proc.clone(),
11031            selection: query,
11032            graphql_client: self.graphql_client.clone(),
11033        }
11034    }
11035    /// The TypeDef representations of the objects currently being served in the session.
11036    pub fn current_type_defs(&self) -> Vec<TypeDef> {
11037        let query = self.selection.select("currentTypeDefs");
11038        vec![TypeDef {
11039            proc: self.proc.clone(),
11040            selection: query,
11041            graphql_client: self.graphql_client.clone(),
11042        }]
11043    }
11044    /// The default platform of the engine.
11045    pub async fn default_platform(&self) -> Result<Platform, DaggerError> {
11046        let query = self.selection.select("defaultPlatform");
11047        query.execute(self.graphql_client.clone()).await
11048    }
11049    /// Creates an empty directory.
11050    pub fn directory(&self) -> Directory {
11051        let query = self.selection.select("directory");
11052        Directory {
11053            proc: self.proc.clone(),
11054            selection: query,
11055            graphql_client: self.graphql_client.clone(),
11056        }
11057    }
11058    /// The Dagger engine container configuration and state
11059    pub fn engine(&self) -> Engine {
11060        let query = self.selection.select("engine");
11061        Engine {
11062            proc: self.proc.clone(),
11063            selection: query,
11064            graphql_client: self.graphql_client.clone(),
11065        }
11066    }
11067    /// Initializes a new environment
11068    ///
11069    /// # Arguments
11070    ///
11071    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11072    pub fn env(&self) -> Env {
11073        let query = self.selection.select("env");
11074        Env {
11075            proc: self.proc.clone(),
11076            selection: query,
11077            graphql_client: self.graphql_client.clone(),
11078        }
11079    }
11080    /// Initializes a new environment
11081    ///
11082    /// # Arguments
11083    ///
11084    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11085    pub fn env_opts(&self, opts: QueryEnvOpts) -> Env {
11086        let mut query = self.selection.select("env");
11087        if let Some(privileged) = opts.privileged {
11088            query = query.arg("privileged", privileged);
11089        }
11090        if let Some(writable) = opts.writable {
11091            query = query.arg("writable", writable);
11092        }
11093        Env {
11094            proc: self.proc.clone(),
11095            selection: query,
11096            graphql_client: self.graphql_client.clone(),
11097        }
11098    }
11099    /// Initialize an environment file
11100    ///
11101    /// # Arguments
11102    ///
11103    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11104    pub fn env_file(&self) -> EnvFile {
11105        let query = self.selection.select("envFile");
11106        EnvFile {
11107            proc: self.proc.clone(),
11108            selection: query,
11109            graphql_client: self.graphql_client.clone(),
11110        }
11111    }
11112    /// Initialize an environment file
11113    ///
11114    /// # Arguments
11115    ///
11116    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11117    pub fn env_file_opts(&self, opts: QueryEnvFileOpts) -> EnvFile {
11118        let mut query = self.selection.select("envFile");
11119        if let Some(expand) = opts.expand {
11120            query = query.arg("expand", expand);
11121        }
11122        EnvFile {
11123            proc: self.proc.clone(),
11124            selection: query,
11125            graphql_client: self.graphql_client.clone(),
11126        }
11127    }
11128    /// Create a new error.
11129    ///
11130    /// # Arguments
11131    ///
11132    /// * `message` - A brief description of the error.
11133    pub fn error(&self, message: impl Into<String>) -> Error {
11134        let mut query = self.selection.select("error");
11135        query = query.arg("message", message.into());
11136        Error {
11137            proc: self.proc.clone(),
11138            selection: query,
11139            graphql_client: self.graphql_client.clone(),
11140        }
11141    }
11142    /// Creates a file with the specified contents.
11143    ///
11144    /// # Arguments
11145    ///
11146    /// * `name` - Name of the new file. Example: "foo.txt"
11147    /// * `contents` - Contents of the new file. Example: "Hello world!"
11148    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11149    pub fn file(&self, name: impl Into<String>, contents: impl Into<String>) -> File {
11150        let mut query = self.selection.select("file");
11151        query = query.arg("name", name.into());
11152        query = query.arg("contents", contents.into());
11153        File {
11154            proc: self.proc.clone(),
11155            selection: query,
11156            graphql_client: self.graphql_client.clone(),
11157        }
11158    }
11159    /// Creates a file with the specified contents.
11160    ///
11161    /// # Arguments
11162    ///
11163    /// * `name` - Name of the new file. Example: "foo.txt"
11164    /// * `contents` - Contents of the new file. Example: "Hello world!"
11165    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11166    pub fn file_opts(
11167        &self,
11168        name: impl Into<String>,
11169        contents: impl Into<String>,
11170        opts: QueryFileOpts,
11171    ) -> File {
11172        let mut query = self.selection.select("file");
11173        query = query.arg("name", name.into());
11174        query = query.arg("contents", contents.into());
11175        if let Some(permissions) = opts.permissions {
11176            query = query.arg("permissions", permissions);
11177        }
11178        File {
11179            proc: self.proc.clone(),
11180            selection: query,
11181            graphql_client: self.graphql_client.clone(),
11182        }
11183    }
11184    /// Creates a function.
11185    ///
11186    /// # Arguments
11187    ///
11188    /// * `name` - Name of the function, in its original format from the implementation language.
11189    /// * `return_type` - Return type of the function.
11190    pub fn function(
11191        &self,
11192        name: impl Into<String>,
11193        return_type: impl IntoID<TypeDefId>,
11194    ) -> Function {
11195        let mut query = self.selection.select("function");
11196        query = query.arg("name", name.into());
11197        query = query.arg_lazy(
11198            "returnType",
11199            Box::new(move || {
11200                let return_type = return_type.clone();
11201                Box::pin(async move { return_type.into_id().await.unwrap().quote() })
11202            }),
11203        );
11204        Function {
11205            proc: self.proc.clone(),
11206            selection: query,
11207            graphql_client: self.graphql_client.clone(),
11208        }
11209    }
11210    /// Create a code generation result, given a directory containing the generated code.
11211    pub fn generated_code(&self, code: impl IntoID<DirectoryId>) -> GeneratedCode {
11212        let mut query = self.selection.select("generatedCode");
11213        query = query.arg_lazy(
11214            "code",
11215            Box::new(move || {
11216                let code = code.clone();
11217                Box::pin(async move { code.into_id().await.unwrap().quote() })
11218            }),
11219        );
11220        GeneratedCode {
11221            proc: self.proc.clone(),
11222            selection: query,
11223            graphql_client: self.graphql_client.clone(),
11224        }
11225    }
11226    /// Queries a Git repository.
11227    ///
11228    /// # Arguments
11229    ///
11230    /// * `url` - URL of the git repository.
11231    ///
11232    /// Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.
11233    ///
11234    /// Suffix ".git" is optional.
11235    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11236    pub fn git(&self, url: impl Into<String>) -> GitRepository {
11237        let mut query = self.selection.select("git");
11238        query = query.arg("url", url.into());
11239        GitRepository {
11240            proc: self.proc.clone(),
11241            selection: query,
11242            graphql_client: self.graphql_client.clone(),
11243        }
11244    }
11245    /// Queries a Git repository.
11246    ///
11247    /// # Arguments
11248    ///
11249    /// * `url` - URL of the git repository.
11250    ///
11251    /// Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.
11252    ///
11253    /// Suffix ".git" is optional.
11254    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11255    pub fn git_opts<'a>(&self, url: impl Into<String>, opts: QueryGitOpts<'a>) -> GitRepository {
11256        let mut query = self.selection.select("git");
11257        query = query.arg("url", url.into());
11258        if let Some(keep_git_dir) = opts.keep_git_dir {
11259            query = query.arg("keepGitDir", keep_git_dir);
11260        }
11261        if let Some(ssh_known_hosts) = opts.ssh_known_hosts {
11262            query = query.arg("sshKnownHosts", ssh_known_hosts);
11263        }
11264        if let Some(ssh_auth_socket) = opts.ssh_auth_socket {
11265            query = query.arg("sshAuthSocket", ssh_auth_socket);
11266        }
11267        if let Some(http_auth_username) = opts.http_auth_username {
11268            query = query.arg("httpAuthUsername", http_auth_username);
11269        }
11270        if let Some(http_auth_token) = opts.http_auth_token {
11271            query = query.arg("httpAuthToken", http_auth_token);
11272        }
11273        if let Some(http_auth_header) = opts.http_auth_header {
11274            query = query.arg("httpAuthHeader", http_auth_header);
11275        }
11276        if let Some(experimental_service_host) = opts.experimental_service_host {
11277            query = query.arg("experimentalServiceHost", experimental_service_host);
11278        }
11279        GitRepository {
11280            proc: self.proc.clone(),
11281            selection: query,
11282            graphql_client: self.graphql_client.clone(),
11283        }
11284    }
11285    /// Queries the host environment.
11286    pub fn host(&self) -> Host {
11287        let query = self.selection.select("host");
11288        Host {
11289            proc: self.proc.clone(),
11290            selection: query,
11291            graphql_client: self.graphql_client.clone(),
11292        }
11293    }
11294    /// Returns a file containing an http remote url content.
11295    ///
11296    /// # Arguments
11297    ///
11298    /// * `url` - HTTP url to get the content from (e.g., "https://docs.dagger.io").
11299    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11300    pub fn http(&self, url: impl Into<String>) -> File {
11301        let mut query = self.selection.select("http");
11302        query = query.arg("url", url.into());
11303        File {
11304            proc: self.proc.clone(),
11305            selection: query,
11306            graphql_client: self.graphql_client.clone(),
11307        }
11308    }
11309    /// Returns a file containing an http remote url content.
11310    ///
11311    /// # Arguments
11312    ///
11313    /// * `url` - HTTP url to get the content from (e.g., "https://docs.dagger.io").
11314    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11315    pub fn http_opts<'a>(&self, url: impl Into<String>, opts: QueryHttpOpts<'a>) -> File {
11316        let mut query = self.selection.select("http");
11317        query = query.arg("url", url.into());
11318        if let Some(name) = opts.name {
11319            query = query.arg("name", name);
11320        }
11321        if let Some(permissions) = opts.permissions {
11322            query = query.arg("permissions", permissions);
11323        }
11324        if let Some(auth_header) = opts.auth_header {
11325            query = query.arg("authHeader", auth_header);
11326        }
11327        if let Some(experimental_service_host) = opts.experimental_service_host {
11328            query = query.arg("experimentalServiceHost", experimental_service_host);
11329        }
11330        File {
11331            proc: self.proc.clone(),
11332            selection: query,
11333            graphql_client: self.graphql_client.clone(),
11334        }
11335    }
11336    /// Initialize a JSON value
11337    pub fn json(&self) -> JsonValue {
11338        let query = self.selection.select("json");
11339        JsonValue {
11340            proc: self.proc.clone(),
11341            selection: query,
11342            graphql_client: self.graphql_client.clone(),
11343        }
11344    }
11345    /// Initialize a Large Language Model (LLM)
11346    ///
11347    /// # Arguments
11348    ///
11349    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11350    pub fn llm(&self) -> Llm {
11351        let query = self.selection.select("llm");
11352        Llm {
11353            proc: self.proc.clone(),
11354            selection: query,
11355            graphql_client: self.graphql_client.clone(),
11356        }
11357    }
11358    /// Initialize a Large Language Model (LLM)
11359    ///
11360    /// # Arguments
11361    ///
11362    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11363    pub fn llm_opts<'a>(&self, opts: QueryLlmOpts<'a>) -> Llm {
11364        let mut query = self.selection.select("llm");
11365        if let Some(model) = opts.model {
11366            query = query.arg("model", model);
11367        }
11368        if let Some(max_api_calls) = opts.max_api_calls {
11369            query = query.arg("maxAPICalls", max_api_calls);
11370        }
11371        Llm {
11372            proc: self.proc.clone(),
11373            selection: query,
11374            graphql_client: self.graphql_client.clone(),
11375        }
11376    }
11377    /// Load a Address from its ID.
11378    pub fn load_address_from_id(&self, id: impl IntoID<AddressId>) -> Address {
11379        let mut query = self.selection.select("loadAddressFromID");
11380        query = query.arg_lazy(
11381            "id",
11382            Box::new(move || {
11383                let id = id.clone();
11384                Box::pin(async move { id.into_id().await.unwrap().quote() })
11385            }),
11386        );
11387        Address {
11388            proc: self.proc.clone(),
11389            selection: query,
11390            graphql_client: self.graphql_client.clone(),
11391        }
11392    }
11393    /// Load a Binding from its ID.
11394    pub fn load_binding_from_id(&self, id: impl IntoID<BindingId>) -> Binding {
11395        let mut query = self.selection.select("loadBindingFromID");
11396        query = query.arg_lazy(
11397            "id",
11398            Box::new(move || {
11399                let id = id.clone();
11400                Box::pin(async move { id.into_id().await.unwrap().quote() })
11401            }),
11402        );
11403        Binding {
11404            proc: self.proc.clone(),
11405            selection: query,
11406            graphql_client: self.graphql_client.clone(),
11407        }
11408    }
11409    /// Load a CacheVolume from its ID.
11410    pub fn load_cache_volume_from_id(&self, id: impl IntoID<CacheVolumeId>) -> CacheVolume {
11411        let mut query = self.selection.select("loadCacheVolumeFromID");
11412        query = query.arg_lazy(
11413            "id",
11414            Box::new(move || {
11415                let id = id.clone();
11416                Box::pin(async move { id.into_id().await.unwrap().quote() })
11417            }),
11418        );
11419        CacheVolume {
11420            proc: self.proc.clone(),
11421            selection: query,
11422            graphql_client: self.graphql_client.clone(),
11423        }
11424    }
11425    /// Load a Changeset from its ID.
11426    pub fn load_changeset_from_id(&self, id: impl IntoID<ChangesetId>) -> Changeset {
11427        let mut query = self.selection.select("loadChangesetFromID");
11428        query = query.arg_lazy(
11429            "id",
11430            Box::new(move || {
11431                let id = id.clone();
11432                Box::pin(async move { id.into_id().await.unwrap().quote() })
11433            }),
11434        );
11435        Changeset {
11436            proc: self.proc.clone(),
11437            selection: query,
11438            graphql_client: self.graphql_client.clone(),
11439        }
11440    }
11441    /// Load a Check from its ID.
11442    pub fn load_check_from_id(&self, id: impl IntoID<CheckId>) -> Check {
11443        let mut query = self.selection.select("loadCheckFromID");
11444        query = query.arg_lazy(
11445            "id",
11446            Box::new(move || {
11447                let id = id.clone();
11448                Box::pin(async move { id.into_id().await.unwrap().quote() })
11449            }),
11450        );
11451        Check {
11452            proc: self.proc.clone(),
11453            selection: query,
11454            graphql_client: self.graphql_client.clone(),
11455        }
11456    }
11457    /// Load a CheckGroup from its ID.
11458    pub fn load_check_group_from_id(&self, id: impl IntoID<CheckGroupId>) -> CheckGroup {
11459        let mut query = self.selection.select("loadCheckGroupFromID");
11460        query = query.arg_lazy(
11461            "id",
11462            Box::new(move || {
11463                let id = id.clone();
11464                Box::pin(async move { id.into_id().await.unwrap().quote() })
11465            }),
11466        );
11467        CheckGroup {
11468            proc: self.proc.clone(),
11469            selection: query,
11470            graphql_client: self.graphql_client.clone(),
11471        }
11472    }
11473    /// Load a Cloud from its ID.
11474    pub fn load_cloud_from_id(&self, id: impl IntoID<CloudId>) -> Cloud {
11475        let mut query = self.selection.select("loadCloudFromID");
11476        query = query.arg_lazy(
11477            "id",
11478            Box::new(move || {
11479                let id = id.clone();
11480                Box::pin(async move { id.into_id().await.unwrap().quote() })
11481            }),
11482        );
11483        Cloud {
11484            proc: self.proc.clone(),
11485            selection: query,
11486            graphql_client: self.graphql_client.clone(),
11487        }
11488    }
11489    /// Load a Container from its ID.
11490    pub fn load_container_from_id(&self, id: impl IntoID<ContainerId>) -> Container {
11491        let mut query = self.selection.select("loadContainerFromID");
11492        query = query.arg_lazy(
11493            "id",
11494            Box::new(move || {
11495                let id = id.clone();
11496                Box::pin(async move { id.into_id().await.unwrap().quote() })
11497            }),
11498        );
11499        Container {
11500            proc: self.proc.clone(),
11501            selection: query,
11502            graphql_client: self.graphql_client.clone(),
11503        }
11504    }
11505    /// Load a CurrentModule from its ID.
11506    pub fn load_current_module_from_id(&self, id: impl IntoID<CurrentModuleId>) -> CurrentModule {
11507        let mut query = self.selection.select("loadCurrentModuleFromID");
11508        query = query.arg_lazy(
11509            "id",
11510            Box::new(move || {
11511                let id = id.clone();
11512                Box::pin(async move { id.into_id().await.unwrap().quote() })
11513            }),
11514        );
11515        CurrentModule {
11516            proc: self.proc.clone(),
11517            selection: query,
11518            graphql_client: self.graphql_client.clone(),
11519        }
11520    }
11521    /// Load a Directory from its ID.
11522    pub fn load_directory_from_id(&self, id: impl IntoID<DirectoryId>) -> Directory {
11523        let mut query = self.selection.select("loadDirectoryFromID");
11524        query = query.arg_lazy(
11525            "id",
11526            Box::new(move || {
11527                let id = id.clone();
11528                Box::pin(async move { id.into_id().await.unwrap().quote() })
11529            }),
11530        );
11531        Directory {
11532            proc: self.proc.clone(),
11533            selection: query,
11534            graphql_client: self.graphql_client.clone(),
11535        }
11536    }
11537    /// Load a EngineCacheEntry from its ID.
11538    pub fn load_engine_cache_entry_from_id(
11539        &self,
11540        id: impl IntoID<EngineCacheEntryId>,
11541    ) -> EngineCacheEntry {
11542        let mut query = self.selection.select("loadEngineCacheEntryFromID");
11543        query = query.arg_lazy(
11544            "id",
11545            Box::new(move || {
11546                let id = id.clone();
11547                Box::pin(async move { id.into_id().await.unwrap().quote() })
11548            }),
11549        );
11550        EngineCacheEntry {
11551            proc: self.proc.clone(),
11552            selection: query,
11553            graphql_client: self.graphql_client.clone(),
11554        }
11555    }
11556    /// Load a EngineCacheEntrySet from its ID.
11557    pub fn load_engine_cache_entry_set_from_id(
11558        &self,
11559        id: impl IntoID<EngineCacheEntrySetId>,
11560    ) -> EngineCacheEntrySet {
11561        let mut query = self.selection.select("loadEngineCacheEntrySetFromID");
11562        query = query.arg_lazy(
11563            "id",
11564            Box::new(move || {
11565                let id = id.clone();
11566                Box::pin(async move { id.into_id().await.unwrap().quote() })
11567            }),
11568        );
11569        EngineCacheEntrySet {
11570            proc: self.proc.clone(),
11571            selection: query,
11572            graphql_client: self.graphql_client.clone(),
11573        }
11574    }
11575    /// Load a EngineCache from its ID.
11576    pub fn load_engine_cache_from_id(&self, id: impl IntoID<EngineCacheId>) -> EngineCache {
11577        let mut query = self.selection.select("loadEngineCacheFromID");
11578        query = query.arg_lazy(
11579            "id",
11580            Box::new(move || {
11581                let id = id.clone();
11582                Box::pin(async move { id.into_id().await.unwrap().quote() })
11583            }),
11584        );
11585        EngineCache {
11586            proc: self.proc.clone(),
11587            selection: query,
11588            graphql_client: self.graphql_client.clone(),
11589        }
11590    }
11591    /// Load a Engine from its ID.
11592    pub fn load_engine_from_id(&self, id: impl IntoID<EngineId>) -> Engine {
11593        let mut query = self.selection.select("loadEngineFromID");
11594        query = query.arg_lazy(
11595            "id",
11596            Box::new(move || {
11597                let id = id.clone();
11598                Box::pin(async move { id.into_id().await.unwrap().quote() })
11599            }),
11600        );
11601        Engine {
11602            proc: self.proc.clone(),
11603            selection: query,
11604            graphql_client: self.graphql_client.clone(),
11605        }
11606    }
11607    /// Load a EnumTypeDef from its ID.
11608    pub fn load_enum_type_def_from_id(&self, id: impl IntoID<EnumTypeDefId>) -> EnumTypeDef {
11609        let mut query = self.selection.select("loadEnumTypeDefFromID");
11610        query = query.arg_lazy(
11611            "id",
11612            Box::new(move || {
11613                let id = id.clone();
11614                Box::pin(async move { id.into_id().await.unwrap().quote() })
11615            }),
11616        );
11617        EnumTypeDef {
11618            proc: self.proc.clone(),
11619            selection: query,
11620            graphql_client: self.graphql_client.clone(),
11621        }
11622    }
11623    /// Load a EnumValueTypeDef from its ID.
11624    pub fn load_enum_value_type_def_from_id(
11625        &self,
11626        id: impl IntoID<EnumValueTypeDefId>,
11627    ) -> EnumValueTypeDef {
11628        let mut query = self.selection.select("loadEnumValueTypeDefFromID");
11629        query = query.arg_lazy(
11630            "id",
11631            Box::new(move || {
11632                let id = id.clone();
11633                Box::pin(async move { id.into_id().await.unwrap().quote() })
11634            }),
11635        );
11636        EnumValueTypeDef {
11637            proc: self.proc.clone(),
11638            selection: query,
11639            graphql_client: self.graphql_client.clone(),
11640        }
11641    }
11642    /// Load a EnvFile from its ID.
11643    pub fn load_env_file_from_id(&self, id: impl IntoID<EnvFileId>) -> EnvFile {
11644        let mut query = self.selection.select("loadEnvFileFromID");
11645        query = query.arg_lazy(
11646            "id",
11647            Box::new(move || {
11648                let id = id.clone();
11649                Box::pin(async move { id.into_id().await.unwrap().quote() })
11650            }),
11651        );
11652        EnvFile {
11653            proc: self.proc.clone(),
11654            selection: query,
11655            graphql_client: self.graphql_client.clone(),
11656        }
11657    }
11658    /// Load a Env from its ID.
11659    pub fn load_env_from_id(&self, id: impl IntoID<EnvId>) -> Env {
11660        let mut query = self.selection.select("loadEnvFromID");
11661        query = query.arg_lazy(
11662            "id",
11663            Box::new(move || {
11664                let id = id.clone();
11665                Box::pin(async move { id.into_id().await.unwrap().quote() })
11666            }),
11667        );
11668        Env {
11669            proc: self.proc.clone(),
11670            selection: query,
11671            graphql_client: self.graphql_client.clone(),
11672        }
11673    }
11674    /// Load a EnvVariable from its ID.
11675    pub fn load_env_variable_from_id(&self, id: impl IntoID<EnvVariableId>) -> EnvVariable {
11676        let mut query = self.selection.select("loadEnvVariableFromID");
11677        query = query.arg_lazy(
11678            "id",
11679            Box::new(move || {
11680                let id = id.clone();
11681                Box::pin(async move { id.into_id().await.unwrap().quote() })
11682            }),
11683        );
11684        EnvVariable {
11685            proc: self.proc.clone(),
11686            selection: query,
11687            graphql_client: self.graphql_client.clone(),
11688        }
11689    }
11690    /// Load a Error from its ID.
11691    pub fn load_error_from_id(&self, id: impl IntoID<ErrorId>) -> Error {
11692        let mut query = self.selection.select("loadErrorFromID");
11693        query = query.arg_lazy(
11694            "id",
11695            Box::new(move || {
11696                let id = id.clone();
11697                Box::pin(async move { id.into_id().await.unwrap().quote() })
11698            }),
11699        );
11700        Error {
11701            proc: self.proc.clone(),
11702            selection: query,
11703            graphql_client: self.graphql_client.clone(),
11704        }
11705    }
11706    /// Load a ErrorValue from its ID.
11707    pub fn load_error_value_from_id(&self, id: impl IntoID<ErrorValueId>) -> ErrorValue {
11708        let mut query = self.selection.select("loadErrorValueFromID");
11709        query = query.arg_lazy(
11710            "id",
11711            Box::new(move || {
11712                let id = id.clone();
11713                Box::pin(async move { id.into_id().await.unwrap().quote() })
11714            }),
11715        );
11716        ErrorValue {
11717            proc: self.proc.clone(),
11718            selection: query,
11719            graphql_client: self.graphql_client.clone(),
11720        }
11721    }
11722    /// Load a FieldTypeDef from its ID.
11723    pub fn load_field_type_def_from_id(&self, id: impl IntoID<FieldTypeDefId>) -> FieldTypeDef {
11724        let mut query = self.selection.select("loadFieldTypeDefFromID");
11725        query = query.arg_lazy(
11726            "id",
11727            Box::new(move || {
11728                let id = id.clone();
11729                Box::pin(async move { id.into_id().await.unwrap().quote() })
11730            }),
11731        );
11732        FieldTypeDef {
11733            proc: self.proc.clone(),
11734            selection: query,
11735            graphql_client: self.graphql_client.clone(),
11736        }
11737    }
11738    /// Load a File from its ID.
11739    pub fn load_file_from_id(&self, id: impl IntoID<FileId>) -> File {
11740        let mut query = self.selection.select("loadFileFromID");
11741        query = query.arg_lazy(
11742            "id",
11743            Box::new(move || {
11744                let id = id.clone();
11745                Box::pin(async move { id.into_id().await.unwrap().quote() })
11746            }),
11747        );
11748        File {
11749            proc: self.proc.clone(),
11750            selection: query,
11751            graphql_client: self.graphql_client.clone(),
11752        }
11753    }
11754    /// Load a FunctionArg from its ID.
11755    pub fn load_function_arg_from_id(&self, id: impl IntoID<FunctionArgId>) -> FunctionArg {
11756        let mut query = self.selection.select("loadFunctionArgFromID");
11757        query = query.arg_lazy(
11758            "id",
11759            Box::new(move || {
11760                let id = id.clone();
11761                Box::pin(async move { id.into_id().await.unwrap().quote() })
11762            }),
11763        );
11764        FunctionArg {
11765            proc: self.proc.clone(),
11766            selection: query,
11767            graphql_client: self.graphql_client.clone(),
11768        }
11769    }
11770    /// Load a FunctionCallArgValue from its ID.
11771    pub fn load_function_call_arg_value_from_id(
11772        &self,
11773        id: impl IntoID<FunctionCallArgValueId>,
11774    ) -> FunctionCallArgValue {
11775        let mut query = self.selection.select("loadFunctionCallArgValueFromID");
11776        query = query.arg_lazy(
11777            "id",
11778            Box::new(move || {
11779                let id = id.clone();
11780                Box::pin(async move { id.into_id().await.unwrap().quote() })
11781            }),
11782        );
11783        FunctionCallArgValue {
11784            proc: self.proc.clone(),
11785            selection: query,
11786            graphql_client: self.graphql_client.clone(),
11787        }
11788    }
11789    /// Load a FunctionCall from its ID.
11790    pub fn load_function_call_from_id(&self, id: impl IntoID<FunctionCallId>) -> FunctionCall {
11791        let mut query = self.selection.select("loadFunctionCallFromID");
11792        query = query.arg_lazy(
11793            "id",
11794            Box::new(move || {
11795                let id = id.clone();
11796                Box::pin(async move { id.into_id().await.unwrap().quote() })
11797            }),
11798        );
11799        FunctionCall {
11800            proc: self.proc.clone(),
11801            selection: query,
11802            graphql_client: self.graphql_client.clone(),
11803        }
11804    }
11805    /// Load a Function from its ID.
11806    pub fn load_function_from_id(&self, id: impl IntoID<FunctionId>) -> Function {
11807        let mut query = self.selection.select("loadFunctionFromID");
11808        query = query.arg_lazy(
11809            "id",
11810            Box::new(move || {
11811                let id = id.clone();
11812                Box::pin(async move { id.into_id().await.unwrap().quote() })
11813            }),
11814        );
11815        Function {
11816            proc: self.proc.clone(),
11817            selection: query,
11818            graphql_client: self.graphql_client.clone(),
11819        }
11820    }
11821    /// Load a GeneratedCode from its ID.
11822    pub fn load_generated_code_from_id(&self, id: impl IntoID<GeneratedCodeId>) -> GeneratedCode {
11823        let mut query = self.selection.select("loadGeneratedCodeFromID");
11824        query = query.arg_lazy(
11825            "id",
11826            Box::new(move || {
11827                let id = id.clone();
11828                Box::pin(async move { id.into_id().await.unwrap().quote() })
11829            }),
11830        );
11831        GeneratedCode {
11832            proc: self.proc.clone(),
11833            selection: query,
11834            graphql_client: self.graphql_client.clone(),
11835        }
11836    }
11837    /// Load a GitRef from its ID.
11838    pub fn load_git_ref_from_id(&self, id: impl IntoID<GitRefId>) -> GitRef {
11839        let mut query = self.selection.select("loadGitRefFromID");
11840        query = query.arg_lazy(
11841            "id",
11842            Box::new(move || {
11843                let id = id.clone();
11844                Box::pin(async move { id.into_id().await.unwrap().quote() })
11845            }),
11846        );
11847        GitRef {
11848            proc: self.proc.clone(),
11849            selection: query,
11850            graphql_client: self.graphql_client.clone(),
11851        }
11852    }
11853    /// Load a GitRepository from its ID.
11854    pub fn load_git_repository_from_id(&self, id: impl IntoID<GitRepositoryId>) -> GitRepository {
11855        let mut query = self.selection.select("loadGitRepositoryFromID");
11856        query = query.arg_lazy(
11857            "id",
11858            Box::new(move || {
11859                let id = id.clone();
11860                Box::pin(async move { id.into_id().await.unwrap().quote() })
11861            }),
11862        );
11863        GitRepository {
11864            proc: self.proc.clone(),
11865            selection: query,
11866            graphql_client: self.graphql_client.clone(),
11867        }
11868    }
11869    /// Load a Host from its ID.
11870    pub fn load_host_from_id(&self, id: impl IntoID<HostId>) -> Host {
11871        let mut query = self.selection.select("loadHostFromID");
11872        query = query.arg_lazy(
11873            "id",
11874            Box::new(move || {
11875                let id = id.clone();
11876                Box::pin(async move { id.into_id().await.unwrap().quote() })
11877            }),
11878        );
11879        Host {
11880            proc: self.proc.clone(),
11881            selection: query,
11882            graphql_client: self.graphql_client.clone(),
11883        }
11884    }
11885    /// Load a InputTypeDef from its ID.
11886    pub fn load_input_type_def_from_id(&self, id: impl IntoID<InputTypeDefId>) -> InputTypeDef {
11887        let mut query = self.selection.select("loadInputTypeDefFromID");
11888        query = query.arg_lazy(
11889            "id",
11890            Box::new(move || {
11891                let id = id.clone();
11892                Box::pin(async move { id.into_id().await.unwrap().quote() })
11893            }),
11894        );
11895        InputTypeDef {
11896            proc: self.proc.clone(),
11897            selection: query,
11898            graphql_client: self.graphql_client.clone(),
11899        }
11900    }
11901    /// Load a InterfaceTypeDef from its ID.
11902    pub fn load_interface_type_def_from_id(
11903        &self,
11904        id: impl IntoID<InterfaceTypeDefId>,
11905    ) -> InterfaceTypeDef {
11906        let mut query = self.selection.select("loadInterfaceTypeDefFromID");
11907        query = query.arg_lazy(
11908            "id",
11909            Box::new(move || {
11910                let id = id.clone();
11911                Box::pin(async move { id.into_id().await.unwrap().quote() })
11912            }),
11913        );
11914        InterfaceTypeDef {
11915            proc: self.proc.clone(),
11916            selection: query,
11917            graphql_client: self.graphql_client.clone(),
11918        }
11919    }
11920    /// Load a JSONValue from its ID.
11921    pub fn load_json_value_from_id(&self, id: impl IntoID<JsonValueId>) -> JsonValue {
11922        let mut query = self.selection.select("loadJSONValueFromID");
11923        query = query.arg_lazy(
11924            "id",
11925            Box::new(move || {
11926                let id = id.clone();
11927                Box::pin(async move { id.into_id().await.unwrap().quote() })
11928            }),
11929        );
11930        JsonValue {
11931            proc: self.proc.clone(),
11932            selection: query,
11933            graphql_client: self.graphql_client.clone(),
11934        }
11935    }
11936    /// Load a LLM from its ID.
11937    pub fn load_llm_from_id(&self, id: impl IntoID<Llmid>) -> Llm {
11938        let mut query = self.selection.select("loadLLMFromID");
11939        query = query.arg_lazy(
11940            "id",
11941            Box::new(move || {
11942                let id = id.clone();
11943                Box::pin(async move { id.into_id().await.unwrap().quote() })
11944            }),
11945        );
11946        Llm {
11947            proc: self.proc.clone(),
11948            selection: query,
11949            graphql_client: self.graphql_client.clone(),
11950        }
11951    }
11952    /// Load a LLMTokenUsage from its ID.
11953    pub fn load_llm_token_usage_from_id(&self, id: impl IntoID<LlmTokenUsageId>) -> LlmTokenUsage {
11954        let mut query = self.selection.select("loadLLMTokenUsageFromID");
11955        query = query.arg_lazy(
11956            "id",
11957            Box::new(move || {
11958                let id = id.clone();
11959                Box::pin(async move { id.into_id().await.unwrap().quote() })
11960            }),
11961        );
11962        LlmTokenUsage {
11963            proc: self.proc.clone(),
11964            selection: query,
11965            graphql_client: self.graphql_client.clone(),
11966        }
11967    }
11968    /// Load a Label from its ID.
11969    pub fn load_label_from_id(&self, id: impl IntoID<LabelId>) -> Label {
11970        let mut query = self.selection.select("loadLabelFromID");
11971        query = query.arg_lazy(
11972            "id",
11973            Box::new(move || {
11974                let id = id.clone();
11975                Box::pin(async move { id.into_id().await.unwrap().quote() })
11976            }),
11977        );
11978        Label {
11979            proc: self.proc.clone(),
11980            selection: query,
11981            graphql_client: self.graphql_client.clone(),
11982        }
11983    }
11984    /// Load a ListTypeDef from its ID.
11985    pub fn load_list_type_def_from_id(&self, id: impl IntoID<ListTypeDefId>) -> ListTypeDef {
11986        let mut query = self.selection.select("loadListTypeDefFromID");
11987        query = query.arg_lazy(
11988            "id",
11989            Box::new(move || {
11990                let id = id.clone();
11991                Box::pin(async move { id.into_id().await.unwrap().quote() })
11992            }),
11993        );
11994        ListTypeDef {
11995            proc: self.proc.clone(),
11996            selection: query,
11997            graphql_client: self.graphql_client.clone(),
11998        }
11999    }
12000    /// Load a ModuleConfigClient from its ID.
12001    pub fn load_module_config_client_from_id(
12002        &self,
12003        id: impl IntoID<ModuleConfigClientId>,
12004    ) -> ModuleConfigClient {
12005        let mut query = self.selection.select("loadModuleConfigClientFromID");
12006        query = query.arg_lazy(
12007            "id",
12008            Box::new(move || {
12009                let id = id.clone();
12010                Box::pin(async move { id.into_id().await.unwrap().quote() })
12011            }),
12012        );
12013        ModuleConfigClient {
12014            proc: self.proc.clone(),
12015            selection: query,
12016            graphql_client: self.graphql_client.clone(),
12017        }
12018    }
12019    /// Load a Module from its ID.
12020    pub fn load_module_from_id(&self, id: impl IntoID<ModuleId>) -> Module {
12021        let mut query = self.selection.select("loadModuleFromID");
12022        query = query.arg_lazy(
12023            "id",
12024            Box::new(move || {
12025                let id = id.clone();
12026                Box::pin(async move { id.into_id().await.unwrap().quote() })
12027            }),
12028        );
12029        Module {
12030            proc: self.proc.clone(),
12031            selection: query,
12032            graphql_client: self.graphql_client.clone(),
12033        }
12034    }
12035    /// Load a ModuleSource from its ID.
12036    pub fn load_module_source_from_id(&self, id: impl IntoID<ModuleSourceId>) -> ModuleSource {
12037        let mut query = self.selection.select("loadModuleSourceFromID");
12038        query = query.arg_lazy(
12039            "id",
12040            Box::new(move || {
12041                let id = id.clone();
12042                Box::pin(async move { id.into_id().await.unwrap().quote() })
12043            }),
12044        );
12045        ModuleSource {
12046            proc: self.proc.clone(),
12047            selection: query,
12048            graphql_client: self.graphql_client.clone(),
12049        }
12050    }
12051    /// Load a ObjectTypeDef from its ID.
12052    pub fn load_object_type_def_from_id(&self, id: impl IntoID<ObjectTypeDefId>) -> ObjectTypeDef {
12053        let mut query = self.selection.select("loadObjectTypeDefFromID");
12054        query = query.arg_lazy(
12055            "id",
12056            Box::new(move || {
12057                let id = id.clone();
12058                Box::pin(async move { id.into_id().await.unwrap().quote() })
12059            }),
12060        );
12061        ObjectTypeDef {
12062            proc: self.proc.clone(),
12063            selection: query,
12064            graphql_client: self.graphql_client.clone(),
12065        }
12066    }
12067    /// Load a Port from its ID.
12068    pub fn load_port_from_id(&self, id: impl IntoID<PortId>) -> Port {
12069        let mut query = self.selection.select("loadPortFromID");
12070        query = query.arg_lazy(
12071            "id",
12072            Box::new(move || {
12073                let id = id.clone();
12074                Box::pin(async move { id.into_id().await.unwrap().quote() })
12075            }),
12076        );
12077        Port {
12078            proc: self.proc.clone(),
12079            selection: query,
12080            graphql_client: self.graphql_client.clone(),
12081        }
12082    }
12083    /// Load a SDKConfig from its ID.
12084    pub fn load_sdk_config_from_id(&self, id: impl IntoID<SdkConfigId>) -> SdkConfig {
12085        let mut query = self.selection.select("loadSDKConfigFromID");
12086        query = query.arg_lazy(
12087            "id",
12088            Box::new(move || {
12089                let id = id.clone();
12090                Box::pin(async move { id.into_id().await.unwrap().quote() })
12091            }),
12092        );
12093        SdkConfig {
12094            proc: self.proc.clone(),
12095            selection: query,
12096            graphql_client: self.graphql_client.clone(),
12097        }
12098    }
12099    /// Load a ScalarTypeDef from its ID.
12100    pub fn load_scalar_type_def_from_id(&self, id: impl IntoID<ScalarTypeDefId>) -> ScalarTypeDef {
12101        let mut query = self.selection.select("loadScalarTypeDefFromID");
12102        query = query.arg_lazy(
12103            "id",
12104            Box::new(move || {
12105                let id = id.clone();
12106                Box::pin(async move { id.into_id().await.unwrap().quote() })
12107            }),
12108        );
12109        ScalarTypeDef {
12110            proc: self.proc.clone(),
12111            selection: query,
12112            graphql_client: self.graphql_client.clone(),
12113        }
12114    }
12115    /// Load a SearchResult from its ID.
12116    pub fn load_search_result_from_id(&self, id: impl IntoID<SearchResultId>) -> SearchResult {
12117        let mut query = self.selection.select("loadSearchResultFromID");
12118        query = query.arg_lazy(
12119            "id",
12120            Box::new(move || {
12121                let id = id.clone();
12122                Box::pin(async move { id.into_id().await.unwrap().quote() })
12123            }),
12124        );
12125        SearchResult {
12126            proc: self.proc.clone(),
12127            selection: query,
12128            graphql_client: self.graphql_client.clone(),
12129        }
12130    }
12131    /// Load a SearchSubmatch from its ID.
12132    pub fn load_search_submatch_from_id(
12133        &self,
12134        id: impl IntoID<SearchSubmatchId>,
12135    ) -> SearchSubmatch {
12136        let mut query = self.selection.select("loadSearchSubmatchFromID");
12137        query = query.arg_lazy(
12138            "id",
12139            Box::new(move || {
12140                let id = id.clone();
12141                Box::pin(async move { id.into_id().await.unwrap().quote() })
12142            }),
12143        );
12144        SearchSubmatch {
12145            proc: self.proc.clone(),
12146            selection: query,
12147            graphql_client: self.graphql_client.clone(),
12148        }
12149    }
12150    /// Load a Secret from its ID.
12151    pub fn load_secret_from_id(&self, id: impl IntoID<SecretId>) -> Secret {
12152        let mut query = self.selection.select("loadSecretFromID");
12153        query = query.arg_lazy(
12154            "id",
12155            Box::new(move || {
12156                let id = id.clone();
12157                Box::pin(async move { id.into_id().await.unwrap().quote() })
12158            }),
12159        );
12160        Secret {
12161            proc: self.proc.clone(),
12162            selection: query,
12163            graphql_client: self.graphql_client.clone(),
12164        }
12165    }
12166    /// Load a Service from its ID.
12167    pub fn load_service_from_id(&self, id: impl IntoID<ServiceId>) -> Service {
12168        let mut query = self.selection.select("loadServiceFromID");
12169        query = query.arg_lazy(
12170            "id",
12171            Box::new(move || {
12172                let id = id.clone();
12173                Box::pin(async move { id.into_id().await.unwrap().quote() })
12174            }),
12175        );
12176        Service {
12177            proc: self.proc.clone(),
12178            selection: query,
12179            graphql_client: self.graphql_client.clone(),
12180        }
12181    }
12182    /// Load a Socket from its ID.
12183    pub fn load_socket_from_id(&self, id: impl IntoID<SocketId>) -> Socket {
12184        let mut query = self.selection.select("loadSocketFromID");
12185        query = query.arg_lazy(
12186            "id",
12187            Box::new(move || {
12188                let id = id.clone();
12189                Box::pin(async move { id.into_id().await.unwrap().quote() })
12190            }),
12191        );
12192        Socket {
12193            proc: self.proc.clone(),
12194            selection: query,
12195            graphql_client: self.graphql_client.clone(),
12196        }
12197    }
12198    /// Load a SourceMap from its ID.
12199    pub fn load_source_map_from_id(&self, id: impl IntoID<SourceMapId>) -> SourceMap {
12200        let mut query = self.selection.select("loadSourceMapFromID");
12201        query = query.arg_lazy(
12202            "id",
12203            Box::new(move || {
12204                let id = id.clone();
12205                Box::pin(async move { id.into_id().await.unwrap().quote() })
12206            }),
12207        );
12208        SourceMap {
12209            proc: self.proc.clone(),
12210            selection: query,
12211            graphql_client: self.graphql_client.clone(),
12212        }
12213    }
12214    /// Load a Terminal from its ID.
12215    pub fn load_terminal_from_id(&self, id: impl IntoID<TerminalId>) -> Terminal {
12216        let mut query = self.selection.select("loadTerminalFromID");
12217        query = query.arg_lazy(
12218            "id",
12219            Box::new(move || {
12220                let id = id.clone();
12221                Box::pin(async move { id.into_id().await.unwrap().quote() })
12222            }),
12223        );
12224        Terminal {
12225            proc: self.proc.clone(),
12226            selection: query,
12227            graphql_client: self.graphql_client.clone(),
12228        }
12229    }
12230    /// Load a TypeDef from its ID.
12231    pub fn load_type_def_from_id(&self, id: impl IntoID<TypeDefId>) -> TypeDef {
12232        let mut query = self.selection.select("loadTypeDefFromID");
12233        query = query.arg_lazy(
12234            "id",
12235            Box::new(move || {
12236                let id = id.clone();
12237                Box::pin(async move { id.into_id().await.unwrap().quote() })
12238            }),
12239        );
12240        TypeDef {
12241            proc: self.proc.clone(),
12242            selection: query,
12243            graphql_client: self.graphql_client.clone(),
12244        }
12245    }
12246    /// Create a new module.
12247    pub fn module(&self) -> Module {
12248        let query = self.selection.select("module");
12249        Module {
12250            proc: self.proc.clone(),
12251            selection: query,
12252            graphql_client: self.graphql_client.clone(),
12253        }
12254    }
12255    /// Create a new module source instance from a source ref string
12256    ///
12257    /// # Arguments
12258    ///
12259    /// * `ref_string` - The string ref representation of the module source
12260    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12261    pub fn module_source(&self, ref_string: impl Into<String>) -> ModuleSource {
12262        let mut query = self.selection.select("moduleSource");
12263        query = query.arg("refString", ref_string.into());
12264        ModuleSource {
12265            proc: self.proc.clone(),
12266            selection: query,
12267            graphql_client: self.graphql_client.clone(),
12268        }
12269    }
12270    /// Create a new module source instance from a source ref string
12271    ///
12272    /// # Arguments
12273    ///
12274    /// * `ref_string` - The string ref representation of the module source
12275    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12276    pub fn module_source_opts<'a>(
12277        &self,
12278        ref_string: impl Into<String>,
12279        opts: QueryModuleSourceOpts<'a>,
12280    ) -> ModuleSource {
12281        let mut query = self.selection.select("moduleSource");
12282        query = query.arg("refString", ref_string.into());
12283        if let Some(ref_pin) = opts.ref_pin {
12284            query = query.arg("refPin", ref_pin);
12285        }
12286        if let Some(disable_find_up) = opts.disable_find_up {
12287            query = query.arg("disableFindUp", disable_find_up);
12288        }
12289        if let Some(allow_not_exists) = opts.allow_not_exists {
12290            query = query.arg("allowNotExists", allow_not_exists);
12291        }
12292        if let Some(require_kind) = opts.require_kind {
12293            query = query.arg("requireKind", require_kind);
12294        }
12295        ModuleSource {
12296            proc: self.proc.clone(),
12297            selection: query,
12298            graphql_client: self.graphql_client.clone(),
12299        }
12300    }
12301    /// Creates a new secret.
12302    ///
12303    /// # Arguments
12304    ///
12305    /// * `uri` - The URI of the secret store
12306    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12307    pub fn secret(&self, uri: impl Into<String>) -> Secret {
12308        let mut query = self.selection.select("secret");
12309        query = query.arg("uri", uri.into());
12310        Secret {
12311            proc: self.proc.clone(),
12312            selection: query,
12313            graphql_client: self.graphql_client.clone(),
12314        }
12315    }
12316    /// Creates a new secret.
12317    ///
12318    /// # Arguments
12319    ///
12320    /// * `uri` - The URI of the secret store
12321    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12322    pub fn secret_opts<'a>(&self, uri: impl Into<String>, opts: QuerySecretOpts<'a>) -> Secret {
12323        let mut query = self.selection.select("secret");
12324        query = query.arg("uri", uri.into());
12325        if let Some(cache_key) = opts.cache_key {
12326            query = query.arg("cacheKey", cache_key);
12327        }
12328        Secret {
12329            proc: self.proc.clone(),
12330            selection: query,
12331            graphql_client: self.graphql_client.clone(),
12332        }
12333    }
12334    /// Sets a secret given a user defined name to its plaintext and returns the secret.
12335    /// The plaintext value is limited to a size of 128000 bytes.
12336    ///
12337    /// # Arguments
12338    ///
12339    /// * `name` - The user defined name for this secret
12340    /// * `plaintext` - The plaintext of the secret
12341    pub fn set_secret(&self, name: impl Into<String>, plaintext: impl Into<String>) -> Secret {
12342        let mut query = self.selection.select("setSecret");
12343        query = query.arg("name", name.into());
12344        query = query.arg("plaintext", plaintext.into());
12345        Secret {
12346            proc: self.proc.clone(),
12347            selection: query,
12348            graphql_client: self.graphql_client.clone(),
12349        }
12350    }
12351    /// Creates source map metadata.
12352    ///
12353    /// # Arguments
12354    ///
12355    /// * `filename` - The filename from the module source.
12356    /// * `line` - The line number within the filename.
12357    /// * `column` - The column number within the line.
12358    pub fn source_map(&self, filename: impl Into<String>, line: isize, column: isize) -> SourceMap {
12359        let mut query = self.selection.select("sourceMap");
12360        query = query.arg("filename", filename.into());
12361        query = query.arg("line", line);
12362        query = query.arg("column", column);
12363        SourceMap {
12364            proc: self.proc.clone(),
12365            selection: query,
12366            graphql_client: self.graphql_client.clone(),
12367        }
12368    }
12369    /// Create a new TypeDef.
12370    pub fn type_def(&self) -> TypeDef {
12371        let query = self.selection.select("typeDef");
12372        TypeDef {
12373            proc: self.proc.clone(),
12374            selection: query,
12375            graphql_client: self.graphql_client.clone(),
12376        }
12377    }
12378    /// Get the current Dagger Engine version.
12379    pub async fn version(&self) -> Result<String, DaggerError> {
12380        let query = self.selection.select("version");
12381        query.execute(self.graphql_client.clone()).await
12382    }
12383}
12384#[derive(Clone)]
12385pub struct SdkConfig {
12386    pub proc: Option<Arc<DaggerSessionProc>>,
12387    pub selection: Selection,
12388    pub graphql_client: DynGraphQLClient,
12389}
12390impl SdkConfig {
12391    /// Whether to start the SDK runtime in debug mode with an interactive terminal.
12392    pub async fn debug(&self) -> Result<bool, DaggerError> {
12393        let query = self.selection.select("debug");
12394        query.execute(self.graphql_client.clone()).await
12395    }
12396    /// A unique identifier for this SDKConfig.
12397    pub async fn id(&self) -> Result<SdkConfigId, DaggerError> {
12398        let query = self.selection.select("id");
12399        query.execute(self.graphql_client.clone()).await
12400    }
12401    /// Source of the SDK. Either a name of a builtin SDK or a module source ref string pointing to the SDK's implementation.
12402    pub async fn source(&self) -> Result<String, DaggerError> {
12403        let query = self.selection.select("source");
12404        query.execute(self.graphql_client.clone()).await
12405    }
12406}
12407#[derive(Clone)]
12408pub struct ScalarTypeDef {
12409    pub proc: Option<Arc<DaggerSessionProc>>,
12410    pub selection: Selection,
12411    pub graphql_client: DynGraphQLClient,
12412}
12413impl ScalarTypeDef {
12414    /// A doc string for the scalar, if any.
12415    pub async fn description(&self) -> Result<String, DaggerError> {
12416        let query = self.selection.select("description");
12417        query.execute(self.graphql_client.clone()).await
12418    }
12419    /// A unique identifier for this ScalarTypeDef.
12420    pub async fn id(&self) -> Result<ScalarTypeDefId, DaggerError> {
12421        let query = self.selection.select("id");
12422        query.execute(self.graphql_client.clone()).await
12423    }
12424    /// The name of the scalar.
12425    pub async fn name(&self) -> Result<String, DaggerError> {
12426        let query = self.selection.select("name");
12427        query.execute(self.graphql_client.clone()).await
12428    }
12429    /// If this ScalarTypeDef is associated with a Module, the name of the module. Unset otherwise.
12430    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
12431        let query = self.selection.select("sourceModuleName");
12432        query.execute(self.graphql_client.clone()).await
12433    }
12434}
12435#[derive(Clone)]
12436pub struct SearchResult {
12437    pub proc: Option<Arc<DaggerSessionProc>>,
12438    pub selection: Selection,
12439    pub graphql_client: DynGraphQLClient,
12440}
12441impl SearchResult {
12442    /// The byte offset of this line within the file.
12443    pub async fn absolute_offset(&self) -> Result<isize, DaggerError> {
12444        let query = self.selection.select("absoluteOffset");
12445        query.execute(self.graphql_client.clone()).await
12446    }
12447    /// The path to the file that matched.
12448    pub async fn file_path(&self) -> Result<String, DaggerError> {
12449        let query = self.selection.select("filePath");
12450        query.execute(self.graphql_client.clone()).await
12451    }
12452    /// A unique identifier for this SearchResult.
12453    pub async fn id(&self) -> Result<SearchResultId, DaggerError> {
12454        let query = self.selection.select("id");
12455        query.execute(self.graphql_client.clone()).await
12456    }
12457    /// The first line that matched.
12458    pub async fn line_number(&self) -> Result<isize, DaggerError> {
12459        let query = self.selection.select("lineNumber");
12460        query.execute(self.graphql_client.clone()).await
12461    }
12462    /// The line content that matched.
12463    pub async fn matched_lines(&self) -> Result<String, DaggerError> {
12464        let query = self.selection.select("matchedLines");
12465        query.execute(self.graphql_client.clone()).await
12466    }
12467    /// Sub-match positions and content within the matched lines.
12468    pub fn submatches(&self) -> Vec<SearchSubmatch> {
12469        let query = self.selection.select("submatches");
12470        vec![SearchSubmatch {
12471            proc: self.proc.clone(),
12472            selection: query,
12473            graphql_client: self.graphql_client.clone(),
12474        }]
12475    }
12476}
12477#[derive(Clone)]
12478pub struct SearchSubmatch {
12479    pub proc: Option<Arc<DaggerSessionProc>>,
12480    pub selection: Selection,
12481    pub graphql_client: DynGraphQLClient,
12482}
12483impl SearchSubmatch {
12484    /// The match's end offset within the matched lines.
12485    pub async fn end(&self) -> Result<isize, DaggerError> {
12486        let query = self.selection.select("end");
12487        query.execute(self.graphql_client.clone()).await
12488    }
12489    /// A unique identifier for this SearchSubmatch.
12490    pub async fn id(&self) -> Result<SearchSubmatchId, DaggerError> {
12491        let query = self.selection.select("id");
12492        query.execute(self.graphql_client.clone()).await
12493    }
12494    /// The match's start offset within the matched lines.
12495    pub async fn start(&self) -> Result<isize, DaggerError> {
12496        let query = self.selection.select("start");
12497        query.execute(self.graphql_client.clone()).await
12498    }
12499    /// The matched text.
12500    pub async fn text(&self) -> Result<String, DaggerError> {
12501        let query = self.selection.select("text");
12502        query.execute(self.graphql_client.clone()).await
12503    }
12504}
12505#[derive(Clone)]
12506pub struct Secret {
12507    pub proc: Option<Arc<DaggerSessionProc>>,
12508    pub selection: Selection,
12509    pub graphql_client: DynGraphQLClient,
12510}
12511impl Secret {
12512    /// A unique identifier for this Secret.
12513    pub async fn id(&self) -> Result<SecretId, DaggerError> {
12514        let query = self.selection.select("id");
12515        query.execute(self.graphql_client.clone()).await
12516    }
12517    /// The name of this secret.
12518    pub async fn name(&self) -> Result<String, DaggerError> {
12519        let query = self.selection.select("name");
12520        query.execute(self.graphql_client.clone()).await
12521    }
12522    /// The value of this secret.
12523    pub async fn plaintext(&self) -> Result<String, DaggerError> {
12524        let query = self.selection.select("plaintext");
12525        query.execute(self.graphql_client.clone()).await
12526    }
12527    /// The URI of this secret.
12528    pub async fn uri(&self) -> Result<String, DaggerError> {
12529        let query = self.selection.select("uri");
12530        query.execute(self.graphql_client.clone()).await
12531    }
12532}
12533#[derive(Clone)]
12534pub struct Service {
12535    pub proc: Option<Arc<DaggerSessionProc>>,
12536    pub selection: Selection,
12537    pub graphql_client: DynGraphQLClient,
12538}
12539#[derive(Builder, Debug, PartialEq)]
12540pub struct ServiceEndpointOpts<'a> {
12541    /// The exposed port number for the endpoint
12542    #[builder(setter(into, strip_option), default)]
12543    pub port: Option<isize>,
12544    /// Return a URL with the given scheme, eg. http for http://
12545    #[builder(setter(into, strip_option), default)]
12546    pub scheme: Option<&'a str>,
12547}
12548#[derive(Builder, Debug, PartialEq)]
12549pub struct ServiceStopOpts {
12550    /// Immediately kill the service without waiting for a graceful exit
12551    #[builder(setter(into, strip_option), default)]
12552    pub kill: Option<bool>,
12553}
12554#[derive(Builder, Debug, PartialEq)]
12555pub struct ServiceTerminalOpts<'a> {
12556    #[builder(setter(into, strip_option), default)]
12557    pub cmd: Option<Vec<&'a str>>,
12558}
12559#[derive(Builder, Debug, PartialEq)]
12560pub struct ServiceUpOpts {
12561    /// List of frontend/backend port mappings to forward.
12562    /// Frontend is the port accepting traffic on the host, backend is the service port.
12563    #[builder(setter(into, strip_option), default)]
12564    pub ports: Option<Vec<PortForward>>,
12565    /// Bind each tunnel port to a random port on the host.
12566    #[builder(setter(into, strip_option), default)]
12567    pub random: Option<bool>,
12568}
12569impl Service {
12570    /// Retrieves an endpoint that clients can use to reach this container.
12571    /// If no port is specified, the first exposed port is used. If none exist an error is returned.
12572    /// If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.
12573    ///
12574    /// # Arguments
12575    ///
12576    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12577    pub async fn endpoint(&self) -> Result<String, DaggerError> {
12578        let query = self.selection.select("endpoint");
12579        query.execute(self.graphql_client.clone()).await
12580    }
12581    /// Retrieves an endpoint that clients can use to reach this container.
12582    /// If no port is specified, the first exposed port is used. If none exist an error is returned.
12583    /// If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.
12584    ///
12585    /// # Arguments
12586    ///
12587    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12588    pub async fn endpoint_opts<'a>(
12589        &self,
12590        opts: ServiceEndpointOpts<'a>,
12591    ) -> Result<String, DaggerError> {
12592        let mut query = self.selection.select("endpoint");
12593        if let Some(port) = opts.port {
12594            query = query.arg("port", port);
12595        }
12596        if let Some(scheme) = opts.scheme {
12597            query = query.arg("scheme", scheme);
12598        }
12599        query.execute(self.graphql_client.clone()).await
12600    }
12601    /// Retrieves a hostname which can be used by clients to reach this container.
12602    pub async fn hostname(&self) -> Result<String, DaggerError> {
12603        let query = self.selection.select("hostname");
12604        query.execute(self.graphql_client.clone()).await
12605    }
12606    /// A unique identifier for this Service.
12607    pub async fn id(&self) -> Result<ServiceId, DaggerError> {
12608        let query = self.selection.select("id");
12609        query.execute(self.graphql_client.clone()).await
12610    }
12611    /// Retrieves the list of ports provided by the service.
12612    pub fn ports(&self) -> Vec<Port> {
12613        let query = self.selection.select("ports");
12614        vec![Port {
12615            proc: self.proc.clone(),
12616            selection: query,
12617            graphql_client: self.graphql_client.clone(),
12618        }]
12619    }
12620    /// Start the service and wait for its health checks to succeed.
12621    /// Services bound to a Container do not need to be manually started.
12622    pub async fn start(&self) -> Result<ServiceId, DaggerError> {
12623        let query = self.selection.select("start");
12624        query.execute(self.graphql_client.clone()).await
12625    }
12626    /// Stop the service.
12627    ///
12628    /// # Arguments
12629    ///
12630    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12631    pub async fn stop(&self) -> Result<ServiceId, DaggerError> {
12632        let query = self.selection.select("stop");
12633        query.execute(self.graphql_client.clone()).await
12634    }
12635    /// Stop the service.
12636    ///
12637    /// # Arguments
12638    ///
12639    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12640    pub async fn stop_opts(&self, opts: ServiceStopOpts) -> Result<ServiceId, DaggerError> {
12641        let mut query = self.selection.select("stop");
12642        if let Some(kill) = opts.kill {
12643            query = query.arg("kill", kill);
12644        }
12645        query.execute(self.graphql_client.clone()).await
12646    }
12647    /// Forces evaluation of the pipeline in the engine.
12648    pub async fn sync(&self) -> Result<ServiceId, DaggerError> {
12649        let query = self.selection.select("sync");
12650        query.execute(self.graphql_client.clone()).await
12651    }
12652    ///
12653    /// # Arguments
12654    ///
12655    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12656    pub fn terminal(&self) -> Service {
12657        let query = self.selection.select("terminal");
12658        Service {
12659            proc: self.proc.clone(),
12660            selection: query,
12661            graphql_client: self.graphql_client.clone(),
12662        }
12663    }
12664    ///
12665    /// # Arguments
12666    ///
12667    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12668    pub fn terminal_opts<'a>(&self, opts: ServiceTerminalOpts<'a>) -> Service {
12669        let mut query = self.selection.select("terminal");
12670        if let Some(cmd) = opts.cmd {
12671            query = query.arg("cmd", cmd);
12672        }
12673        Service {
12674            proc: self.proc.clone(),
12675            selection: query,
12676            graphql_client: self.graphql_client.clone(),
12677        }
12678    }
12679    /// Creates a tunnel that forwards traffic from the caller's network to this service.
12680    ///
12681    /// # Arguments
12682    ///
12683    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12684    pub async fn up(&self) -> Result<Void, DaggerError> {
12685        let query = self.selection.select("up");
12686        query.execute(self.graphql_client.clone()).await
12687    }
12688    /// Creates a tunnel that forwards traffic from the caller's network to this service.
12689    ///
12690    /// # Arguments
12691    ///
12692    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12693    pub async fn up_opts(&self, opts: ServiceUpOpts) -> Result<Void, DaggerError> {
12694        let mut query = self.selection.select("up");
12695        if let Some(ports) = opts.ports {
12696            query = query.arg("ports", ports);
12697        }
12698        if let Some(random) = opts.random {
12699            query = query.arg("random", random);
12700        }
12701        query.execute(self.graphql_client.clone()).await
12702    }
12703    /// Configures a hostname which can be used by clients within the session to reach this container.
12704    ///
12705    /// # Arguments
12706    ///
12707    /// * `hostname` - The hostname to use.
12708    pub fn with_hostname(&self, hostname: impl Into<String>) -> Service {
12709        let mut query = self.selection.select("withHostname");
12710        query = query.arg("hostname", hostname.into());
12711        Service {
12712            proc: self.proc.clone(),
12713            selection: query,
12714            graphql_client: self.graphql_client.clone(),
12715        }
12716    }
12717}
12718#[derive(Clone)]
12719pub struct Socket {
12720    pub proc: Option<Arc<DaggerSessionProc>>,
12721    pub selection: Selection,
12722    pub graphql_client: DynGraphQLClient,
12723}
12724impl Socket {
12725    /// A unique identifier for this Socket.
12726    pub async fn id(&self) -> Result<SocketId, DaggerError> {
12727        let query = self.selection.select("id");
12728        query.execute(self.graphql_client.clone()).await
12729    }
12730}
12731#[derive(Clone)]
12732pub struct SourceMap {
12733    pub proc: Option<Arc<DaggerSessionProc>>,
12734    pub selection: Selection,
12735    pub graphql_client: DynGraphQLClient,
12736}
12737impl SourceMap {
12738    /// The column number within the line.
12739    pub async fn column(&self) -> Result<isize, DaggerError> {
12740        let query = self.selection.select("column");
12741        query.execute(self.graphql_client.clone()).await
12742    }
12743    /// The filename from the module source.
12744    pub async fn filename(&self) -> Result<String, DaggerError> {
12745        let query = self.selection.select("filename");
12746        query.execute(self.graphql_client.clone()).await
12747    }
12748    /// A unique identifier for this SourceMap.
12749    pub async fn id(&self) -> Result<SourceMapId, DaggerError> {
12750        let query = self.selection.select("id");
12751        query.execute(self.graphql_client.clone()).await
12752    }
12753    /// The line number within the filename.
12754    pub async fn line(&self) -> Result<isize, DaggerError> {
12755        let query = self.selection.select("line");
12756        query.execute(self.graphql_client.clone()).await
12757    }
12758    /// The module dependency this was declared in.
12759    pub async fn module(&self) -> Result<String, DaggerError> {
12760        let query = self.selection.select("module");
12761        query.execute(self.graphql_client.clone()).await
12762    }
12763    /// The URL to the file, if any. This can be used to link to the source map in the browser.
12764    pub async fn url(&self) -> Result<String, DaggerError> {
12765        let query = self.selection.select("url");
12766        query.execute(self.graphql_client.clone()).await
12767    }
12768}
12769#[derive(Clone)]
12770pub struct Terminal {
12771    pub proc: Option<Arc<DaggerSessionProc>>,
12772    pub selection: Selection,
12773    pub graphql_client: DynGraphQLClient,
12774}
12775impl Terminal {
12776    /// A unique identifier for this Terminal.
12777    pub async fn id(&self) -> Result<TerminalId, DaggerError> {
12778        let query = self.selection.select("id");
12779        query.execute(self.graphql_client.clone()).await
12780    }
12781    /// Forces evaluation of the pipeline in the engine.
12782    /// It doesn't run the default command if no exec has been set.
12783    pub async fn sync(&self) -> Result<TerminalId, DaggerError> {
12784        let query = self.selection.select("sync");
12785        query.execute(self.graphql_client.clone()).await
12786    }
12787}
12788#[derive(Clone)]
12789pub struct TypeDef {
12790    pub proc: Option<Arc<DaggerSessionProc>>,
12791    pub selection: Selection,
12792    pub graphql_client: DynGraphQLClient,
12793}
12794#[derive(Builder, Debug, PartialEq)]
12795pub struct TypeDefWithEnumOpts<'a> {
12796    /// A doc string for the enum, if any
12797    #[builder(setter(into, strip_option), default)]
12798    pub description: Option<&'a str>,
12799    /// The source map for the enum definition.
12800    #[builder(setter(into, strip_option), default)]
12801    pub source_map: Option<SourceMapId>,
12802}
12803#[derive(Builder, Debug, PartialEq)]
12804pub struct TypeDefWithEnumMemberOpts<'a> {
12805    /// If deprecated, the reason or migration path.
12806    #[builder(setter(into, strip_option), default)]
12807    pub deprecated: Option<&'a str>,
12808    /// A doc string for the member, if any
12809    #[builder(setter(into, strip_option), default)]
12810    pub description: Option<&'a str>,
12811    /// The source map for the enum member definition.
12812    #[builder(setter(into, strip_option), default)]
12813    pub source_map: Option<SourceMapId>,
12814    /// The value of the member in the enum
12815    #[builder(setter(into, strip_option), default)]
12816    pub value: Option<&'a str>,
12817}
12818#[derive(Builder, Debug, PartialEq)]
12819pub struct TypeDefWithEnumValueOpts<'a> {
12820    /// If deprecated, the reason or migration path.
12821    #[builder(setter(into, strip_option), default)]
12822    pub deprecated: Option<&'a str>,
12823    /// A doc string for the value, if any
12824    #[builder(setter(into, strip_option), default)]
12825    pub description: Option<&'a str>,
12826    /// The source map for the enum value definition.
12827    #[builder(setter(into, strip_option), default)]
12828    pub source_map: Option<SourceMapId>,
12829}
12830#[derive(Builder, Debug, PartialEq)]
12831pub struct TypeDefWithFieldOpts<'a> {
12832    /// If deprecated, the reason or migration path.
12833    #[builder(setter(into, strip_option), default)]
12834    pub deprecated: Option<&'a str>,
12835    /// A doc string for the field, if any
12836    #[builder(setter(into, strip_option), default)]
12837    pub description: Option<&'a str>,
12838    /// The source map for the field definition.
12839    #[builder(setter(into, strip_option), default)]
12840    pub source_map: Option<SourceMapId>,
12841}
12842#[derive(Builder, Debug, PartialEq)]
12843pub struct TypeDefWithInterfaceOpts<'a> {
12844    #[builder(setter(into, strip_option), default)]
12845    pub description: Option<&'a str>,
12846    #[builder(setter(into, strip_option), default)]
12847    pub source_map: Option<SourceMapId>,
12848}
12849#[derive(Builder, Debug, PartialEq)]
12850pub struct TypeDefWithObjectOpts<'a> {
12851    #[builder(setter(into, strip_option), default)]
12852    pub deprecated: Option<&'a str>,
12853    #[builder(setter(into, strip_option), default)]
12854    pub description: Option<&'a str>,
12855    #[builder(setter(into, strip_option), default)]
12856    pub source_map: Option<SourceMapId>,
12857}
12858#[derive(Builder, Debug, PartialEq)]
12859pub struct TypeDefWithScalarOpts<'a> {
12860    #[builder(setter(into, strip_option), default)]
12861    pub description: Option<&'a str>,
12862}
12863impl TypeDef {
12864    /// If kind is ENUM, the enum-specific type definition. If kind is not ENUM, this will be null.
12865    pub fn as_enum(&self) -> EnumTypeDef {
12866        let query = self.selection.select("asEnum");
12867        EnumTypeDef {
12868            proc: self.proc.clone(),
12869            selection: query,
12870            graphql_client: self.graphql_client.clone(),
12871        }
12872    }
12873    /// If kind is INPUT, the input-specific type definition. If kind is not INPUT, this will be null.
12874    pub fn as_input(&self) -> InputTypeDef {
12875        let query = self.selection.select("asInput");
12876        InputTypeDef {
12877            proc: self.proc.clone(),
12878            selection: query,
12879            graphql_client: self.graphql_client.clone(),
12880        }
12881    }
12882    /// If kind is INTERFACE, the interface-specific type definition. If kind is not INTERFACE, this will be null.
12883    pub fn as_interface(&self) -> InterfaceTypeDef {
12884        let query = self.selection.select("asInterface");
12885        InterfaceTypeDef {
12886            proc: self.proc.clone(),
12887            selection: query,
12888            graphql_client: self.graphql_client.clone(),
12889        }
12890    }
12891    /// If kind is LIST, the list-specific type definition. If kind is not LIST, this will be null.
12892    pub fn as_list(&self) -> ListTypeDef {
12893        let query = self.selection.select("asList");
12894        ListTypeDef {
12895            proc: self.proc.clone(),
12896            selection: query,
12897            graphql_client: self.graphql_client.clone(),
12898        }
12899    }
12900    /// If kind is OBJECT, the object-specific type definition. If kind is not OBJECT, this will be null.
12901    pub fn as_object(&self) -> ObjectTypeDef {
12902        let query = self.selection.select("asObject");
12903        ObjectTypeDef {
12904            proc: self.proc.clone(),
12905            selection: query,
12906            graphql_client: self.graphql_client.clone(),
12907        }
12908    }
12909    /// If kind is SCALAR, the scalar-specific type definition. If kind is not SCALAR, this will be null.
12910    pub fn as_scalar(&self) -> ScalarTypeDef {
12911        let query = self.selection.select("asScalar");
12912        ScalarTypeDef {
12913            proc: self.proc.clone(),
12914            selection: query,
12915            graphql_client: self.graphql_client.clone(),
12916        }
12917    }
12918    /// A unique identifier for this TypeDef.
12919    pub async fn id(&self) -> Result<TypeDefId, DaggerError> {
12920        let query = self.selection.select("id");
12921        query.execute(self.graphql_client.clone()).await
12922    }
12923    /// The kind of type this is (e.g. primitive, list, object).
12924    pub async fn kind(&self) -> Result<TypeDefKind, DaggerError> {
12925        let query = self.selection.select("kind");
12926        query.execute(self.graphql_client.clone()).await
12927    }
12928    /// Whether this type can be set to null. Defaults to false.
12929    pub async fn optional(&self) -> Result<bool, DaggerError> {
12930        let query = self.selection.select("optional");
12931        query.execute(self.graphql_client.clone()).await
12932    }
12933    /// Adds a function for constructing a new instance of an Object TypeDef, failing if the type is not an object.
12934    pub fn with_constructor(&self, function: impl IntoID<FunctionId>) -> TypeDef {
12935        let mut query = self.selection.select("withConstructor");
12936        query = query.arg_lazy(
12937            "function",
12938            Box::new(move || {
12939                let function = function.clone();
12940                Box::pin(async move { function.into_id().await.unwrap().quote() })
12941            }),
12942        );
12943        TypeDef {
12944            proc: self.proc.clone(),
12945            selection: query,
12946            graphql_client: self.graphql_client.clone(),
12947        }
12948    }
12949    /// Returns a TypeDef of kind Enum with the provided name.
12950    /// 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.
12951    ///
12952    /// # Arguments
12953    ///
12954    /// * `name` - The name of the enum
12955    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12956    pub fn with_enum(&self, name: impl Into<String>) -> TypeDef {
12957        let mut query = self.selection.select("withEnum");
12958        query = query.arg("name", name.into());
12959        TypeDef {
12960            proc: self.proc.clone(),
12961            selection: query,
12962            graphql_client: self.graphql_client.clone(),
12963        }
12964    }
12965    /// Returns a TypeDef of kind Enum with the provided name.
12966    /// 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.
12967    ///
12968    /// # Arguments
12969    ///
12970    /// * `name` - The name of the enum
12971    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12972    pub fn with_enum_opts<'a>(
12973        &self,
12974        name: impl Into<String>,
12975        opts: TypeDefWithEnumOpts<'a>,
12976    ) -> TypeDef {
12977        let mut query = self.selection.select("withEnum");
12978        query = query.arg("name", name.into());
12979        if let Some(description) = opts.description {
12980            query = query.arg("description", description);
12981        }
12982        if let Some(source_map) = opts.source_map {
12983            query = query.arg("sourceMap", source_map);
12984        }
12985        TypeDef {
12986            proc: self.proc.clone(),
12987            selection: query,
12988            graphql_client: self.graphql_client.clone(),
12989        }
12990    }
12991    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
12992    ///
12993    /// # Arguments
12994    ///
12995    /// * `name` - The name of the member in the enum
12996    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12997    pub fn with_enum_member(&self, name: impl Into<String>) -> TypeDef {
12998        let mut query = self.selection.select("withEnumMember");
12999        query = query.arg("name", name.into());
13000        TypeDef {
13001            proc: self.proc.clone(),
13002            selection: query,
13003            graphql_client: self.graphql_client.clone(),
13004        }
13005    }
13006    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
13007    ///
13008    /// # Arguments
13009    ///
13010    /// * `name` - The name of the member in the enum
13011    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13012    pub fn with_enum_member_opts<'a>(
13013        &self,
13014        name: impl Into<String>,
13015        opts: TypeDefWithEnumMemberOpts<'a>,
13016    ) -> TypeDef {
13017        let mut query = self.selection.select("withEnumMember");
13018        query = query.arg("name", name.into());
13019        if let Some(value) = opts.value {
13020            query = query.arg("value", value);
13021        }
13022        if let Some(description) = opts.description {
13023            query = query.arg("description", description);
13024        }
13025        if let Some(source_map) = opts.source_map {
13026            query = query.arg("sourceMap", source_map);
13027        }
13028        if let Some(deprecated) = opts.deprecated {
13029            query = query.arg("deprecated", deprecated);
13030        }
13031        TypeDef {
13032            proc: self.proc.clone(),
13033            selection: query,
13034            graphql_client: self.graphql_client.clone(),
13035        }
13036    }
13037    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
13038    ///
13039    /// # Arguments
13040    ///
13041    /// * `value` - The name of the value in the enum
13042    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13043    pub fn with_enum_value(&self, value: impl Into<String>) -> TypeDef {
13044        let mut query = self.selection.select("withEnumValue");
13045        query = query.arg("value", value.into());
13046        TypeDef {
13047            proc: self.proc.clone(),
13048            selection: query,
13049            graphql_client: self.graphql_client.clone(),
13050        }
13051    }
13052    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
13053    ///
13054    /// # Arguments
13055    ///
13056    /// * `value` - The name of the value in the enum
13057    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13058    pub fn with_enum_value_opts<'a>(
13059        &self,
13060        value: impl Into<String>,
13061        opts: TypeDefWithEnumValueOpts<'a>,
13062    ) -> TypeDef {
13063        let mut query = self.selection.select("withEnumValue");
13064        query = query.arg("value", value.into());
13065        if let Some(description) = opts.description {
13066            query = query.arg("description", description);
13067        }
13068        if let Some(source_map) = opts.source_map {
13069            query = query.arg("sourceMap", source_map);
13070        }
13071        if let Some(deprecated) = opts.deprecated {
13072            query = query.arg("deprecated", deprecated);
13073        }
13074        TypeDef {
13075            proc: self.proc.clone(),
13076            selection: query,
13077            graphql_client: self.graphql_client.clone(),
13078        }
13079    }
13080    /// Adds a static field for an Object TypeDef, failing if the type is not an object.
13081    ///
13082    /// # Arguments
13083    ///
13084    /// * `name` - The name of the field in the object
13085    /// * `type_def` - The type of the field
13086    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13087    pub fn with_field(&self, name: impl Into<String>, type_def: impl IntoID<TypeDefId>) -> TypeDef {
13088        let mut query = self.selection.select("withField");
13089        query = query.arg("name", name.into());
13090        query = query.arg_lazy(
13091            "typeDef",
13092            Box::new(move || {
13093                let type_def = type_def.clone();
13094                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
13095            }),
13096        );
13097        TypeDef {
13098            proc: self.proc.clone(),
13099            selection: query,
13100            graphql_client: self.graphql_client.clone(),
13101        }
13102    }
13103    /// Adds a static field for an Object TypeDef, failing if the type is not an object.
13104    ///
13105    /// # Arguments
13106    ///
13107    /// * `name` - The name of the field in the object
13108    /// * `type_def` - The type of the field
13109    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13110    pub fn with_field_opts<'a>(
13111        &self,
13112        name: impl Into<String>,
13113        type_def: impl IntoID<TypeDefId>,
13114        opts: TypeDefWithFieldOpts<'a>,
13115    ) -> TypeDef {
13116        let mut query = self.selection.select("withField");
13117        query = query.arg("name", name.into());
13118        query = query.arg_lazy(
13119            "typeDef",
13120            Box::new(move || {
13121                let type_def = type_def.clone();
13122                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
13123            }),
13124        );
13125        if let Some(description) = opts.description {
13126            query = query.arg("description", description);
13127        }
13128        if let Some(source_map) = opts.source_map {
13129            query = query.arg("sourceMap", source_map);
13130        }
13131        if let Some(deprecated) = opts.deprecated {
13132            query = query.arg("deprecated", deprecated);
13133        }
13134        TypeDef {
13135            proc: self.proc.clone(),
13136            selection: query,
13137            graphql_client: self.graphql_client.clone(),
13138        }
13139    }
13140    /// Adds a function for an Object or Interface TypeDef, failing if the type is not one of those kinds.
13141    pub fn with_function(&self, function: impl IntoID<FunctionId>) -> TypeDef {
13142        let mut query = self.selection.select("withFunction");
13143        query = query.arg_lazy(
13144            "function",
13145            Box::new(move || {
13146                let function = function.clone();
13147                Box::pin(async move { function.into_id().await.unwrap().quote() })
13148            }),
13149        );
13150        TypeDef {
13151            proc: self.proc.clone(),
13152            selection: query,
13153            graphql_client: self.graphql_client.clone(),
13154        }
13155    }
13156    /// Returns a TypeDef of kind Interface with the provided name.
13157    ///
13158    /// # Arguments
13159    ///
13160    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13161    pub fn with_interface(&self, name: impl Into<String>) -> TypeDef {
13162        let mut query = self.selection.select("withInterface");
13163        query = query.arg("name", name.into());
13164        TypeDef {
13165            proc: self.proc.clone(),
13166            selection: query,
13167            graphql_client: self.graphql_client.clone(),
13168        }
13169    }
13170    /// Returns a TypeDef of kind Interface with the provided name.
13171    ///
13172    /// # Arguments
13173    ///
13174    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13175    pub fn with_interface_opts<'a>(
13176        &self,
13177        name: impl Into<String>,
13178        opts: TypeDefWithInterfaceOpts<'a>,
13179    ) -> TypeDef {
13180        let mut query = self.selection.select("withInterface");
13181        query = query.arg("name", name.into());
13182        if let Some(description) = opts.description {
13183            query = query.arg("description", description);
13184        }
13185        if let Some(source_map) = opts.source_map {
13186            query = query.arg("sourceMap", source_map);
13187        }
13188        TypeDef {
13189            proc: self.proc.clone(),
13190            selection: query,
13191            graphql_client: self.graphql_client.clone(),
13192        }
13193    }
13194    /// Sets the kind of the type.
13195    pub fn with_kind(&self, kind: TypeDefKind) -> TypeDef {
13196        let mut query = self.selection.select("withKind");
13197        query = query.arg("kind", kind);
13198        TypeDef {
13199            proc: self.proc.clone(),
13200            selection: query,
13201            graphql_client: self.graphql_client.clone(),
13202        }
13203    }
13204    /// Returns a TypeDef of kind List with the provided type for its elements.
13205    pub fn with_list_of(&self, element_type: impl IntoID<TypeDefId>) -> TypeDef {
13206        let mut query = self.selection.select("withListOf");
13207        query = query.arg_lazy(
13208            "elementType",
13209            Box::new(move || {
13210                let element_type = element_type.clone();
13211                Box::pin(async move { element_type.into_id().await.unwrap().quote() })
13212            }),
13213        );
13214        TypeDef {
13215            proc: self.proc.clone(),
13216            selection: query,
13217            graphql_client: self.graphql_client.clone(),
13218        }
13219    }
13220    /// Returns a TypeDef of kind Object with the provided name.
13221    /// 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.
13222    ///
13223    /// # Arguments
13224    ///
13225    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13226    pub fn with_object(&self, name: impl Into<String>) -> TypeDef {
13227        let mut query = self.selection.select("withObject");
13228        query = query.arg("name", name.into());
13229        TypeDef {
13230            proc: self.proc.clone(),
13231            selection: query,
13232            graphql_client: self.graphql_client.clone(),
13233        }
13234    }
13235    /// Returns a TypeDef of kind Object with the provided name.
13236    /// 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.
13237    ///
13238    /// # Arguments
13239    ///
13240    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13241    pub fn with_object_opts<'a>(
13242        &self,
13243        name: impl Into<String>,
13244        opts: TypeDefWithObjectOpts<'a>,
13245    ) -> TypeDef {
13246        let mut query = self.selection.select("withObject");
13247        query = query.arg("name", name.into());
13248        if let Some(description) = opts.description {
13249            query = query.arg("description", description);
13250        }
13251        if let Some(source_map) = opts.source_map {
13252            query = query.arg("sourceMap", source_map);
13253        }
13254        if let Some(deprecated) = opts.deprecated {
13255            query = query.arg("deprecated", deprecated);
13256        }
13257        TypeDef {
13258            proc: self.proc.clone(),
13259            selection: query,
13260            graphql_client: self.graphql_client.clone(),
13261        }
13262    }
13263    /// Sets whether this type can be set to null.
13264    pub fn with_optional(&self, optional: bool) -> TypeDef {
13265        let mut query = self.selection.select("withOptional");
13266        query = query.arg("optional", optional);
13267        TypeDef {
13268            proc: self.proc.clone(),
13269            selection: query,
13270            graphql_client: self.graphql_client.clone(),
13271        }
13272    }
13273    /// Returns a TypeDef of kind Scalar with the provided name.
13274    ///
13275    /// # Arguments
13276    ///
13277    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13278    pub fn with_scalar(&self, name: impl Into<String>) -> TypeDef {
13279        let mut query = self.selection.select("withScalar");
13280        query = query.arg("name", name.into());
13281        TypeDef {
13282            proc: self.proc.clone(),
13283            selection: query,
13284            graphql_client: self.graphql_client.clone(),
13285        }
13286    }
13287    /// Returns a TypeDef of kind Scalar with the provided name.
13288    ///
13289    /// # Arguments
13290    ///
13291    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13292    pub fn with_scalar_opts<'a>(
13293        &self,
13294        name: impl Into<String>,
13295        opts: TypeDefWithScalarOpts<'a>,
13296    ) -> TypeDef {
13297        let mut query = self.selection.select("withScalar");
13298        query = query.arg("name", name.into());
13299        if let Some(description) = opts.description {
13300            query = query.arg("description", description);
13301        }
13302        TypeDef {
13303            proc: self.proc.clone(),
13304            selection: query,
13305            graphql_client: self.graphql_client.clone(),
13306        }
13307    }
13308}
13309#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
13310pub enum CacheSharingMode {
13311    #[serde(rename = "LOCKED")]
13312    Locked,
13313    #[serde(rename = "PRIVATE")]
13314    Private,
13315    #[serde(rename = "SHARED")]
13316    Shared,
13317}
13318#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
13319pub enum ExistsType {
13320    #[serde(rename = "DIRECTORY_TYPE")]
13321    DirectoryType,
13322    #[serde(rename = "REGULAR_TYPE")]
13323    RegularType,
13324    #[serde(rename = "SYMLINK_TYPE")]
13325    SymlinkType,
13326}
13327#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
13328pub enum FunctionCachePolicy {
13329    #[serde(rename = "Default")]
13330    Default,
13331    #[serde(rename = "Never")]
13332    Never,
13333    #[serde(rename = "PerSession")]
13334    PerSession,
13335}
13336#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
13337pub enum ImageLayerCompression {
13338    #[serde(rename = "EStarGZ")]
13339    EStarGz,
13340    #[serde(rename = "ESTARGZ")]
13341    Estargz,
13342    #[serde(rename = "Gzip")]
13343    Gzip,
13344    #[serde(rename = "Uncompressed")]
13345    Uncompressed,
13346    #[serde(rename = "Zstd")]
13347    Zstd,
13348}
13349#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
13350pub enum ImageMediaTypes {
13351    #[serde(rename = "DOCKER")]
13352    Docker,
13353    #[serde(rename = "DockerMediaTypes")]
13354    DockerMediaTypes,
13355    #[serde(rename = "OCI")]
13356    Oci,
13357    #[serde(rename = "OCIMediaTypes")]
13358    OciMediaTypes,
13359}
13360#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
13361pub enum ModuleSourceExperimentalFeature {
13362    #[serde(rename = "SELF_CALLS")]
13363    SelfCalls,
13364}
13365#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
13366pub enum ModuleSourceKind {
13367    #[serde(rename = "DIR")]
13368    Dir,
13369    #[serde(rename = "DIR_SOURCE")]
13370    DirSource,
13371    #[serde(rename = "GIT")]
13372    Git,
13373    #[serde(rename = "GIT_SOURCE")]
13374    GitSource,
13375    #[serde(rename = "LOCAL")]
13376    Local,
13377    #[serde(rename = "LOCAL_SOURCE")]
13378    LocalSource,
13379}
13380#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
13381pub enum NetworkProtocol {
13382    #[serde(rename = "TCP")]
13383    Tcp,
13384    #[serde(rename = "UDP")]
13385    Udp,
13386}
13387#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
13388pub enum ReturnType {
13389    #[serde(rename = "ANY")]
13390    Any,
13391    #[serde(rename = "FAILURE")]
13392    Failure,
13393    #[serde(rename = "SUCCESS")]
13394    Success,
13395}
13396#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
13397pub enum TypeDefKind {
13398    #[serde(rename = "BOOLEAN")]
13399    Boolean,
13400    #[serde(rename = "BOOLEAN_KIND")]
13401    BooleanKind,
13402    #[serde(rename = "ENUM")]
13403    Enum,
13404    #[serde(rename = "ENUM_KIND")]
13405    EnumKind,
13406    #[serde(rename = "FLOAT")]
13407    Float,
13408    #[serde(rename = "FLOAT_KIND")]
13409    FloatKind,
13410    #[serde(rename = "INPUT")]
13411    Input,
13412    #[serde(rename = "INPUT_KIND")]
13413    InputKind,
13414    #[serde(rename = "INTEGER")]
13415    Integer,
13416    #[serde(rename = "INTEGER_KIND")]
13417    IntegerKind,
13418    #[serde(rename = "INTERFACE")]
13419    Interface,
13420    #[serde(rename = "INTERFACE_KIND")]
13421    InterfaceKind,
13422    #[serde(rename = "LIST")]
13423    List,
13424    #[serde(rename = "LIST_KIND")]
13425    ListKind,
13426    #[serde(rename = "OBJECT")]
13427    Object,
13428    #[serde(rename = "OBJECT_KIND")]
13429    ObjectKind,
13430    #[serde(rename = "SCALAR")]
13431    Scalar,
13432    #[serde(rename = "SCALAR_KIND")]
13433    ScalarKind,
13434    #[serde(rename = "STRING")]
13435    String,
13436    #[serde(rename = "STRING_KIND")]
13437    StringKind,
13438    #[serde(rename = "VOID")]
13439    Void,
13440    #[serde(rename = "VOID_KIND")]
13441    VoidKind,
13442}