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    /// Export environment variables from an env-file to the container.
3735    ///
3736    /// # Arguments
3737    ///
3738    /// * `source` - Identifier of the envfile
3739    pub fn with_env_file_variables(&self, source: impl IntoID<EnvFileId>) -> Container {
3740        let mut query = self.selection.select("withEnvFileVariables");
3741        query = query.arg_lazy(
3742            "source",
3743            Box::new(move || {
3744                let source = source.clone();
3745                Box::pin(async move { source.into_id().await.unwrap().quote() })
3746            }),
3747        );
3748        Container {
3749            proc: self.proc.clone(),
3750            selection: query,
3751            graphql_client: self.graphql_client.clone(),
3752        }
3753    }
3754    /// Set a new environment variable in the container.
3755    ///
3756    /// # Arguments
3757    ///
3758    /// * `name` - Name of the environment variable (e.g., "HOST").
3759    /// * `value` - Value of the environment variable. (e.g., "localhost").
3760    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3761    pub fn with_env_variable(
3762        &self,
3763        name: impl Into<String>,
3764        value: impl Into<String>,
3765    ) -> Container {
3766        let mut query = self.selection.select("withEnvVariable");
3767        query = query.arg("name", name.into());
3768        query = query.arg("value", value.into());
3769        Container {
3770            proc: self.proc.clone(),
3771            selection: query,
3772            graphql_client: self.graphql_client.clone(),
3773        }
3774    }
3775    /// Set a new environment variable in the container.
3776    ///
3777    /// # Arguments
3778    ///
3779    /// * `name` - Name of the environment variable (e.g., "HOST").
3780    /// * `value` - Value of the environment variable. (e.g., "localhost").
3781    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3782    pub fn with_env_variable_opts(
3783        &self,
3784        name: impl Into<String>,
3785        value: impl Into<String>,
3786        opts: ContainerWithEnvVariableOpts,
3787    ) -> Container {
3788        let mut query = self.selection.select("withEnvVariable");
3789        query = query.arg("name", name.into());
3790        query = query.arg("value", value.into());
3791        if let Some(expand) = opts.expand {
3792            query = query.arg("expand", expand);
3793        }
3794        Container {
3795            proc: self.proc.clone(),
3796            selection: query,
3797            graphql_client: self.graphql_client.clone(),
3798        }
3799    }
3800    /// Raise an error.
3801    ///
3802    /// # Arguments
3803    ///
3804    /// * `err` - Message of the error to raise. If empty, the error will be ignored.
3805    pub fn with_error(&self, err: impl Into<String>) -> Container {
3806        let mut query = self.selection.select("withError");
3807        query = query.arg("err", err.into());
3808        Container {
3809            proc: self.proc.clone(),
3810            selection: query,
3811            graphql_client: self.graphql_client.clone(),
3812        }
3813    }
3814    /// Execute a command in the container, and return a new snapshot of the container state after execution.
3815    ///
3816    /// # Arguments
3817    ///
3818    /// * `args` - Command to execute. Must be valid exec() arguments, not a shell command. Example: ["go", "run", "main.go"].
3819    ///
3820    /// To run a shell command, execute the shell and pass the shell command as argument. Example: ["sh", "-c", "ls -l | grep foo"]
3821    ///
3822    /// Defaults to the container's default arguments (see "defaultArgs" and "withDefaultArgs").
3823    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3824    pub fn with_exec(&self, args: Vec<impl Into<String>>) -> Container {
3825        let mut query = self.selection.select("withExec");
3826        query = query.arg(
3827            "args",
3828            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3829        );
3830        Container {
3831            proc: self.proc.clone(),
3832            selection: query,
3833            graphql_client: self.graphql_client.clone(),
3834        }
3835    }
3836    /// Execute a command in the container, and return a new snapshot of the container state after execution.
3837    ///
3838    /// # Arguments
3839    ///
3840    /// * `args` - Command to execute. Must be valid exec() arguments, not a shell command. Example: ["go", "run", "main.go"].
3841    ///
3842    /// To run a shell command, execute the shell and pass the shell command as argument. Example: ["sh", "-c", "ls -l | grep foo"]
3843    ///
3844    /// Defaults to the container's default arguments (see "defaultArgs" and "withDefaultArgs").
3845    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3846    pub fn with_exec_opts<'a>(
3847        &self,
3848        args: Vec<impl Into<String>>,
3849        opts: ContainerWithExecOpts<'a>,
3850    ) -> Container {
3851        let mut query = self.selection.select("withExec");
3852        query = query.arg(
3853            "args",
3854            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3855        );
3856        if let Some(use_entrypoint) = opts.use_entrypoint {
3857            query = query.arg("useEntrypoint", use_entrypoint);
3858        }
3859        if let Some(stdin) = opts.stdin {
3860            query = query.arg("stdin", stdin);
3861        }
3862        if let Some(redirect_stdin) = opts.redirect_stdin {
3863            query = query.arg("redirectStdin", redirect_stdin);
3864        }
3865        if let Some(redirect_stdout) = opts.redirect_stdout {
3866            query = query.arg("redirectStdout", redirect_stdout);
3867        }
3868        if let Some(redirect_stderr) = opts.redirect_stderr {
3869            query = query.arg("redirectStderr", redirect_stderr);
3870        }
3871        if let Some(expect) = opts.expect {
3872            query = query.arg("expect", expect);
3873        }
3874        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
3875            query = query.arg(
3876                "experimentalPrivilegedNesting",
3877                experimental_privileged_nesting,
3878            );
3879        }
3880        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
3881            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
3882        }
3883        if let Some(expand) = opts.expand {
3884            query = query.arg("expand", expand);
3885        }
3886        if let Some(no_init) = opts.no_init {
3887            query = query.arg("noInit", no_init);
3888        }
3889        Container {
3890            proc: self.proc.clone(),
3891            selection: query,
3892            graphql_client: self.graphql_client.clone(),
3893        }
3894    }
3895    /// Expose a network port. Like EXPOSE in Dockerfile (but with healthcheck support)
3896    /// Exposed ports serve two purposes:
3897    /// - For health checks and introspection, when running services
3898    /// - For setting the EXPOSE OCI field when publishing the container
3899    ///
3900    /// # Arguments
3901    ///
3902    /// * `port` - Port number to expose. Example: 8080
3903    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3904    pub fn with_exposed_port(&self, port: isize) -> Container {
3905        let mut query = self.selection.select("withExposedPort");
3906        query = query.arg("port", port);
3907        Container {
3908            proc: self.proc.clone(),
3909            selection: query,
3910            graphql_client: self.graphql_client.clone(),
3911        }
3912    }
3913    /// Expose a network port. Like EXPOSE in Dockerfile (but with healthcheck support)
3914    /// Exposed ports serve two purposes:
3915    /// - For health checks and introspection, when running services
3916    /// - For setting the EXPOSE OCI field when publishing the container
3917    ///
3918    /// # Arguments
3919    ///
3920    /// * `port` - Port number to expose. Example: 8080
3921    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3922    pub fn with_exposed_port_opts<'a>(
3923        &self,
3924        port: isize,
3925        opts: ContainerWithExposedPortOpts<'a>,
3926    ) -> Container {
3927        let mut query = self.selection.select("withExposedPort");
3928        query = query.arg("port", port);
3929        if let Some(protocol) = opts.protocol {
3930            query = query.arg("protocol", protocol);
3931        }
3932        if let Some(description) = opts.description {
3933            query = query.arg("description", description);
3934        }
3935        if let Some(experimental_skip_healthcheck) = opts.experimental_skip_healthcheck {
3936            query = query.arg("experimentalSkipHealthcheck", experimental_skip_healthcheck);
3937        }
3938        Container {
3939            proc: self.proc.clone(),
3940            selection: query,
3941            graphql_client: self.graphql_client.clone(),
3942        }
3943    }
3944    /// Return a container snapshot with a file added
3945    ///
3946    /// # Arguments
3947    ///
3948    /// * `path` - Path of the new file. Example: "/path/to/new-file.txt"
3949    /// * `source` - File to add
3950    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3951    pub fn with_file(&self, path: impl Into<String>, source: impl IntoID<FileId>) -> Container {
3952        let mut query = self.selection.select("withFile");
3953        query = query.arg("path", path.into());
3954        query = query.arg_lazy(
3955            "source",
3956            Box::new(move || {
3957                let source = source.clone();
3958                Box::pin(async move { source.into_id().await.unwrap().quote() })
3959            }),
3960        );
3961        Container {
3962            proc: self.proc.clone(),
3963            selection: query,
3964            graphql_client: self.graphql_client.clone(),
3965        }
3966    }
3967    /// Return a container snapshot with a file added
3968    ///
3969    /// # Arguments
3970    ///
3971    /// * `path` - Path of the new file. Example: "/path/to/new-file.txt"
3972    /// * `source` - File to add
3973    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3974    pub fn with_file_opts<'a>(
3975        &self,
3976        path: impl Into<String>,
3977        source: impl IntoID<FileId>,
3978        opts: ContainerWithFileOpts<'a>,
3979    ) -> Container {
3980        let mut query = self.selection.select("withFile");
3981        query = query.arg("path", path.into());
3982        query = query.arg_lazy(
3983            "source",
3984            Box::new(move || {
3985                let source = source.clone();
3986                Box::pin(async move { source.into_id().await.unwrap().quote() })
3987            }),
3988        );
3989        if let Some(permissions) = opts.permissions {
3990            query = query.arg("permissions", permissions);
3991        }
3992        if let Some(owner) = opts.owner {
3993            query = query.arg("owner", owner);
3994        }
3995        if let Some(expand) = opts.expand {
3996            query = query.arg("expand", expand);
3997        }
3998        Container {
3999            proc: self.proc.clone(),
4000            selection: query,
4001            graphql_client: self.graphql_client.clone(),
4002        }
4003    }
4004    /// Retrieves this container plus the contents of the given files copied to the given path.
4005    ///
4006    /// # Arguments
4007    ///
4008    /// * `path` - Location where copied files should be placed (e.g., "/src").
4009    /// * `sources` - Identifiers of the files to copy.
4010    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4011    pub fn with_files(&self, path: impl Into<String>, sources: Vec<FileId>) -> Container {
4012        let mut query = self.selection.select("withFiles");
4013        query = query.arg("path", path.into());
4014        query = query.arg("sources", sources);
4015        Container {
4016            proc: self.proc.clone(),
4017            selection: query,
4018            graphql_client: self.graphql_client.clone(),
4019        }
4020    }
4021    /// Retrieves this container plus the contents of the given files copied to the given path.
4022    ///
4023    /// # Arguments
4024    ///
4025    /// * `path` - Location where copied files should be placed (e.g., "/src").
4026    /// * `sources` - Identifiers of the files to copy.
4027    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4028    pub fn with_files_opts<'a>(
4029        &self,
4030        path: impl Into<String>,
4031        sources: Vec<FileId>,
4032        opts: ContainerWithFilesOpts<'a>,
4033    ) -> Container {
4034        let mut query = self.selection.select("withFiles");
4035        query = query.arg("path", path.into());
4036        query = query.arg("sources", sources);
4037        if let Some(permissions) = opts.permissions {
4038            query = query.arg("permissions", permissions);
4039        }
4040        if let Some(owner) = opts.owner {
4041            query = query.arg("owner", owner);
4042        }
4043        if let Some(expand) = opts.expand {
4044            query = query.arg("expand", expand);
4045        }
4046        Container {
4047            proc: self.proc.clone(),
4048            selection: query,
4049            graphql_client: self.graphql_client.clone(),
4050        }
4051    }
4052    /// Retrieves this container plus the given label.
4053    ///
4054    /// # Arguments
4055    ///
4056    /// * `name` - The name of the label (e.g., "org.opencontainers.artifact.created").
4057    /// * `value` - The value of the label (e.g., "2023-01-01T00:00:00Z").
4058    pub fn with_label(&self, name: impl Into<String>, value: impl Into<String>) -> Container {
4059        let mut query = self.selection.select("withLabel");
4060        query = query.arg("name", name.into());
4061        query = query.arg("value", value.into());
4062        Container {
4063            proc: self.proc.clone(),
4064            selection: query,
4065            graphql_client: self.graphql_client.clone(),
4066        }
4067    }
4068    /// Retrieves this container plus a cache volume mounted at the given path.
4069    ///
4070    /// # Arguments
4071    ///
4072    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
4073    /// * `cache` - Identifier of the cache volume to mount.
4074    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4075    pub fn with_mounted_cache(
4076        &self,
4077        path: impl Into<String>,
4078        cache: impl IntoID<CacheVolumeId>,
4079    ) -> Container {
4080        let mut query = self.selection.select("withMountedCache");
4081        query = query.arg("path", path.into());
4082        query = query.arg_lazy(
4083            "cache",
4084            Box::new(move || {
4085                let cache = cache.clone();
4086                Box::pin(async move { cache.into_id().await.unwrap().quote() })
4087            }),
4088        );
4089        Container {
4090            proc: self.proc.clone(),
4091            selection: query,
4092            graphql_client: self.graphql_client.clone(),
4093        }
4094    }
4095    /// Retrieves this container plus a cache volume mounted at the given path.
4096    ///
4097    /// # Arguments
4098    ///
4099    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
4100    /// * `cache` - Identifier of the cache volume to mount.
4101    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4102    pub fn with_mounted_cache_opts<'a>(
4103        &self,
4104        path: impl Into<String>,
4105        cache: impl IntoID<CacheVolumeId>,
4106        opts: ContainerWithMountedCacheOpts<'a>,
4107    ) -> Container {
4108        let mut query = self.selection.select("withMountedCache");
4109        query = query.arg("path", path.into());
4110        query = query.arg_lazy(
4111            "cache",
4112            Box::new(move || {
4113                let cache = cache.clone();
4114                Box::pin(async move { cache.into_id().await.unwrap().quote() })
4115            }),
4116        );
4117        if let Some(source) = opts.source {
4118            query = query.arg("source", source);
4119        }
4120        if let Some(sharing) = opts.sharing {
4121            query = query.arg("sharing", sharing);
4122        }
4123        if let Some(owner) = opts.owner {
4124            query = query.arg("owner", owner);
4125        }
4126        if let Some(expand) = opts.expand {
4127            query = query.arg("expand", expand);
4128        }
4129        Container {
4130            proc: self.proc.clone(),
4131            selection: query,
4132            graphql_client: self.graphql_client.clone(),
4133        }
4134    }
4135    /// Retrieves this container plus a directory mounted at the given path.
4136    ///
4137    /// # Arguments
4138    ///
4139    /// * `path` - Location of the mounted directory (e.g., "/mnt/directory").
4140    /// * `source` - Identifier of the mounted directory.
4141    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4142    pub fn with_mounted_directory(
4143        &self,
4144        path: impl Into<String>,
4145        source: impl IntoID<DirectoryId>,
4146    ) -> Container {
4147        let mut query = self.selection.select("withMountedDirectory");
4148        query = query.arg("path", path.into());
4149        query = query.arg_lazy(
4150            "source",
4151            Box::new(move || {
4152                let source = source.clone();
4153                Box::pin(async move { source.into_id().await.unwrap().quote() })
4154            }),
4155        );
4156        Container {
4157            proc: self.proc.clone(),
4158            selection: query,
4159            graphql_client: self.graphql_client.clone(),
4160        }
4161    }
4162    /// Retrieves this container plus a directory mounted at the given path.
4163    ///
4164    /// # Arguments
4165    ///
4166    /// * `path` - Location of the mounted directory (e.g., "/mnt/directory").
4167    /// * `source` - Identifier of the mounted directory.
4168    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4169    pub fn with_mounted_directory_opts<'a>(
4170        &self,
4171        path: impl Into<String>,
4172        source: impl IntoID<DirectoryId>,
4173        opts: ContainerWithMountedDirectoryOpts<'a>,
4174    ) -> Container {
4175        let mut query = self.selection.select("withMountedDirectory");
4176        query = query.arg("path", path.into());
4177        query = query.arg_lazy(
4178            "source",
4179            Box::new(move || {
4180                let source = source.clone();
4181                Box::pin(async move { source.into_id().await.unwrap().quote() })
4182            }),
4183        );
4184        if let Some(owner) = opts.owner {
4185            query = query.arg("owner", owner);
4186        }
4187        if let Some(expand) = opts.expand {
4188            query = query.arg("expand", expand);
4189        }
4190        Container {
4191            proc: self.proc.clone(),
4192            selection: query,
4193            graphql_client: self.graphql_client.clone(),
4194        }
4195    }
4196    /// Retrieves this container plus a file mounted at the given path.
4197    ///
4198    /// # Arguments
4199    ///
4200    /// * `path` - Location of the mounted file (e.g., "/tmp/file.txt").
4201    /// * `source` - Identifier of the mounted file.
4202    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4203    pub fn with_mounted_file(
4204        &self,
4205        path: impl Into<String>,
4206        source: impl IntoID<FileId>,
4207    ) -> Container {
4208        let mut query = self.selection.select("withMountedFile");
4209        query = query.arg("path", path.into());
4210        query = query.arg_lazy(
4211            "source",
4212            Box::new(move || {
4213                let source = source.clone();
4214                Box::pin(async move { source.into_id().await.unwrap().quote() })
4215            }),
4216        );
4217        Container {
4218            proc: self.proc.clone(),
4219            selection: query,
4220            graphql_client: self.graphql_client.clone(),
4221        }
4222    }
4223    /// Retrieves this container plus a file mounted at the given path.
4224    ///
4225    /// # Arguments
4226    ///
4227    /// * `path` - Location of the mounted file (e.g., "/tmp/file.txt").
4228    /// * `source` - Identifier of the mounted file.
4229    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4230    pub fn with_mounted_file_opts<'a>(
4231        &self,
4232        path: impl Into<String>,
4233        source: impl IntoID<FileId>,
4234        opts: ContainerWithMountedFileOpts<'a>,
4235    ) -> Container {
4236        let mut query = self.selection.select("withMountedFile");
4237        query = query.arg("path", path.into());
4238        query = query.arg_lazy(
4239            "source",
4240            Box::new(move || {
4241                let source = source.clone();
4242                Box::pin(async move { source.into_id().await.unwrap().quote() })
4243            }),
4244        );
4245        if let Some(owner) = opts.owner {
4246            query = query.arg("owner", owner);
4247        }
4248        if let Some(expand) = opts.expand {
4249            query = query.arg("expand", expand);
4250        }
4251        Container {
4252            proc: self.proc.clone(),
4253            selection: query,
4254            graphql_client: self.graphql_client.clone(),
4255        }
4256    }
4257    /// Retrieves this container plus a secret mounted into a file at the given path.
4258    ///
4259    /// # Arguments
4260    ///
4261    /// * `path` - Location of the secret file (e.g., "/tmp/secret.txt").
4262    /// * `source` - Identifier of the secret to mount.
4263    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4264    pub fn with_mounted_secret(
4265        &self,
4266        path: impl Into<String>,
4267        source: impl IntoID<SecretId>,
4268    ) -> Container {
4269        let mut query = self.selection.select("withMountedSecret");
4270        query = query.arg("path", path.into());
4271        query = query.arg_lazy(
4272            "source",
4273            Box::new(move || {
4274                let source = source.clone();
4275                Box::pin(async move { source.into_id().await.unwrap().quote() })
4276            }),
4277        );
4278        Container {
4279            proc: self.proc.clone(),
4280            selection: query,
4281            graphql_client: self.graphql_client.clone(),
4282        }
4283    }
4284    /// Retrieves this container plus a secret mounted into a file at the given path.
4285    ///
4286    /// # Arguments
4287    ///
4288    /// * `path` - Location of the secret file (e.g., "/tmp/secret.txt").
4289    /// * `source` - Identifier of the secret to mount.
4290    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4291    pub fn with_mounted_secret_opts<'a>(
4292        &self,
4293        path: impl Into<String>,
4294        source: impl IntoID<SecretId>,
4295        opts: ContainerWithMountedSecretOpts<'a>,
4296    ) -> Container {
4297        let mut query = self.selection.select("withMountedSecret");
4298        query = query.arg("path", path.into());
4299        query = query.arg_lazy(
4300            "source",
4301            Box::new(move || {
4302                let source = source.clone();
4303                Box::pin(async move { source.into_id().await.unwrap().quote() })
4304            }),
4305        );
4306        if let Some(owner) = opts.owner {
4307            query = query.arg("owner", owner);
4308        }
4309        if let Some(mode) = opts.mode {
4310            query = query.arg("mode", mode);
4311        }
4312        if let Some(expand) = opts.expand {
4313            query = query.arg("expand", expand);
4314        }
4315        Container {
4316            proc: self.proc.clone(),
4317            selection: query,
4318            graphql_client: self.graphql_client.clone(),
4319        }
4320    }
4321    /// 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.
4322    ///
4323    /// # Arguments
4324    ///
4325    /// * `path` - Location of the temporary directory (e.g., "/tmp/temp_dir").
4326    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4327    pub fn with_mounted_temp(&self, path: impl Into<String>) -> Container {
4328        let mut query = self.selection.select("withMountedTemp");
4329        query = query.arg("path", path.into());
4330        Container {
4331            proc: self.proc.clone(),
4332            selection: query,
4333            graphql_client: self.graphql_client.clone(),
4334        }
4335    }
4336    /// 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.
4337    ///
4338    /// # Arguments
4339    ///
4340    /// * `path` - Location of the temporary directory (e.g., "/tmp/temp_dir").
4341    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4342    pub fn with_mounted_temp_opts(
4343        &self,
4344        path: impl Into<String>,
4345        opts: ContainerWithMountedTempOpts,
4346    ) -> Container {
4347        let mut query = self.selection.select("withMountedTemp");
4348        query = query.arg("path", path.into());
4349        if let Some(size) = opts.size {
4350            query = query.arg("size", size);
4351        }
4352        if let Some(expand) = opts.expand {
4353            query = query.arg("expand", expand);
4354        }
4355        Container {
4356            proc: self.proc.clone(),
4357            selection: query,
4358            graphql_client: self.graphql_client.clone(),
4359        }
4360    }
4361    /// Return a new container snapshot, with a file added to its filesystem with text content
4362    ///
4363    /// # Arguments
4364    ///
4365    /// * `path` - Path of the new file. May be relative or absolute. Example: "README.md" or "/etc/profile"
4366    /// * `contents` - Contents of the new file. Example: "Hello world!"
4367    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4368    pub fn with_new_file(&self, path: impl Into<String>, contents: impl Into<String>) -> Container {
4369        let mut query = self.selection.select("withNewFile");
4370        query = query.arg("path", path.into());
4371        query = query.arg("contents", contents.into());
4372        Container {
4373            proc: self.proc.clone(),
4374            selection: query,
4375            graphql_client: self.graphql_client.clone(),
4376        }
4377    }
4378    /// Return a new container snapshot, with a file added to its filesystem with text content
4379    ///
4380    /// # Arguments
4381    ///
4382    /// * `path` - Path of the new file. May be relative or absolute. Example: "README.md" or "/etc/profile"
4383    /// * `contents` - Contents of the new file. Example: "Hello world!"
4384    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4385    pub fn with_new_file_opts<'a>(
4386        &self,
4387        path: impl Into<String>,
4388        contents: impl Into<String>,
4389        opts: ContainerWithNewFileOpts<'a>,
4390    ) -> Container {
4391        let mut query = self.selection.select("withNewFile");
4392        query = query.arg("path", path.into());
4393        query = query.arg("contents", contents.into());
4394        if let Some(permissions) = opts.permissions {
4395            query = query.arg("permissions", permissions);
4396        }
4397        if let Some(owner) = opts.owner {
4398            query = query.arg("owner", owner);
4399        }
4400        if let Some(expand) = opts.expand {
4401            query = query.arg("expand", expand);
4402        }
4403        Container {
4404            proc: self.proc.clone(),
4405            selection: query,
4406            graphql_client: self.graphql_client.clone(),
4407        }
4408    }
4409    /// Attach credentials for future publishing to a registry. Use in combination with publish
4410    ///
4411    /// # Arguments
4412    ///
4413    /// * `address` - The image address that needs authentication. Same format as "docker push". Example: "registry.dagger.io/dagger:latest"
4414    /// * `username` - The username to authenticate with. Example: "alice"
4415    /// * `secret` - The API key, password or token to authenticate to this registry
4416    pub fn with_registry_auth(
4417        &self,
4418        address: impl Into<String>,
4419        username: impl Into<String>,
4420        secret: impl IntoID<SecretId>,
4421    ) -> Container {
4422        let mut query = self.selection.select("withRegistryAuth");
4423        query = query.arg("address", address.into());
4424        query = query.arg("username", username.into());
4425        query = query.arg_lazy(
4426            "secret",
4427            Box::new(move || {
4428                let secret = secret.clone();
4429                Box::pin(async move { secret.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    /// Change the container's root filesystem. The previous root filesystem will be lost.
4439    ///
4440    /// # Arguments
4441    ///
4442    /// * `directory` - The new root filesystem.
4443    pub fn with_rootfs(&self, directory: impl IntoID<DirectoryId>) -> Container {
4444        let mut query = self.selection.select("withRootfs");
4445        query = query.arg_lazy(
4446            "directory",
4447            Box::new(move || {
4448                let directory = directory.clone();
4449                Box::pin(async move { directory.into_id().await.unwrap().quote() })
4450            }),
4451        );
4452        Container {
4453            proc: self.proc.clone(),
4454            selection: query,
4455            graphql_client: self.graphql_client.clone(),
4456        }
4457    }
4458    /// Set a new environment variable, using a secret value
4459    ///
4460    /// # Arguments
4461    ///
4462    /// * `name` - Name of the secret variable (e.g., "API_SECRET").
4463    /// * `secret` - Identifier of the secret value.
4464    pub fn with_secret_variable(
4465        &self,
4466        name: impl Into<String>,
4467        secret: impl IntoID<SecretId>,
4468    ) -> Container {
4469        let mut query = self.selection.select("withSecretVariable");
4470        query = query.arg("name", name.into());
4471        query = query.arg_lazy(
4472            "secret",
4473            Box::new(move || {
4474                let secret = secret.clone();
4475                Box::pin(async move { secret.into_id().await.unwrap().quote() })
4476            }),
4477        );
4478        Container {
4479            proc: self.proc.clone(),
4480            selection: query,
4481            graphql_client: self.graphql_client.clone(),
4482        }
4483    }
4484    /// Establish a runtime dependency from a container to a network service.
4485    /// The service will be started automatically when needed and detached when it is no longer needed, executing the default command if none is set.
4486    /// The service will be reachable from the container via the provided hostname alias.
4487    /// The service dependency will also convey to any files or directories produced by the container.
4488    ///
4489    /// # Arguments
4490    ///
4491    /// * `alias` - Hostname that will resolve to the target service (only accessible from within this container)
4492    /// * `service` - The target service
4493    pub fn with_service_binding(
4494        &self,
4495        alias: impl Into<String>,
4496        service: impl IntoID<ServiceId>,
4497    ) -> Container {
4498        let mut query = self.selection.select("withServiceBinding");
4499        query = query.arg("alias", alias.into());
4500        query = query.arg_lazy(
4501            "service",
4502            Box::new(move || {
4503                let service = service.clone();
4504                Box::pin(async move { service.into_id().await.unwrap().quote() })
4505            }),
4506        );
4507        Container {
4508            proc: self.proc.clone(),
4509            selection: query,
4510            graphql_client: self.graphql_client.clone(),
4511        }
4512    }
4513    /// Return a snapshot with a symlink
4514    ///
4515    /// # Arguments
4516    ///
4517    /// * `target` - Location of the file or directory to link to (e.g., "/existing/file").
4518    /// * `link_name` - Location where the symbolic link will be created (e.g., "/new-file-link").
4519    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4520    pub fn with_symlink(
4521        &self,
4522        target: impl Into<String>,
4523        link_name: impl Into<String>,
4524    ) -> Container {
4525        let mut query = self.selection.select("withSymlink");
4526        query = query.arg("target", target.into());
4527        query = query.arg("linkName", link_name.into());
4528        Container {
4529            proc: self.proc.clone(),
4530            selection: query,
4531            graphql_client: self.graphql_client.clone(),
4532        }
4533    }
4534    /// Return a snapshot with a symlink
4535    ///
4536    /// # Arguments
4537    ///
4538    /// * `target` - Location of the file or directory to link to (e.g., "/existing/file").
4539    /// * `link_name` - Location where the symbolic link will be created (e.g., "/new-file-link").
4540    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4541    pub fn with_symlink_opts(
4542        &self,
4543        target: impl Into<String>,
4544        link_name: impl Into<String>,
4545        opts: ContainerWithSymlinkOpts,
4546    ) -> Container {
4547        let mut query = self.selection.select("withSymlink");
4548        query = query.arg("target", target.into());
4549        query = query.arg("linkName", link_name.into());
4550        if let Some(expand) = opts.expand {
4551            query = query.arg("expand", expand);
4552        }
4553        Container {
4554            proc: self.proc.clone(),
4555            selection: query,
4556            graphql_client: self.graphql_client.clone(),
4557        }
4558    }
4559    /// Retrieves this container plus a socket forwarded to the given Unix socket path.
4560    ///
4561    /// # Arguments
4562    ///
4563    /// * `path` - Location of the forwarded Unix socket (e.g., "/tmp/socket").
4564    /// * `source` - Identifier of the socket to forward.
4565    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4566    pub fn with_unix_socket(
4567        &self,
4568        path: impl Into<String>,
4569        source: impl IntoID<SocketId>,
4570    ) -> Container {
4571        let mut query = self.selection.select("withUnixSocket");
4572        query = query.arg("path", path.into());
4573        query = query.arg_lazy(
4574            "source",
4575            Box::new(move || {
4576                let source = source.clone();
4577                Box::pin(async move { source.into_id().await.unwrap().quote() })
4578            }),
4579        );
4580        Container {
4581            proc: self.proc.clone(),
4582            selection: query,
4583            graphql_client: self.graphql_client.clone(),
4584        }
4585    }
4586    /// Retrieves this container plus a socket forwarded to the given Unix socket path.
4587    ///
4588    /// # Arguments
4589    ///
4590    /// * `path` - Location of the forwarded Unix socket (e.g., "/tmp/socket").
4591    /// * `source` - Identifier of the socket to forward.
4592    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4593    pub fn with_unix_socket_opts<'a>(
4594        &self,
4595        path: impl Into<String>,
4596        source: impl IntoID<SocketId>,
4597        opts: ContainerWithUnixSocketOpts<'a>,
4598    ) -> Container {
4599        let mut query = self.selection.select("withUnixSocket");
4600        query = query.arg("path", path.into());
4601        query = query.arg_lazy(
4602            "source",
4603            Box::new(move || {
4604                let source = source.clone();
4605                Box::pin(async move { source.into_id().await.unwrap().quote() })
4606            }),
4607        );
4608        if let Some(owner) = opts.owner {
4609            query = query.arg("owner", owner);
4610        }
4611        if let Some(expand) = opts.expand {
4612            query = query.arg("expand", expand);
4613        }
4614        Container {
4615            proc: self.proc.clone(),
4616            selection: query,
4617            graphql_client: self.graphql_client.clone(),
4618        }
4619    }
4620    /// Retrieves this container with a different command user.
4621    ///
4622    /// # Arguments
4623    ///
4624    /// * `name` - The user to set (e.g., "root").
4625    pub fn with_user(&self, name: impl Into<String>) -> Container {
4626        let mut query = self.selection.select("withUser");
4627        query = query.arg("name", name.into());
4628        Container {
4629            proc: self.proc.clone(),
4630            selection: query,
4631            graphql_client: self.graphql_client.clone(),
4632        }
4633    }
4634    /// Change the container's working directory. Like WORKDIR in Dockerfile.
4635    ///
4636    /// # Arguments
4637    ///
4638    /// * `path` - The path to set as the working directory (e.g., "/app").
4639    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4640    pub fn with_workdir(&self, path: impl Into<String>) -> Container {
4641        let mut query = self.selection.select("withWorkdir");
4642        query = query.arg("path", path.into());
4643        Container {
4644            proc: self.proc.clone(),
4645            selection: query,
4646            graphql_client: self.graphql_client.clone(),
4647        }
4648    }
4649    /// Change the container's working directory. Like WORKDIR in Dockerfile.
4650    ///
4651    /// # Arguments
4652    ///
4653    /// * `path` - The path to set as the working directory (e.g., "/app").
4654    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4655    pub fn with_workdir_opts(
4656        &self,
4657        path: impl Into<String>,
4658        opts: ContainerWithWorkdirOpts,
4659    ) -> Container {
4660        let mut query = self.selection.select("withWorkdir");
4661        query = query.arg("path", path.into());
4662        if let Some(expand) = opts.expand {
4663            query = query.arg("expand", expand);
4664        }
4665        Container {
4666            proc: self.proc.clone(),
4667            selection: query,
4668            graphql_client: self.graphql_client.clone(),
4669        }
4670    }
4671    /// Retrieves this container minus the given OCI annotation.
4672    ///
4673    /// # Arguments
4674    ///
4675    /// * `name` - The name of the annotation.
4676    pub fn without_annotation(&self, name: impl Into<String>) -> Container {
4677        let mut query = self.selection.select("withoutAnnotation");
4678        query = query.arg("name", name.into());
4679        Container {
4680            proc: self.proc.clone(),
4681            selection: query,
4682            graphql_client: self.graphql_client.clone(),
4683        }
4684    }
4685    /// Remove the container's default arguments.
4686    pub fn without_default_args(&self) -> Container {
4687        let query = self.selection.select("withoutDefaultArgs");
4688        Container {
4689            proc: self.proc.clone(),
4690            selection: query,
4691            graphql_client: self.graphql_client.clone(),
4692        }
4693    }
4694    /// Return a new container snapshot, with a directory removed from its filesystem
4695    ///
4696    /// # Arguments
4697    ///
4698    /// * `path` - Location of the directory to remove (e.g., ".github/").
4699    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4700    pub fn without_directory(&self, path: impl Into<String>) -> Container {
4701        let mut query = self.selection.select("withoutDirectory");
4702        query = query.arg("path", path.into());
4703        Container {
4704            proc: self.proc.clone(),
4705            selection: query,
4706            graphql_client: self.graphql_client.clone(),
4707        }
4708    }
4709    /// Return a new container snapshot, with a directory removed from its filesystem
4710    ///
4711    /// # Arguments
4712    ///
4713    /// * `path` - Location of the directory to remove (e.g., ".github/").
4714    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4715    pub fn without_directory_opts(
4716        &self,
4717        path: impl Into<String>,
4718        opts: ContainerWithoutDirectoryOpts,
4719    ) -> Container {
4720        let mut query = self.selection.select("withoutDirectory");
4721        query = query.arg("path", path.into());
4722        if let Some(expand) = opts.expand {
4723            query = query.arg("expand", expand);
4724        }
4725        Container {
4726            proc: self.proc.clone(),
4727            selection: query,
4728            graphql_client: self.graphql_client.clone(),
4729        }
4730    }
4731    /// Reset the container's OCI entrypoint.
4732    ///
4733    /// # Arguments
4734    ///
4735    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4736    pub fn without_entrypoint(&self) -> Container {
4737        let query = self.selection.select("withoutEntrypoint");
4738        Container {
4739            proc: self.proc.clone(),
4740            selection: query,
4741            graphql_client: self.graphql_client.clone(),
4742        }
4743    }
4744    /// Reset the container's OCI entrypoint.
4745    ///
4746    /// # Arguments
4747    ///
4748    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4749    pub fn without_entrypoint_opts(&self, opts: ContainerWithoutEntrypointOpts) -> Container {
4750        let mut query = self.selection.select("withoutEntrypoint");
4751        if let Some(keep_default_args) = opts.keep_default_args {
4752            query = query.arg("keepDefaultArgs", keep_default_args);
4753        }
4754        Container {
4755            proc: self.proc.clone(),
4756            selection: query,
4757            graphql_client: self.graphql_client.clone(),
4758        }
4759    }
4760    /// Retrieves this container minus the given environment variable.
4761    ///
4762    /// # Arguments
4763    ///
4764    /// * `name` - The name of the environment variable (e.g., "HOST").
4765    pub fn without_env_variable(&self, name: impl Into<String>) -> Container {
4766        let mut query = self.selection.select("withoutEnvVariable");
4767        query = query.arg("name", name.into());
4768        Container {
4769            proc: self.proc.clone(),
4770            selection: query,
4771            graphql_client: self.graphql_client.clone(),
4772        }
4773    }
4774    /// Unexpose a previously exposed port.
4775    ///
4776    /// # Arguments
4777    ///
4778    /// * `port` - Port number to unexpose
4779    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4780    pub fn without_exposed_port(&self, port: isize) -> Container {
4781        let mut query = self.selection.select("withoutExposedPort");
4782        query = query.arg("port", port);
4783        Container {
4784            proc: self.proc.clone(),
4785            selection: query,
4786            graphql_client: self.graphql_client.clone(),
4787        }
4788    }
4789    /// Unexpose a previously exposed port.
4790    ///
4791    /// # Arguments
4792    ///
4793    /// * `port` - Port number to unexpose
4794    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4795    pub fn without_exposed_port_opts(
4796        &self,
4797        port: isize,
4798        opts: ContainerWithoutExposedPortOpts,
4799    ) -> Container {
4800        let mut query = self.selection.select("withoutExposedPort");
4801        query = query.arg("port", port);
4802        if let Some(protocol) = opts.protocol {
4803            query = query.arg("protocol", protocol);
4804        }
4805        Container {
4806            proc: self.proc.clone(),
4807            selection: query,
4808            graphql_client: self.graphql_client.clone(),
4809        }
4810    }
4811    /// Retrieves this container with the file at the given path removed.
4812    ///
4813    /// # Arguments
4814    ///
4815    /// * `path` - Location of the file to remove (e.g., "/file.txt").
4816    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4817    pub fn without_file(&self, path: impl Into<String>) -> Container {
4818        let mut query = self.selection.select("withoutFile");
4819        query = query.arg("path", path.into());
4820        Container {
4821            proc: self.proc.clone(),
4822            selection: query,
4823            graphql_client: self.graphql_client.clone(),
4824        }
4825    }
4826    /// Retrieves this container with the file at the given path removed.
4827    ///
4828    /// # Arguments
4829    ///
4830    /// * `path` - Location of the file to remove (e.g., "/file.txt").
4831    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4832    pub fn without_file_opts(
4833        &self,
4834        path: impl Into<String>,
4835        opts: ContainerWithoutFileOpts,
4836    ) -> Container {
4837        let mut query = self.selection.select("withoutFile");
4838        query = query.arg("path", path.into());
4839        if let Some(expand) = opts.expand {
4840            query = query.arg("expand", expand);
4841        }
4842        Container {
4843            proc: self.proc.clone(),
4844            selection: query,
4845            graphql_client: self.graphql_client.clone(),
4846        }
4847    }
4848    /// Return a new container spanshot with specified files removed
4849    ///
4850    /// # Arguments
4851    ///
4852    /// * `paths` - Paths of the files to remove. Example: ["foo.txt, "/root/.ssh/config"
4853    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4854    pub fn without_files(&self, paths: Vec<impl Into<String>>) -> Container {
4855        let mut query = self.selection.select("withoutFiles");
4856        query = query.arg(
4857            "paths",
4858            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
4859        );
4860        Container {
4861            proc: self.proc.clone(),
4862            selection: query,
4863            graphql_client: self.graphql_client.clone(),
4864        }
4865    }
4866    /// Return a new container spanshot with specified files removed
4867    ///
4868    /// # Arguments
4869    ///
4870    /// * `paths` - Paths of the files to remove. Example: ["foo.txt, "/root/.ssh/config"
4871    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4872    pub fn without_files_opts(
4873        &self,
4874        paths: Vec<impl Into<String>>,
4875        opts: ContainerWithoutFilesOpts,
4876    ) -> Container {
4877        let mut query = self.selection.select("withoutFiles");
4878        query = query.arg(
4879            "paths",
4880            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
4881        );
4882        if let Some(expand) = opts.expand {
4883            query = query.arg("expand", expand);
4884        }
4885        Container {
4886            proc: self.proc.clone(),
4887            selection: query,
4888            graphql_client: self.graphql_client.clone(),
4889        }
4890    }
4891    /// Retrieves this container minus the given environment label.
4892    ///
4893    /// # Arguments
4894    ///
4895    /// * `name` - The name of the label to remove (e.g., "org.opencontainers.artifact.created").
4896    pub fn without_label(&self, name: impl Into<String>) -> Container {
4897        let mut query = self.selection.select("withoutLabel");
4898        query = query.arg("name", name.into());
4899        Container {
4900            proc: self.proc.clone(),
4901            selection: query,
4902            graphql_client: self.graphql_client.clone(),
4903        }
4904    }
4905    /// Retrieves this container after unmounting everything at the given path.
4906    ///
4907    /// # Arguments
4908    ///
4909    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
4910    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4911    pub fn without_mount(&self, path: impl Into<String>) -> Container {
4912        let mut query = self.selection.select("withoutMount");
4913        query = query.arg("path", path.into());
4914        Container {
4915            proc: self.proc.clone(),
4916            selection: query,
4917            graphql_client: self.graphql_client.clone(),
4918        }
4919    }
4920    /// Retrieves this container after unmounting everything at the given path.
4921    ///
4922    /// # Arguments
4923    ///
4924    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
4925    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4926    pub fn without_mount_opts(
4927        &self,
4928        path: impl Into<String>,
4929        opts: ContainerWithoutMountOpts,
4930    ) -> Container {
4931        let mut query = self.selection.select("withoutMount");
4932        query = query.arg("path", path.into());
4933        if let Some(expand) = opts.expand {
4934            query = query.arg("expand", expand);
4935        }
4936        Container {
4937            proc: self.proc.clone(),
4938            selection: query,
4939            graphql_client: self.graphql_client.clone(),
4940        }
4941    }
4942    /// Retrieves this container without the registry authentication of a given address.
4943    ///
4944    /// # Arguments
4945    ///
4946    /// * `address` - Registry's address to remove the authentication from.
4947    ///
4948    /// Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
4949    pub fn without_registry_auth(&self, address: impl Into<String>) -> Container {
4950        let mut query = self.selection.select("withoutRegistryAuth");
4951        query = query.arg("address", address.into());
4952        Container {
4953            proc: self.proc.clone(),
4954            selection: query,
4955            graphql_client: self.graphql_client.clone(),
4956        }
4957    }
4958    /// Retrieves this container minus the given environment variable containing the secret.
4959    ///
4960    /// # Arguments
4961    ///
4962    /// * `name` - The name of the environment variable (e.g., "HOST").
4963    pub fn without_secret_variable(&self, name: impl Into<String>) -> Container {
4964        let mut query = self.selection.select("withoutSecretVariable");
4965        query = query.arg("name", name.into());
4966        Container {
4967            proc: self.proc.clone(),
4968            selection: query,
4969            graphql_client: self.graphql_client.clone(),
4970        }
4971    }
4972    /// Retrieves this container with a previously added Unix socket removed.
4973    ///
4974    /// # Arguments
4975    ///
4976    /// * `path` - Location of the socket to remove (e.g., "/tmp/socket").
4977    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4978    pub fn without_unix_socket(&self, path: impl Into<String>) -> Container {
4979        let mut query = self.selection.select("withoutUnixSocket");
4980        query = query.arg("path", path.into());
4981        Container {
4982            proc: self.proc.clone(),
4983            selection: query,
4984            graphql_client: self.graphql_client.clone(),
4985        }
4986    }
4987    /// Retrieves this container with a previously added Unix socket removed.
4988    ///
4989    /// # Arguments
4990    ///
4991    /// * `path` - Location of the socket to remove (e.g., "/tmp/socket").
4992    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4993    pub fn without_unix_socket_opts(
4994        &self,
4995        path: impl Into<String>,
4996        opts: ContainerWithoutUnixSocketOpts,
4997    ) -> Container {
4998        let mut query = self.selection.select("withoutUnixSocket");
4999        query = query.arg("path", path.into());
5000        if let Some(expand) = opts.expand {
5001            query = query.arg("expand", expand);
5002        }
5003        Container {
5004            proc: self.proc.clone(),
5005            selection: query,
5006            graphql_client: self.graphql_client.clone(),
5007        }
5008    }
5009    /// Retrieves this container with an unset command user.
5010    /// Should default to root.
5011    pub fn without_user(&self) -> Container {
5012        let query = self.selection.select("withoutUser");
5013        Container {
5014            proc: self.proc.clone(),
5015            selection: query,
5016            graphql_client: self.graphql_client.clone(),
5017        }
5018    }
5019    /// Unset the container's working directory.
5020    /// Should default to "/".
5021    pub fn without_workdir(&self) -> Container {
5022        let query = self.selection.select("withoutWorkdir");
5023        Container {
5024            proc: self.proc.clone(),
5025            selection: query,
5026            graphql_client: self.graphql_client.clone(),
5027        }
5028    }
5029    /// Retrieves the working directory for all commands.
5030    pub async fn workdir(&self) -> Result<String, DaggerError> {
5031        let query = self.selection.select("workdir");
5032        query.execute(self.graphql_client.clone()).await
5033    }
5034}
5035#[derive(Clone)]
5036pub struct CurrentModule {
5037    pub proc: Option<Arc<DaggerSessionProc>>,
5038    pub selection: Selection,
5039    pub graphql_client: DynGraphQLClient,
5040}
5041#[derive(Builder, Debug, PartialEq)]
5042pub struct CurrentModuleWorkdirOpts<'a> {
5043    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
5044    #[builder(setter(into, strip_option), default)]
5045    pub exclude: Option<Vec<&'a str>>,
5046    /// Apply .gitignore filter rules inside the directory
5047    #[builder(setter(into, strip_option), default)]
5048    pub gitignore: Option<bool>,
5049    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
5050    #[builder(setter(into, strip_option), default)]
5051    pub include: Option<Vec<&'a str>>,
5052}
5053impl CurrentModule {
5054    /// The dependencies of the module.
5055    pub fn dependencies(&self) -> Vec<Module> {
5056        let query = self.selection.select("dependencies");
5057        vec![Module {
5058            proc: self.proc.clone(),
5059            selection: query,
5060            graphql_client: self.graphql_client.clone(),
5061        }]
5062    }
5063    /// The generated files and directories made on top of the module source's context directory.
5064    pub fn generated_context_directory(&self) -> Directory {
5065        let query = self.selection.select("generatedContextDirectory");
5066        Directory {
5067            proc: self.proc.clone(),
5068            selection: query,
5069            graphql_client: self.graphql_client.clone(),
5070        }
5071    }
5072    /// A unique identifier for this CurrentModule.
5073    pub async fn id(&self) -> Result<CurrentModuleId, DaggerError> {
5074        let query = self.selection.select("id");
5075        query.execute(self.graphql_client.clone()).await
5076    }
5077    /// The name of the module being executed in
5078    pub async fn name(&self) -> Result<String, DaggerError> {
5079        let query = self.selection.select("name");
5080        query.execute(self.graphql_client.clone()).await
5081    }
5082    /// The directory containing the module's source code loaded into the engine (plus any generated code that may have been created).
5083    pub fn source(&self) -> Directory {
5084        let query = self.selection.select("source");
5085        Directory {
5086            proc: self.proc.clone(),
5087            selection: query,
5088            graphql_client: self.graphql_client.clone(),
5089        }
5090    }
5091    /// Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.
5092    ///
5093    /// # Arguments
5094    ///
5095    /// * `path` - Location of the directory to access (e.g., ".").
5096    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5097    pub fn workdir(&self, path: impl Into<String>) -> Directory {
5098        let mut query = self.selection.select("workdir");
5099        query = query.arg("path", path.into());
5100        Directory {
5101            proc: self.proc.clone(),
5102            selection: query,
5103            graphql_client: self.graphql_client.clone(),
5104        }
5105    }
5106    /// Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.
5107    ///
5108    /// # Arguments
5109    ///
5110    /// * `path` - Location of the directory to access (e.g., ".").
5111    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5112    pub fn workdir_opts<'a>(
5113        &self,
5114        path: impl Into<String>,
5115        opts: CurrentModuleWorkdirOpts<'a>,
5116    ) -> Directory {
5117        let mut query = self.selection.select("workdir");
5118        query = query.arg("path", path.into());
5119        if let Some(exclude) = opts.exclude {
5120            query = query.arg("exclude", exclude);
5121        }
5122        if let Some(include) = opts.include {
5123            query = query.arg("include", include);
5124        }
5125        if let Some(gitignore) = opts.gitignore {
5126            query = query.arg("gitignore", gitignore);
5127        }
5128        Directory {
5129            proc: self.proc.clone(),
5130            selection: query,
5131            graphql_client: self.graphql_client.clone(),
5132        }
5133    }
5134    /// 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.
5135    ///
5136    /// # Arguments
5137    ///
5138    /// * `path` - Location of the file to retrieve (e.g., "README.md").
5139    pub fn workdir_file(&self, path: impl Into<String>) -> File {
5140        let mut query = self.selection.select("workdirFile");
5141        query = query.arg("path", path.into());
5142        File {
5143            proc: self.proc.clone(),
5144            selection: query,
5145            graphql_client: self.graphql_client.clone(),
5146        }
5147    }
5148}
5149#[derive(Clone)]
5150pub struct Directory {
5151    pub proc: Option<Arc<DaggerSessionProc>>,
5152    pub selection: Selection,
5153    pub graphql_client: DynGraphQLClient,
5154}
5155#[derive(Builder, Debug, PartialEq)]
5156pub struct DirectoryAsModuleOpts<'a> {
5157    /// An optional subpath of the directory which contains the module's configuration file.
5158    /// If not set, the module source code is loaded from the root of the directory.
5159    #[builder(setter(into, strip_option), default)]
5160    pub source_root_path: Option<&'a str>,
5161}
5162#[derive(Builder, Debug, PartialEq)]
5163pub struct DirectoryAsModuleSourceOpts<'a> {
5164    /// An optional subpath of the directory which contains the module's configuration file.
5165    /// If not set, the module source code is loaded from the root of the directory.
5166    #[builder(setter(into, strip_option), default)]
5167    pub source_root_path: Option<&'a str>,
5168}
5169#[derive(Builder, Debug, PartialEq)]
5170pub struct DirectoryDockerBuildOpts<'a> {
5171    /// Build arguments to use in the build.
5172    #[builder(setter(into, strip_option), default)]
5173    pub build_args: Option<Vec<BuildArg>>,
5174    /// Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
5175    #[builder(setter(into, strip_option), default)]
5176    pub dockerfile: Option<&'a str>,
5177    /// If set, skip the automatic init process injected into containers created by RUN statements.
5178    /// 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.
5179    #[builder(setter(into, strip_option), default)]
5180    pub no_init: Option<bool>,
5181    /// The platform to build.
5182    #[builder(setter(into, strip_option), default)]
5183    pub platform: Option<Platform>,
5184    /// Secrets to pass to the build.
5185    /// They will be mounted at /run/secrets/[secret-name].
5186    #[builder(setter(into, strip_option), default)]
5187    pub secrets: Option<Vec<SecretId>>,
5188    /// Target build stage to build.
5189    #[builder(setter(into, strip_option), default)]
5190    pub target: Option<&'a str>,
5191}
5192#[derive(Builder, Debug, PartialEq)]
5193pub struct DirectoryEntriesOpts<'a> {
5194    /// Location of the directory to look at (e.g., "/src").
5195    #[builder(setter(into, strip_option), default)]
5196    pub path: Option<&'a str>,
5197}
5198#[derive(Builder, Debug, PartialEq)]
5199pub struct DirectoryExistsOpts {
5200    /// If specified, do not follow symlinks.
5201    #[builder(setter(into, strip_option), default)]
5202    pub do_not_follow_symlinks: Option<bool>,
5203    /// If specified, also validate the type of file (e.g. "REGULAR_TYPE", "DIRECTORY_TYPE", or "SYMLINK_TYPE").
5204    #[builder(setter(into, strip_option), default)]
5205    pub expected_type: Option<ExistsType>,
5206}
5207#[derive(Builder, Debug, PartialEq)]
5208pub struct DirectoryExportOpts {
5209    /// 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.
5210    #[builder(setter(into, strip_option), default)]
5211    pub wipe: Option<bool>,
5212}
5213#[derive(Builder, Debug, PartialEq)]
5214pub struct DirectoryFilterOpts<'a> {
5215    /// If set, paths matching one of these glob patterns is excluded from the new snapshot. Example: ["node_modules/", ".git*", ".env"]
5216    #[builder(setter(into, strip_option), default)]
5217    pub exclude: Option<Vec<&'a str>>,
5218    /// If set, apply .gitignore rules when filtering the directory.
5219    #[builder(setter(into, strip_option), default)]
5220    pub gitignore: Option<bool>,
5221    /// If set, only paths matching one of these glob patterns is included in the new snapshot. Example: (e.g., ["app/", "package.*"]).
5222    #[builder(setter(into, strip_option), default)]
5223    pub include: Option<Vec<&'a str>>,
5224}
5225#[derive(Builder, Debug, PartialEq)]
5226pub struct DirectorySearchOpts<'a> {
5227    /// Allow the . pattern to match newlines in multiline mode.
5228    #[builder(setter(into, strip_option), default)]
5229    pub dotall: Option<bool>,
5230    /// Only return matching files, not lines and content
5231    #[builder(setter(into, strip_option), default)]
5232    pub files_only: Option<bool>,
5233    /// Glob patterns to match (e.g., "*.md")
5234    #[builder(setter(into, strip_option), default)]
5235    pub globs: Option<Vec<&'a str>>,
5236    /// Enable case-insensitive matching.
5237    #[builder(setter(into, strip_option), default)]
5238    pub insensitive: Option<bool>,
5239    /// Limit the number of results to return
5240    #[builder(setter(into, strip_option), default)]
5241    pub limit: Option<isize>,
5242    /// Interpret the pattern as a literal string instead of a regular expression.
5243    #[builder(setter(into, strip_option), default)]
5244    pub literal: Option<bool>,
5245    /// Enable searching across multiple lines.
5246    #[builder(setter(into, strip_option), default)]
5247    pub multiline: Option<bool>,
5248    /// Directory or file paths to search
5249    #[builder(setter(into, strip_option), default)]
5250    pub paths: Option<Vec<&'a str>>,
5251    /// Skip hidden files (files starting with .).
5252    #[builder(setter(into, strip_option), default)]
5253    pub skip_hidden: Option<bool>,
5254    /// Honor .gitignore, .ignore, and .rgignore files.
5255    #[builder(setter(into, strip_option), default)]
5256    pub skip_ignored: Option<bool>,
5257}
5258#[derive(Builder, Debug, PartialEq)]
5259pub struct DirectoryTerminalOpts<'a> {
5260    /// If set, override the container's default terminal command and invoke these command arguments instead.
5261    #[builder(setter(into, strip_option), default)]
5262    pub cmd: Option<Vec<&'a str>>,
5263    /// If set, override the default container used for the terminal.
5264    #[builder(setter(into, strip_option), default)]
5265    pub container: Option<ContainerId>,
5266    /// Provides Dagger access to the executed command.
5267    #[builder(setter(into, strip_option), default)]
5268    pub experimental_privileged_nesting: Option<bool>,
5269    /// 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.
5270    #[builder(setter(into, strip_option), default)]
5271    pub insecure_root_capabilities: Option<bool>,
5272}
5273#[derive(Builder, Debug, PartialEq)]
5274pub struct DirectoryWithDirectoryOpts<'a> {
5275    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
5276    #[builder(setter(into, strip_option), default)]
5277    pub exclude: Option<Vec<&'a str>>,
5278    /// Apply .gitignore filter rules inside the directory
5279    #[builder(setter(into, strip_option), default)]
5280    pub gitignore: Option<bool>,
5281    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
5282    #[builder(setter(into, strip_option), default)]
5283    pub include: Option<Vec<&'a str>>,
5284    /// A user:group to set for the copied directory and its contents.
5285    /// The user and group must be an ID (1000:1000), not a name (foo:bar).
5286    /// If the group is omitted, it defaults to the same as the user.
5287    #[builder(setter(into, strip_option), default)]
5288    pub owner: Option<&'a str>,
5289}
5290#[derive(Builder, Debug, PartialEq)]
5291pub struct DirectoryWithFileOpts<'a> {
5292    /// A user:group to set for the copied directory and its contents.
5293    /// The user and group must be an ID (1000:1000), not a name (foo:bar).
5294    /// If the group is omitted, it defaults to the same as the user.
5295    #[builder(setter(into, strip_option), default)]
5296    pub owner: Option<&'a str>,
5297    /// Permission given to the copied file (e.g., 0600).
5298    #[builder(setter(into, strip_option), default)]
5299    pub permissions: Option<isize>,
5300}
5301#[derive(Builder, Debug, PartialEq)]
5302pub struct DirectoryWithFilesOpts {
5303    /// Permission given to the copied files (e.g., 0600).
5304    #[builder(setter(into, strip_option), default)]
5305    pub permissions: Option<isize>,
5306}
5307#[derive(Builder, Debug, PartialEq)]
5308pub struct DirectoryWithNewDirectoryOpts {
5309    /// Permission granted to the created directory (e.g., 0777).
5310    #[builder(setter(into, strip_option), default)]
5311    pub permissions: Option<isize>,
5312}
5313#[derive(Builder, Debug, PartialEq)]
5314pub struct DirectoryWithNewFileOpts {
5315    /// Permissions of the new file. Example: 0600
5316    #[builder(setter(into, strip_option), default)]
5317    pub permissions: Option<isize>,
5318}
5319impl Directory {
5320    /// Converts this directory to a local git repository
5321    pub fn as_git(&self) -> GitRepository {
5322        let query = self.selection.select("asGit");
5323        GitRepository {
5324            proc: self.proc.clone(),
5325            selection: query,
5326            graphql_client: self.graphql_client.clone(),
5327        }
5328    }
5329    /// Load the directory as a Dagger module source
5330    ///
5331    /// # Arguments
5332    ///
5333    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5334    pub fn as_module(&self) -> Module {
5335        let query = self.selection.select("asModule");
5336        Module {
5337            proc: self.proc.clone(),
5338            selection: query,
5339            graphql_client: self.graphql_client.clone(),
5340        }
5341    }
5342    /// Load the directory as a Dagger module source
5343    ///
5344    /// # Arguments
5345    ///
5346    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5347    pub fn as_module_opts<'a>(&self, opts: DirectoryAsModuleOpts<'a>) -> Module {
5348        let mut query = self.selection.select("asModule");
5349        if let Some(source_root_path) = opts.source_root_path {
5350            query = query.arg("sourceRootPath", source_root_path);
5351        }
5352        Module {
5353            proc: self.proc.clone(),
5354            selection: query,
5355            graphql_client: self.graphql_client.clone(),
5356        }
5357    }
5358    /// Load the directory as a Dagger module source
5359    ///
5360    /// # Arguments
5361    ///
5362    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5363    pub fn as_module_source(&self) -> ModuleSource {
5364        let query = self.selection.select("asModuleSource");
5365        ModuleSource {
5366            proc: self.proc.clone(),
5367            selection: query,
5368            graphql_client: self.graphql_client.clone(),
5369        }
5370    }
5371    /// Load the directory as a Dagger module source
5372    ///
5373    /// # Arguments
5374    ///
5375    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5376    pub fn as_module_source_opts<'a>(&self, opts: DirectoryAsModuleSourceOpts<'a>) -> ModuleSource {
5377        let mut query = self.selection.select("asModuleSource");
5378        if let Some(source_root_path) = opts.source_root_path {
5379            query = query.arg("sourceRootPath", source_root_path);
5380        }
5381        ModuleSource {
5382            proc: self.proc.clone(),
5383            selection: query,
5384            graphql_client: self.graphql_client.clone(),
5385        }
5386    }
5387    /// Return the difference between this directory and another directory, typically an older snapshot.
5388    /// The difference is encoded as a changeset, which also tracks removed files, and can be applied to other directories.
5389    ///
5390    /// # Arguments
5391    ///
5392    /// * `from` - The base directory snapshot to compare against
5393    pub fn changes(&self, from: impl IntoID<DirectoryId>) -> Changeset {
5394        let mut query = self.selection.select("changes");
5395        query = query.arg_lazy(
5396            "from",
5397            Box::new(move || {
5398                let from = from.clone();
5399                Box::pin(async move { from.into_id().await.unwrap().quote() })
5400            }),
5401        );
5402        Changeset {
5403            proc: self.proc.clone(),
5404            selection: query,
5405            graphql_client: self.graphql_client.clone(),
5406        }
5407    }
5408    /// Change the owner of the directory contents recursively.
5409    ///
5410    /// # Arguments
5411    ///
5412    /// * `path` - Path of the directory to change ownership of (e.g., "/").
5413    /// * `owner` - A user:group to set for the mounted directory and its contents.
5414    ///
5415    /// The user and group must be an ID (1000:1000), not a name (foo:bar).
5416    ///
5417    /// If the group is omitted, it defaults to the same as the user.
5418    pub fn chown(&self, path: impl Into<String>, owner: impl Into<String>) -> Directory {
5419        let mut query = self.selection.select("chown");
5420        query = query.arg("path", path.into());
5421        query = query.arg("owner", owner.into());
5422        Directory {
5423            proc: self.proc.clone(),
5424            selection: query,
5425            graphql_client: self.graphql_client.clone(),
5426        }
5427    }
5428    /// Return the difference between this directory and an another directory. The difference is encoded as a directory.
5429    ///
5430    /// # Arguments
5431    ///
5432    /// * `other` - The directory to compare against
5433    pub fn diff(&self, other: impl IntoID<DirectoryId>) -> Directory {
5434        let mut query = self.selection.select("diff");
5435        query = query.arg_lazy(
5436            "other",
5437            Box::new(move || {
5438                let other = other.clone();
5439                Box::pin(async move { other.into_id().await.unwrap().quote() })
5440            }),
5441        );
5442        Directory {
5443            proc: self.proc.clone(),
5444            selection: query,
5445            graphql_client: self.graphql_client.clone(),
5446        }
5447    }
5448    /// 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.
5449    pub async fn digest(&self) -> Result<String, DaggerError> {
5450        let query = self.selection.select("digest");
5451        query.execute(self.graphql_client.clone()).await
5452    }
5453    /// Retrieves a directory at the given path.
5454    ///
5455    /// # Arguments
5456    ///
5457    /// * `path` - Location of the directory to retrieve. Example: "/src"
5458    pub fn directory(&self, path: impl Into<String>) -> Directory {
5459        let mut query = self.selection.select("directory");
5460        query = query.arg("path", path.into());
5461        Directory {
5462            proc: self.proc.clone(),
5463            selection: query,
5464            graphql_client: self.graphql_client.clone(),
5465        }
5466    }
5467    /// 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.
5468    ///
5469    /// # Arguments
5470    ///
5471    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5472    pub fn docker_build(&self) -> Container {
5473        let query = self.selection.select("dockerBuild");
5474        Container {
5475            proc: self.proc.clone(),
5476            selection: query,
5477            graphql_client: self.graphql_client.clone(),
5478        }
5479    }
5480    /// 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.
5481    ///
5482    /// # Arguments
5483    ///
5484    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5485    pub fn docker_build_opts<'a>(&self, opts: DirectoryDockerBuildOpts<'a>) -> Container {
5486        let mut query = self.selection.select("dockerBuild");
5487        if let Some(dockerfile) = opts.dockerfile {
5488            query = query.arg("dockerfile", dockerfile);
5489        }
5490        if let Some(platform) = opts.platform {
5491            query = query.arg("platform", platform);
5492        }
5493        if let Some(build_args) = opts.build_args {
5494            query = query.arg("buildArgs", build_args);
5495        }
5496        if let Some(target) = opts.target {
5497            query = query.arg("target", target);
5498        }
5499        if let Some(secrets) = opts.secrets {
5500            query = query.arg("secrets", secrets);
5501        }
5502        if let Some(no_init) = opts.no_init {
5503            query = query.arg("noInit", no_init);
5504        }
5505        Container {
5506            proc: self.proc.clone(),
5507            selection: query,
5508            graphql_client: self.graphql_client.clone(),
5509        }
5510    }
5511    /// Returns a list of files and directories at the given path.
5512    ///
5513    /// # Arguments
5514    ///
5515    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5516    pub async fn entries(&self) -> Result<Vec<String>, DaggerError> {
5517        let query = self.selection.select("entries");
5518        query.execute(self.graphql_client.clone()).await
5519    }
5520    /// Returns a list of files and directories at the given path.
5521    ///
5522    /// # Arguments
5523    ///
5524    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5525    pub async fn entries_opts<'a>(
5526        &self,
5527        opts: DirectoryEntriesOpts<'a>,
5528    ) -> Result<Vec<String>, DaggerError> {
5529        let mut query = self.selection.select("entries");
5530        if let Some(path) = opts.path {
5531            query = query.arg("path", path);
5532        }
5533        query.execute(self.graphql_client.clone()).await
5534    }
5535    /// check if a file or directory exists
5536    ///
5537    /// # Arguments
5538    ///
5539    /// * `path` - Path to check (e.g., "/file.txt").
5540    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5541    pub async fn exists(&self, path: impl Into<String>) -> Result<bool, DaggerError> {
5542        let mut query = self.selection.select("exists");
5543        query = query.arg("path", path.into());
5544        query.execute(self.graphql_client.clone()).await
5545    }
5546    /// check if a file or directory exists
5547    ///
5548    /// # Arguments
5549    ///
5550    /// * `path` - Path to check (e.g., "/file.txt").
5551    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5552    pub async fn exists_opts(
5553        &self,
5554        path: impl Into<String>,
5555        opts: DirectoryExistsOpts,
5556    ) -> Result<bool, DaggerError> {
5557        let mut query = self.selection.select("exists");
5558        query = query.arg("path", path.into());
5559        if let Some(expected_type) = opts.expected_type {
5560            query = query.arg("expectedType", expected_type);
5561        }
5562        if let Some(do_not_follow_symlinks) = opts.do_not_follow_symlinks {
5563            query = query.arg("doNotFollowSymlinks", do_not_follow_symlinks);
5564        }
5565        query.execute(self.graphql_client.clone()).await
5566    }
5567    /// Writes the contents of the directory to a path on the host.
5568    ///
5569    /// # Arguments
5570    ///
5571    /// * `path` - Location of the copied directory (e.g., "logs/").
5572    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5573    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
5574        let mut query = self.selection.select("export");
5575        query = query.arg("path", path.into());
5576        query.execute(self.graphql_client.clone()).await
5577    }
5578    /// Writes the contents of the directory to a path on the host.
5579    ///
5580    /// # Arguments
5581    ///
5582    /// * `path` - Location of the copied directory (e.g., "logs/").
5583    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5584    pub async fn export_opts(
5585        &self,
5586        path: impl Into<String>,
5587        opts: DirectoryExportOpts,
5588    ) -> Result<String, DaggerError> {
5589        let mut query = self.selection.select("export");
5590        query = query.arg("path", path.into());
5591        if let Some(wipe) = opts.wipe {
5592            query = query.arg("wipe", wipe);
5593        }
5594        query.execute(self.graphql_client.clone()).await
5595    }
5596    /// Retrieve a file at the given path.
5597    ///
5598    /// # Arguments
5599    ///
5600    /// * `path` - Location of the file to retrieve (e.g., "README.md").
5601    pub fn file(&self, path: impl Into<String>) -> File {
5602        let mut query = self.selection.select("file");
5603        query = query.arg("path", path.into());
5604        File {
5605            proc: self.proc.clone(),
5606            selection: query,
5607            graphql_client: self.graphql_client.clone(),
5608        }
5609    }
5610    /// Return a snapshot with some paths included or excluded
5611    ///
5612    /// # Arguments
5613    ///
5614    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5615    pub fn filter(&self) -> Directory {
5616        let query = self.selection.select("filter");
5617        Directory {
5618            proc: self.proc.clone(),
5619            selection: query,
5620            graphql_client: self.graphql_client.clone(),
5621        }
5622    }
5623    /// Return a snapshot with some paths included or excluded
5624    ///
5625    /// # Arguments
5626    ///
5627    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5628    pub fn filter_opts<'a>(&self, opts: DirectoryFilterOpts<'a>) -> Directory {
5629        let mut query = self.selection.select("filter");
5630        if let Some(exclude) = opts.exclude {
5631            query = query.arg("exclude", exclude);
5632        }
5633        if let Some(include) = opts.include {
5634            query = query.arg("include", include);
5635        }
5636        if let Some(gitignore) = opts.gitignore {
5637            query = query.arg("gitignore", gitignore);
5638        }
5639        Directory {
5640            proc: self.proc.clone(),
5641            selection: query,
5642            graphql_client: self.graphql_client.clone(),
5643        }
5644    }
5645    /// Search up the directory tree for a file or directory, and return its path. If no match, return null
5646    ///
5647    /// # Arguments
5648    ///
5649    /// * `name` - The name of the file or directory to search for
5650    /// * `start` - The path to start the search from
5651    pub async fn find_up(
5652        &self,
5653        name: impl Into<String>,
5654        start: impl Into<String>,
5655    ) -> Result<String, DaggerError> {
5656        let mut query = self.selection.select("findUp");
5657        query = query.arg("name", name.into());
5658        query = query.arg("start", start.into());
5659        query.execute(self.graphql_client.clone()).await
5660    }
5661    /// Returns a list of files and directories that matche the given pattern.
5662    ///
5663    /// # Arguments
5664    ///
5665    /// * `pattern` - Pattern to match (e.g., "*.md").
5666    pub async fn glob(&self, pattern: impl Into<String>) -> Result<Vec<String>, DaggerError> {
5667        let mut query = self.selection.select("glob");
5668        query = query.arg("pattern", pattern.into());
5669        query.execute(self.graphql_client.clone()).await
5670    }
5671    /// A unique identifier for this Directory.
5672    pub async fn id(&self) -> Result<DirectoryId, DaggerError> {
5673        let query = self.selection.select("id");
5674        query.execute(self.graphql_client.clone()).await
5675    }
5676    /// Returns the name of the directory.
5677    pub async fn name(&self) -> Result<String, DaggerError> {
5678        let query = self.selection.select("name");
5679        query.execute(self.graphql_client.clone()).await
5680    }
5681    /// Searches for content matching the given regular expression or literal string.
5682    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
5683    ///
5684    /// # Arguments
5685    ///
5686    /// * `pattern` - The text to match.
5687    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5688    pub fn search(&self, pattern: impl Into<String>) -> Vec<SearchResult> {
5689        let mut query = self.selection.select("search");
5690        query = query.arg("pattern", pattern.into());
5691        vec![SearchResult {
5692            proc: self.proc.clone(),
5693            selection: query,
5694            graphql_client: self.graphql_client.clone(),
5695        }]
5696    }
5697    /// Searches for content matching the given regular expression or literal string.
5698    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
5699    ///
5700    /// # Arguments
5701    ///
5702    /// * `pattern` - The text to match.
5703    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5704    pub fn search_opts<'a>(
5705        &self,
5706        pattern: impl Into<String>,
5707        opts: DirectorySearchOpts<'a>,
5708    ) -> Vec<SearchResult> {
5709        let mut query = self.selection.select("search");
5710        query = query.arg("pattern", pattern.into());
5711        if let Some(paths) = opts.paths {
5712            query = query.arg("paths", paths);
5713        }
5714        if let Some(globs) = opts.globs {
5715            query = query.arg("globs", globs);
5716        }
5717        if let Some(literal) = opts.literal {
5718            query = query.arg("literal", literal);
5719        }
5720        if let Some(multiline) = opts.multiline {
5721            query = query.arg("multiline", multiline);
5722        }
5723        if let Some(dotall) = opts.dotall {
5724            query = query.arg("dotall", dotall);
5725        }
5726        if let Some(insensitive) = opts.insensitive {
5727            query = query.arg("insensitive", insensitive);
5728        }
5729        if let Some(skip_ignored) = opts.skip_ignored {
5730            query = query.arg("skipIgnored", skip_ignored);
5731        }
5732        if let Some(skip_hidden) = opts.skip_hidden {
5733            query = query.arg("skipHidden", skip_hidden);
5734        }
5735        if let Some(files_only) = opts.files_only {
5736            query = query.arg("filesOnly", files_only);
5737        }
5738        if let Some(limit) = opts.limit {
5739            query = query.arg("limit", limit);
5740        }
5741        vec![SearchResult {
5742            proc: self.proc.clone(),
5743            selection: query,
5744            graphql_client: self.graphql_client.clone(),
5745        }]
5746    }
5747    /// Force evaluation in the engine.
5748    pub async fn sync(&self) -> Result<DirectoryId, DaggerError> {
5749        let query = self.selection.select("sync");
5750        query.execute(self.graphql_client.clone()).await
5751    }
5752    /// Opens an interactive terminal in new container with this directory mounted inside.
5753    ///
5754    /// # Arguments
5755    ///
5756    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5757    pub fn terminal(&self) -> Directory {
5758        let query = self.selection.select("terminal");
5759        Directory {
5760            proc: self.proc.clone(),
5761            selection: query,
5762            graphql_client: self.graphql_client.clone(),
5763        }
5764    }
5765    /// Opens an interactive terminal in new container with this directory mounted inside.
5766    ///
5767    /// # Arguments
5768    ///
5769    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5770    pub fn terminal_opts<'a>(&self, opts: DirectoryTerminalOpts<'a>) -> Directory {
5771        let mut query = self.selection.select("terminal");
5772        if let Some(container) = opts.container {
5773            query = query.arg("container", container);
5774        }
5775        if let Some(cmd) = opts.cmd {
5776            query = query.arg("cmd", cmd);
5777        }
5778        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
5779            query = query.arg(
5780                "experimentalPrivilegedNesting",
5781                experimental_privileged_nesting,
5782            );
5783        }
5784        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
5785            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
5786        }
5787        Directory {
5788            proc: self.proc.clone(),
5789            selection: query,
5790            graphql_client: self.graphql_client.clone(),
5791        }
5792    }
5793    /// Return a directory with changes from another directory applied to it.
5794    ///
5795    /// # Arguments
5796    ///
5797    /// * `changes` - Changes to apply to the directory
5798    pub fn with_changes(&self, changes: impl IntoID<ChangesetId>) -> Directory {
5799        let mut query = self.selection.select("withChanges");
5800        query = query.arg_lazy(
5801            "changes",
5802            Box::new(move || {
5803                let changes = changes.clone();
5804                Box::pin(async move { changes.into_id().await.unwrap().quote() })
5805            }),
5806        );
5807        Directory {
5808            proc: self.proc.clone(),
5809            selection: query,
5810            graphql_client: self.graphql_client.clone(),
5811        }
5812    }
5813    /// Return a snapshot with a directory added
5814    ///
5815    /// # Arguments
5816    ///
5817    /// * `path` - Location of the written directory (e.g., "/src/").
5818    /// * `source` - Identifier of the directory to copy.
5819    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5820    pub fn with_directory(
5821        &self,
5822        path: impl Into<String>,
5823        source: impl IntoID<DirectoryId>,
5824    ) -> Directory {
5825        let mut query = self.selection.select("withDirectory");
5826        query = query.arg("path", path.into());
5827        query = query.arg_lazy(
5828            "source",
5829            Box::new(move || {
5830                let source = source.clone();
5831                Box::pin(async move { source.into_id().await.unwrap().quote() })
5832            }),
5833        );
5834        Directory {
5835            proc: self.proc.clone(),
5836            selection: query,
5837            graphql_client: self.graphql_client.clone(),
5838        }
5839    }
5840    /// Return a snapshot with a directory added
5841    ///
5842    /// # Arguments
5843    ///
5844    /// * `path` - Location of the written directory (e.g., "/src/").
5845    /// * `source` - Identifier of the directory to copy.
5846    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5847    pub fn with_directory_opts<'a>(
5848        &self,
5849        path: impl Into<String>,
5850        source: impl IntoID<DirectoryId>,
5851        opts: DirectoryWithDirectoryOpts<'a>,
5852    ) -> Directory {
5853        let mut query = self.selection.select("withDirectory");
5854        query = query.arg("path", path.into());
5855        query = query.arg_lazy(
5856            "source",
5857            Box::new(move || {
5858                let source = source.clone();
5859                Box::pin(async move { source.into_id().await.unwrap().quote() })
5860            }),
5861        );
5862        if let Some(exclude) = opts.exclude {
5863            query = query.arg("exclude", exclude);
5864        }
5865        if let Some(include) = opts.include {
5866            query = query.arg("include", include);
5867        }
5868        if let Some(gitignore) = opts.gitignore {
5869            query = query.arg("gitignore", gitignore);
5870        }
5871        if let Some(owner) = opts.owner {
5872            query = query.arg("owner", owner);
5873        }
5874        Directory {
5875            proc: self.proc.clone(),
5876            selection: query,
5877            graphql_client: self.graphql_client.clone(),
5878        }
5879    }
5880    /// Raise an error.
5881    ///
5882    /// # Arguments
5883    ///
5884    /// * `err` - Message of the error to raise. If empty, the error will be ignored.
5885    pub fn with_error(&self, err: impl Into<String>) -> Directory {
5886        let mut query = self.selection.select("withError");
5887        query = query.arg("err", err.into());
5888        Directory {
5889            proc: self.proc.clone(),
5890            selection: query,
5891            graphql_client: self.graphql_client.clone(),
5892        }
5893    }
5894    /// Retrieves this directory plus the contents of the given file copied to the given path.
5895    ///
5896    /// # Arguments
5897    ///
5898    /// * `path` - Location of the copied file (e.g., "/file.txt").
5899    /// * `source` - Identifier of the file to copy.
5900    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5901    pub fn with_file(&self, path: impl Into<String>, source: impl IntoID<FileId>) -> Directory {
5902        let mut query = self.selection.select("withFile");
5903        query = query.arg("path", path.into());
5904        query = query.arg_lazy(
5905            "source",
5906            Box::new(move || {
5907                let source = source.clone();
5908                Box::pin(async move { source.into_id().await.unwrap().quote() })
5909            }),
5910        );
5911        Directory {
5912            proc: self.proc.clone(),
5913            selection: query,
5914            graphql_client: self.graphql_client.clone(),
5915        }
5916    }
5917    /// Retrieves this directory plus the contents of the given file copied to the given path.
5918    ///
5919    /// # Arguments
5920    ///
5921    /// * `path` - Location of the copied file (e.g., "/file.txt").
5922    /// * `source` - Identifier of the file to copy.
5923    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5924    pub fn with_file_opts<'a>(
5925        &self,
5926        path: impl Into<String>,
5927        source: impl IntoID<FileId>,
5928        opts: DirectoryWithFileOpts<'a>,
5929    ) -> Directory {
5930        let mut query = self.selection.select("withFile");
5931        query = query.arg("path", path.into());
5932        query = query.arg_lazy(
5933            "source",
5934            Box::new(move || {
5935                let source = source.clone();
5936                Box::pin(async move { source.into_id().await.unwrap().quote() })
5937            }),
5938        );
5939        if let Some(permissions) = opts.permissions {
5940            query = query.arg("permissions", permissions);
5941        }
5942        if let Some(owner) = opts.owner {
5943            query = query.arg("owner", owner);
5944        }
5945        Directory {
5946            proc: self.proc.clone(),
5947            selection: query,
5948            graphql_client: self.graphql_client.clone(),
5949        }
5950    }
5951    /// Retrieves this directory plus the contents of the given files copied to the given path.
5952    ///
5953    /// # Arguments
5954    ///
5955    /// * `path` - Location where copied files should be placed (e.g., "/src").
5956    /// * `sources` - Identifiers of the files to copy.
5957    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5958    pub fn with_files(&self, path: impl Into<String>, sources: Vec<FileId>) -> Directory {
5959        let mut query = self.selection.select("withFiles");
5960        query = query.arg("path", path.into());
5961        query = query.arg("sources", sources);
5962        Directory {
5963            proc: self.proc.clone(),
5964            selection: query,
5965            graphql_client: self.graphql_client.clone(),
5966        }
5967    }
5968    /// Retrieves this directory plus the contents of the given files copied to the given path.
5969    ///
5970    /// # Arguments
5971    ///
5972    /// * `path` - Location where copied files should be placed (e.g., "/src").
5973    /// * `sources` - Identifiers of the files to copy.
5974    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5975    pub fn with_files_opts(
5976        &self,
5977        path: impl Into<String>,
5978        sources: Vec<FileId>,
5979        opts: DirectoryWithFilesOpts,
5980    ) -> Directory {
5981        let mut query = self.selection.select("withFiles");
5982        query = query.arg("path", path.into());
5983        query = query.arg("sources", sources);
5984        if let Some(permissions) = opts.permissions {
5985            query = query.arg("permissions", permissions);
5986        }
5987        Directory {
5988            proc: self.proc.clone(),
5989            selection: query,
5990            graphql_client: self.graphql_client.clone(),
5991        }
5992    }
5993    /// Retrieves this directory plus a new directory created at the given path.
5994    ///
5995    /// # Arguments
5996    ///
5997    /// * `path` - Location of the directory created (e.g., "/logs").
5998    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5999    pub fn with_new_directory(&self, path: impl Into<String>) -> Directory {
6000        let mut query = self.selection.select("withNewDirectory");
6001        query = query.arg("path", path.into());
6002        Directory {
6003            proc: self.proc.clone(),
6004            selection: query,
6005            graphql_client: self.graphql_client.clone(),
6006        }
6007    }
6008    /// Retrieves this directory plus a new directory created at the given path.
6009    ///
6010    /// # Arguments
6011    ///
6012    /// * `path` - Location of the directory created (e.g., "/logs").
6013    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6014    pub fn with_new_directory_opts(
6015        &self,
6016        path: impl Into<String>,
6017        opts: DirectoryWithNewDirectoryOpts,
6018    ) -> Directory {
6019        let mut query = self.selection.select("withNewDirectory");
6020        query = query.arg("path", path.into());
6021        if let Some(permissions) = opts.permissions {
6022            query = query.arg("permissions", permissions);
6023        }
6024        Directory {
6025            proc: self.proc.clone(),
6026            selection: query,
6027            graphql_client: self.graphql_client.clone(),
6028        }
6029    }
6030    /// Return a snapshot with a new file added
6031    ///
6032    /// # Arguments
6033    ///
6034    /// * `path` - Path of the new file. Example: "foo/bar.txt"
6035    /// * `contents` - Contents of the new file. Example: "Hello world!"
6036    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6037    pub fn with_new_file(&self, path: impl Into<String>, contents: impl Into<String>) -> Directory {
6038        let mut query = self.selection.select("withNewFile");
6039        query = query.arg("path", path.into());
6040        query = query.arg("contents", contents.into());
6041        Directory {
6042            proc: self.proc.clone(),
6043            selection: query,
6044            graphql_client: self.graphql_client.clone(),
6045        }
6046    }
6047    /// Return a snapshot with a new file added
6048    ///
6049    /// # Arguments
6050    ///
6051    /// * `path` - Path of the new file. Example: "foo/bar.txt"
6052    /// * `contents` - Contents of the new file. Example: "Hello world!"
6053    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6054    pub fn with_new_file_opts(
6055        &self,
6056        path: impl Into<String>,
6057        contents: impl Into<String>,
6058        opts: DirectoryWithNewFileOpts,
6059    ) -> Directory {
6060        let mut query = self.selection.select("withNewFile");
6061        query = query.arg("path", path.into());
6062        query = query.arg("contents", contents.into());
6063        if let Some(permissions) = opts.permissions {
6064            query = query.arg("permissions", permissions);
6065        }
6066        Directory {
6067            proc: self.proc.clone(),
6068            selection: query,
6069            graphql_client: self.graphql_client.clone(),
6070        }
6071    }
6072    /// Retrieves this directory with the given Git-compatible patch applied.
6073    ///
6074    /// # Arguments
6075    ///
6076    /// * `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").
6077    pub fn with_patch(&self, patch: impl Into<String>) -> Directory {
6078        let mut query = self.selection.select("withPatch");
6079        query = query.arg("patch", patch.into());
6080        Directory {
6081            proc: self.proc.clone(),
6082            selection: query,
6083            graphql_client: self.graphql_client.clone(),
6084        }
6085    }
6086    /// Retrieves this directory with the given Git-compatible patch file applied.
6087    ///
6088    /// # Arguments
6089    ///
6090    /// * `patch` - File containing the patch to apply
6091    pub fn with_patch_file(&self, patch: impl IntoID<FileId>) -> Directory {
6092        let mut query = self.selection.select("withPatchFile");
6093        query = query.arg_lazy(
6094            "patch",
6095            Box::new(move || {
6096                let patch = patch.clone();
6097                Box::pin(async move { patch.into_id().await.unwrap().quote() })
6098            }),
6099        );
6100        Directory {
6101            proc: self.proc.clone(),
6102            selection: query,
6103            graphql_client: self.graphql_client.clone(),
6104        }
6105    }
6106    /// Return a snapshot with a symlink
6107    ///
6108    /// # Arguments
6109    ///
6110    /// * `target` - Location of the file or directory to link to (e.g., "/existing/file").
6111    /// * `link_name` - Location where the symbolic link will be created (e.g., "/new-file-link").
6112    pub fn with_symlink(
6113        &self,
6114        target: impl Into<String>,
6115        link_name: impl Into<String>,
6116    ) -> Directory {
6117        let mut query = self.selection.select("withSymlink");
6118        query = query.arg("target", target.into());
6119        query = query.arg("linkName", link_name.into());
6120        Directory {
6121            proc: self.proc.clone(),
6122            selection: query,
6123            graphql_client: self.graphql_client.clone(),
6124        }
6125    }
6126    /// Retrieves this directory with all file/dir timestamps set to the given time.
6127    ///
6128    /// # Arguments
6129    ///
6130    /// * `timestamp` - Timestamp to set dir/files in.
6131    ///
6132    /// Formatted in seconds following Unix epoch (e.g., 1672531199).
6133    pub fn with_timestamps(&self, timestamp: isize) -> Directory {
6134        let mut query = self.selection.select("withTimestamps");
6135        query = query.arg("timestamp", timestamp);
6136        Directory {
6137            proc: self.proc.clone(),
6138            selection: query,
6139            graphql_client: self.graphql_client.clone(),
6140        }
6141    }
6142    /// Return a snapshot with a subdirectory removed
6143    ///
6144    /// # Arguments
6145    ///
6146    /// * `path` - Path of the subdirectory to remove. Example: ".github/workflows"
6147    pub fn without_directory(&self, path: impl Into<String>) -> Directory {
6148        let mut query = self.selection.select("withoutDirectory");
6149        query = query.arg("path", path.into());
6150        Directory {
6151            proc: self.proc.clone(),
6152            selection: query,
6153            graphql_client: self.graphql_client.clone(),
6154        }
6155    }
6156    /// Return a snapshot with a file removed
6157    ///
6158    /// # Arguments
6159    ///
6160    /// * `path` - Path of the file to remove (e.g., "/file.txt").
6161    pub fn without_file(&self, path: impl Into<String>) -> Directory {
6162        let mut query = self.selection.select("withoutFile");
6163        query = query.arg("path", path.into());
6164        Directory {
6165            proc: self.proc.clone(),
6166            selection: query,
6167            graphql_client: self.graphql_client.clone(),
6168        }
6169    }
6170    /// Return a snapshot with files removed
6171    ///
6172    /// # Arguments
6173    ///
6174    /// * `paths` - Paths of the files to remove (e.g., ["/file.txt"]).
6175    pub fn without_files(&self, paths: Vec<impl Into<String>>) -> Directory {
6176        let mut query = self.selection.select("withoutFiles");
6177        query = query.arg(
6178            "paths",
6179            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
6180        );
6181        Directory {
6182            proc: self.proc.clone(),
6183            selection: query,
6184            graphql_client: self.graphql_client.clone(),
6185        }
6186    }
6187}
6188#[derive(Clone)]
6189pub struct Engine {
6190    pub proc: Option<Arc<DaggerSessionProc>>,
6191    pub selection: Selection,
6192    pub graphql_client: DynGraphQLClient,
6193}
6194impl Engine {
6195    /// The list of connected client IDs
6196    pub async fn clients(&self) -> Result<Vec<String>, DaggerError> {
6197        let query = self.selection.select("clients");
6198        query.execute(self.graphql_client.clone()).await
6199    }
6200    /// A unique identifier for this Engine.
6201    pub async fn id(&self) -> Result<EngineId, DaggerError> {
6202        let query = self.selection.select("id");
6203        query.execute(self.graphql_client.clone()).await
6204    }
6205    /// The local (on-disk) cache for the Dagger engine
6206    pub fn local_cache(&self) -> EngineCache {
6207        let query = self.selection.select("localCache");
6208        EngineCache {
6209            proc: self.proc.clone(),
6210            selection: query,
6211            graphql_client: self.graphql_client.clone(),
6212        }
6213    }
6214    /// The name of the engine instance.
6215    pub async fn name(&self) -> Result<String, DaggerError> {
6216        let query = self.selection.select("name");
6217        query.execute(self.graphql_client.clone()).await
6218    }
6219}
6220#[derive(Clone)]
6221pub struct EngineCache {
6222    pub proc: Option<Arc<DaggerSessionProc>>,
6223    pub selection: Selection,
6224    pub graphql_client: DynGraphQLClient,
6225}
6226#[derive(Builder, Debug, PartialEq)]
6227pub struct EngineCacheEntrySetOpts<'a> {
6228    #[builder(setter(into, strip_option), default)]
6229    pub key: Option<&'a str>,
6230}
6231#[derive(Builder, Debug, PartialEq)]
6232pub struct EngineCachePruneOpts {
6233    /// Use the engine-wide default pruning policy if true, otherwise prune the whole cache of any releasable entries.
6234    #[builder(setter(into, strip_option), default)]
6235    pub use_default_policy: Option<bool>,
6236}
6237impl EngineCache {
6238    /// The current set of entries in the cache
6239    ///
6240    /// # Arguments
6241    ///
6242    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6243    pub fn entry_set(&self) -> EngineCacheEntrySet {
6244        let query = self.selection.select("entrySet");
6245        EngineCacheEntrySet {
6246            proc: self.proc.clone(),
6247            selection: query,
6248            graphql_client: self.graphql_client.clone(),
6249        }
6250    }
6251    /// The current set of entries in the cache
6252    ///
6253    /// # Arguments
6254    ///
6255    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6256    pub fn entry_set_opts<'a>(&self, opts: EngineCacheEntrySetOpts<'a>) -> EngineCacheEntrySet {
6257        let mut query = self.selection.select("entrySet");
6258        if let Some(key) = opts.key {
6259            query = query.arg("key", key);
6260        }
6261        EngineCacheEntrySet {
6262            proc: self.proc.clone(),
6263            selection: query,
6264            graphql_client: self.graphql_client.clone(),
6265        }
6266    }
6267    /// A unique identifier for this EngineCache.
6268    pub async fn id(&self) -> Result<EngineCacheId, DaggerError> {
6269        let query = self.selection.select("id");
6270        query.execute(self.graphql_client.clone()).await
6271    }
6272    /// The maximum bytes to keep in the cache without pruning.
6273    pub async fn max_used_space(&self) -> Result<isize, DaggerError> {
6274        let query = self.selection.select("maxUsedSpace");
6275        query.execute(self.graphql_client.clone()).await
6276    }
6277    /// The target amount of free disk space the garbage collector will attempt to leave.
6278    pub async fn min_free_space(&self) -> Result<isize, DaggerError> {
6279        let query = self.selection.select("minFreeSpace");
6280        query.execute(self.graphql_client.clone()).await
6281    }
6282    /// Prune the cache of releaseable entries
6283    ///
6284    /// # Arguments
6285    ///
6286    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6287    pub async fn prune(&self) -> Result<Void, DaggerError> {
6288        let query = self.selection.select("prune");
6289        query.execute(self.graphql_client.clone()).await
6290    }
6291    /// Prune the cache of releaseable entries
6292    ///
6293    /// # Arguments
6294    ///
6295    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6296    pub async fn prune_opts(&self, opts: EngineCachePruneOpts) -> Result<Void, DaggerError> {
6297        let mut query = self.selection.select("prune");
6298        if let Some(use_default_policy) = opts.use_default_policy {
6299            query = query.arg("useDefaultPolicy", use_default_policy);
6300        }
6301        query.execute(self.graphql_client.clone()).await
6302    }
6303    /// The minimum amount of disk space this policy is guaranteed to retain.
6304    pub async fn reserved_space(&self) -> Result<isize, DaggerError> {
6305        let query = self.selection.select("reservedSpace");
6306        query.execute(self.graphql_client.clone()).await
6307    }
6308    /// The target number of bytes to keep when pruning.
6309    pub async fn target_space(&self) -> Result<isize, DaggerError> {
6310        let query = self.selection.select("targetSpace");
6311        query.execute(self.graphql_client.clone()).await
6312    }
6313}
6314#[derive(Clone)]
6315pub struct EngineCacheEntry {
6316    pub proc: Option<Arc<DaggerSessionProc>>,
6317    pub selection: Selection,
6318    pub graphql_client: DynGraphQLClient,
6319}
6320impl EngineCacheEntry {
6321    /// Whether the cache entry is actively being used.
6322    pub async fn actively_used(&self) -> Result<bool, DaggerError> {
6323        let query = self.selection.select("activelyUsed");
6324        query.execute(self.graphql_client.clone()).await
6325    }
6326    /// The time the cache entry was created, in Unix nanoseconds.
6327    pub async fn created_time_unix_nano(&self) -> Result<isize, DaggerError> {
6328        let query = self.selection.select("createdTimeUnixNano");
6329        query.execute(self.graphql_client.clone()).await
6330    }
6331    /// The description of the cache entry.
6332    pub async fn description(&self) -> Result<String, DaggerError> {
6333        let query = self.selection.select("description");
6334        query.execute(self.graphql_client.clone()).await
6335    }
6336    /// The disk space used by the cache entry.
6337    pub async fn disk_space_bytes(&self) -> Result<isize, DaggerError> {
6338        let query = self.selection.select("diskSpaceBytes");
6339        query.execute(self.graphql_client.clone()).await
6340    }
6341    /// A unique identifier for this EngineCacheEntry.
6342    pub async fn id(&self) -> Result<EngineCacheEntryId, DaggerError> {
6343        let query = self.selection.select("id");
6344        query.execute(self.graphql_client.clone()).await
6345    }
6346    /// The most recent time the cache entry was used, in Unix nanoseconds.
6347    pub async fn most_recent_use_time_unix_nano(&self) -> Result<isize, DaggerError> {
6348        let query = self.selection.select("mostRecentUseTimeUnixNano");
6349        query.execute(self.graphql_client.clone()).await
6350    }
6351}
6352#[derive(Clone)]
6353pub struct EngineCacheEntrySet {
6354    pub proc: Option<Arc<DaggerSessionProc>>,
6355    pub selection: Selection,
6356    pub graphql_client: DynGraphQLClient,
6357}
6358impl EngineCacheEntrySet {
6359    /// The total disk space used by the cache entries in this set.
6360    pub async fn disk_space_bytes(&self) -> Result<isize, DaggerError> {
6361        let query = self.selection.select("diskSpaceBytes");
6362        query.execute(self.graphql_client.clone()).await
6363    }
6364    /// The list of individual cache entries in the set
6365    pub fn entries(&self) -> Vec<EngineCacheEntry> {
6366        let query = self.selection.select("entries");
6367        vec![EngineCacheEntry {
6368            proc: self.proc.clone(),
6369            selection: query,
6370            graphql_client: self.graphql_client.clone(),
6371        }]
6372    }
6373    /// The number of cache entries in this set.
6374    pub async fn entry_count(&self) -> Result<isize, DaggerError> {
6375        let query = self.selection.select("entryCount");
6376        query.execute(self.graphql_client.clone()).await
6377    }
6378    /// A unique identifier for this EngineCacheEntrySet.
6379    pub async fn id(&self) -> Result<EngineCacheEntrySetId, DaggerError> {
6380        let query = self.selection.select("id");
6381        query.execute(self.graphql_client.clone()).await
6382    }
6383}
6384#[derive(Clone)]
6385pub struct EnumTypeDef {
6386    pub proc: Option<Arc<DaggerSessionProc>>,
6387    pub selection: Selection,
6388    pub graphql_client: DynGraphQLClient,
6389}
6390impl EnumTypeDef {
6391    /// A doc string for the enum, if any.
6392    pub async fn description(&self) -> Result<String, DaggerError> {
6393        let query = self.selection.select("description");
6394        query.execute(self.graphql_client.clone()).await
6395    }
6396    /// A unique identifier for this EnumTypeDef.
6397    pub async fn id(&self) -> Result<EnumTypeDefId, DaggerError> {
6398        let query = self.selection.select("id");
6399        query.execute(self.graphql_client.clone()).await
6400    }
6401    /// The members of the enum.
6402    pub fn members(&self) -> Vec<EnumValueTypeDef> {
6403        let query = self.selection.select("members");
6404        vec![EnumValueTypeDef {
6405            proc: self.proc.clone(),
6406            selection: query,
6407            graphql_client: self.graphql_client.clone(),
6408        }]
6409    }
6410    /// The name of the enum.
6411    pub async fn name(&self) -> Result<String, DaggerError> {
6412        let query = self.selection.select("name");
6413        query.execute(self.graphql_client.clone()).await
6414    }
6415    /// The location of this enum declaration.
6416    pub fn source_map(&self) -> SourceMap {
6417        let query = self.selection.select("sourceMap");
6418        SourceMap {
6419            proc: self.proc.clone(),
6420            selection: query,
6421            graphql_client: self.graphql_client.clone(),
6422        }
6423    }
6424    /// If this EnumTypeDef is associated with a Module, the name of the module. Unset otherwise.
6425    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
6426        let query = self.selection.select("sourceModuleName");
6427        query.execute(self.graphql_client.clone()).await
6428    }
6429    pub fn values(&self) -> Vec<EnumValueTypeDef> {
6430        let query = self.selection.select("values");
6431        vec![EnumValueTypeDef {
6432            proc: self.proc.clone(),
6433            selection: query,
6434            graphql_client: self.graphql_client.clone(),
6435        }]
6436    }
6437}
6438#[derive(Clone)]
6439pub struct EnumValueTypeDef {
6440    pub proc: Option<Arc<DaggerSessionProc>>,
6441    pub selection: Selection,
6442    pub graphql_client: DynGraphQLClient,
6443}
6444impl EnumValueTypeDef {
6445    /// The reason this enum member is deprecated, if any.
6446    pub async fn deprecated(&self) -> Result<String, DaggerError> {
6447        let query = self.selection.select("deprecated");
6448        query.execute(self.graphql_client.clone()).await
6449    }
6450    /// A doc string for the enum member, if any.
6451    pub async fn description(&self) -> Result<String, DaggerError> {
6452        let query = self.selection.select("description");
6453        query.execute(self.graphql_client.clone()).await
6454    }
6455    /// A unique identifier for this EnumValueTypeDef.
6456    pub async fn id(&self) -> Result<EnumValueTypeDefId, DaggerError> {
6457        let query = self.selection.select("id");
6458        query.execute(self.graphql_client.clone()).await
6459    }
6460    /// The name of the enum member.
6461    pub async fn name(&self) -> Result<String, DaggerError> {
6462        let query = self.selection.select("name");
6463        query.execute(self.graphql_client.clone()).await
6464    }
6465    /// The location of this enum member declaration.
6466    pub fn source_map(&self) -> SourceMap {
6467        let query = self.selection.select("sourceMap");
6468        SourceMap {
6469            proc: self.proc.clone(),
6470            selection: query,
6471            graphql_client: self.graphql_client.clone(),
6472        }
6473    }
6474    /// The value of the enum member
6475    pub async fn value(&self) -> Result<String, DaggerError> {
6476        let query = self.selection.select("value");
6477        query.execute(self.graphql_client.clone()).await
6478    }
6479}
6480#[derive(Clone)]
6481pub struct Env {
6482    pub proc: Option<Arc<DaggerSessionProc>>,
6483    pub selection: Selection,
6484    pub graphql_client: DynGraphQLClient,
6485}
6486impl Env {
6487    /// A unique identifier for this Env.
6488    pub async fn id(&self) -> Result<EnvId, DaggerError> {
6489        let query = self.selection.select("id");
6490        query.execute(self.graphql_client.clone()).await
6491    }
6492    /// Retrieves an input binding by name
6493    pub fn input(&self, name: impl Into<String>) -> Binding {
6494        let mut query = self.selection.select("input");
6495        query = query.arg("name", name.into());
6496        Binding {
6497            proc: self.proc.clone(),
6498            selection: query,
6499            graphql_client: self.graphql_client.clone(),
6500        }
6501    }
6502    /// Returns all input bindings provided to the environment
6503    pub fn inputs(&self) -> Vec<Binding> {
6504        let query = self.selection.select("inputs");
6505        vec![Binding {
6506            proc: self.proc.clone(),
6507            selection: query,
6508            graphql_client: self.graphql_client.clone(),
6509        }]
6510    }
6511    /// Retrieves an output binding by name
6512    pub fn output(&self, name: impl Into<String>) -> Binding {
6513        let mut query = self.selection.select("output");
6514        query = query.arg("name", name.into());
6515        Binding {
6516            proc: self.proc.clone(),
6517            selection: query,
6518            graphql_client: self.graphql_client.clone(),
6519        }
6520    }
6521    /// Returns all declared output bindings for the environment
6522    pub fn outputs(&self) -> Vec<Binding> {
6523        let query = self.selection.select("outputs");
6524        vec![Binding {
6525            proc: self.proc.clone(),
6526            selection: query,
6527            graphql_client: self.graphql_client.clone(),
6528        }]
6529    }
6530    /// Create or update a binding of type Address in the environment
6531    ///
6532    /// # Arguments
6533    ///
6534    /// * `name` - The name of the binding
6535    /// * `value` - The Address value to assign to the binding
6536    /// * `description` - The purpose of the input
6537    pub fn with_address_input(
6538        &self,
6539        name: impl Into<String>,
6540        value: impl IntoID<AddressId>,
6541        description: impl Into<String>,
6542    ) -> Env {
6543        let mut query = self.selection.select("withAddressInput");
6544        query = query.arg("name", name.into());
6545        query = query.arg_lazy(
6546            "value",
6547            Box::new(move || {
6548                let value = value.clone();
6549                Box::pin(async move { value.into_id().await.unwrap().quote() })
6550            }),
6551        );
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    /// Declare a desired Address output to be assigned in the environment
6560    ///
6561    /// # Arguments
6562    ///
6563    /// * `name` - The name of the binding
6564    /// * `description` - A description of the desired value of the binding
6565    pub fn with_address_output(
6566        &self,
6567        name: impl Into<String>,
6568        description: impl Into<String>,
6569    ) -> Env {
6570        let mut query = self.selection.select("withAddressOutput");
6571        query = query.arg("name", name.into());
6572        query = query.arg("description", description.into());
6573        Env {
6574            proc: self.proc.clone(),
6575            selection: query,
6576            graphql_client: self.graphql_client.clone(),
6577        }
6578    }
6579    /// Create or update a binding of type CacheVolume in the environment
6580    ///
6581    /// # Arguments
6582    ///
6583    /// * `name` - The name of the binding
6584    /// * `value` - The CacheVolume value to assign to the binding
6585    /// * `description` - The purpose of the input
6586    pub fn with_cache_volume_input(
6587        &self,
6588        name: impl Into<String>,
6589        value: impl IntoID<CacheVolumeId>,
6590        description: impl Into<String>,
6591    ) -> Env {
6592        let mut query = self.selection.select("withCacheVolumeInput");
6593        query = query.arg("name", name.into());
6594        query = query.arg_lazy(
6595            "value",
6596            Box::new(move || {
6597                let value = value.clone();
6598                Box::pin(async move { value.into_id().await.unwrap().quote() })
6599            }),
6600        );
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    /// Declare a desired CacheVolume output to be assigned in the environment
6609    ///
6610    /// # Arguments
6611    ///
6612    /// * `name` - The name of the binding
6613    /// * `description` - A description of the desired value of the binding
6614    pub fn with_cache_volume_output(
6615        &self,
6616        name: impl Into<String>,
6617        description: impl Into<String>,
6618    ) -> Env {
6619        let mut query = self.selection.select("withCacheVolumeOutput");
6620        query = query.arg("name", name.into());
6621        query = query.arg("description", description.into());
6622        Env {
6623            proc: self.proc.clone(),
6624            selection: query,
6625            graphql_client: self.graphql_client.clone(),
6626        }
6627    }
6628    /// Create or update a binding of type Changeset in the environment
6629    ///
6630    /// # Arguments
6631    ///
6632    /// * `name` - The name of the binding
6633    /// * `value` - The Changeset value to assign to the binding
6634    /// * `description` - The purpose of the input
6635    pub fn with_changeset_input(
6636        &self,
6637        name: impl Into<String>,
6638        value: impl IntoID<ChangesetId>,
6639        description: impl Into<String>,
6640    ) -> Env {
6641        let mut query = self.selection.select("withChangesetInput");
6642        query = query.arg("name", name.into());
6643        query = query.arg_lazy(
6644            "value",
6645            Box::new(move || {
6646                let value = value.clone();
6647                Box::pin(async move { value.into_id().await.unwrap().quote() })
6648            }),
6649        );
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    /// Declare a desired Changeset output to be assigned in the environment
6658    ///
6659    /// # Arguments
6660    ///
6661    /// * `name` - The name of the binding
6662    /// * `description` - A description of the desired value of the binding
6663    pub fn with_changeset_output(
6664        &self,
6665        name: impl Into<String>,
6666        description: impl Into<String>,
6667    ) -> Env {
6668        let mut query = self.selection.select("withChangesetOutput");
6669        query = query.arg("name", name.into());
6670        query = query.arg("description", description.into());
6671        Env {
6672            proc: self.proc.clone(),
6673            selection: query,
6674            graphql_client: self.graphql_client.clone(),
6675        }
6676    }
6677    /// Create or update a binding of type CheckGroup in the environment
6678    ///
6679    /// # Arguments
6680    ///
6681    /// * `name` - The name of the binding
6682    /// * `value` - The CheckGroup value to assign to the binding
6683    /// * `description` - The purpose of the input
6684    pub fn with_check_group_input(
6685        &self,
6686        name: impl Into<String>,
6687        value: impl IntoID<CheckGroupId>,
6688        description: impl Into<String>,
6689    ) -> Env {
6690        let mut query = self.selection.select("withCheckGroupInput");
6691        query = query.arg("name", name.into());
6692        query = query.arg_lazy(
6693            "value",
6694            Box::new(move || {
6695                let value = value.clone();
6696                Box::pin(async move { value.into_id().await.unwrap().quote() })
6697            }),
6698        );
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    /// Declare a desired CheckGroup output to be assigned in the environment
6707    ///
6708    /// # Arguments
6709    ///
6710    /// * `name` - The name of the binding
6711    /// * `description` - A description of the desired value of the binding
6712    pub fn with_check_group_output(
6713        &self,
6714        name: impl Into<String>,
6715        description: impl Into<String>,
6716    ) -> Env {
6717        let mut query = self.selection.select("withCheckGroupOutput");
6718        query = query.arg("name", name.into());
6719        query = query.arg("description", description.into());
6720        Env {
6721            proc: self.proc.clone(),
6722            selection: query,
6723            graphql_client: self.graphql_client.clone(),
6724        }
6725    }
6726    /// Create or update a binding of type Check in the environment
6727    ///
6728    /// # Arguments
6729    ///
6730    /// * `name` - The name of the binding
6731    /// * `value` - The Check value to assign to the binding
6732    /// * `description` - The purpose of the input
6733    pub fn with_check_input(
6734        &self,
6735        name: impl Into<String>,
6736        value: impl IntoID<CheckId>,
6737        description: impl Into<String>,
6738    ) -> Env {
6739        let mut query = self.selection.select("withCheckInput");
6740        query = query.arg("name", name.into());
6741        query = query.arg_lazy(
6742            "value",
6743            Box::new(move || {
6744                let value = value.clone();
6745                Box::pin(async move { value.into_id().await.unwrap().quote() })
6746            }),
6747        );
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    /// Declare a desired Check output to be assigned in the environment
6756    ///
6757    /// # Arguments
6758    ///
6759    /// * `name` - The name of the binding
6760    /// * `description` - A description of the desired value of the binding
6761    pub fn with_check_output(
6762        &self,
6763        name: impl Into<String>,
6764        description: impl Into<String>,
6765    ) -> Env {
6766        let mut query = self.selection.select("withCheckOutput");
6767        query = query.arg("name", name.into());
6768        query = query.arg("description", description.into());
6769        Env {
6770            proc: self.proc.clone(),
6771            selection: query,
6772            graphql_client: self.graphql_client.clone(),
6773        }
6774    }
6775    /// Create or update a binding of type Cloud in the environment
6776    ///
6777    /// # Arguments
6778    ///
6779    /// * `name` - The name of the binding
6780    /// * `value` - The Cloud value to assign to the binding
6781    /// * `description` - The purpose of the input
6782    pub fn with_cloud_input(
6783        &self,
6784        name: impl Into<String>,
6785        value: impl IntoID<CloudId>,
6786        description: impl Into<String>,
6787    ) -> Env {
6788        let mut query = self.selection.select("withCloudInput");
6789        query = query.arg("name", name.into());
6790        query = query.arg_lazy(
6791            "value",
6792            Box::new(move || {
6793                let value = value.clone();
6794                Box::pin(async move { value.into_id().await.unwrap().quote() })
6795            }),
6796        );
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    /// Declare a desired Cloud output to be assigned in the environment
6805    ///
6806    /// # Arguments
6807    ///
6808    /// * `name` - The name of the binding
6809    /// * `description` - A description of the desired value of the binding
6810    pub fn with_cloud_output(
6811        &self,
6812        name: impl Into<String>,
6813        description: impl Into<String>,
6814    ) -> Env {
6815        let mut query = self.selection.select("withCloudOutput");
6816        query = query.arg("name", name.into());
6817        query = query.arg("description", description.into());
6818        Env {
6819            proc: self.proc.clone(),
6820            selection: query,
6821            graphql_client: self.graphql_client.clone(),
6822        }
6823    }
6824    /// Create or update a binding of type Container in the environment
6825    ///
6826    /// # Arguments
6827    ///
6828    /// * `name` - The name of the binding
6829    /// * `value` - The Container value to assign to the binding
6830    /// * `description` - The purpose of the input
6831    pub fn with_container_input(
6832        &self,
6833        name: impl Into<String>,
6834        value: impl IntoID<ContainerId>,
6835        description: impl Into<String>,
6836    ) -> Env {
6837        let mut query = self.selection.select("withContainerInput");
6838        query = query.arg("name", name.into());
6839        query = query.arg_lazy(
6840            "value",
6841            Box::new(move || {
6842                let value = value.clone();
6843                Box::pin(async move { value.into_id().await.unwrap().quote() })
6844            }),
6845        );
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    /// Declare a desired Container output to be assigned in the environment
6854    ///
6855    /// # Arguments
6856    ///
6857    /// * `name` - The name of the binding
6858    /// * `description` - A description of the desired value of the binding
6859    pub fn with_container_output(
6860        &self,
6861        name: impl Into<String>,
6862        description: impl Into<String>,
6863    ) -> Env {
6864        let mut query = self.selection.select("withContainerOutput");
6865        query = query.arg("name", name.into());
6866        query = query.arg("description", description.into());
6867        Env {
6868            proc: self.proc.clone(),
6869            selection: query,
6870            graphql_client: self.graphql_client.clone(),
6871        }
6872    }
6873    /// Installs the current module into the environment, exposing its functions to the model
6874    /// Contextual path arguments will be populated using the environment's workspace.
6875    pub fn with_current_module(&self) -> Env {
6876        let query = self.selection.select("withCurrentModule");
6877        Env {
6878            proc: self.proc.clone(),
6879            selection: query,
6880            graphql_client: self.graphql_client.clone(),
6881        }
6882    }
6883    /// Create or update a binding of type Directory in the environment
6884    ///
6885    /// # Arguments
6886    ///
6887    /// * `name` - The name of the binding
6888    /// * `value` - The Directory value to assign to the binding
6889    /// * `description` - The purpose of the input
6890    pub fn with_directory_input(
6891        &self,
6892        name: impl Into<String>,
6893        value: impl IntoID<DirectoryId>,
6894        description: impl Into<String>,
6895    ) -> Env {
6896        let mut query = self.selection.select("withDirectoryInput");
6897        query = query.arg("name", name.into());
6898        query = query.arg_lazy(
6899            "value",
6900            Box::new(move || {
6901                let value = value.clone();
6902                Box::pin(async move { value.into_id().await.unwrap().quote() })
6903            }),
6904        );
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    /// Declare a desired Directory output to be assigned in the environment
6913    ///
6914    /// # Arguments
6915    ///
6916    /// * `name` - The name of the binding
6917    /// * `description` - A description of the desired value of the binding
6918    pub fn with_directory_output(
6919        &self,
6920        name: impl Into<String>,
6921        description: impl Into<String>,
6922    ) -> Env {
6923        let mut query = self.selection.select("withDirectoryOutput");
6924        query = query.arg("name", name.into());
6925        query = query.arg("description", description.into());
6926        Env {
6927            proc: self.proc.clone(),
6928            selection: query,
6929            graphql_client: self.graphql_client.clone(),
6930        }
6931    }
6932    /// Create or update a binding of type EnvFile in the environment
6933    ///
6934    /// # Arguments
6935    ///
6936    /// * `name` - The name of the binding
6937    /// * `value` - The EnvFile value to assign to the binding
6938    /// * `description` - The purpose of the input
6939    pub fn with_env_file_input(
6940        &self,
6941        name: impl Into<String>,
6942        value: impl IntoID<EnvFileId>,
6943        description: impl Into<String>,
6944    ) -> Env {
6945        let mut query = self.selection.select("withEnvFileInput");
6946        query = query.arg("name", name.into());
6947        query = query.arg_lazy(
6948            "value",
6949            Box::new(move || {
6950                let value = value.clone();
6951                Box::pin(async move { value.into_id().await.unwrap().quote() })
6952            }),
6953        );
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    /// Declare a desired EnvFile output to be assigned in the environment
6962    ///
6963    /// # Arguments
6964    ///
6965    /// * `name` - The name of the binding
6966    /// * `description` - A description of the desired value of the binding
6967    pub fn with_env_file_output(
6968        &self,
6969        name: impl Into<String>,
6970        description: impl Into<String>,
6971    ) -> Env {
6972        let mut query = self.selection.select("withEnvFileOutput");
6973        query = query.arg("name", name.into());
6974        query = query.arg("description", description.into());
6975        Env {
6976            proc: self.proc.clone(),
6977            selection: query,
6978            graphql_client: self.graphql_client.clone(),
6979        }
6980    }
6981    /// Create or update a binding of type Env in the environment
6982    ///
6983    /// # Arguments
6984    ///
6985    /// * `name` - The name of the binding
6986    /// * `value` - The Env value to assign to the binding
6987    /// * `description` - The purpose of the input
6988    pub fn with_env_input(
6989        &self,
6990        name: impl Into<String>,
6991        value: impl IntoID<EnvId>,
6992        description: impl Into<String>,
6993    ) -> Env {
6994        let mut query = self.selection.select("withEnvInput");
6995        query = query.arg("name", name.into());
6996        query = query.arg_lazy(
6997            "value",
6998            Box::new(move || {
6999                let value = value.clone();
7000                Box::pin(async move { value.into_id().await.unwrap().quote() })
7001            }),
7002        );
7003        query = query.arg("description", description.into());
7004        Env {
7005            proc: self.proc.clone(),
7006            selection: query,
7007            graphql_client: self.graphql_client.clone(),
7008        }
7009    }
7010    /// Declare a desired Env output to be assigned in the environment
7011    ///
7012    /// # Arguments
7013    ///
7014    /// * `name` - The name of the binding
7015    /// * `description` - A description of the desired value of the binding
7016    pub fn with_env_output(&self, name: impl Into<String>, description: impl Into<String>) -> Env {
7017        let mut query = self.selection.select("withEnvOutput");
7018        query = query.arg("name", name.into());
7019        query = query.arg("description", description.into());
7020        Env {
7021            proc: self.proc.clone(),
7022            selection: query,
7023            graphql_client: self.graphql_client.clone(),
7024        }
7025    }
7026    /// Create or update a binding of type File in the environment
7027    ///
7028    /// # Arguments
7029    ///
7030    /// * `name` - The name of the binding
7031    /// * `value` - The File value to assign to the binding
7032    /// * `description` - The purpose of the input
7033    pub fn with_file_input(
7034        &self,
7035        name: impl Into<String>,
7036        value: impl IntoID<FileId>,
7037        description: impl Into<String>,
7038    ) -> Env {
7039        let mut query = self.selection.select("withFileInput");
7040        query = query.arg("name", name.into());
7041        query = query.arg_lazy(
7042            "value",
7043            Box::new(move || {
7044                let value = value.clone();
7045                Box::pin(async move { value.into_id().await.unwrap().quote() })
7046            }),
7047        );
7048        query = query.arg("description", description.into());
7049        Env {
7050            proc: self.proc.clone(),
7051            selection: query,
7052            graphql_client: self.graphql_client.clone(),
7053        }
7054    }
7055    /// Declare a desired File output to be assigned in the environment
7056    ///
7057    /// # Arguments
7058    ///
7059    /// * `name` - The name of the binding
7060    /// * `description` - A description of the desired value of the binding
7061    pub fn with_file_output(&self, name: impl Into<String>, description: impl Into<String>) -> Env {
7062        let mut query = self.selection.select("withFileOutput");
7063        query = query.arg("name", name.into());
7064        query = query.arg("description", description.into());
7065        Env {
7066            proc: self.proc.clone(),
7067            selection: query,
7068            graphql_client: self.graphql_client.clone(),
7069        }
7070    }
7071    /// Create or update a binding of type GitRef in the environment
7072    ///
7073    /// # Arguments
7074    ///
7075    /// * `name` - The name of the binding
7076    /// * `value` - The GitRef value to assign to the binding
7077    /// * `description` - The purpose of the input
7078    pub fn with_git_ref_input(
7079        &self,
7080        name: impl Into<String>,
7081        value: impl IntoID<GitRefId>,
7082        description: impl Into<String>,
7083    ) -> Env {
7084        let mut query = self.selection.select("withGitRefInput");
7085        query = query.arg("name", name.into());
7086        query = query.arg_lazy(
7087            "value",
7088            Box::new(move || {
7089                let value = value.clone();
7090                Box::pin(async move { value.into_id().await.unwrap().quote() })
7091            }),
7092        );
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    /// Declare a desired GitRef output to be assigned in the environment
7101    ///
7102    /// # Arguments
7103    ///
7104    /// * `name` - The name of the binding
7105    /// * `description` - A description of the desired value of the binding
7106    pub fn with_git_ref_output(
7107        &self,
7108        name: impl Into<String>,
7109        description: impl Into<String>,
7110    ) -> Env {
7111        let mut query = self.selection.select("withGitRefOutput");
7112        query = query.arg("name", name.into());
7113        query = query.arg("description", description.into());
7114        Env {
7115            proc: self.proc.clone(),
7116            selection: query,
7117            graphql_client: self.graphql_client.clone(),
7118        }
7119    }
7120    /// Create or update a binding of type GitRepository in the environment
7121    ///
7122    /// # Arguments
7123    ///
7124    /// * `name` - The name of the binding
7125    /// * `value` - The GitRepository value to assign to the binding
7126    /// * `description` - The purpose of the input
7127    pub fn with_git_repository_input(
7128        &self,
7129        name: impl Into<String>,
7130        value: impl IntoID<GitRepositoryId>,
7131        description: impl Into<String>,
7132    ) -> Env {
7133        let mut query = self.selection.select("withGitRepositoryInput");
7134        query = query.arg("name", name.into());
7135        query = query.arg_lazy(
7136            "value",
7137            Box::new(move || {
7138                let value = value.clone();
7139                Box::pin(async move { value.into_id().await.unwrap().quote() })
7140            }),
7141        );
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    /// Declare a desired GitRepository output to be assigned in the environment
7150    ///
7151    /// # Arguments
7152    ///
7153    /// * `name` - The name of the binding
7154    /// * `description` - A description of the desired value of the binding
7155    pub fn with_git_repository_output(
7156        &self,
7157        name: impl Into<String>,
7158        description: impl Into<String>,
7159    ) -> Env {
7160        let mut query = self.selection.select("withGitRepositoryOutput");
7161        query = query.arg("name", name.into());
7162        query = query.arg("description", description.into());
7163        Env {
7164            proc: self.proc.clone(),
7165            selection: query,
7166            graphql_client: self.graphql_client.clone(),
7167        }
7168    }
7169    /// Create or update a binding of type JSONValue in the environment
7170    ///
7171    /// # Arguments
7172    ///
7173    /// * `name` - The name of the binding
7174    /// * `value` - The JSONValue value to assign to the binding
7175    /// * `description` - The purpose of the input
7176    pub fn with_json_value_input(
7177        &self,
7178        name: impl Into<String>,
7179        value: impl IntoID<JsonValueId>,
7180        description: impl Into<String>,
7181    ) -> Env {
7182        let mut query = self.selection.select("withJSONValueInput");
7183        query = query.arg("name", name.into());
7184        query = query.arg_lazy(
7185            "value",
7186            Box::new(move || {
7187                let value = value.clone();
7188                Box::pin(async move { value.into_id().await.unwrap().quote() })
7189            }),
7190        );
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    /// Declare a desired JSONValue output to be assigned in the environment
7199    ///
7200    /// # Arguments
7201    ///
7202    /// * `name` - The name of the binding
7203    /// * `description` - A description of the desired value of the binding
7204    pub fn with_json_value_output(
7205        &self,
7206        name: impl Into<String>,
7207        description: impl Into<String>,
7208    ) -> Env {
7209        let mut query = self.selection.select("withJSONValueOutput");
7210        query = query.arg("name", name.into());
7211        query = query.arg("description", description.into());
7212        Env {
7213            proc: self.proc.clone(),
7214            selection: query,
7215            graphql_client: self.graphql_client.clone(),
7216        }
7217    }
7218    /// Installs a module into the environment, exposing its functions to the model
7219    /// Contextual path arguments will be populated using the environment's workspace.
7220    pub fn with_module(&self, module: impl IntoID<ModuleId>) -> Env {
7221        let mut query = self.selection.select("withModule");
7222        query = query.arg_lazy(
7223            "module",
7224            Box::new(move || {
7225                let module = module.clone();
7226                Box::pin(async move { module.into_id().await.unwrap().quote() })
7227            }),
7228        );
7229        Env {
7230            proc: self.proc.clone(),
7231            selection: query,
7232            graphql_client: self.graphql_client.clone(),
7233        }
7234    }
7235    /// Create or update a binding of type ModuleConfigClient in the environment
7236    ///
7237    /// # Arguments
7238    ///
7239    /// * `name` - The name of the binding
7240    /// * `value` - The ModuleConfigClient value to assign to the binding
7241    /// * `description` - The purpose of the input
7242    pub fn with_module_config_client_input(
7243        &self,
7244        name: impl Into<String>,
7245        value: impl IntoID<ModuleConfigClientId>,
7246        description: impl Into<String>,
7247    ) -> Env {
7248        let mut query = self.selection.select("withModuleConfigClientInput");
7249        query = query.arg("name", name.into());
7250        query = query.arg_lazy(
7251            "value",
7252            Box::new(move || {
7253                let value = value.clone();
7254                Box::pin(async move { value.into_id().await.unwrap().quote() })
7255            }),
7256        );
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    /// Declare a desired ModuleConfigClient output to be assigned in the environment
7265    ///
7266    /// # Arguments
7267    ///
7268    /// * `name` - The name of the binding
7269    /// * `description` - A description of the desired value of the binding
7270    pub fn with_module_config_client_output(
7271        &self,
7272        name: impl Into<String>,
7273        description: impl Into<String>,
7274    ) -> Env {
7275        let mut query = self.selection.select("withModuleConfigClientOutput");
7276        query = query.arg("name", name.into());
7277        query = query.arg("description", description.into());
7278        Env {
7279            proc: self.proc.clone(),
7280            selection: query,
7281            graphql_client: self.graphql_client.clone(),
7282        }
7283    }
7284    /// Create or update a binding of type Module in the environment
7285    ///
7286    /// # Arguments
7287    ///
7288    /// * `name` - The name of the binding
7289    /// * `value` - The Module value to assign to the binding
7290    /// * `description` - The purpose of the input
7291    pub fn with_module_input(
7292        &self,
7293        name: impl Into<String>,
7294        value: impl IntoID<ModuleId>,
7295        description: impl Into<String>,
7296    ) -> Env {
7297        let mut query = self.selection.select("withModuleInput");
7298        query = query.arg("name", name.into());
7299        query = query.arg_lazy(
7300            "value",
7301            Box::new(move || {
7302                let value = value.clone();
7303                Box::pin(async move { value.into_id().await.unwrap().quote() })
7304            }),
7305        );
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    /// Declare a desired Module output to be assigned in the environment
7314    ///
7315    /// # Arguments
7316    ///
7317    /// * `name` - The name of the binding
7318    /// * `description` - A description of the desired value of the binding
7319    pub fn with_module_output(
7320        &self,
7321        name: impl Into<String>,
7322        description: impl Into<String>,
7323    ) -> Env {
7324        let mut query = self.selection.select("withModuleOutput");
7325        query = query.arg("name", name.into());
7326        query = query.arg("description", description.into());
7327        Env {
7328            proc: self.proc.clone(),
7329            selection: query,
7330            graphql_client: self.graphql_client.clone(),
7331        }
7332    }
7333    /// Create or update a binding of type ModuleSource in the environment
7334    ///
7335    /// # Arguments
7336    ///
7337    /// * `name` - The name of the binding
7338    /// * `value` - The ModuleSource value to assign to the binding
7339    /// * `description` - The purpose of the input
7340    pub fn with_module_source_input(
7341        &self,
7342        name: impl Into<String>,
7343        value: impl IntoID<ModuleSourceId>,
7344        description: impl Into<String>,
7345    ) -> Env {
7346        let mut query = self.selection.select("withModuleSourceInput");
7347        query = query.arg("name", name.into());
7348        query = query.arg_lazy(
7349            "value",
7350            Box::new(move || {
7351                let value = value.clone();
7352                Box::pin(async move { value.into_id().await.unwrap().quote() })
7353            }),
7354        );
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    /// Declare a desired ModuleSource output to be assigned in the environment
7363    ///
7364    /// # Arguments
7365    ///
7366    /// * `name` - The name of the binding
7367    /// * `description` - A description of the desired value of the binding
7368    pub fn with_module_source_output(
7369        &self,
7370        name: impl Into<String>,
7371        description: impl Into<String>,
7372    ) -> Env {
7373        let mut query = self.selection.select("withModuleSourceOutput");
7374        query = query.arg("name", name.into());
7375        query = query.arg("description", description.into());
7376        Env {
7377            proc: self.proc.clone(),
7378            selection: query,
7379            graphql_client: self.graphql_client.clone(),
7380        }
7381    }
7382    /// Create or update a binding of type SearchResult in the environment
7383    ///
7384    /// # Arguments
7385    ///
7386    /// * `name` - The name of the binding
7387    /// * `value` - The SearchResult value to assign to the binding
7388    /// * `description` - The purpose of the input
7389    pub fn with_search_result_input(
7390        &self,
7391        name: impl Into<String>,
7392        value: impl IntoID<SearchResultId>,
7393        description: impl Into<String>,
7394    ) -> Env {
7395        let mut query = self.selection.select("withSearchResultInput");
7396        query = query.arg("name", name.into());
7397        query = query.arg_lazy(
7398            "value",
7399            Box::new(move || {
7400                let value = value.clone();
7401                Box::pin(async move { value.into_id().await.unwrap().quote() })
7402            }),
7403        );
7404        query = query.arg("description", description.into());
7405        Env {
7406            proc: self.proc.clone(),
7407            selection: query,
7408            graphql_client: self.graphql_client.clone(),
7409        }
7410    }
7411    /// Declare a desired SearchResult output to be assigned in the environment
7412    ///
7413    /// # Arguments
7414    ///
7415    /// * `name` - The name of the binding
7416    /// * `description` - A description of the desired value of the binding
7417    pub fn with_search_result_output(
7418        &self,
7419        name: impl Into<String>,
7420        description: impl Into<String>,
7421    ) -> Env {
7422        let mut query = self.selection.select("withSearchResultOutput");
7423        query = query.arg("name", name.into());
7424        query = query.arg("description", description.into());
7425        Env {
7426            proc: self.proc.clone(),
7427            selection: query,
7428            graphql_client: self.graphql_client.clone(),
7429        }
7430    }
7431    /// Create or update a binding of type SearchSubmatch in the environment
7432    ///
7433    /// # Arguments
7434    ///
7435    /// * `name` - The name of the binding
7436    /// * `value` - The SearchSubmatch value to assign to the binding
7437    /// * `description` - The purpose of the input
7438    pub fn with_search_submatch_input(
7439        &self,
7440        name: impl Into<String>,
7441        value: impl IntoID<SearchSubmatchId>,
7442        description: impl Into<String>,
7443    ) -> Env {
7444        let mut query = self.selection.select("withSearchSubmatchInput");
7445        query = query.arg("name", name.into());
7446        query = query.arg_lazy(
7447            "value",
7448            Box::new(move || {
7449                let value = value.clone();
7450                Box::pin(async move { value.into_id().await.unwrap().quote() })
7451            }),
7452        );
7453        query = query.arg("description", description.into());
7454        Env {
7455            proc: self.proc.clone(),
7456            selection: query,
7457            graphql_client: self.graphql_client.clone(),
7458        }
7459    }
7460    /// Declare a desired SearchSubmatch output to be assigned in the environment
7461    ///
7462    /// # Arguments
7463    ///
7464    /// * `name` - The name of the binding
7465    /// * `description` - A description of the desired value of the binding
7466    pub fn with_search_submatch_output(
7467        &self,
7468        name: impl Into<String>,
7469        description: impl Into<String>,
7470    ) -> Env {
7471        let mut query = self.selection.select("withSearchSubmatchOutput");
7472        query = query.arg("name", name.into());
7473        query = query.arg("description", description.into());
7474        Env {
7475            proc: self.proc.clone(),
7476            selection: query,
7477            graphql_client: self.graphql_client.clone(),
7478        }
7479    }
7480    /// Create or update a binding of type Secret in the environment
7481    ///
7482    /// # Arguments
7483    ///
7484    /// * `name` - The name of the binding
7485    /// * `value` - The Secret value to assign to the binding
7486    /// * `description` - The purpose of the input
7487    pub fn with_secret_input(
7488        &self,
7489        name: impl Into<String>,
7490        value: impl IntoID<SecretId>,
7491        description: impl Into<String>,
7492    ) -> Env {
7493        let mut query = self.selection.select("withSecretInput");
7494        query = query.arg("name", name.into());
7495        query = query.arg_lazy(
7496            "value",
7497            Box::new(move || {
7498                let value = value.clone();
7499                Box::pin(async move { value.into_id().await.unwrap().quote() })
7500            }),
7501        );
7502        query = query.arg("description", description.into());
7503        Env {
7504            proc: self.proc.clone(),
7505            selection: query,
7506            graphql_client: self.graphql_client.clone(),
7507        }
7508    }
7509    /// Declare a desired Secret output to be assigned in the environment
7510    ///
7511    /// # Arguments
7512    ///
7513    /// * `name` - The name of the binding
7514    /// * `description` - A description of the desired value of the binding
7515    pub fn with_secret_output(
7516        &self,
7517        name: impl Into<String>,
7518        description: impl Into<String>,
7519    ) -> Env {
7520        let mut query = self.selection.select("withSecretOutput");
7521        query = query.arg("name", name.into());
7522        query = query.arg("description", description.into());
7523        Env {
7524            proc: self.proc.clone(),
7525            selection: query,
7526            graphql_client: self.graphql_client.clone(),
7527        }
7528    }
7529    /// Create or update a binding of type Service in the environment
7530    ///
7531    /// # Arguments
7532    ///
7533    /// * `name` - The name of the binding
7534    /// * `value` - The Service value to assign to the binding
7535    /// * `description` - The purpose of the input
7536    pub fn with_service_input(
7537        &self,
7538        name: impl Into<String>,
7539        value: impl IntoID<ServiceId>,
7540        description: impl Into<String>,
7541    ) -> Env {
7542        let mut query = self.selection.select("withServiceInput");
7543        query = query.arg("name", name.into());
7544        query = query.arg_lazy(
7545            "value",
7546            Box::new(move || {
7547                let value = value.clone();
7548                Box::pin(async move { value.into_id().await.unwrap().quote() })
7549            }),
7550        );
7551        query = query.arg("description", description.into());
7552        Env {
7553            proc: self.proc.clone(),
7554            selection: query,
7555            graphql_client: self.graphql_client.clone(),
7556        }
7557    }
7558    /// Declare a desired Service output to be assigned in the environment
7559    ///
7560    /// # Arguments
7561    ///
7562    /// * `name` - The name of the binding
7563    /// * `description` - A description of the desired value of the binding
7564    pub fn with_service_output(
7565        &self,
7566        name: impl Into<String>,
7567        description: impl Into<String>,
7568    ) -> Env {
7569        let mut query = self.selection.select("withServiceOutput");
7570        query = query.arg("name", name.into());
7571        query = query.arg("description", description.into());
7572        Env {
7573            proc: self.proc.clone(),
7574            selection: query,
7575            graphql_client: self.graphql_client.clone(),
7576        }
7577    }
7578    /// Create or update a binding of type Socket in the environment
7579    ///
7580    /// # Arguments
7581    ///
7582    /// * `name` - The name of the binding
7583    /// * `value` - The Socket value to assign to the binding
7584    /// * `description` - The purpose of the input
7585    pub fn with_socket_input(
7586        &self,
7587        name: impl Into<String>,
7588        value: impl IntoID<SocketId>,
7589        description: impl Into<String>,
7590    ) -> Env {
7591        let mut query = self.selection.select("withSocketInput");
7592        query = query.arg("name", name.into());
7593        query = query.arg_lazy(
7594            "value",
7595            Box::new(move || {
7596                let value = value.clone();
7597                Box::pin(async move { value.into_id().await.unwrap().quote() })
7598            }),
7599        );
7600        query = query.arg("description", description.into());
7601        Env {
7602            proc: self.proc.clone(),
7603            selection: query,
7604            graphql_client: self.graphql_client.clone(),
7605        }
7606    }
7607    /// Declare a desired Socket output to be assigned in the environment
7608    ///
7609    /// # Arguments
7610    ///
7611    /// * `name` - The name of the binding
7612    /// * `description` - A description of the desired value of the binding
7613    pub fn with_socket_output(
7614        &self,
7615        name: impl Into<String>,
7616        description: impl Into<String>,
7617    ) -> Env {
7618        let mut query = self.selection.select("withSocketOutput");
7619        query = query.arg("name", name.into());
7620        query = query.arg("description", description.into());
7621        Env {
7622            proc: self.proc.clone(),
7623            selection: query,
7624            graphql_client: self.graphql_client.clone(),
7625        }
7626    }
7627    /// Provides a string input binding to the environment
7628    ///
7629    /// # Arguments
7630    ///
7631    /// * `name` - The name of the binding
7632    /// * `value` - The string value to assign to the binding
7633    /// * `description` - The description of the input
7634    pub fn with_string_input(
7635        &self,
7636        name: impl Into<String>,
7637        value: impl Into<String>,
7638        description: impl Into<String>,
7639    ) -> Env {
7640        let mut query = self.selection.select("withStringInput");
7641        query = query.arg("name", name.into());
7642        query = query.arg("value", value.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    /// Declares a desired string output binding
7651    ///
7652    /// # Arguments
7653    ///
7654    /// * `name` - The name of the binding
7655    /// * `description` - The description of the output
7656    pub fn with_string_output(
7657        &self,
7658        name: impl Into<String>,
7659        description: impl Into<String>,
7660    ) -> Env {
7661        let mut query = self.selection.select("withStringOutput");
7662        query = query.arg("name", name.into());
7663        query = query.arg("description", description.into());
7664        Env {
7665            proc: self.proc.clone(),
7666            selection: query,
7667            graphql_client: self.graphql_client.clone(),
7668        }
7669    }
7670    /// Returns a new environment with the provided workspace
7671    ///
7672    /// # Arguments
7673    ///
7674    /// * `workspace` - The directory to set as the host filesystem
7675    pub fn with_workspace(&self, workspace: impl IntoID<DirectoryId>) -> Env {
7676        let mut query = self.selection.select("withWorkspace");
7677        query = query.arg_lazy(
7678            "workspace",
7679            Box::new(move || {
7680                let workspace = workspace.clone();
7681                Box::pin(async move { workspace.into_id().await.unwrap().quote() })
7682            }),
7683        );
7684        Env {
7685            proc: self.proc.clone(),
7686            selection: query,
7687            graphql_client: self.graphql_client.clone(),
7688        }
7689    }
7690    /// Returns a new environment without any outputs
7691    pub fn without_outputs(&self) -> Env {
7692        let query = self.selection.select("withoutOutputs");
7693        Env {
7694            proc: self.proc.clone(),
7695            selection: query,
7696            graphql_client: self.graphql_client.clone(),
7697        }
7698    }
7699    pub fn workspace(&self) -> Directory {
7700        let query = self.selection.select("workspace");
7701        Directory {
7702            proc: self.proc.clone(),
7703            selection: query,
7704            graphql_client: self.graphql_client.clone(),
7705        }
7706    }
7707}
7708#[derive(Clone)]
7709pub struct EnvFile {
7710    pub proc: Option<Arc<DaggerSessionProc>>,
7711    pub selection: Selection,
7712    pub graphql_client: DynGraphQLClient,
7713}
7714#[derive(Builder, Debug, PartialEq)]
7715pub struct EnvFileGetOpts {
7716    /// Return the value exactly as written to the file. No quote removal or variable expansion
7717    #[builder(setter(into, strip_option), default)]
7718    pub raw: Option<bool>,
7719}
7720#[derive(Builder, Debug, PartialEq)]
7721pub struct EnvFileVariablesOpts {
7722    /// Return values exactly as written to the file. No quote removal or variable expansion
7723    #[builder(setter(into, strip_option), default)]
7724    pub raw: Option<bool>,
7725}
7726impl EnvFile {
7727    /// Return as a file
7728    pub fn as_file(&self) -> File {
7729        let query = self.selection.select("asFile");
7730        File {
7731            proc: self.proc.clone(),
7732            selection: query,
7733            graphql_client: self.graphql_client.clone(),
7734        }
7735    }
7736    /// Check if a variable exists
7737    ///
7738    /// # Arguments
7739    ///
7740    /// * `name` - Variable name
7741    pub async fn exists(&self, name: impl Into<String>) -> Result<bool, DaggerError> {
7742        let mut query = self.selection.select("exists");
7743        query = query.arg("name", name.into());
7744        query.execute(self.graphql_client.clone()).await
7745    }
7746    /// Lookup a variable (last occurrence wins) and return its value, or an empty string
7747    ///
7748    /// # Arguments
7749    ///
7750    /// * `name` - Variable name
7751    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7752    pub async fn get(&self, name: impl Into<String>) -> Result<String, DaggerError> {
7753        let mut query = self.selection.select("get");
7754        query = query.arg("name", name.into());
7755        query.execute(self.graphql_client.clone()).await
7756    }
7757    /// Lookup a variable (last occurrence wins) and return its value, or an empty string
7758    ///
7759    /// # Arguments
7760    ///
7761    /// * `name` - Variable name
7762    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7763    pub async fn get_opts(
7764        &self,
7765        name: impl Into<String>,
7766        opts: EnvFileGetOpts,
7767    ) -> Result<String, DaggerError> {
7768        let mut query = self.selection.select("get");
7769        query = query.arg("name", name.into());
7770        if let Some(raw) = opts.raw {
7771            query = query.arg("raw", raw);
7772        }
7773        query.execute(self.graphql_client.clone()).await
7774    }
7775    /// A unique identifier for this EnvFile.
7776    pub async fn id(&self) -> Result<EnvFileId, DaggerError> {
7777        let query = self.selection.select("id");
7778        query.execute(self.graphql_client.clone()).await
7779    }
7780    /// 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
7781    ///
7782    /// # Arguments
7783    ///
7784    /// * `prefix` - The prefix to filter by
7785    pub fn namespace(&self, prefix: impl Into<String>) -> EnvFile {
7786        let mut query = self.selection.select("namespace");
7787        query = query.arg("prefix", prefix.into());
7788        EnvFile {
7789            proc: self.proc.clone(),
7790            selection: query,
7791            graphql_client: self.graphql_client.clone(),
7792        }
7793    }
7794    /// Return all variables
7795    ///
7796    /// # Arguments
7797    ///
7798    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7799    pub fn variables(&self) -> Vec<EnvVariable> {
7800        let query = self.selection.select("variables");
7801        vec![EnvVariable {
7802            proc: self.proc.clone(),
7803            selection: query,
7804            graphql_client: self.graphql_client.clone(),
7805        }]
7806    }
7807    /// Return all variables
7808    ///
7809    /// # Arguments
7810    ///
7811    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7812    pub fn variables_opts(&self, opts: EnvFileVariablesOpts) -> Vec<EnvVariable> {
7813        let mut query = self.selection.select("variables");
7814        if let Some(raw) = opts.raw {
7815            query = query.arg("raw", raw);
7816        }
7817        vec![EnvVariable {
7818            proc: self.proc.clone(),
7819            selection: query,
7820            graphql_client: self.graphql_client.clone(),
7821        }]
7822    }
7823    /// Add a variable
7824    ///
7825    /// # Arguments
7826    ///
7827    /// * `name` - Variable name
7828    /// * `value` - Variable value
7829    pub fn with_variable(&self, name: impl Into<String>, value: impl Into<String>) -> EnvFile {
7830        let mut query = self.selection.select("withVariable");
7831        query = query.arg("name", name.into());
7832        query = query.arg("value", value.into());
7833        EnvFile {
7834            proc: self.proc.clone(),
7835            selection: query,
7836            graphql_client: self.graphql_client.clone(),
7837        }
7838    }
7839    /// Remove all occurrences of the named variable
7840    ///
7841    /// # Arguments
7842    ///
7843    /// * `name` - Variable name
7844    pub fn without_variable(&self, name: impl Into<String>) -> EnvFile {
7845        let mut query = self.selection.select("withoutVariable");
7846        query = query.arg("name", name.into());
7847        EnvFile {
7848            proc: self.proc.clone(),
7849            selection: query,
7850            graphql_client: self.graphql_client.clone(),
7851        }
7852    }
7853}
7854#[derive(Clone)]
7855pub struct EnvVariable {
7856    pub proc: Option<Arc<DaggerSessionProc>>,
7857    pub selection: Selection,
7858    pub graphql_client: DynGraphQLClient,
7859}
7860impl EnvVariable {
7861    /// A unique identifier for this EnvVariable.
7862    pub async fn id(&self) -> Result<EnvVariableId, DaggerError> {
7863        let query = self.selection.select("id");
7864        query.execute(self.graphql_client.clone()).await
7865    }
7866    /// The environment variable name.
7867    pub async fn name(&self) -> Result<String, DaggerError> {
7868        let query = self.selection.select("name");
7869        query.execute(self.graphql_client.clone()).await
7870    }
7871    /// The environment variable value.
7872    pub async fn value(&self) -> Result<String, DaggerError> {
7873        let query = self.selection.select("value");
7874        query.execute(self.graphql_client.clone()).await
7875    }
7876}
7877#[derive(Clone)]
7878pub struct Error {
7879    pub proc: Option<Arc<DaggerSessionProc>>,
7880    pub selection: Selection,
7881    pub graphql_client: DynGraphQLClient,
7882}
7883impl Error {
7884    /// A unique identifier for this Error.
7885    pub async fn id(&self) -> Result<ErrorId, DaggerError> {
7886        let query = self.selection.select("id");
7887        query.execute(self.graphql_client.clone()).await
7888    }
7889    /// A description of the error.
7890    pub async fn message(&self) -> Result<String, DaggerError> {
7891        let query = self.selection.select("message");
7892        query.execute(self.graphql_client.clone()).await
7893    }
7894    /// The extensions of the error.
7895    pub fn values(&self) -> Vec<ErrorValue> {
7896        let query = self.selection.select("values");
7897        vec![ErrorValue {
7898            proc: self.proc.clone(),
7899            selection: query,
7900            graphql_client: self.graphql_client.clone(),
7901        }]
7902    }
7903    /// Add a value to the error.
7904    ///
7905    /// # Arguments
7906    ///
7907    /// * `name` - The name of the value.
7908    /// * `value` - The value to store on the error.
7909    pub fn with_value(&self, name: impl Into<String>, value: Json) -> Error {
7910        let mut query = self.selection.select("withValue");
7911        query = query.arg("name", name.into());
7912        query = query.arg("value", value);
7913        Error {
7914            proc: self.proc.clone(),
7915            selection: query,
7916            graphql_client: self.graphql_client.clone(),
7917        }
7918    }
7919}
7920#[derive(Clone)]
7921pub struct ErrorValue {
7922    pub proc: Option<Arc<DaggerSessionProc>>,
7923    pub selection: Selection,
7924    pub graphql_client: DynGraphQLClient,
7925}
7926impl ErrorValue {
7927    /// A unique identifier for this ErrorValue.
7928    pub async fn id(&self) -> Result<ErrorValueId, DaggerError> {
7929        let query = self.selection.select("id");
7930        query.execute(self.graphql_client.clone()).await
7931    }
7932    /// The name of the value.
7933    pub async fn name(&self) -> Result<String, DaggerError> {
7934        let query = self.selection.select("name");
7935        query.execute(self.graphql_client.clone()).await
7936    }
7937    /// The value.
7938    pub async fn value(&self) -> Result<Json, DaggerError> {
7939        let query = self.selection.select("value");
7940        query.execute(self.graphql_client.clone()).await
7941    }
7942}
7943#[derive(Clone)]
7944pub struct FieldTypeDef {
7945    pub proc: Option<Arc<DaggerSessionProc>>,
7946    pub selection: Selection,
7947    pub graphql_client: DynGraphQLClient,
7948}
7949impl FieldTypeDef {
7950    /// The reason this enum member is deprecated, if any.
7951    pub async fn deprecated(&self) -> Result<String, DaggerError> {
7952        let query = self.selection.select("deprecated");
7953        query.execute(self.graphql_client.clone()).await
7954    }
7955    /// A doc string for the field, if any.
7956    pub async fn description(&self) -> Result<String, DaggerError> {
7957        let query = self.selection.select("description");
7958        query.execute(self.graphql_client.clone()).await
7959    }
7960    /// A unique identifier for this FieldTypeDef.
7961    pub async fn id(&self) -> Result<FieldTypeDefId, DaggerError> {
7962        let query = self.selection.select("id");
7963        query.execute(self.graphql_client.clone()).await
7964    }
7965    /// The name of the field in lowerCamelCase format.
7966    pub async fn name(&self) -> Result<String, DaggerError> {
7967        let query = self.selection.select("name");
7968        query.execute(self.graphql_client.clone()).await
7969    }
7970    /// The location of this field declaration.
7971    pub fn source_map(&self) -> SourceMap {
7972        let query = self.selection.select("sourceMap");
7973        SourceMap {
7974            proc: self.proc.clone(),
7975            selection: query,
7976            graphql_client: self.graphql_client.clone(),
7977        }
7978    }
7979    /// The type of the field.
7980    pub fn type_def(&self) -> TypeDef {
7981        let query = self.selection.select("typeDef");
7982        TypeDef {
7983            proc: self.proc.clone(),
7984            selection: query,
7985            graphql_client: self.graphql_client.clone(),
7986        }
7987    }
7988}
7989#[derive(Clone)]
7990pub struct File {
7991    pub proc: Option<Arc<DaggerSessionProc>>,
7992    pub selection: Selection,
7993    pub graphql_client: DynGraphQLClient,
7994}
7995#[derive(Builder, Debug, PartialEq)]
7996pub struct FileAsEnvFileOpts {
7997    /// Replace "${VAR}" or "$VAR" with the value of other vars
7998    #[builder(setter(into, strip_option), default)]
7999    pub expand: Option<bool>,
8000}
8001#[derive(Builder, Debug, PartialEq)]
8002pub struct FileContentsOpts {
8003    /// Maximum number of lines to read
8004    #[builder(setter(into, strip_option), default)]
8005    pub limit_lines: Option<isize>,
8006    /// Start reading after this line
8007    #[builder(setter(into, strip_option), default)]
8008    pub offset_lines: Option<isize>,
8009}
8010#[derive(Builder, Debug, PartialEq)]
8011pub struct FileDigestOpts {
8012    /// If true, exclude metadata from the digest.
8013    #[builder(setter(into, strip_option), default)]
8014    pub exclude_metadata: Option<bool>,
8015}
8016#[derive(Builder, Debug, PartialEq)]
8017pub struct FileExportOpts {
8018    /// If allowParentDirPath is true, the path argument can be a directory path, in which case the file will be created in that directory.
8019    #[builder(setter(into, strip_option), default)]
8020    pub allow_parent_dir_path: Option<bool>,
8021}
8022#[derive(Builder, Debug, PartialEq)]
8023pub struct FileSearchOpts<'a> {
8024    /// Allow the . pattern to match newlines in multiline mode.
8025    #[builder(setter(into, strip_option), default)]
8026    pub dotall: Option<bool>,
8027    /// Only return matching files, not lines and content
8028    #[builder(setter(into, strip_option), default)]
8029    pub files_only: Option<bool>,
8030    #[builder(setter(into, strip_option), default)]
8031    pub globs: Option<Vec<&'a str>>,
8032    /// Enable case-insensitive matching.
8033    #[builder(setter(into, strip_option), default)]
8034    pub insensitive: Option<bool>,
8035    /// Limit the number of results to return
8036    #[builder(setter(into, strip_option), default)]
8037    pub limit: Option<isize>,
8038    /// Interpret the pattern as a literal string instead of a regular expression.
8039    #[builder(setter(into, strip_option), default)]
8040    pub literal: Option<bool>,
8041    /// Enable searching across multiple lines.
8042    #[builder(setter(into, strip_option), default)]
8043    pub multiline: Option<bool>,
8044    #[builder(setter(into, strip_option), default)]
8045    pub paths: Option<Vec<&'a str>>,
8046    /// Skip hidden files (files starting with .).
8047    #[builder(setter(into, strip_option), default)]
8048    pub skip_hidden: Option<bool>,
8049    /// Honor .gitignore, .ignore, and .rgignore files.
8050    #[builder(setter(into, strip_option), default)]
8051    pub skip_ignored: Option<bool>,
8052}
8053#[derive(Builder, Debug, PartialEq)]
8054pub struct FileWithReplacedOpts {
8055    /// Replace all occurrences of the pattern.
8056    #[builder(setter(into, strip_option), default)]
8057    pub all: Option<bool>,
8058    /// Replace the first match starting from the specified line.
8059    #[builder(setter(into, strip_option), default)]
8060    pub first_from: Option<isize>,
8061}
8062impl File {
8063    /// Parse as an env file
8064    ///
8065    /// # Arguments
8066    ///
8067    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8068    pub fn as_env_file(&self) -> EnvFile {
8069        let query = self.selection.select("asEnvFile");
8070        EnvFile {
8071            proc: self.proc.clone(),
8072            selection: query,
8073            graphql_client: self.graphql_client.clone(),
8074        }
8075    }
8076    /// Parse as an env file
8077    ///
8078    /// # Arguments
8079    ///
8080    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8081    pub fn as_env_file_opts(&self, opts: FileAsEnvFileOpts) -> EnvFile {
8082        let mut query = self.selection.select("asEnvFile");
8083        if let Some(expand) = opts.expand {
8084            query = query.arg("expand", expand);
8085        }
8086        EnvFile {
8087            proc: self.proc.clone(),
8088            selection: query,
8089            graphql_client: self.graphql_client.clone(),
8090        }
8091    }
8092    /// Parse the file contents as JSON.
8093    pub fn as_json(&self) -> JsonValue {
8094        let query = self.selection.select("asJSON");
8095        JsonValue {
8096            proc: self.proc.clone(),
8097            selection: query,
8098            graphql_client: self.graphql_client.clone(),
8099        }
8100    }
8101    /// Change the owner of the file recursively.
8102    ///
8103    /// # Arguments
8104    ///
8105    /// * `owner` - A user:group to set for the file.
8106    ///
8107    /// The user and group must be an ID (1000:1000), not a name (foo:bar).
8108    ///
8109    /// If the group is omitted, it defaults to the same as the user.
8110    pub fn chown(&self, owner: impl Into<String>) -> File {
8111        let mut query = self.selection.select("chown");
8112        query = query.arg("owner", owner.into());
8113        File {
8114            proc: self.proc.clone(),
8115            selection: query,
8116            graphql_client: self.graphql_client.clone(),
8117        }
8118    }
8119    /// Retrieves the contents of the file.
8120    ///
8121    /// # Arguments
8122    ///
8123    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8124    pub async fn contents(&self) -> Result<String, DaggerError> {
8125        let query = self.selection.select("contents");
8126        query.execute(self.graphql_client.clone()).await
8127    }
8128    /// Retrieves the contents of the file.
8129    ///
8130    /// # Arguments
8131    ///
8132    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8133    pub async fn contents_opts(&self, opts: FileContentsOpts) -> Result<String, DaggerError> {
8134        let mut query = self.selection.select("contents");
8135        if let Some(offset_lines) = opts.offset_lines {
8136            query = query.arg("offsetLines", offset_lines);
8137        }
8138        if let Some(limit_lines) = opts.limit_lines {
8139            query = query.arg("limitLines", limit_lines);
8140        }
8141        query.execute(self.graphql_client.clone()).await
8142    }
8143    /// 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.
8144    ///
8145    /// # Arguments
8146    ///
8147    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8148    pub async fn digest(&self) -> Result<String, DaggerError> {
8149        let query = self.selection.select("digest");
8150        query.execute(self.graphql_client.clone()).await
8151    }
8152    /// 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.
8153    ///
8154    /// # Arguments
8155    ///
8156    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8157    pub async fn digest_opts(&self, opts: FileDigestOpts) -> Result<String, DaggerError> {
8158        let mut query = self.selection.select("digest");
8159        if let Some(exclude_metadata) = opts.exclude_metadata {
8160            query = query.arg("excludeMetadata", exclude_metadata);
8161        }
8162        query.execute(self.graphql_client.clone()).await
8163    }
8164    /// Writes the file to a file path on the host.
8165    ///
8166    /// # Arguments
8167    ///
8168    /// * `path` - Location of the written directory (e.g., "output.txt").
8169    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8170    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
8171        let mut query = self.selection.select("export");
8172        query = query.arg("path", path.into());
8173        query.execute(self.graphql_client.clone()).await
8174    }
8175    /// Writes the file to a file path on the host.
8176    ///
8177    /// # Arguments
8178    ///
8179    /// * `path` - Location of the written directory (e.g., "output.txt").
8180    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8181    pub async fn export_opts(
8182        &self,
8183        path: impl Into<String>,
8184        opts: FileExportOpts,
8185    ) -> Result<String, DaggerError> {
8186        let mut query = self.selection.select("export");
8187        query = query.arg("path", path.into());
8188        if let Some(allow_parent_dir_path) = opts.allow_parent_dir_path {
8189            query = query.arg("allowParentDirPath", allow_parent_dir_path);
8190        }
8191        query.execute(self.graphql_client.clone()).await
8192    }
8193    /// A unique identifier for this File.
8194    pub async fn id(&self) -> Result<FileId, DaggerError> {
8195        let query = self.selection.select("id");
8196        query.execute(self.graphql_client.clone()).await
8197    }
8198    /// Retrieves the name of the file.
8199    pub async fn name(&self) -> Result<String, DaggerError> {
8200        let query = self.selection.select("name");
8201        query.execute(self.graphql_client.clone()).await
8202    }
8203    /// Searches for content matching the given regular expression or literal string.
8204    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
8205    ///
8206    /// # Arguments
8207    ///
8208    /// * `pattern` - The text to match.
8209    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8210    pub fn search(&self, pattern: impl Into<String>) -> Vec<SearchResult> {
8211        let mut query = self.selection.select("search");
8212        query = query.arg("pattern", pattern.into());
8213        vec![SearchResult {
8214            proc: self.proc.clone(),
8215            selection: query,
8216            graphql_client: self.graphql_client.clone(),
8217        }]
8218    }
8219    /// Searches for content matching the given regular expression or literal string.
8220    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
8221    ///
8222    /// # Arguments
8223    ///
8224    /// * `pattern` - The text to match.
8225    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8226    pub fn search_opts<'a>(
8227        &self,
8228        pattern: impl Into<String>,
8229        opts: FileSearchOpts<'a>,
8230    ) -> Vec<SearchResult> {
8231        let mut query = self.selection.select("search");
8232        query = query.arg("pattern", pattern.into());
8233        if let Some(literal) = opts.literal {
8234            query = query.arg("literal", literal);
8235        }
8236        if let Some(multiline) = opts.multiline {
8237            query = query.arg("multiline", multiline);
8238        }
8239        if let Some(dotall) = opts.dotall {
8240            query = query.arg("dotall", dotall);
8241        }
8242        if let Some(insensitive) = opts.insensitive {
8243            query = query.arg("insensitive", insensitive);
8244        }
8245        if let Some(skip_ignored) = opts.skip_ignored {
8246            query = query.arg("skipIgnored", skip_ignored);
8247        }
8248        if let Some(skip_hidden) = opts.skip_hidden {
8249            query = query.arg("skipHidden", skip_hidden);
8250        }
8251        if let Some(files_only) = opts.files_only {
8252            query = query.arg("filesOnly", files_only);
8253        }
8254        if let Some(limit) = opts.limit {
8255            query = query.arg("limit", limit);
8256        }
8257        if let Some(paths) = opts.paths {
8258            query = query.arg("paths", paths);
8259        }
8260        if let Some(globs) = opts.globs {
8261            query = query.arg("globs", globs);
8262        }
8263        vec![SearchResult {
8264            proc: self.proc.clone(),
8265            selection: query,
8266            graphql_client: self.graphql_client.clone(),
8267        }]
8268    }
8269    /// Retrieves the size of the file, in bytes.
8270    pub async fn size(&self) -> Result<isize, DaggerError> {
8271        let query = self.selection.select("size");
8272        query.execute(self.graphql_client.clone()).await
8273    }
8274    /// Force evaluation in the engine.
8275    pub async fn sync(&self) -> Result<FileId, DaggerError> {
8276        let query = self.selection.select("sync");
8277        query.execute(self.graphql_client.clone()).await
8278    }
8279    /// Retrieves this file with its name set to the given name.
8280    ///
8281    /// # Arguments
8282    ///
8283    /// * `name` - Name to set file to.
8284    pub fn with_name(&self, name: impl Into<String>) -> File {
8285        let mut query = self.selection.select("withName");
8286        query = query.arg("name", name.into());
8287        File {
8288            proc: self.proc.clone(),
8289            selection: query,
8290            graphql_client: self.graphql_client.clone(),
8291        }
8292    }
8293    /// Retrieves the file with content replaced with the given text.
8294    /// If 'all' is true, all occurrences of the pattern will be replaced.
8295    /// If 'firstAfter' is specified, only the first match starting at the specified line will be replaced.
8296    /// If neither are specified, and there are multiple matches for the pattern, this will error.
8297    /// If there are no matches for the pattern, this will error.
8298    ///
8299    /// # Arguments
8300    ///
8301    /// * `search` - The text to match.
8302    /// * `replacement` - The text to match.
8303    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8304    pub fn with_replaced(&self, search: impl Into<String>, replacement: impl Into<String>) -> File {
8305        let mut query = self.selection.select("withReplaced");
8306        query = query.arg("search", search.into());
8307        query = query.arg("replacement", replacement.into());
8308        File {
8309            proc: self.proc.clone(),
8310            selection: query,
8311            graphql_client: self.graphql_client.clone(),
8312        }
8313    }
8314    /// Retrieves the file with content replaced with the given text.
8315    /// If 'all' is true, all occurrences of the pattern will be replaced.
8316    /// If 'firstAfter' is specified, only the first match starting at the specified line will be replaced.
8317    /// If neither are specified, and there are multiple matches for the pattern, this will error.
8318    /// If there are no matches for the pattern, this will error.
8319    ///
8320    /// # Arguments
8321    ///
8322    /// * `search` - The text to match.
8323    /// * `replacement` - The text to match.
8324    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8325    pub fn with_replaced_opts(
8326        &self,
8327        search: impl Into<String>,
8328        replacement: impl Into<String>,
8329        opts: FileWithReplacedOpts,
8330    ) -> File {
8331        let mut query = self.selection.select("withReplaced");
8332        query = query.arg("search", search.into());
8333        query = query.arg("replacement", replacement.into());
8334        if let Some(all) = opts.all {
8335            query = query.arg("all", all);
8336        }
8337        if let Some(first_from) = opts.first_from {
8338            query = query.arg("firstFrom", first_from);
8339        }
8340        File {
8341            proc: self.proc.clone(),
8342            selection: query,
8343            graphql_client: self.graphql_client.clone(),
8344        }
8345    }
8346    /// Retrieves this file with its created/modified timestamps set to the given time.
8347    ///
8348    /// # Arguments
8349    ///
8350    /// * `timestamp` - Timestamp to set dir/files in.
8351    ///
8352    /// Formatted in seconds following Unix epoch (e.g., 1672531199).
8353    pub fn with_timestamps(&self, timestamp: isize) -> File {
8354        let mut query = self.selection.select("withTimestamps");
8355        query = query.arg("timestamp", timestamp);
8356        File {
8357            proc: self.proc.clone(),
8358            selection: query,
8359            graphql_client: self.graphql_client.clone(),
8360        }
8361    }
8362}
8363#[derive(Clone)]
8364pub struct Function {
8365    pub proc: Option<Arc<DaggerSessionProc>>,
8366    pub selection: Selection,
8367    pub graphql_client: DynGraphQLClient,
8368}
8369#[derive(Builder, Debug, PartialEq)]
8370pub struct FunctionWithArgOpts<'a> {
8371    /// If the argument is a Directory or File type, default to load path from context directory, relative to root directory.
8372    #[builder(setter(into, strip_option), default)]
8373    pub default_path: Option<&'a str>,
8374    /// A default value to use for this argument if not explicitly set by the caller, if any
8375    #[builder(setter(into, strip_option), default)]
8376    pub default_value: Option<Json>,
8377    /// If deprecated, the reason or migration path.
8378    #[builder(setter(into, strip_option), default)]
8379    pub deprecated: Option<&'a str>,
8380    /// A doc string for the argument, if any
8381    #[builder(setter(into, strip_option), default)]
8382    pub description: Option<&'a str>,
8383    /// Patterns to ignore when loading the contextual argument value.
8384    #[builder(setter(into, strip_option), default)]
8385    pub ignore: Option<Vec<&'a str>>,
8386    /// The source map for the argument definition.
8387    #[builder(setter(into, strip_option), default)]
8388    pub source_map: Option<SourceMapId>,
8389}
8390#[derive(Builder, Debug, PartialEq)]
8391pub struct FunctionWithCachePolicyOpts<'a> {
8392    /// The TTL for the cache policy, if applicable. Provided as a duration string, e.g. "5m", "1h30s".
8393    #[builder(setter(into, strip_option), default)]
8394    pub time_to_live: Option<&'a str>,
8395}
8396#[derive(Builder, Debug, PartialEq)]
8397pub struct FunctionWithDeprecatedOpts<'a> {
8398    /// Reason or migration path describing the deprecation.
8399    #[builder(setter(into, strip_option), default)]
8400    pub reason: Option<&'a str>,
8401}
8402impl Function {
8403    /// Arguments accepted by the function, if any.
8404    pub fn args(&self) -> Vec<FunctionArg> {
8405        let query = self.selection.select("args");
8406        vec![FunctionArg {
8407            proc: self.proc.clone(),
8408            selection: query,
8409            graphql_client: self.graphql_client.clone(),
8410        }]
8411    }
8412    /// The reason this function is deprecated, if any.
8413    pub async fn deprecated(&self) -> Result<String, DaggerError> {
8414        let query = self.selection.select("deprecated");
8415        query.execute(self.graphql_client.clone()).await
8416    }
8417    /// A doc string for the function, if any.
8418    pub async fn description(&self) -> Result<String, DaggerError> {
8419        let query = self.selection.select("description");
8420        query.execute(self.graphql_client.clone()).await
8421    }
8422    /// A unique identifier for this Function.
8423    pub async fn id(&self) -> Result<FunctionId, DaggerError> {
8424        let query = self.selection.select("id");
8425        query.execute(self.graphql_client.clone()).await
8426    }
8427    /// The name of the function.
8428    pub async fn name(&self) -> Result<String, DaggerError> {
8429        let query = self.selection.select("name");
8430        query.execute(self.graphql_client.clone()).await
8431    }
8432    /// The type returned by the function.
8433    pub fn return_type(&self) -> TypeDef {
8434        let query = self.selection.select("returnType");
8435        TypeDef {
8436            proc: self.proc.clone(),
8437            selection: query,
8438            graphql_client: self.graphql_client.clone(),
8439        }
8440    }
8441    /// The location of this function declaration.
8442    pub fn source_map(&self) -> SourceMap {
8443        let query = self.selection.select("sourceMap");
8444        SourceMap {
8445            proc: self.proc.clone(),
8446            selection: query,
8447            graphql_client: self.graphql_client.clone(),
8448        }
8449    }
8450    /// Returns the function with the provided argument
8451    ///
8452    /// # Arguments
8453    ///
8454    /// * `name` - The name of the argument
8455    /// * `type_def` - The type of the argument
8456    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8457    pub fn with_arg(&self, name: impl Into<String>, type_def: impl IntoID<TypeDefId>) -> Function {
8458        let mut query = self.selection.select("withArg");
8459        query = query.arg("name", name.into());
8460        query = query.arg_lazy(
8461            "typeDef",
8462            Box::new(move || {
8463                let type_def = type_def.clone();
8464                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
8465            }),
8466        );
8467        Function {
8468            proc: self.proc.clone(),
8469            selection: query,
8470            graphql_client: self.graphql_client.clone(),
8471        }
8472    }
8473    /// Returns the function with the provided argument
8474    ///
8475    /// # Arguments
8476    ///
8477    /// * `name` - The name of the argument
8478    /// * `type_def` - The type of the argument
8479    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8480    pub fn with_arg_opts<'a>(
8481        &self,
8482        name: impl Into<String>,
8483        type_def: impl IntoID<TypeDefId>,
8484        opts: FunctionWithArgOpts<'a>,
8485    ) -> Function {
8486        let mut query = self.selection.select("withArg");
8487        query = query.arg("name", name.into());
8488        query = query.arg_lazy(
8489            "typeDef",
8490            Box::new(move || {
8491                let type_def = type_def.clone();
8492                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
8493            }),
8494        );
8495        if let Some(description) = opts.description {
8496            query = query.arg("description", description);
8497        }
8498        if let Some(default_value) = opts.default_value {
8499            query = query.arg("defaultValue", default_value);
8500        }
8501        if let Some(default_path) = opts.default_path {
8502            query = query.arg("defaultPath", default_path);
8503        }
8504        if let Some(ignore) = opts.ignore {
8505            query = query.arg("ignore", ignore);
8506        }
8507        if let Some(source_map) = opts.source_map {
8508            query = query.arg("sourceMap", source_map);
8509        }
8510        if let Some(deprecated) = opts.deprecated {
8511            query = query.arg("deprecated", deprecated);
8512        }
8513        Function {
8514            proc: self.proc.clone(),
8515            selection: query,
8516            graphql_client: self.graphql_client.clone(),
8517        }
8518    }
8519    /// Returns the function updated to use the provided cache policy.
8520    ///
8521    /// # Arguments
8522    ///
8523    /// * `policy` - The cache policy to use.
8524    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8525    pub fn with_cache_policy(&self, policy: FunctionCachePolicy) -> Function {
8526        let mut query = self.selection.select("withCachePolicy");
8527        query = query.arg("policy", policy);
8528        Function {
8529            proc: self.proc.clone(),
8530            selection: query,
8531            graphql_client: self.graphql_client.clone(),
8532        }
8533    }
8534    /// Returns the function updated to use the provided cache policy.
8535    ///
8536    /// # Arguments
8537    ///
8538    /// * `policy` - The cache policy to use.
8539    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8540    pub fn with_cache_policy_opts<'a>(
8541        &self,
8542        policy: FunctionCachePolicy,
8543        opts: FunctionWithCachePolicyOpts<'a>,
8544    ) -> Function {
8545        let mut query = self.selection.select("withCachePolicy");
8546        query = query.arg("policy", policy);
8547        if let Some(time_to_live) = opts.time_to_live {
8548            query = query.arg("timeToLive", time_to_live);
8549        }
8550        Function {
8551            proc: self.proc.clone(),
8552            selection: query,
8553            graphql_client: self.graphql_client.clone(),
8554        }
8555    }
8556    /// Returns the function with a flag indicating it's a check.
8557    pub fn with_check(&self) -> Function {
8558        let query = self.selection.select("withCheck");
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 provided deprecation reason.
8566    ///
8567    /// # Arguments
8568    ///
8569    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8570    pub fn with_deprecated(&self) -> Function {
8571        let query = self.selection.select("withDeprecated");
8572        Function {
8573            proc: self.proc.clone(),
8574            selection: query,
8575            graphql_client: self.graphql_client.clone(),
8576        }
8577    }
8578    /// Returns the function with the provided deprecation reason.
8579    ///
8580    /// # Arguments
8581    ///
8582    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8583    pub fn with_deprecated_opts<'a>(&self, opts: FunctionWithDeprecatedOpts<'a>) -> Function {
8584        let mut query = self.selection.select("withDeprecated");
8585        if let Some(reason) = opts.reason {
8586            query = query.arg("reason", reason);
8587        }
8588        Function {
8589            proc: self.proc.clone(),
8590            selection: query,
8591            graphql_client: self.graphql_client.clone(),
8592        }
8593    }
8594    /// Returns the function with the given doc string.
8595    ///
8596    /// # Arguments
8597    ///
8598    /// * `description` - The doc string to set.
8599    pub fn with_description(&self, description: impl Into<String>) -> Function {
8600        let mut query = self.selection.select("withDescription");
8601        query = query.arg("description", description.into());
8602        Function {
8603            proc: self.proc.clone(),
8604            selection: query,
8605            graphql_client: self.graphql_client.clone(),
8606        }
8607    }
8608    /// Returns the function with the given source map.
8609    ///
8610    /// # Arguments
8611    ///
8612    /// * `source_map` - The source map for the function definition.
8613    pub fn with_source_map(&self, source_map: impl IntoID<SourceMapId>) -> Function {
8614        let mut query = self.selection.select("withSourceMap");
8615        query = query.arg_lazy(
8616            "sourceMap",
8617            Box::new(move || {
8618                let source_map = source_map.clone();
8619                Box::pin(async move { source_map.into_id().await.unwrap().quote() })
8620            }),
8621        );
8622        Function {
8623            proc: self.proc.clone(),
8624            selection: query,
8625            graphql_client: self.graphql_client.clone(),
8626        }
8627    }
8628}
8629#[derive(Clone)]
8630pub struct FunctionArg {
8631    pub proc: Option<Arc<DaggerSessionProc>>,
8632    pub selection: Selection,
8633    pub graphql_client: DynGraphQLClient,
8634}
8635impl FunctionArg {
8636    /// 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
8637    pub async fn default_path(&self) -> Result<String, DaggerError> {
8638        let query = self.selection.select("defaultPath");
8639        query.execute(self.graphql_client.clone()).await
8640    }
8641    /// A default value to use for this argument when not explicitly set by the caller, if any.
8642    pub async fn default_value(&self) -> Result<Json, DaggerError> {
8643        let query = self.selection.select("defaultValue");
8644        query.execute(self.graphql_client.clone()).await
8645    }
8646    /// The reason this function is deprecated, if any.
8647    pub async fn deprecated(&self) -> Result<String, DaggerError> {
8648        let query = self.selection.select("deprecated");
8649        query.execute(self.graphql_client.clone()).await
8650    }
8651    /// A doc string for the argument, if any.
8652    pub async fn description(&self) -> Result<String, DaggerError> {
8653        let query = self.selection.select("description");
8654        query.execute(self.graphql_client.clone()).await
8655    }
8656    /// A unique identifier for this FunctionArg.
8657    pub async fn id(&self) -> Result<FunctionArgId, DaggerError> {
8658        let query = self.selection.select("id");
8659        query.execute(self.graphql_client.clone()).await
8660    }
8661    /// 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.
8662    pub async fn ignore(&self) -> Result<Vec<String>, DaggerError> {
8663        let query = self.selection.select("ignore");
8664        query.execute(self.graphql_client.clone()).await
8665    }
8666    /// The name of the argument in lowerCamelCase format.
8667    pub async fn name(&self) -> Result<String, DaggerError> {
8668        let query = self.selection.select("name");
8669        query.execute(self.graphql_client.clone()).await
8670    }
8671    /// The location of this arg declaration.
8672    pub fn source_map(&self) -> SourceMap {
8673        let query = self.selection.select("sourceMap");
8674        SourceMap {
8675            proc: self.proc.clone(),
8676            selection: query,
8677            graphql_client: self.graphql_client.clone(),
8678        }
8679    }
8680    /// The type of the argument.
8681    pub fn type_def(&self) -> TypeDef {
8682        let query = self.selection.select("typeDef");
8683        TypeDef {
8684            proc: self.proc.clone(),
8685            selection: query,
8686            graphql_client: self.graphql_client.clone(),
8687        }
8688    }
8689}
8690#[derive(Clone)]
8691pub struct FunctionCall {
8692    pub proc: Option<Arc<DaggerSessionProc>>,
8693    pub selection: Selection,
8694    pub graphql_client: DynGraphQLClient,
8695}
8696impl FunctionCall {
8697    /// A unique identifier for this FunctionCall.
8698    pub async fn id(&self) -> Result<FunctionCallId, DaggerError> {
8699        let query = self.selection.select("id");
8700        query.execute(self.graphql_client.clone()).await
8701    }
8702    /// The argument values the function is being invoked with.
8703    pub fn input_args(&self) -> Vec<FunctionCallArgValue> {
8704        let query = self.selection.select("inputArgs");
8705        vec![FunctionCallArgValue {
8706            proc: self.proc.clone(),
8707            selection: query,
8708            graphql_client: self.graphql_client.clone(),
8709        }]
8710    }
8711    /// The name of the function being called.
8712    pub async fn name(&self) -> Result<String, DaggerError> {
8713        let query = self.selection.select("name");
8714        query.execute(self.graphql_client.clone()).await
8715    }
8716    /// 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.
8717    pub async fn parent(&self) -> Result<Json, DaggerError> {
8718        let query = self.selection.select("parent");
8719        query.execute(self.graphql_client.clone()).await
8720    }
8721    /// 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.
8722    pub async fn parent_name(&self) -> Result<String, DaggerError> {
8723        let query = self.selection.select("parentName");
8724        query.execute(self.graphql_client.clone()).await
8725    }
8726    /// Return an error from the function.
8727    ///
8728    /// # Arguments
8729    ///
8730    /// * `error` - The error to return.
8731    pub async fn return_error(&self, error: impl IntoID<ErrorId>) -> Result<Void, DaggerError> {
8732        let mut query = self.selection.select("returnError");
8733        query = query.arg_lazy(
8734            "error",
8735            Box::new(move || {
8736                let error = error.clone();
8737                Box::pin(async move { error.into_id().await.unwrap().quote() })
8738            }),
8739        );
8740        query.execute(self.graphql_client.clone()).await
8741    }
8742    /// Set the return value of the function call to the provided value.
8743    ///
8744    /// # Arguments
8745    ///
8746    /// * `value` - JSON serialization of the return value.
8747    pub async fn return_value(&self, value: Json) -> Result<Void, DaggerError> {
8748        let mut query = self.selection.select("returnValue");
8749        query = query.arg("value", value);
8750        query.execute(self.graphql_client.clone()).await
8751    }
8752}
8753#[derive(Clone)]
8754pub struct FunctionCallArgValue {
8755    pub proc: Option<Arc<DaggerSessionProc>>,
8756    pub selection: Selection,
8757    pub graphql_client: DynGraphQLClient,
8758}
8759impl FunctionCallArgValue {
8760    /// A unique identifier for this FunctionCallArgValue.
8761    pub async fn id(&self) -> Result<FunctionCallArgValueId, DaggerError> {
8762        let query = self.selection.select("id");
8763        query.execute(self.graphql_client.clone()).await
8764    }
8765    /// The name of the argument.
8766    pub async fn name(&self) -> Result<String, DaggerError> {
8767        let query = self.selection.select("name");
8768        query.execute(self.graphql_client.clone()).await
8769    }
8770    /// The value of the argument represented as a JSON serialized string.
8771    pub async fn value(&self) -> Result<Json, DaggerError> {
8772        let query = self.selection.select("value");
8773        query.execute(self.graphql_client.clone()).await
8774    }
8775}
8776#[derive(Clone)]
8777pub struct GeneratedCode {
8778    pub proc: Option<Arc<DaggerSessionProc>>,
8779    pub selection: Selection,
8780    pub graphql_client: DynGraphQLClient,
8781}
8782impl GeneratedCode {
8783    /// The directory containing the generated code.
8784    pub fn code(&self) -> Directory {
8785        let query = self.selection.select("code");
8786        Directory {
8787            proc: self.proc.clone(),
8788            selection: query,
8789            graphql_client: self.graphql_client.clone(),
8790        }
8791    }
8792    /// A unique identifier for this GeneratedCode.
8793    pub async fn id(&self) -> Result<GeneratedCodeId, DaggerError> {
8794        let query = self.selection.select("id");
8795        query.execute(self.graphql_client.clone()).await
8796    }
8797    /// List of paths to mark generated in version control (i.e. .gitattributes).
8798    pub async fn vcs_generated_paths(&self) -> Result<Vec<String>, DaggerError> {
8799        let query = self.selection.select("vcsGeneratedPaths");
8800        query.execute(self.graphql_client.clone()).await
8801    }
8802    /// List of paths to ignore in version control (i.e. .gitignore).
8803    pub async fn vcs_ignored_paths(&self) -> Result<Vec<String>, DaggerError> {
8804        let query = self.selection.select("vcsIgnoredPaths");
8805        query.execute(self.graphql_client.clone()).await
8806    }
8807    /// Set the list of paths to mark generated in version control.
8808    pub fn with_vcs_generated_paths(&self, paths: Vec<impl Into<String>>) -> GeneratedCode {
8809        let mut query = self.selection.select("withVCSGeneratedPaths");
8810        query = query.arg(
8811            "paths",
8812            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
8813        );
8814        GeneratedCode {
8815            proc: self.proc.clone(),
8816            selection: query,
8817            graphql_client: self.graphql_client.clone(),
8818        }
8819    }
8820    /// Set the list of paths to ignore in version control.
8821    pub fn with_vcs_ignored_paths(&self, paths: Vec<impl Into<String>>) -> GeneratedCode {
8822        let mut query = self.selection.select("withVCSIgnoredPaths");
8823        query = query.arg(
8824            "paths",
8825            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
8826        );
8827        GeneratedCode {
8828            proc: self.proc.clone(),
8829            selection: query,
8830            graphql_client: self.graphql_client.clone(),
8831        }
8832    }
8833}
8834#[derive(Clone)]
8835pub struct GitRef {
8836    pub proc: Option<Arc<DaggerSessionProc>>,
8837    pub selection: Selection,
8838    pub graphql_client: DynGraphQLClient,
8839}
8840#[derive(Builder, Debug, PartialEq)]
8841pub struct GitRefTreeOpts {
8842    /// The depth of the tree to fetch.
8843    #[builder(setter(into, strip_option), default)]
8844    pub depth: Option<isize>,
8845    /// Set to true to discard .git directory.
8846    #[builder(setter(into, strip_option), default)]
8847    pub discard_git_dir: Option<bool>,
8848}
8849impl GitRef {
8850    /// The resolved commit id at this ref.
8851    pub async fn commit(&self) -> Result<String, DaggerError> {
8852        let query = self.selection.select("commit");
8853        query.execute(self.graphql_client.clone()).await
8854    }
8855    /// Find the best common ancestor between this ref and another ref.
8856    ///
8857    /// # Arguments
8858    ///
8859    /// * `other` - The other ref to compare against.
8860    pub fn common_ancestor(&self, other: impl IntoID<GitRefId>) -> GitRef {
8861        let mut query = self.selection.select("commonAncestor");
8862        query = query.arg_lazy(
8863            "other",
8864            Box::new(move || {
8865                let other = other.clone();
8866                Box::pin(async move { other.into_id().await.unwrap().quote() })
8867            }),
8868        );
8869        GitRef {
8870            proc: self.proc.clone(),
8871            selection: query,
8872            graphql_client: self.graphql_client.clone(),
8873        }
8874    }
8875    /// A unique identifier for this GitRef.
8876    pub async fn id(&self) -> Result<GitRefId, DaggerError> {
8877        let query = self.selection.select("id");
8878        query.execute(self.graphql_client.clone()).await
8879    }
8880    /// The resolved ref name at this ref.
8881    pub async fn r#ref(&self) -> Result<String, DaggerError> {
8882        let query = self.selection.select("ref");
8883        query.execute(self.graphql_client.clone()).await
8884    }
8885    /// The filesystem tree at this ref.
8886    ///
8887    /// # Arguments
8888    ///
8889    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8890    pub fn tree(&self) -> Directory {
8891        let query = self.selection.select("tree");
8892        Directory {
8893            proc: self.proc.clone(),
8894            selection: query,
8895            graphql_client: self.graphql_client.clone(),
8896        }
8897    }
8898    /// The filesystem tree at this ref.
8899    ///
8900    /// # Arguments
8901    ///
8902    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8903    pub fn tree_opts(&self, opts: GitRefTreeOpts) -> Directory {
8904        let mut query = self.selection.select("tree");
8905        if let Some(discard_git_dir) = opts.discard_git_dir {
8906            query = query.arg("discardGitDir", discard_git_dir);
8907        }
8908        if let Some(depth) = opts.depth {
8909            query = query.arg("depth", depth);
8910        }
8911        Directory {
8912            proc: self.proc.clone(),
8913            selection: query,
8914            graphql_client: self.graphql_client.clone(),
8915        }
8916    }
8917}
8918#[derive(Clone)]
8919pub struct GitRepository {
8920    pub proc: Option<Arc<DaggerSessionProc>>,
8921    pub selection: Selection,
8922    pub graphql_client: DynGraphQLClient,
8923}
8924#[derive(Builder, Debug, PartialEq)]
8925pub struct GitRepositoryBranchesOpts<'a> {
8926    /// Glob patterns (e.g., "refs/tags/v*").
8927    #[builder(setter(into, strip_option), default)]
8928    pub patterns: Option<Vec<&'a str>>,
8929}
8930#[derive(Builder, Debug, PartialEq)]
8931pub struct GitRepositoryTagsOpts<'a> {
8932    /// Glob patterns (e.g., "refs/tags/v*").
8933    #[builder(setter(into, strip_option), default)]
8934    pub patterns: Option<Vec<&'a str>>,
8935}
8936impl GitRepository {
8937    /// Returns details of a branch.
8938    ///
8939    /// # Arguments
8940    ///
8941    /// * `name` - Branch's name (e.g., "main").
8942    pub fn branch(&self, name: impl Into<String>) -> GitRef {
8943        let mut query = self.selection.select("branch");
8944        query = query.arg("name", name.into());
8945        GitRef {
8946            proc: self.proc.clone(),
8947            selection: query,
8948            graphql_client: self.graphql_client.clone(),
8949        }
8950    }
8951    /// branches that match any of the given glob patterns.
8952    ///
8953    /// # Arguments
8954    ///
8955    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8956    pub async fn branches(&self) -> Result<Vec<String>, DaggerError> {
8957        let query = self.selection.select("branches");
8958        query.execute(self.graphql_client.clone()).await
8959    }
8960    /// branches that match any of the given glob patterns.
8961    ///
8962    /// # Arguments
8963    ///
8964    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8965    pub async fn branches_opts<'a>(
8966        &self,
8967        opts: GitRepositoryBranchesOpts<'a>,
8968    ) -> Result<Vec<String>, DaggerError> {
8969        let mut query = self.selection.select("branches");
8970        if let Some(patterns) = opts.patterns {
8971            query = query.arg("patterns", patterns);
8972        }
8973        query.execute(self.graphql_client.clone()).await
8974    }
8975    /// Returns details of a commit.
8976    ///
8977    /// # Arguments
8978    ///
8979    /// * `id` - Identifier of the commit (e.g., "b6315d8f2810962c601af73f86831f6866ea798b").
8980    pub fn commit(&self, id: impl Into<String>) -> GitRef {
8981        let mut query = self.selection.select("commit");
8982        query = query.arg("id", id.into());
8983        GitRef {
8984            proc: self.proc.clone(),
8985            selection: query,
8986            graphql_client: self.graphql_client.clone(),
8987        }
8988    }
8989    /// Returns details for HEAD.
8990    pub fn head(&self) -> GitRef {
8991        let query = self.selection.select("head");
8992        GitRef {
8993            proc: self.proc.clone(),
8994            selection: query,
8995            graphql_client: self.graphql_client.clone(),
8996        }
8997    }
8998    /// A unique identifier for this GitRepository.
8999    pub async fn id(&self) -> Result<GitRepositoryId, DaggerError> {
9000        let query = self.selection.select("id");
9001        query.execute(self.graphql_client.clone()).await
9002    }
9003    /// Returns details for the latest semver tag.
9004    pub fn latest_version(&self) -> GitRef {
9005        let query = self.selection.select("latestVersion");
9006        GitRef {
9007            proc: self.proc.clone(),
9008            selection: query,
9009            graphql_client: self.graphql_client.clone(),
9010        }
9011    }
9012    /// Returns details of a ref.
9013    ///
9014    /// # Arguments
9015    ///
9016    /// * `name` - Ref's name (can be a commit identifier, a tag name, a branch name, or a fully-qualified ref).
9017    pub fn r#ref(&self, name: impl Into<String>) -> GitRef {
9018        let mut query = self.selection.select("ref");
9019        query = query.arg("name", name.into());
9020        GitRef {
9021            proc: self.proc.clone(),
9022            selection: query,
9023            graphql_client: self.graphql_client.clone(),
9024        }
9025    }
9026    /// Returns details of a tag.
9027    ///
9028    /// # Arguments
9029    ///
9030    /// * `name` - Tag's name (e.g., "v0.3.9").
9031    pub fn tag(&self, name: impl Into<String>) -> GitRef {
9032        let mut query = self.selection.select("tag");
9033        query = query.arg("name", name.into());
9034        GitRef {
9035            proc: self.proc.clone(),
9036            selection: query,
9037            graphql_client: self.graphql_client.clone(),
9038        }
9039    }
9040    /// tags that match any of the given glob patterns.
9041    ///
9042    /// # Arguments
9043    ///
9044    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9045    pub async fn tags(&self) -> Result<Vec<String>, DaggerError> {
9046        let query = self.selection.select("tags");
9047        query.execute(self.graphql_client.clone()).await
9048    }
9049    /// tags that match any of the given glob patterns.
9050    ///
9051    /// # Arguments
9052    ///
9053    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9054    pub async fn tags_opts<'a>(
9055        &self,
9056        opts: GitRepositoryTagsOpts<'a>,
9057    ) -> Result<Vec<String>, DaggerError> {
9058        let mut query = self.selection.select("tags");
9059        if let Some(patterns) = opts.patterns {
9060            query = query.arg("patterns", patterns);
9061        }
9062        query.execute(self.graphql_client.clone()).await
9063    }
9064    /// Returns the changeset of uncommitted changes in the git repository.
9065    pub fn uncommitted(&self) -> Changeset {
9066        let query = self.selection.select("uncommitted");
9067        Changeset {
9068            proc: self.proc.clone(),
9069            selection: query,
9070            graphql_client: self.graphql_client.clone(),
9071        }
9072    }
9073    /// The URL of the git repository.
9074    pub async fn url(&self) -> Result<String, DaggerError> {
9075        let query = self.selection.select("url");
9076        query.execute(self.graphql_client.clone()).await
9077    }
9078}
9079#[derive(Clone)]
9080pub struct Host {
9081    pub proc: Option<Arc<DaggerSessionProc>>,
9082    pub selection: Selection,
9083    pub graphql_client: DynGraphQLClient,
9084}
9085#[derive(Builder, Debug, PartialEq)]
9086pub struct HostDirectoryOpts<'a> {
9087    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
9088    #[builder(setter(into, strip_option), default)]
9089    pub exclude: Option<Vec<&'a str>>,
9090    /// Apply .gitignore filter rules inside the directory
9091    #[builder(setter(into, strip_option), default)]
9092    pub gitignore: Option<bool>,
9093    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
9094    #[builder(setter(into, strip_option), default)]
9095    pub include: Option<Vec<&'a str>>,
9096    /// If true, the directory will always be reloaded from the host.
9097    #[builder(setter(into, strip_option), default)]
9098    pub no_cache: Option<bool>,
9099}
9100#[derive(Builder, Debug, PartialEq)]
9101pub struct HostFileOpts {
9102    /// If true, the file will always be reloaded from the host.
9103    #[builder(setter(into, strip_option), default)]
9104    pub no_cache: Option<bool>,
9105}
9106#[derive(Builder, Debug, PartialEq)]
9107pub struct HostFindUpOpts {
9108    #[builder(setter(into, strip_option), default)]
9109    pub no_cache: Option<bool>,
9110}
9111#[derive(Builder, Debug, PartialEq)]
9112pub struct HostServiceOpts<'a> {
9113    /// Upstream host to forward traffic to.
9114    #[builder(setter(into, strip_option), default)]
9115    pub host: Option<&'a str>,
9116}
9117#[derive(Builder, Debug, PartialEq)]
9118pub struct HostTunnelOpts {
9119    /// Map each service port to the same port on the host, as if the service were running natively.
9120    /// Note: enabling may result in port conflicts.
9121    #[builder(setter(into, strip_option), default)]
9122    pub native: Option<bool>,
9123    /// Configure explicit port forwarding rules for the tunnel.
9124    /// If a port's frontend is unspecified or 0, a random port will be chosen by the host.
9125    /// 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.
9126    /// If ports are given and native is true, the ports are additive.
9127    #[builder(setter(into, strip_option), default)]
9128    pub ports: Option<Vec<PortForward>>,
9129}
9130impl Host {
9131    /// Accesses a container image on the host.
9132    ///
9133    /// # Arguments
9134    ///
9135    /// * `name` - Name of the image to access.
9136    pub fn container_image(&self, name: impl Into<String>) -> Container {
9137        let mut query = self.selection.select("containerImage");
9138        query = query.arg("name", name.into());
9139        Container {
9140            proc: self.proc.clone(),
9141            selection: query,
9142            graphql_client: self.graphql_client.clone(),
9143        }
9144    }
9145    /// Accesses a directory on the host.
9146    ///
9147    /// # Arguments
9148    ///
9149    /// * `path` - Location of the directory to access (e.g., ".").
9150    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9151    pub fn directory(&self, path: impl Into<String>) -> Directory {
9152        let mut query = self.selection.select("directory");
9153        query = query.arg("path", path.into());
9154        Directory {
9155            proc: self.proc.clone(),
9156            selection: query,
9157            graphql_client: self.graphql_client.clone(),
9158        }
9159    }
9160    /// Accesses a directory on the host.
9161    ///
9162    /// # Arguments
9163    ///
9164    /// * `path` - Location of the directory to access (e.g., ".").
9165    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9166    pub fn directory_opts<'a>(
9167        &self,
9168        path: impl Into<String>,
9169        opts: HostDirectoryOpts<'a>,
9170    ) -> Directory {
9171        let mut query = self.selection.select("directory");
9172        query = query.arg("path", path.into());
9173        if let Some(exclude) = opts.exclude {
9174            query = query.arg("exclude", exclude);
9175        }
9176        if let Some(include) = opts.include {
9177            query = query.arg("include", include);
9178        }
9179        if let Some(no_cache) = opts.no_cache {
9180            query = query.arg("noCache", no_cache);
9181        }
9182        if let Some(gitignore) = opts.gitignore {
9183            query = query.arg("gitignore", gitignore);
9184        }
9185        Directory {
9186            proc: self.proc.clone(),
9187            selection: query,
9188            graphql_client: self.graphql_client.clone(),
9189        }
9190    }
9191    /// Accesses a file on the host.
9192    ///
9193    /// # Arguments
9194    ///
9195    /// * `path` - Location of the file to retrieve (e.g., "README.md").
9196    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9197    pub fn file(&self, path: impl Into<String>) -> File {
9198        let mut query = self.selection.select("file");
9199        query = query.arg("path", path.into());
9200        File {
9201            proc: self.proc.clone(),
9202            selection: query,
9203            graphql_client: self.graphql_client.clone(),
9204        }
9205    }
9206    /// Accesses a file on the host.
9207    ///
9208    /// # Arguments
9209    ///
9210    /// * `path` - Location of the file to retrieve (e.g., "README.md").
9211    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9212    pub fn file_opts(&self, path: impl Into<String>, opts: HostFileOpts) -> File {
9213        let mut query = self.selection.select("file");
9214        query = query.arg("path", path.into());
9215        if let Some(no_cache) = opts.no_cache {
9216            query = query.arg("noCache", no_cache);
9217        }
9218        File {
9219            proc: self.proc.clone(),
9220            selection: query,
9221            graphql_client: self.graphql_client.clone(),
9222        }
9223    }
9224    /// Search for a file or directory by walking up the tree from system workdir. Return its relative path. If no match, return null
9225    ///
9226    /// # Arguments
9227    ///
9228    /// * `name` - name of the file or directory to search for
9229    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9230    pub async fn find_up(&self, name: impl Into<String>) -> Result<String, DaggerError> {
9231        let mut query = self.selection.select("findUp");
9232        query = query.arg("name", name.into());
9233        query.execute(self.graphql_client.clone()).await
9234    }
9235    /// Search for a file or directory by walking up the tree from system workdir. Return its relative path. If no match, return null
9236    ///
9237    /// # Arguments
9238    ///
9239    /// * `name` - name of the file or directory to search for
9240    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9241    pub async fn find_up_opts(
9242        &self,
9243        name: impl Into<String>,
9244        opts: HostFindUpOpts,
9245    ) -> Result<String, DaggerError> {
9246        let mut query = self.selection.select("findUp");
9247        query = query.arg("name", name.into());
9248        if let Some(no_cache) = opts.no_cache {
9249            query = query.arg("noCache", no_cache);
9250        }
9251        query.execute(self.graphql_client.clone()).await
9252    }
9253    /// A unique identifier for this Host.
9254    pub async fn id(&self) -> Result<HostId, DaggerError> {
9255        let query = self.selection.select("id");
9256        query.execute(self.graphql_client.clone()).await
9257    }
9258    /// Creates a service that forwards traffic to a specified address via the host.
9259    ///
9260    /// # Arguments
9261    ///
9262    /// * `ports` - Ports to expose via the service, forwarding through the host network.
9263    ///
9264    /// If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
9265    ///
9266    /// An empty set of ports is not valid; an error will be returned.
9267    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9268    pub fn service(&self, ports: Vec<PortForward>) -> Service {
9269        let mut query = self.selection.select("service");
9270        query = query.arg("ports", ports);
9271        Service {
9272            proc: self.proc.clone(),
9273            selection: query,
9274            graphql_client: self.graphql_client.clone(),
9275        }
9276    }
9277    /// Creates a service that forwards traffic to a specified address via the host.
9278    ///
9279    /// # Arguments
9280    ///
9281    /// * `ports` - Ports to expose via the service, forwarding through the host network.
9282    ///
9283    /// If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
9284    ///
9285    /// An empty set of ports is not valid; an error will be returned.
9286    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9287    pub fn service_opts<'a>(&self, ports: Vec<PortForward>, opts: HostServiceOpts<'a>) -> Service {
9288        let mut query = self.selection.select("service");
9289        query = query.arg("ports", ports);
9290        if let Some(host) = opts.host {
9291            query = query.arg("host", host);
9292        }
9293        Service {
9294            proc: self.proc.clone(),
9295            selection: query,
9296            graphql_client: self.graphql_client.clone(),
9297        }
9298    }
9299    /// Creates a tunnel that forwards traffic from the host to a service.
9300    ///
9301    /// # Arguments
9302    ///
9303    /// * `service` - Service to send traffic from the tunnel.
9304    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9305    pub fn tunnel(&self, service: impl IntoID<ServiceId>) -> Service {
9306        let mut query = self.selection.select("tunnel");
9307        query = query.arg_lazy(
9308            "service",
9309            Box::new(move || {
9310                let service = service.clone();
9311                Box::pin(async move { service.into_id().await.unwrap().quote() })
9312            }),
9313        );
9314        Service {
9315            proc: self.proc.clone(),
9316            selection: query,
9317            graphql_client: self.graphql_client.clone(),
9318        }
9319    }
9320    /// Creates a tunnel that forwards traffic from the host to a service.
9321    ///
9322    /// # Arguments
9323    ///
9324    /// * `service` - Service to send traffic from the tunnel.
9325    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9326    pub fn tunnel_opts(&self, service: impl IntoID<ServiceId>, opts: HostTunnelOpts) -> Service {
9327        let mut query = self.selection.select("tunnel");
9328        query = query.arg_lazy(
9329            "service",
9330            Box::new(move || {
9331                let service = service.clone();
9332                Box::pin(async move { service.into_id().await.unwrap().quote() })
9333            }),
9334        );
9335        if let Some(native) = opts.native {
9336            query = query.arg("native", native);
9337        }
9338        if let Some(ports) = opts.ports {
9339            query = query.arg("ports", ports);
9340        }
9341        Service {
9342            proc: self.proc.clone(),
9343            selection: query,
9344            graphql_client: self.graphql_client.clone(),
9345        }
9346    }
9347    /// Accesses a Unix socket on the host.
9348    ///
9349    /// # Arguments
9350    ///
9351    /// * `path` - Location of the Unix socket (e.g., "/var/run/docker.sock").
9352    pub fn unix_socket(&self, path: impl Into<String>) -> Socket {
9353        let mut query = self.selection.select("unixSocket");
9354        query = query.arg("path", path.into());
9355        Socket {
9356            proc: self.proc.clone(),
9357            selection: query,
9358            graphql_client: self.graphql_client.clone(),
9359        }
9360    }
9361}
9362#[derive(Clone)]
9363pub struct InputTypeDef {
9364    pub proc: Option<Arc<DaggerSessionProc>>,
9365    pub selection: Selection,
9366    pub graphql_client: DynGraphQLClient,
9367}
9368impl InputTypeDef {
9369    /// Static fields defined on this input object, if any.
9370    pub fn fields(&self) -> Vec<FieldTypeDef> {
9371        let query = self.selection.select("fields");
9372        vec![FieldTypeDef {
9373            proc: self.proc.clone(),
9374            selection: query,
9375            graphql_client: self.graphql_client.clone(),
9376        }]
9377    }
9378    /// A unique identifier for this InputTypeDef.
9379    pub async fn id(&self) -> Result<InputTypeDefId, DaggerError> {
9380        let query = self.selection.select("id");
9381        query.execute(self.graphql_client.clone()).await
9382    }
9383    /// The name of the input object.
9384    pub async fn name(&self) -> Result<String, DaggerError> {
9385        let query = self.selection.select("name");
9386        query.execute(self.graphql_client.clone()).await
9387    }
9388}
9389#[derive(Clone)]
9390pub struct InterfaceTypeDef {
9391    pub proc: Option<Arc<DaggerSessionProc>>,
9392    pub selection: Selection,
9393    pub graphql_client: DynGraphQLClient,
9394}
9395impl InterfaceTypeDef {
9396    /// The doc string for the interface, if any.
9397    pub async fn description(&self) -> Result<String, DaggerError> {
9398        let query = self.selection.select("description");
9399        query.execute(self.graphql_client.clone()).await
9400    }
9401    /// Functions defined on this interface, if any.
9402    pub fn functions(&self) -> Vec<Function> {
9403        let query = self.selection.select("functions");
9404        vec![Function {
9405            proc: self.proc.clone(),
9406            selection: query,
9407            graphql_client: self.graphql_client.clone(),
9408        }]
9409    }
9410    /// A unique identifier for this InterfaceTypeDef.
9411    pub async fn id(&self) -> Result<InterfaceTypeDefId, DaggerError> {
9412        let query = self.selection.select("id");
9413        query.execute(self.graphql_client.clone()).await
9414    }
9415    /// The name of the interface.
9416    pub async fn name(&self) -> Result<String, DaggerError> {
9417        let query = self.selection.select("name");
9418        query.execute(self.graphql_client.clone()).await
9419    }
9420    /// The location of this interface declaration.
9421    pub fn source_map(&self) -> SourceMap {
9422        let query = self.selection.select("sourceMap");
9423        SourceMap {
9424            proc: self.proc.clone(),
9425            selection: query,
9426            graphql_client: self.graphql_client.clone(),
9427        }
9428    }
9429    /// If this InterfaceTypeDef is associated with a Module, the name of the module. Unset otherwise.
9430    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
9431        let query = self.selection.select("sourceModuleName");
9432        query.execute(self.graphql_client.clone()).await
9433    }
9434}
9435#[derive(Clone)]
9436pub struct JsonValue {
9437    pub proc: Option<Arc<DaggerSessionProc>>,
9438    pub selection: Selection,
9439    pub graphql_client: DynGraphQLClient,
9440}
9441#[derive(Builder, Debug, PartialEq)]
9442pub struct JsonValueContentsOpts<'a> {
9443    /// Optional line prefix
9444    #[builder(setter(into, strip_option), default)]
9445    pub indent: Option<&'a str>,
9446    /// Pretty-print
9447    #[builder(setter(into, strip_option), default)]
9448    pub pretty: Option<bool>,
9449}
9450impl JsonValue {
9451    /// Decode an array from json
9452    pub fn as_array(&self) -> Vec<JsonValue> {
9453        let query = self.selection.select("asArray");
9454        vec![JsonValue {
9455            proc: self.proc.clone(),
9456            selection: query,
9457            graphql_client: self.graphql_client.clone(),
9458        }]
9459    }
9460    /// Decode a boolean from json
9461    pub async fn as_boolean(&self) -> Result<bool, DaggerError> {
9462        let query = self.selection.select("asBoolean");
9463        query.execute(self.graphql_client.clone()).await
9464    }
9465    /// Decode an integer from json
9466    pub async fn as_integer(&self) -> Result<isize, DaggerError> {
9467        let query = self.selection.select("asInteger");
9468        query.execute(self.graphql_client.clone()).await
9469    }
9470    /// Decode a string from json
9471    pub async fn as_string(&self) -> Result<String, DaggerError> {
9472        let query = self.selection.select("asString");
9473        query.execute(self.graphql_client.clone()).await
9474    }
9475    /// Return the value encoded as json
9476    ///
9477    /// # Arguments
9478    ///
9479    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9480    pub async fn contents(&self) -> Result<Json, DaggerError> {
9481        let query = self.selection.select("contents");
9482        query.execute(self.graphql_client.clone()).await
9483    }
9484    /// Return the value encoded as json
9485    ///
9486    /// # Arguments
9487    ///
9488    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9489    pub async fn contents_opts<'a>(
9490        &self,
9491        opts: JsonValueContentsOpts<'a>,
9492    ) -> Result<Json, DaggerError> {
9493        let mut query = self.selection.select("contents");
9494        if let Some(pretty) = opts.pretty {
9495            query = query.arg("pretty", pretty);
9496        }
9497        if let Some(indent) = opts.indent {
9498            query = query.arg("indent", indent);
9499        }
9500        query.execute(self.graphql_client.clone()).await
9501    }
9502    /// Lookup the field at the given path, and return its value.
9503    ///
9504    /// # Arguments
9505    ///
9506    /// * `path` - Path of the field to lookup, encoded as an array of field names
9507    pub fn field(&self, path: Vec<impl Into<String>>) -> JsonValue {
9508        let mut query = self.selection.select("field");
9509        query = query.arg(
9510            "path",
9511            path.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
9512        );
9513        JsonValue {
9514            proc: self.proc.clone(),
9515            selection: query,
9516            graphql_client: self.graphql_client.clone(),
9517        }
9518    }
9519    /// List fields of the encoded object
9520    pub async fn fields(&self) -> Result<Vec<String>, DaggerError> {
9521        let query = self.selection.select("fields");
9522        query.execute(self.graphql_client.clone()).await
9523    }
9524    /// A unique identifier for this JSONValue.
9525    pub async fn id(&self) -> Result<JsonValueId, DaggerError> {
9526        let query = self.selection.select("id");
9527        query.execute(self.graphql_client.clone()).await
9528    }
9529    /// Encode a boolean to json
9530    ///
9531    /// # Arguments
9532    ///
9533    /// * `value` - New boolean value
9534    pub fn new_boolean(&self, value: bool) -> JsonValue {
9535        let mut query = self.selection.select("newBoolean");
9536        query = query.arg("value", value);
9537        JsonValue {
9538            proc: self.proc.clone(),
9539            selection: query,
9540            graphql_client: self.graphql_client.clone(),
9541        }
9542    }
9543    /// Encode an integer to json
9544    ///
9545    /// # Arguments
9546    ///
9547    /// * `value` - New integer value
9548    pub fn new_integer(&self, value: isize) -> JsonValue {
9549        let mut query = self.selection.select("newInteger");
9550        query = query.arg("value", value);
9551        JsonValue {
9552            proc: self.proc.clone(),
9553            selection: query,
9554            graphql_client: self.graphql_client.clone(),
9555        }
9556    }
9557    /// Encode a string to json
9558    ///
9559    /// # Arguments
9560    ///
9561    /// * `value` - New string value
9562    pub fn new_string(&self, value: impl Into<String>) -> JsonValue {
9563        let mut query = self.selection.select("newString");
9564        query = query.arg("value", value.into());
9565        JsonValue {
9566            proc: self.proc.clone(),
9567            selection: query,
9568            graphql_client: self.graphql_client.clone(),
9569        }
9570    }
9571    /// Return a new json value, decoded from the given content
9572    ///
9573    /// # Arguments
9574    ///
9575    /// * `contents` - New JSON-encoded contents
9576    pub fn with_contents(&self, contents: Json) -> JsonValue {
9577        let mut query = self.selection.select("withContents");
9578        query = query.arg("contents", contents);
9579        JsonValue {
9580            proc: self.proc.clone(),
9581            selection: query,
9582            graphql_client: self.graphql_client.clone(),
9583        }
9584    }
9585    /// Set a new field at the given path
9586    ///
9587    /// # Arguments
9588    ///
9589    /// * `path` - Path of the field to set, encoded as an array of field names
9590    /// * `value` - The new value of the field
9591    pub fn with_field(
9592        &self,
9593        path: Vec<impl Into<String>>,
9594        value: impl IntoID<JsonValueId>,
9595    ) -> JsonValue {
9596        let mut query = self.selection.select("withField");
9597        query = query.arg(
9598            "path",
9599            path.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
9600        );
9601        query = query.arg_lazy(
9602            "value",
9603            Box::new(move || {
9604                let value = value.clone();
9605                Box::pin(async move { value.into_id().await.unwrap().quote() })
9606            }),
9607        );
9608        JsonValue {
9609            proc: self.proc.clone(),
9610            selection: query,
9611            graphql_client: self.graphql_client.clone(),
9612        }
9613    }
9614}
9615#[derive(Clone)]
9616pub struct Llm {
9617    pub proc: Option<Arc<DaggerSessionProc>>,
9618    pub selection: Selection,
9619    pub graphql_client: DynGraphQLClient,
9620}
9621impl Llm {
9622    /// create a branch in the LLM's history
9623    pub fn attempt(&self, number: isize) -> Llm {
9624        let mut query = self.selection.select("attempt");
9625        query = query.arg("number", number);
9626        Llm {
9627            proc: self.proc.clone(),
9628            selection: query,
9629            graphql_client: self.graphql_client.clone(),
9630        }
9631    }
9632    /// returns the type of the current state
9633    pub fn bind_result(&self, name: impl Into<String>) -> Binding {
9634        let mut query = self.selection.select("bindResult");
9635        query = query.arg("name", name.into());
9636        Binding {
9637            proc: self.proc.clone(),
9638            selection: query,
9639            graphql_client: self.graphql_client.clone(),
9640        }
9641    }
9642    /// return the LLM's current environment
9643    pub fn env(&self) -> Env {
9644        let query = self.selection.select("env");
9645        Env {
9646            proc: self.proc.clone(),
9647            selection: query,
9648            graphql_client: self.graphql_client.clone(),
9649        }
9650    }
9651    /// Indicates whether there are any queued prompts or tool results to send to the model
9652    pub async fn has_prompt(&self) -> Result<bool, DaggerError> {
9653        let query = self.selection.select("hasPrompt");
9654        query.execute(self.graphql_client.clone()).await
9655    }
9656    /// return the llm message history
9657    pub async fn history(&self) -> Result<Vec<String>, DaggerError> {
9658        let query = self.selection.select("history");
9659        query.execute(self.graphql_client.clone()).await
9660    }
9661    /// return the raw llm message history as json
9662    pub async fn history_json(&self) -> Result<Json, DaggerError> {
9663        let query = self.selection.select("historyJSON");
9664        query.execute(self.graphql_client.clone()).await
9665    }
9666    /// A unique identifier for this LLM.
9667    pub async fn id(&self) -> Result<Llmid, DaggerError> {
9668        let query = self.selection.select("id");
9669        query.execute(self.graphql_client.clone()).await
9670    }
9671    /// return the last llm reply from the history
9672    pub async fn last_reply(&self) -> Result<String, DaggerError> {
9673        let query = self.selection.select("lastReply");
9674        query.execute(self.graphql_client.clone()).await
9675    }
9676    /// Submit the queued prompt, evaluate any tool calls, queue their results, and keep going until the model ends its turn
9677    pub fn r#loop(&self) -> Llm {
9678        let query = self.selection.select("loop");
9679        Llm {
9680            proc: self.proc.clone(),
9681            selection: query,
9682            graphql_client: self.graphql_client.clone(),
9683        }
9684    }
9685    /// return the model used by the llm
9686    pub async fn model(&self) -> Result<String, DaggerError> {
9687        let query = self.selection.select("model");
9688        query.execute(self.graphql_client.clone()).await
9689    }
9690    /// return the provider used by the llm
9691    pub async fn provider(&self) -> Result<String, DaggerError> {
9692        let query = self.selection.select("provider");
9693        query.execute(self.graphql_client.clone()).await
9694    }
9695    /// Submit the queued prompt or tool call results, evaluate any tool calls, and queue their results
9696    pub async fn step(&self) -> Result<Llmid, DaggerError> {
9697        let query = self.selection.select("step");
9698        query.execute(self.graphql_client.clone()).await
9699    }
9700    /// synchronize LLM state
9701    pub async fn sync(&self) -> Result<Llmid, DaggerError> {
9702        let query = self.selection.select("sync");
9703        query.execute(self.graphql_client.clone()).await
9704    }
9705    /// returns the token usage of the current state
9706    pub fn token_usage(&self) -> LlmTokenUsage {
9707        let query = self.selection.select("tokenUsage");
9708        LlmTokenUsage {
9709            proc: self.proc.clone(),
9710            selection: query,
9711            graphql_client: self.graphql_client.clone(),
9712        }
9713    }
9714    /// print documentation for available tools
9715    pub async fn tools(&self) -> Result<String, DaggerError> {
9716        let query = self.selection.select("tools");
9717        query.execute(self.graphql_client.clone()).await
9718    }
9719    /// Return a new LLM with the specified function no longer exposed as a tool
9720    ///
9721    /// # Arguments
9722    ///
9723    /// * `type_name` - The type name whose function will be blocked
9724    /// * `function` - The function to block
9725    ///
9726    /// Will be converted to lowerCamelCase if necessary.
9727    pub fn with_blocked_function(
9728        &self,
9729        type_name: impl Into<String>,
9730        function: impl Into<String>,
9731    ) -> Llm {
9732        let mut query = self.selection.select("withBlockedFunction");
9733        query = query.arg("typeName", type_name.into());
9734        query = query.arg("function", function.into());
9735        Llm {
9736            proc: self.proc.clone(),
9737            selection: query,
9738            graphql_client: self.graphql_client.clone(),
9739        }
9740    }
9741    /// allow the LLM to interact with an environment via MCP
9742    pub fn with_env(&self, env: impl IntoID<EnvId>) -> Llm {
9743        let mut query = self.selection.select("withEnv");
9744        query = query.arg_lazy(
9745            "env",
9746            Box::new(move || {
9747                let env = env.clone();
9748                Box::pin(async move { env.into_id().await.unwrap().quote() })
9749            }),
9750        );
9751        Llm {
9752            proc: self.proc.clone(),
9753            selection: query,
9754            graphql_client: self.graphql_client.clone(),
9755        }
9756    }
9757    /// Add an external MCP server to the LLM
9758    ///
9759    /// # Arguments
9760    ///
9761    /// * `name` - The name of the MCP server
9762    /// * `service` - The MCP service to run and communicate with over stdio
9763    pub fn with_mcp_server(&self, name: impl Into<String>, service: impl IntoID<ServiceId>) -> Llm {
9764        let mut query = self.selection.select("withMCPServer");
9765        query = query.arg("name", name.into());
9766        query = query.arg_lazy(
9767            "service",
9768            Box::new(move || {
9769                let service = service.clone();
9770                Box::pin(async move { service.into_id().await.unwrap().quote() })
9771            }),
9772        );
9773        Llm {
9774            proc: self.proc.clone(),
9775            selection: query,
9776            graphql_client: self.graphql_client.clone(),
9777        }
9778    }
9779    /// swap out the llm model
9780    ///
9781    /// # Arguments
9782    ///
9783    /// * `model` - The model to use
9784    pub fn with_model(&self, model: impl Into<String>) -> Llm {
9785        let mut query = self.selection.select("withModel");
9786        query = query.arg("model", model.into());
9787        Llm {
9788            proc: self.proc.clone(),
9789            selection: query,
9790            graphql_client: self.graphql_client.clone(),
9791        }
9792    }
9793    /// append a prompt to the llm context
9794    ///
9795    /// # Arguments
9796    ///
9797    /// * `prompt` - The prompt to send
9798    pub fn with_prompt(&self, prompt: impl Into<String>) -> Llm {
9799        let mut query = self.selection.select("withPrompt");
9800        query = query.arg("prompt", prompt.into());
9801        Llm {
9802            proc: self.proc.clone(),
9803            selection: query,
9804            graphql_client: self.graphql_client.clone(),
9805        }
9806    }
9807    /// append the contents of a file to the llm context
9808    ///
9809    /// # Arguments
9810    ///
9811    /// * `file` - The file to read the prompt from
9812    pub fn with_prompt_file(&self, file: impl IntoID<FileId>) -> Llm {
9813        let mut query = self.selection.select("withPromptFile");
9814        query = query.arg_lazy(
9815            "file",
9816            Box::new(move || {
9817                let file = file.clone();
9818                Box::pin(async move { file.into_id().await.unwrap().quote() })
9819            }),
9820        );
9821        Llm {
9822            proc: self.proc.clone(),
9823            selection: query,
9824            graphql_client: self.graphql_client.clone(),
9825        }
9826    }
9827    /// Use a static set of tools for method calls, e.g. for MCP clients that do not support dynamic tool registration
9828    pub fn with_static_tools(&self) -> Llm {
9829        let query = self.selection.select("withStaticTools");
9830        Llm {
9831            proc: self.proc.clone(),
9832            selection: query,
9833            graphql_client: self.graphql_client.clone(),
9834        }
9835    }
9836    /// Add a system prompt to the LLM's environment
9837    ///
9838    /// # Arguments
9839    ///
9840    /// * `prompt` - The system prompt to send
9841    pub fn with_system_prompt(&self, prompt: impl Into<String>) -> Llm {
9842        let mut query = self.selection.select("withSystemPrompt");
9843        query = query.arg("prompt", prompt.into());
9844        Llm {
9845            proc: self.proc.clone(),
9846            selection: query,
9847            graphql_client: self.graphql_client.clone(),
9848        }
9849    }
9850    /// Disable the default system prompt
9851    pub fn without_default_system_prompt(&self) -> Llm {
9852        let query = self.selection.select("withoutDefaultSystemPrompt");
9853        Llm {
9854            proc: self.proc.clone(),
9855            selection: query,
9856            graphql_client: self.graphql_client.clone(),
9857        }
9858    }
9859    /// Clear the message history, leaving only the system prompts
9860    pub fn without_message_history(&self) -> Llm {
9861        let query = self.selection.select("withoutMessageHistory");
9862        Llm {
9863            proc: self.proc.clone(),
9864            selection: query,
9865            graphql_client: self.graphql_client.clone(),
9866        }
9867    }
9868    /// Clear the system prompts, leaving only the default system prompt
9869    pub fn without_system_prompts(&self) -> Llm {
9870        let query = self.selection.select("withoutSystemPrompts");
9871        Llm {
9872            proc: self.proc.clone(),
9873            selection: query,
9874            graphql_client: self.graphql_client.clone(),
9875        }
9876    }
9877}
9878#[derive(Clone)]
9879pub struct LlmTokenUsage {
9880    pub proc: Option<Arc<DaggerSessionProc>>,
9881    pub selection: Selection,
9882    pub graphql_client: DynGraphQLClient,
9883}
9884impl LlmTokenUsage {
9885    pub async fn cached_token_reads(&self) -> Result<isize, DaggerError> {
9886        let query = self.selection.select("cachedTokenReads");
9887        query.execute(self.graphql_client.clone()).await
9888    }
9889    pub async fn cached_token_writes(&self) -> Result<isize, DaggerError> {
9890        let query = self.selection.select("cachedTokenWrites");
9891        query.execute(self.graphql_client.clone()).await
9892    }
9893    /// A unique identifier for this LLMTokenUsage.
9894    pub async fn id(&self) -> Result<LlmTokenUsageId, DaggerError> {
9895        let query = self.selection.select("id");
9896        query.execute(self.graphql_client.clone()).await
9897    }
9898    pub async fn input_tokens(&self) -> Result<isize, DaggerError> {
9899        let query = self.selection.select("inputTokens");
9900        query.execute(self.graphql_client.clone()).await
9901    }
9902    pub async fn output_tokens(&self) -> Result<isize, DaggerError> {
9903        let query = self.selection.select("outputTokens");
9904        query.execute(self.graphql_client.clone()).await
9905    }
9906    pub async fn total_tokens(&self) -> Result<isize, DaggerError> {
9907        let query = self.selection.select("totalTokens");
9908        query.execute(self.graphql_client.clone()).await
9909    }
9910}
9911#[derive(Clone)]
9912pub struct Label {
9913    pub proc: Option<Arc<DaggerSessionProc>>,
9914    pub selection: Selection,
9915    pub graphql_client: DynGraphQLClient,
9916}
9917impl Label {
9918    /// A unique identifier for this Label.
9919    pub async fn id(&self) -> Result<LabelId, DaggerError> {
9920        let query = self.selection.select("id");
9921        query.execute(self.graphql_client.clone()).await
9922    }
9923    /// The label name.
9924    pub async fn name(&self) -> Result<String, DaggerError> {
9925        let query = self.selection.select("name");
9926        query.execute(self.graphql_client.clone()).await
9927    }
9928    /// The label value.
9929    pub async fn value(&self) -> Result<String, DaggerError> {
9930        let query = self.selection.select("value");
9931        query.execute(self.graphql_client.clone()).await
9932    }
9933}
9934#[derive(Clone)]
9935pub struct ListTypeDef {
9936    pub proc: Option<Arc<DaggerSessionProc>>,
9937    pub selection: Selection,
9938    pub graphql_client: DynGraphQLClient,
9939}
9940impl ListTypeDef {
9941    /// The type of the elements in the list.
9942    pub fn element_type_def(&self) -> TypeDef {
9943        let query = self.selection.select("elementTypeDef");
9944        TypeDef {
9945            proc: self.proc.clone(),
9946            selection: query,
9947            graphql_client: self.graphql_client.clone(),
9948        }
9949    }
9950    /// A unique identifier for this ListTypeDef.
9951    pub async fn id(&self) -> Result<ListTypeDefId, DaggerError> {
9952        let query = self.selection.select("id");
9953        query.execute(self.graphql_client.clone()).await
9954    }
9955}
9956#[derive(Clone)]
9957pub struct Module {
9958    pub proc: Option<Arc<DaggerSessionProc>>,
9959    pub selection: Selection,
9960    pub graphql_client: DynGraphQLClient,
9961}
9962#[derive(Builder, Debug, PartialEq)]
9963pub struct ModuleChecksOpts<'a> {
9964    /// Only include checks matching the specified patterns
9965    #[builder(setter(into, strip_option), default)]
9966    pub include: Option<Vec<&'a str>>,
9967}
9968#[derive(Builder, Debug, PartialEq)]
9969pub struct ModuleServeOpts {
9970    /// Expose the dependencies of this module to the client
9971    #[builder(setter(into, strip_option), default)]
9972    pub include_dependencies: Option<bool>,
9973}
9974impl Module {
9975    /// Return the check defined by the module with the given name. Must match to exactly one check.
9976    ///
9977    /// # Arguments
9978    ///
9979    /// * `name` - The name of the check to retrieve
9980    pub fn check(&self, name: impl Into<String>) -> Check {
9981        let mut query = self.selection.select("check");
9982        query = query.arg("name", name.into());
9983        Check {
9984            proc: self.proc.clone(),
9985            selection: query,
9986            graphql_client: self.graphql_client.clone(),
9987        }
9988    }
9989    /// Return all checks defined by the module
9990    ///
9991    /// # Arguments
9992    ///
9993    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9994    pub fn checks(&self) -> CheckGroup {
9995        let query = self.selection.select("checks");
9996        CheckGroup {
9997            proc: self.proc.clone(),
9998            selection: query,
9999            graphql_client: self.graphql_client.clone(),
10000        }
10001    }
10002    /// Return all checks defined by the module
10003    ///
10004    /// # Arguments
10005    ///
10006    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10007    pub fn checks_opts<'a>(&self, opts: ModuleChecksOpts<'a>) -> CheckGroup {
10008        let mut query = self.selection.select("checks");
10009        if let Some(include) = opts.include {
10010            query = query.arg("include", include);
10011        }
10012        CheckGroup {
10013            proc: self.proc.clone(),
10014            selection: query,
10015            graphql_client: self.graphql_client.clone(),
10016        }
10017    }
10018    /// The dependencies of the module.
10019    pub fn dependencies(&self) -> Vec<Module> {
10020        let query = self.selection.select("dependencies");
10021        vec![Module {
10022            proc: self.proc.clone(),
10023            selection: query,
10024            graphql_client: self.graphql_client.clone(),
10025        }]
10026    }
10027    /// The doc string of the module, if any
10028    pub async fn description(&self) -> Result<String, DaggerError> {
10029        let query = self.selection.select("description");
10030        query.execute(self.graphql_client.clone()).await
10031    }
10032    /// Enumerations served by this module.
10033    pub fn enums(&self) -> Vec<TypeDef> {
10034        let query = self.selection.select("enums");
10035        vec![TypeDef {
10036            proc: self.proc.clone(),
10037            selection: query,
10038            graphql_client: self.graphql_client.clone(),
10039        }]
10040    }
10041    /// The generated files and directories made on top of the module source's context directory.
10042    pub fn generated_context_directory(&self) -> Directory {
10043        let query = self.selection.select("generatedContextDirectory");
10044        Directory {
10045            proc: self.proc.clone(),
10046            selection: query,
10047            graphql_client: self.graphql_client.clone(),
10048        }
10049    }
10050    /// A unique identifier for this Module.
10051    pub async fn id(&self) -> Result<ModuleId, DaggerError> {
10052        let query = self.selection.select("id");
10053        query.execute(self.graphql_client.clone()).await
10054    }
10055    /// Interfaces served by this module.
10056    pub fn interfaces(&self) -> Vec<TypeDef> {
10057        let query = self.selection.select("interfaces");
10058        vec![TypeDef {
10059            proc: self.proc.clone(),
10060            selection: query,
10061            graphql_client: self.graphql_client.clone(),
10062        }]
10063    }
10064    /// The introspection schema JSON file for this module.
10065    /// This file represents the schema visible to the module's source code, including all core types and those from the dependencies.
10066    /// Note: this is in the context of a module, so some core types may be hidden.
10067    pub fn introspection_schema_json(&self) -> File {
10068        let query = self.selection.select("introspectionSchemaJSON");
10069        File {
10070            proc: self.proc.clone(),
10071            selection: query,
10072            graphql_client: self.graphql_client.clone(),
10073        }
10074    }
10075    /// The name of the module
10076    pub async fn name(&self) -> Result<String, DaggerError> {
10077        let query = self.selection.select("name");
10078        query.execute(self.graphql_client.clone()).await
10079    }
10080    /// Objects served by this module.
10081    pub fn objects(&self) -> Vec<TypeDef> {
10082        let query = self.selection.select("objects");
10083        vec![TypeDef {
10084            proc: self.proc.clone(),
10085            selection: query,
10086            graphql_client: self.graphql_client.clone(),
10087        }]
10088    }
10089    /// The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile.
10090    pub fn runtime(&self) -> Container {
10091        let query = self.selection.select("runtime");
10092        Container {
10093            proc: self.proc.clone(),
10094            selection: query,
10095            graphql_client: self.graphql_client.clone(),
10096        }
10097    }
10098    /// The SDK config used by this module.
10099    pub fn sdk(&self) -> SdkConfig {
10100        let query = self.selection.select("sdk");
10101        SdkConfig {
10102            proc: self.proc.clone(),
10103            selection: query,
10104            graphql_client: self.graphql_client.clone(),
10105        }
10106    }
10107    /// Serve a module's API in the current session.
10108    /// Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
10109    ///
10110    /// # Arguments
10111    ///
10112    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10113    pub async fn serve(&self) -> Result<Void, DaggerError> {
10114        let query = self.selection.select("serve");
10115        query.execute(self.graphql_client.clone()).await
10116    }
10117    /// Serve a module's API in the current session.
10118    /// Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
10119    ///
10120    /// # Arguments
10121    ///
10122    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10123    pub async fn serve_opts(&self, opts: ModuleServeOpts) -> Result<Void, DaggerError> {
10124        let mut query = self.selection.select("serve");
10125        if let Some(include_dependencies) = opts.include_dependencies {
10126            query = query.arg("includeDependencies", include_dependencies);
10127        }
10128        query.execute(self.graphql_client.clone()).await
10129    }
10130    /// The source for the module.
10131    pub fn source(&self) -> ModuleSource {
10132        let query = self.selection.select("source");
10133        ModuleSource {
10134            proc: self.proc.clone(),
10135            selection: query,
10136            graphql_client: self.graphql_client.clone(),
10137        }
10138    }
10139    /// Forces evaluation of the module, including any loading into the engine and associated validation.
10140    pub async fn sync(&self) -> Result<ModuleId, DaggerError> {
10141        let query = self.selection.select("sync");
10142        query.execute(self.graphql_client.clone()).await
10143    }
10144    /// User-defined default values, loaded from local .env files.
10145    pub fn user_defaults(&self) -> EnvFile {
10146        let query = self.selection.select("userDefaults");
10147        EnvFile {
10148            proc: self.proc.clone(),
10149            selection: query,
10150            graphql_client: self.graphql_client.clone(),
10151        }
10152    }
10153    /// Retrieves the module with the given description
10154    ///
10155    /// # Arguments
10156    ///
10157    /// * `description` - The description to set
10158    pub fn with_description(&self, description: impl Into<String>) -> Module {
10159        let mut query = self.selection.select("withDescription");
10160        query = query.arg("description", description.into());
10161        Module {
10162            proc: self.proc.clone(),
10163            selection: query,
10164            graphql_client: self.graphql_client.clone(),
10165        }
10166    }
10167    /// This module plus the given Enum type and associated values
10168    pub fn with_enum(&self, r#enum: impl IntoID<TypeDefId>) -> Module {
10169        let mut query = self.selection.select("withEnum");
10170        query = query.arg_lazy(
10171            "enum",
10172            Box::new(move || {
10173                let r#enum = r#enum.clone();
10174                Box::pin(async move { r#enum.into_id().await.unwrap().quote() })
10175            }),
10176        );
10177        Module {
10178            proc: self.proc.clone(),
10179            selection: query,
10180            graphql_client: self.graphql_client.clone(),
10181        }
10182    }
10183    /// This module plus the given Interface type and associated functions
10184    pub fn with_interface(&self, iface: impl IntoID<TypeDefId>) -> Module {
10185        let mut query = self.selection.select("withInterface");
10186        query = query.arg_lazy(
10187            "iface",
10188            Box::new(move || {
10189                let iface = iface.clone();
10190                Box::pin(async move { iface.into_id().await.unwrap().quote() })
10191            }),
10192        );
10193        Module {
10194            proc: self.proc.clone(),
10195            selection: query,
10196            graphql_client: self.graphql_client.clone(),
10197        }
10198    }
10199    /// This module plus the given Object type and associated functions.
10200    pub fn with_object(&self, object: impl IntoID<TypeDefId>) -> Module {
10201        let mut query = self.selection.select("withObject");
10202        query = query.arg_lazy(
10203            "object",
10204            Box::new(move || {
10205                let object = object.clone();
10206                Box::pin(async move { object.into_id().await.unwrap().quote() })
10207            }),
10208        );
10209        Module {
10210            proc: self.proc.clone(),
10211            selection: query,
10212            graphql_client: self.graphql_client.clone(),
10213        }
10214    }
10215}
10216#[derive(Clone)]
10217pub struct ModuleConfigClient {
10218    pub proc: Option<Arc<DaggerSessionProc>>,
10219    pub selection: Selection,
10220    pub graphql_client: DynGraphQLClient,
10221}
10222impl ModuleConfigClient {
10223    /// The directory the client is generated in.
10224    pub async fn directory(&self) -> Result<String, DaggerError> {
10225        let query = self.selection.select("directory");
10226        query.execute(self.graphql_client.clone()).await
10227    }
10228    /// The generator to use
10229    pub async fn generator(&self) -> Result<String, DaggerError> {
10230        let query = self.selection.select("generator");
10231        query.execute(self.graphql_client.clone()).await
10232    }
10233    /// A unique identifier for this ModuleConfigClient.
10234    pub async fn id(&self) -> Result<ModuleConfigClientId, DaggerError> {
10235        let query = self.selection.select("id");
10236        query.execute(self.graphql_client.clone()).await
10237    }
10238}
10239#[derive(Clone)]
10240pub struct ModuleSource {
10241    pub proc: Option<Arc<DaggerSessionProc>>,
10242    pub selection: Selection,
10243    pub graphql_client: DynGraphQLClient,
10244}
10245impl ModuleSource {
10246    /// Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation
10247    pub fn as_module(&self) -> Module {
10248        let query = self.selection.select("asModule");
10249        Module {
10250            proc: self.proc.clone(),
10251            selection: query,
10252            graphql_client: self.graphql_client.clone(),
10253        }
10254    }
10255    /// A human readable ref string representation of this module source.
10256    pub async fn as_string(&self) -> Result<String, DaggerError> {
10257        let query = self.selection.select("asString");
10258        query.execute(self.graphql_client.clone()).await
10259    }
10260    /// The blueprint referenced by the module source.
10261    pub fn blueprint(&self) -> ModuleSource {
10262        let query = self.selection.select("blueprint");
10263        ModuleSource {
10264            proc: self.proc.clone(),
10265            selection: query,
10266            graphql_client: self.graphql_client.clone(),
10267        }
10268    }
10269    /// The ref to clone the root of the git repo from. Only valid for git sources.
10270    pub async fn clone_ref(&self) -> Result<String, DaggerError> {
10271        let query = self.selection.select("cloneRef");
10272        query.execute(self.graphql_client.clone()).await
10273    }
10274    /// The resolved commit of the git repo this source points to.
10275    pub async fn commit(&self) -> Result<String, DaggerError> {
10276        let query = self.selection.select("commit");
10277        query.execute(self.graphql_client.clone()).await
10278    }
10279    /// The clients generated for the module.
10280    pub fn config_clients(&self) -> Vec<ModuleConfigClient> {
10281        let query = self.selection.select("configClients");
10282        vec![ModuleConfigClient {
10283            proc: self.proc.clone(),
10284            selection: query,
10285            graphql_client: self.graphql_client.clone(),
10286        }]
10287    }
10288    /// Whether an existing dagger.json for the module was found.
10289    pub async fn config_exists(&self) -> Result<bool, DaggerError> {
10290        let query = self.selection.select("configExists");
10291        query.execute(self.graphql_client.clone()).await
10292    }
10293    /// The full directory loaded for the module source, including the source code as a subdirectory.
10294    pub fn context_directory(&self) -> Directory {
10295        let query = self.selection.select("contextDirectory");
10296        Directory {
10297            proc: self.proc.clone(),
10298            selection: query,
10299            graphql_client: self.graphql_client.clone(),
10300        }
10301    }
10302    /// The dependencies of the module source.
10303    pub fn dependencies(&self) -> Vec<ModuleSource> {
10304        let query = self.selection.select("dependencies");
10305        vec![ModuleSource {
10306            proc: self.proc.clone(),
10307            selection: query,
10308            graphql_client: self.graphql_client.clone(),
10309        }]
10310    }
10311    /// 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.
10312    pub async fn digest(&self) -> Result<String, DaggerError> {
10313        let query = self.selection.select("digest");
10314        query.execute(self.graphql_client.clone()).await
10315    }
10316    /// The directory containing the module configuration and source code (source code may be in a subdir).
10317    ///
10318    /// # Arguments
10319    ///
10320    /// * `path` - A subpath from the source directory to select.
10321    pub fn directory(&self, path: impl Into<String>) -> Directory {
10322        let mut query = self.selection.select("directory");
10323        query = query.arg("path", path.into());
10324        Directory {
10325            proc: self.proc.clone(),
10326            selection: query,
10327            graphql_client: self.graphql_client.clone(),
10328        }
10329    }
10330    /// The engine version of the module.
10331    pub async fn engine_version(&self) -> Result<String, DaggerError> {
10332        let query = self.selection.select("engineVersion");
10333        query.execute(self.graphql_client.clone()).await
10334    }
10335    /// The generated files and directories made on top of the module source's context directory.
10336    pub fn generated_context_directory(&self) -> Directory {
10337        let query = self.selection.select("generatedContextDirectory");
10338        Directory {
10339            proc: self.proc.clone(),
10340            selection: query,
10341            graphql_client: self.graphql_client.clone(),
10342        }
10343    }
10344    /// The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket).
10345    pub async fn html_repo_url(&self) -> Result<String, DaggerError> {
10346        let query = self.selection.select("htmlRepoURL");
10347        query.execute(self.graphql_client.clone()).await
10348    }
10349    /// The URL to the source's git repo in a web browser. Only valid for git sources.
10350    pub async fn html_url(&self) -> Result<String, DaggerError> {
10351        let query = self.selection.select("htmlURL");
10352        query.execute(self.graphql_client.clone()).await
10353    }
10354    /// A unique identifier for this ModuleSource.
10355    pub async fn id(&self) -> Result<ModuleSourceId, DaggerError> {
10356        let query = self.selection.select("id");
10357        query.execute(self.graphql_client.clone()).await
10358    }
10359    /// The introspection schema JSON file for this module source.
10360    /// This file represents the schema visible to the module's source code, including all core types and those from the dependencies.
10361    /// Note: this is in the context of a module, so some core types may be hidden.
10362    pub fn introspection_schema_json(&self) -> File {
10363        let query = self.selection.select("introspectionSchemaJSON");
10364        File {
10365            proc: self.proc.clone(),
10366            selection: query,
10367            graphql_client: self.graphql_client.clone(),
10368        }
10369    }
10370    /// The kind of module source (currently local, git or dir).
10371    pub async fn kind(&self) -> Result<ModuleSourceKind, DaggerError> {
10372        let query = self.selection.select("kind");
10373        query.execute(self.graphql_client.clone()).await
10374    }
10375    /// 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.
10376    pub async fn local_context_directory_path(&self) -> Result<String, DaggerError> {
10377        let query = self.selection.select("localContextDirectoryPath");
10378        query.execute(self.graphql_client.clone()).await
10379    }
10380    /// The name of the module, including any setting via the withName API.
10381    pub async fn module_name(&self) -> Result<String, DaggerError> {
10382        let query = self.selection.select("moduleName");
10383        query.execute(self.graphql_client.clone()).await
10384    }
10385    /// The original name of the module as read from the module's dagger.json (or set for the first time with the withName API).
10386    pub async fn module_original_name(&self) -> Result<String, DaggerError> {
10387        let query = self.selection.select("moduleOriginalName");
10388        query.execute(self.graphql_client.clone()).await
10389    }
10390    /// The original subpath used when instantiating this module source, relative to the context directory.
10391    pub async fn original_subpath(&self) -> Result<String, DaggerError> {
10392        let query = self.selection.select("originalSubpath");
10393        query.execute(self.graphql_client.clone()).await
10394    }
10395    /// The pinned version of this module source.
10396    pub async fn pin(&self) -> Result<String, DaggerError> {
10397        let query = self.selection.select("pin");
10398        query.execute(self.graphql_client.clone()).await
10399    }
10400    /// The import path corresponding to the root of the git repo this source points to. Only valid for git sources.
10401    pub async fn repo_root_path(&self) -> Result<String, DaggerError> {
10402        let query = self.selection.select("repoRootPath");
10403        query.execute(self.graphql_client.clone()).await
10404    }
10405    /// The SDK configuration of the module.
10406    pub fn sdk(&self) -> SdkConfig {
10407        let query = self.selection.select("sdk");
10408        SdkConfig {
10409            proc: self.proc.clone(),
10410            selection: query,
10411            graphql_client: self.graphql_client.clone(),
10412        }
10413    }
10414    /// The path, relative to the context directory, that contains the module's dagger.json.
10415    pub async fn source_root_subpath(&self) -> Result<String, DaggerError> {
10416        let query = self.selection.select("sourceRootSubpath");
10417        query.execute(self.graphql_client.clone()).await
10418    }
10419    /// The path to the directory containing the module's source code, relative to the context directory.
10420    pub async fn source_subpath(&self) -> Result<String, DaggerError> {
10421        let query = self.selection.select("sourceSubpath");
10422        query.execute(self.graphql_client.clone()).await
10423    }
10424    /// Forces evaluation of the module source, including any loading into the engine and associated validation.
10425    pub async fn sync(&self) -> Result<ModuleSourceId, DaggerError> {
10426        let query = self.selection.select("sync");
10427        query.execute(self.graphql_client.clone()).await
10428    }
10429    /// The toolchains referenced by the module source.
10430    pub fn toolchains(&self) -> Vec<ModuleSource> {
10431        let query = self.selection.select("toolchains");
10432        vec![ModuleSource {
10433            proc: self.proc.clone(),
10434            selection: query,
10435            graphql_client: self.graphql_client.clone(),
10436        }]
10437    }
10438    /// User-defined defaults read from local .env files
10439    pub fn user_defaults(&self) -> EnvFile {
10440        let query = self.selection.select("userDefaults");
10441        EnvFile {
10442            proc: self.proc.clone(),
10443            selection: query,
10444            graphql_client: self.graphql_client.clone(),
10445        }
10446    }
10447    /// The specified version of the git repo this source points to.
10448    pub async fn version(&self) -> Result<String, DaggerError> {
10449        let query = self.selection.select("version");
10450        query.execute(self.graphql_client.clone()).await
10451    }
10452    /// Set a blueprint for the module source.
10453    ///
10454    /// # Arguments
10455    ///
10456    /// * `blueprint` - The blueprint module to set.
10457    pub fn with_blueprint(&self, blueprint: impl IntoID<ModuleSourceId>) -> ModuleSource {
10458        let mut query = self.selection.select("withBlueprint");
10459        query = query.arg_lazy(
10460            "blueprint",
10461            Box::new(move || {
10462                let blueprint = blueprint.clone();
10463                Box::pin(async move { blueprint.into_id().await.unwrap().quote() })
10464            }),
10465        );
10466        ModuleSource {
10467            proc: self.proc.clone(),
10468            selection: query,
10469            graphql_client: self.graphql_client.clone(),
10470        }
10471    }
10472    /// Update the module source with a new client to generate.
10473    ///
10474    /// # Arguments
10475    ///
10476    /// * `generator` - The generator to use
10477    /// * `output_dir` - The output directory for the generated client.
10478    pub fn with_client(
10479        &self,
10480        generator: impl Into<String>,
10481        output_dir: impl Into<String>,
10482    ) -> ModuleSource {
10483        let mut query = self.selection.select("withClient");
10484        query = query.arg("generator", generator.into());
10485        query = query.arg("outputDir", output_dir.into());
10486        ModuleSource {
10487            proc: self.proc.clone(),
10488            selection: query,
10489            graphql_client: self.graphql_client.clone(),
10490        }
10491    }
10492    /// Append the provided dependencies to the module source's dependency list.
10493    ///
10494    /// # Arguments
10495    ///
10496    /// * `dependencies` - The dependencies to append.
10497    pub fn with_dependencies(&self, dependencies: Vec<ModuleSourceId>) -> ModuleSource {
10498        let mut query = self.selection.select("withDependencies");
10499        query = query.arg("dependencies", dependencies);
10500        ModuleSource {
10501            proc: self.proc.clone(),
10502            selection: query,
10503            graphql_client: self.graphql_client.clone(),
10504        }
10505    }
10506    /// Upgrade the engine version of the module to the given value.
10507    ///
10508    /// # Arguments
10509    ///
10510    /// * `version` - The engine version to upgrade to.
10511    pub fn with_engine_version(&self, version: impl Into<String>) -> ModuleSource {
10512        let mut query = self.selection.select("withEngineVersion");
10513        query = query.arg("version", version.into());
10514        ModuleSource {
10515            proc: self.proc.clone(),
10516            selection: query,
10517            graphql_client: self.graphql_client.clone(),
10518        }
10519    }
10520    /// Enable the experimental features for the module source.
10521    ///
10522    /// # Arguments
10523    ///
10524    /// * `features` - The experimental features to enable.
10525    pub fn with_experimental_features(
10526        &self,
10527        features: Vec<ModuleSourceExperimentalFeature>,
10528    ) -> ModuleSource {
10529        let mut query = self.selection.select("withExperimentalFeatures");
10530        query = query.arg("features", features);
10531        ModuleSource {
10532            proc: self.proc.clone(),
10533            selection: query,
10534            graphql_client: self.graphql_client.clone(),
10535        }
10536    }
10537    /// Update the module source with additional include patterns for files+directories from its context that are required for building it
10538    ///
10539    /// # Arguments
10540    ///
10541    /// * `patterns` - The new additional include patterns.
10542    pub fn with_includes(&self, patterns: Vec<impl Into<String>>) -> ModuleSource {
10543        let mut query = self.selection.select("withIncludes");
10544        query = query.arg(
10545            "patterns",
10546            patterns
10547                .into_iter()
10548                .map(|i| i.into())
10549                .collect::<Vec<String>>(),
10550        );
10551        ModuleSource {
10552            proc: self.proc.clone(),
10553            selection: query,
10554            graphql_client: self.graphql_client.clone(),
10555        }
10556    }
10557    /// Update the module source with a new name.
10558    ///
10559    /// # Arguments
10560    ///
10561    /// * `name` - The name to set.
10562    pub fn with_name(&self, name: impl Into<String>) -> ModuleSource {
10563        let mut query = self.selection.select("withName");
10564        query = query.arg("name", name.into());
10565        ModuleSource {
10566            proc: self.proc.clone(),
10567            selection: query,
10568            graphql_client: self.graphql_client.clone(),
10569        }
10570    }
10571    /// Update the module source with a new SDK.
10572    ///
10573    /// # Arguments
10574    ///
10575    /// * `source` - The SDK source to set.
10576    pub fn with_sdk(&self, source: impl Into<String>) -> ModuleSource {
10577        let mut query = self.selection.select("withSDK");
10578        query = query.arg("source", source.into());
10579        ModuleSource {
10580            proc: self.proc.clone(),
10581            selection: query,
10582            graphql_client: self.graphql_client.clone(),
10583        }
10584    }
10585    /// Update the module source with a new source subpath.
10586    ///
10587    /// # Arguments
10588    ///
10589    /// * `path` - The path to set as the source subpath. Must be relative to the module source's source root directory.
10590    pub fn with_source_subpath(&self, path: impl Into<String>) -> ModuleSource {
10591        let mut query = self.selection.select("withSourceSubpath");
10592        query = query.arg("path", path.into());
10593        ModuleSource {
10594            proc: self.proc.clone(),
10595            selection: query,
10596            graphql_client: self.graphql_client.clone(),
10597        }
10598    }
10599    /// Add toolchains to the module source.
10600    ///
10601    /// # Arguments
10602    ///
10603    /// * `toolchains` - The toolchain modules to add.
10604    pub fn with_toolchains(&self, toolchains: Vec<ModuleSourceId>) -> ModuleSource {
10605        let mut query = self.selection.select("withToolchains");
10606        query = query.arg("toolchains", toolchains);
10607        ModuleSource {
10608            proc: self.proc.clone(),
10609            selection: query,
10610            graphql_client: self.graphql_client.clone(),
10611        }
10612    }
10613    /// Update the blueprint module to the latest version.
10614    pub fn with_update_blueprint(&self) -> ModuleSource {
10615        let query = self.selection.select("withUpdateBlueprint");
10616        ModuleSource {
10617            proc: self.proc.clone(),
10618            selection: query,
10619            graphql_client: self.graphql_client.clone(),
10620        }
10621    }
10622    /// Update one or more module dependencies.
10623    ///
10624    /// # Arguments
10625    ///
10626    /// * `dependencies` - The dependencies to update.
10627    pub fn with_update_dependencies(&self, dependencies: Vec<impl Into<String>>) -> ModuleSource {
10628        let mut query = self.selection.select("withUpdateDependencies");
10629        query = query.arg(
10630            "dependencies",
10631            dependencies
10632                .into_iter()
10633                .map(|i| i.into())
10634                .collect::<Vec<String>>(),
10635        );
10636        ModuleSource {
10637            proc: self.proc.clone(),
10638            selection: query,
10639            graphql_client: self.graphql_client.clone(),
10640        }
10641    }
10642    /// Update one or more toolchains.
10643    ///
10644    /// # Arguments
10645    ///
10646    /// * `toolchains` - The toolchains to update.
10647    pub fn with_update_toolchains(&self, toolchains: Vec<impl Into<String>>) -> ModuleSource {
10648        let mut query = self.selection.select("withUpdateToolchains");
10649        query = query.arg(
10650            "toolchains",
10651            toolchains
10652                .into_iter()
10653                .map(|i| i.into())
10654                .collect::<Vec<String>>(),
10655        );
10656        ModuleSource {
10657            proc: self.proc.clone(),
10658            selection: query,
10659            graphql_client: self.graphql_client.clone(),
10660        }
10661    }
10662    /// Update one or more clients.
10663    ///
10664    /// # Arguments
10665    ///
10666    /// * `clients` - The clients to update
10667    pub fn with_updated_clients(&self, clients: Vec<impl Into<String>>) -> ModuleSource {
10668        let mut query = self.selection.select("withUpdatedClients");
10669        query = query.arg(
10670            "clients",
10671            clients
10672                .into_iter()
10673                .map(|i| i.into())
10674                .collect::<Vec<String>>(),
10675        );
10676        ModuleSource {
10677            proc: self.proc.clone(),
10678            selection: query,
10679            graphql_client: self.graphql_client.clone(),
10680        }
10681    }
10682    /// Remove the current blueprint from the module source.
10683    pub fn without_blueprint(&self) -> ModuleSource {
10684        let query = self.selection.select("withoutBlueprint");
10685        ModuleSource {
10686            proc: self.proc.clone(),
10687            selection: query,
10688            graphql_client: self.graphql_client.clone(),
10689        }
10690    }
10691    /// Remove a client from the module source.
10692    ///
10693    /// # Arguments
10694    ///
10695    /// * `path` - The path of the client to remove.
10696    pub fn without_client(&self, path: impl Into<String>) -> ModuleSource {
10697        let mut query = self.selection.select("withoutClient");
10698        query = query.arg("path", path.into());
10699        ModuleSource {
10700            proc: self.proc.clone(),
10701            selection: query,
10702            graphql_client: self.graphql_client.clone(),
10703        }
10704    }
10705    /// Remove the provided dependencies from the module source's dependency list.
10706    ///
10707    /// # Arguments
10708    ///
10709    /// * `dependencies` - The dependencies to remove.
10710    pub fn without_dependencies(&self, dependencies: Vec<impl Into<String>>) -> ModuleSource {
10711        let mut query = self.selection.select("withoutDependencies");
10712        query = query.arg(
10713            "dependencies",
10714            dependencies
10715                .into_iter()
10716                .map(|i| i.into())
10717                .collect::<Vec<String>>(),
10718        );
10719        ModuleSource {
10720            proc: self.proc.clone(),
10721            selection: query,
10722            graphql_client: self.graphql_client.clone(),
10723        }
10724    }
10725    /// Disable experimental features for the module source.
10726    ///
10727    /// # Arguments
10728    ///
10729    /// * `features` - The experimental features to disable.
10730    pub fn without_experimental_features(
10731        &self,
10732        features: Vec<ModuleSourceExperimentalFeature>,
10733    ) -> ModuleSource {
10734        let mut query = self.selection.select("withoutExperimentalFeatures");
10735        query = query.arg("features", features);
10736        ModuleSource {
10737            proc: self.proc.clone(),
10738            selection: query,
10739            graphql_client: self.graphql_client.clone(),
10740        }
10741    }
10742    /// Remove the provided toolchains from the module source.
10743    ///
10744    /// # Arguments
10745    ///
10746    /// * `toolchains` - The toolchains to remove.
10747    pub fn without_toolchains(&self, toolchains: Vec<impl Into<String>>) -> ModuleSource {
10748        let mut query = self.selection.select("withoutToolchains");
10749        query = query.arg(
10750            "toolchains",
10751            toolchains
10752                .into_iter()
10753                .map(|i| i.into())
10754                .collect::<Vec<String>>(),
10755        );
10756        ModuleSource {
10757            proc: self.proc.clone(),
10758            selection: query,
10759            graphql_client: self.graphql_client.clone(),
10760        }
10761    }
10762}
10763#[derive(Clone)]
10764pub struct ObjectTypeDef {
10765    pub proc: Option<Arc<DaggerSessionProc>>,
10766    pub selection: Selection,
10767    pub graphql_client: DynGraphQLClient,
10768}
10769impl ObjectTypeDef {
10770    /// The function used to construct new instances of this object, if any
10771    pub fn constructor(&self) -> Function {
10772        let query = self.selection.select("constructor");
10773        Function {
10774            proc: self.proc.clone(),
10775            selection: query,
10776            graphql_client: self.graphql_client.clone(),
10777        }
10778    }
10779    /// The reason this enum member is deprecated, if any.
10780    pub async fn deprecated(&self) -> Result<String, DaggerError> {
10781        let query = self.selection.select("deprecated");
10782        query.execute(self.graphql_client.clone()).await
10783    }
10784    /// The doc string for the object, if any.
10785    pub async fn description(&self) -> Result<String, DaggerError> {
10786        let query = self.selection.select("description");
10787        query.execute(self.graphql_client.clone()).await
10788    }
10789    /// Static fields defined on this object, if any.
10790    pub fn fields(&self) -> Vec<FieldTypeDef> {
10791        let query = self.selection.select("fields");
10792        vec![FieldTypeDef {
10793            proc: self.proc.clone(),
10794            selection: query,
10795            graphql_client: self.graphql_client.clone(),
10796        }]
10797    }
10798    /// Functions defined on this object, if any.
10799    pub fn functions(&self) -> Vec<Function> {
10800        let query = self.selection.select("functions");
10801        vec![Function {
10802            proc: self.proc.clone(),
10803            selection: query,
10804            graphql_client: self.graphql_client.clone(),
10805        }]
10806    }
10807    /// A unique identifier for this ObjectTypeDef.
10808    pub async fn id(&self) -> Result<ObjectTypeDefId, DaggerError> {
10809        let query = self.selection.select("id");
10810        query.execute(self.graphql_client.clone()).await
10811    }
10812    /// The name of the object.
10813    pub async fn name(&self) -> Result<String, DaggerError> {
10814        let query = self.selection.select("name");
10815        query.execute(self.graphql_client.clone()).await
10816    }
10817    /// The location of this object declaration.
10818    pub fn source_map(&self) -> SourceMap {
10819        let query = self.selection.select("sourceMap");
10820        SourceMap {
10821            proc: self.proc.clone(),
10822            selection: query,
10823            graphql_client: self.graphql_client.clone(),
10824        }
10825    }
10826    /// If this ObjectTypeDef is associated with a Module, the name of the module. Unset otherwise.
10827    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
10828        let query = self.selection.select("sourceModuleName");
10829        query.execute(self.graphql_client.clone()).await
10830    }
10831}
10832#[derive(Clone)]
10833pub struct Port {
10834    pub proc: Option<Arc<DaggerSessionProc>>,
10835    pub selection: Selection,
10836    pub graphql_client: DynGraphQLClient,
10837}
10838impl Port {
10839    /// The port description.
10840    pub async fn description(&self) -> Result<String, DaggerError> {
10841        let query = self.selection.select("description");
10842        query.execute(self.graphql_client.clone()).await
10843    }
10844    /// Skip the health check when run as a service.
10845    pub async fn experimental_skip_healthcheck(&self) -> Result<bool, DaggerError> {
10846        let query = self.selection.select("experimentalSkipHealthcheck");
10847        query.execute(self.graphql_client.clone()).await
10848    }
10849    /// A unique identifier for this Port.
10850    pub async fn id(&self) -> Result<PortId, DaggerError> {
10851        let query = self.selection.select("id");
10852        query.execute(self.graphql_client.clone()).await
10853    }
10854    /// The port number.
10855    pub async fn port(&self) -> Result<isize, DaggerError> {
10856        let query = self.selection.select("port");
10857        query.execute(self.graphql_client.clone()).await
10858    }
10859    /// The transport layer protocol.
10860    pub async fn protocol(&self) -> Result<NetworkProtocol, DaggerError> {
10861        let query = self.selection.select("protocol");
10862        query.execute(self.graphql_client.clone()).await
10863    }
10864}
10865#[derive(Clone)]
10866pub struct Query {
10867    pub proc: Option<Arc<DaggerSessionProc>>,
10868    pub selection: Selection,
10869    pub graphql_client: DynGraphQLClient,
10870}
10871#[derive(Builder, Debug, PartialEq)]
10872pub struct QueryContainerOpts {
10873    /// Platform to initialize the container with. Defaults to the native platform of the current engine
10874    #[builder(setter(into, strip_option), default)]
10875    pub platform: Option<Platform>,
10876}
10877#[derive(Builder, Debug, PartialEq)]
10878pub struct QueryEnvOpts {
10879    /// Give the environment the same privileges as the caller: core API including host access, current module, and dependencies
10880    #[builder(setter(into, strip_option), default)]
10881    pub privileged: Option<bool>,
10882    /// Allow new outputs to be declared and saved in the environment
10883    #[builder(setter(into, strip_option), default)]
10884    pub writable: Option<bool>,
10885}
10886#[derive(Builder, Debug, PartialEq)]
10887pub struct QueryEnvFileOpts {
10888    /// Replace "${VAR}" or "$VAR" with the value of other vars
10889    #[builder(setter(into, strip_option), default)]
10890    pub expand: Option<bool>,
10891}
10892#[derive(Builder, Debug, PartialEq)]
10893pub struct QueryFileOpts {
10894    /// Permissions of the new file. Example: 0600
10895    #[builder(setter(into, strip_option), default)]
10896    pub permissions: Option<isize>,
10897}
10898#[derive(Builder, Debug, PartialEq)]
10899pub struct QueryGitOpts<'a> {
10900    /// A service which must be started before the repo is fetched.
10901    #[builder(setter(into, strip_option), default)]
10902    pub experimental_service_host: Option<ServiceId>,
10903    /// Secret used to populate the Authorization HTTP header
10904    #[builder(setter(into, strip_option), default)]
10905    pub http_auth_header: Option<SecretId>,
10906    /// Secret used to populate the password during basic HTTP Authorization
10907    #[builder(setter(into, strip_option), default)]
10908    pub http_auth_token: Option<SecretId>,
10909    /// Username used to populate the password during basic HTTP Authorization
10910    #[builder(setter(into, strip_option), default)]
10911    pub http_auth_username: Option<&'a str>,
10912    /// DEPRECATED: Set to true to keep .git directory.
10913    #[builder(setter(into, strip_option), default)]
10914    pub keep_git_dir: Option<bool>,
10915    /// Set SSH auth socket
10916    #[builder(setter(into, strip_option), default)]
10917    pub ssh_auth_socket: Option<SocketId>,
10918    /// Set SSH known hosts
10919    #[builder(setter(into, strip_option), default)]
10920    pub ssh_known_hosts: Option<&'a str>,
10921}
10922#[derive(Builder, Debug, PartialEq)]
10923pub struct QueryHttpOpts<'a> {
10924    /// Secret used to populate the Authorization HTTP header
10925    #[builder(setter(into, strip_option), default)]
10926    pub auth_header: Option<SecretId>,
10927    /// A service which must be started before the URL is fetched.
10928    #[builder(setter(into, strip_option), default)]
10929    pub experimental_service_host: Option<ServiceId>,
10930    /// File name to use for the file. Defaults to the last part of the URL.
10931    #[builder(setter(into, strip_option), default)]
10932    pub name: Option<&'a str>,
10933    /// Permissions to set on the file.
10934    #[builder(setter(into, strip_option), default)]
10935    pub permissions: Option<isize>,
10936}
10937#[derive(Builder, Debug, PartialEq)]
10938pub struct QueryLlmOpts<'a> {
10939    /// Cap the number of API calls for this LLM
10940    #[builder(setter(into, strip_option), default)]
10941    pub max_api_calls: Option<isize>,
10942    /// Model to use
10943    #[builder(setter(into, strip_option), default)]
10944    pub model: Option<&'a str>,
10945}
10946#[derive(Builder, Debug, PartialEq)]
10947pub struct QueryModuleSourceOpts<'a> {
10948    /// 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.
10949    #[builder(setter(into, strip_option), default)]
10950    pub allow_not_exists: Option<bool>,
10951    /// If true, do not attempt to find dagger.json in a parent directory of the provided path. Only relevant for local module sources.
10952    #[builder(setter(into, strip_option), default)]
10953    pub disable_find_up: Option<bool>,
10954    /// The pinned version of the module source
10955    #[builder(setter(into, strip_option), default)]
10956    pub ref_pin: Option<&'a str>,
10957    /// If set, error out if the ref string is not of the provided requireKind.
10958    #[builder(setter(into, strip_option), default)]
10959    pub require_kind: Option<ModuleSourceKind>,
10960}
10961#[derive(Builder, Debug, PartialEq)]
10962pub struct QuerySecretOpts<'a> {
10963    /// 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.
10964    /// 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.
10965    /// If not set, the cache key for the secret will be derived from its plaintext value as looked up when the secret is constructed.
10966    #[builder(setter(into, strip_option), default)]
10967    pub cache_key: Option<&'a str>,
10968}
10969impl Query {
10970    /// initialize an address to load directories, containers, secrets or other object types.
10971    pub fn address(&self, value: impl Into<String>) -> Address {
10972        let mut query = self.selection.select("address");
10973        query = query.arg("value", value.into());
10974        Address {
10975            proc: self.proc.clone(),
10976            selection: query,
10977            graphql_client: self.graphql_client.clone(),
10978        }
10979    }
10980    /// Constructs a cache volume for a given cache key.
10981    ///
10982    /// # Arguments
10983    ///
10984    /// * `key` - A string identifier to target this cache volume (e.g., "modules-cache").
10985    pub fn cache_volume(&self, key: impl Into<String>) -> CacheVolume {
10986        let mut query = self.selection.select("cacheVolume");
10987        query = query.arg("key", key.into());
10988        CacheVolume {
10989            proc: self.proc.clone(),
10990            selection: query,
10991            graphql_client: self.graphql_client.clone(),
10992        }
10993    }
10994    /// Dagger Cloud configuration and state
10995    pub fn cloud(&self) -> Cloud {
10996        let query = self.selection.select("cloud");
10997        Cloud {
10998            proc: self.proc.clone(),
10999            selection: query,
11000            graphql_client: self.graphql_client.clone(),
11001        }
11002    }
11003    /// Creates a scratch container, with no image or metadata.
11004    /// To pull an image, follow up with the "from" function.
11005    ///
11006    /// # Arguments
11007    ///
11008    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11009    pub fn container(&self) -> Container {
11010        let query = self.selection.select("container");
11011        Container {
11012            proc: self.proc.clone(),
11013            selection: query,
11014            graphql_client: self.graphql_client.clone(),
11015        }
11016    }
11017    /// Creates a scratch container, with no image or metadata.
11018    /// To pull an image, follow up with the "from" function.
11019    ///
11020    /// # Arguments
11021    ///
11022    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11023    pub fn container_opts(&self, opts: QueryContainerOpts) -> Container {
11024        let mut query = self.selection.select("container");
11025        if let Some(platform) = opts.platform {
11026            query = query.arg("platform", platform);
11027        }
11028        Container {
11029            proc: self.proc.clone(),
11030            selection: query,
11031            graphql_client: self.graphql_client.clone(),
11032        }
11033    }
11034    /// Returns the current environment
11035    /// 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.
11036    /// 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.
11037    pub fn current_env(&self) -> Env {
11038        let query = self.selection.select("currentEnv");
11039        Env {
11040            proc: self.proc.clone(),
11041            selection: query,
11042            graphql_client: self.graphql_client.clone(),
11043        }
11044    }
11045    /// The FunctionCall context that the SDK caller is currently executing in.
11046    /// If the caller is not currently executing in a function, this will return an error.
11047    pub fn current_function_call(&self) -> FunctionCall {
11048        let query = self.selection.select("currentFunctionCall");
11049        FunctionCall {
11050            proc: self.proc.clone(),
11051            selection: query,
11052            graphql_client: self.graphql_client.clone(),
11053        }
11054    }
11055    /// The module currently being served in the session, if any.
11056    pub fn current_module(&self) -> CurrentModule {
11057        let query = self.selection.select("currentModule");
11058        CurrentModule {
11059            proc: self.proc.clone(),
11060            selection: query,
11061            graphql_client: self.graphql_client.clone(),
11062        }
11063    }
11064    /// The TypeDef representations of the objects currently being served in the session.
11065    pub fn current_type_defs(&self) -> Vec<TypeDef> {
11066        let query = self.selection.select("currentTypeDefs");
11067        vec![TypeDef {
11068            proc: self.proc.clone(),
11069            selection: query,
11070            graphql_client: self.graphql_client.clone(),
11071        }]
11072    }
11073    /// The default platform of the engine.
11074    pub async fn default_platform(&self) -> Result<Platform, DaggerError> {
11075        let query = self.selection.select("defaultPlatform");
11076        query.execute(self.graphql_client.clone()).await
11077    }
11078    /// Creates an empty directory.
11079    pub fn directory(&self) -> Directory {
11080        let query = self.selection.select("directory");
11081        Directory {
11082            proc: self.proc.clone(),
11083            selection: query,
11084            graphql_client: self.graphql_client.clone(),
11085        }
11086    }
11087    /// The Dagger engine container configuration and state
11088    pub fn engine(&self) -> Engine {
11089        let query = self.selection.select("engine");
11090        Engine {
11091            proc: self.proc.clone(),
11092            selection: query,
11093            graphql_client: self.graphql_client.clone(),
11094        }
11095    }
11096    /// Initializes a new environment
11097    ///
11098    /// # Arguments
11099    ///
11100    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11101    pub fn env(&self) -> Env {
11102        let query = self.selection.select("env");
11103        Env {
11104            proc: self.proc.clone(),
11105            selection: query,
11106            graphql_client: self.graphql_client.clone(),
11107        }
11108    }
11109    /// Initializes a new environment
11110    ///
11111    /// # Arguments
11112    ///
11113    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11114    pub fn env_opts(&self, opts: QueryEnvOpts) -> Env {
11115        let mut query = self.selection.select("env");
11116        if let Some(privileged) = opts.privileged {
11117            query = query.arg("privileged", privileged);
11118        }
11119        if let Some(writable) = opts.writable {
11120            query = query.arg("writable", writable);
11121        }
11122        Env {
11123            proc: self.proc.clone(),
11124            selection: query,
11125            graphql_client: self.graphql_client.clone(),
11126        }
11127    }
11128    /// Initialize an environment file
11129    ///
11130    /// # Arguments
11131    ///
11132    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11133    pub fn env_file(&self) -> EnvFile {
11134        let query = self.selection.select("envFile");
11135        EnvFile {
11136            proc: self.proc.clone(),
11137            selection: query,
11138            graphql_client: self.graphql_client.clone(),
11139        }
11140    }
11141    /// Initialize an environment file
11142    ///
11143    /// # Arguments
11144    ///
11145    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11146    pub fn env_file_opts(&self, opts: QueryEnvFileOpts) -> EnvFile {
11147        let mut query = self.selection.select("envFile");
11148        if let Some(expand) = opts.expand {
11149            query = query.arg("expand", expand);
11150        }
11151        EnvFile {
11152            proc: self.proc.clone(),
11153            selection: query,
11154            graphql_client: self.graphql_client.clone(),
11155        }
11156    }
11157    /// Create a new error.
11158    ///
11159    /// # Arguments
11160    ///
11161    /// * `message` - A brief description of the error.
11162    pub fn error(&self, message: impl Into<String>) -> Error {
11163        let mut query = self.selection.select("error");
11164        query = query.arg("message", message.into());
11165        Error {
11166            proc: self.proc.clone(),
11167            selection: query,
11168            graphql_client: self.graphql_client.clone(),
11169        }
11170    }
11171    /// Creates a file with the specified contents.
11172    ///
11173    /// # Arguments
11174    ///
11175    /// * `name` - Name of the new file. Example: "foo.txt"
11176    /// * `contents` - Contents of the new file. Example: "Hello world!"
11177    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11178    pub fn file(&self, name: impl Into<String>, contents: impl Into<String>) -> File {
11179        let mut query = self.selection.select("file");
11180        query = query.arg("name", name.into());
11181        query = query.arg("contents", contents.into());
11182        File {
11183            proc: self.proc.clone(),
11184            selection: query,
11185            graphql_client: self.graphql_client.clone(),
11186        }
11187    }
11188    /// Creates a file with the specified contents.
11189    ///
11190    /// # Arguments
11191    ///
11192    /// * `name` - Name of the new file. Example: "foo.txt"
11193    /// * `contents` - Contents of the new file. Example: "Hello world!"
11194    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11195    pub fn file_opts(
11196        &self,
11197        name: impl Into<String>,
11198        contents: impl Into<String>,
11199        opts: QueryFileOpts,
11200    ) -> File {
11201        let mut query = self.selection.select("file");
11202        query = query.arg("name", name.into());
11203        query = query.arg("contents", contents.into());
11204        if let Some(permissions) = opts.permissions {
11205            query = query.arg("permissions", permissions);
11206        }
11207        File {
11208            proc: self.proc.clone(),
11209            selection: query,
11210            graphql_client: self.graphql_client.clone(),
11211        }
11212    }
11213    /// Creates a function.
11214    ///
11215    /// # Arguments
11216    ///
11217    /// * `name` - Name of the function, in its original format from the implementation language.
11218    /// * `return_type` - Return type of the function.
11219    pub fn function(
11220        &self,
11221        name: impl Into<String>,
11222        return_type: impl IntoID<TypeDefId>,
11223    ) -> Function {
11224        let mut query = self.selection.select("function");
11225        query = query.arg("name", name.into());
11226        query = query.arg_lazy(
11227            "returnType",
11228            Box::new(move || {
11229                let return_type = return_type.clone();
11230                Box::pin(async move { return_type.into_id().await.unwrap().quote() })
11231            }),
11232        );
11233        Function {
11234            proc: self.proc.clone(),
11235            selection: query,
11236            graphql_client: self.graphql_client.clone(),
11237        }
11238    }
11239    /// Create a code generation result, given a directory containing the generated code.
11240    pub fn generated_code(&self, code: impl IntoID<DirectoryId>) -> GeneratedCode {
11241        let mut query = self.selection.select("generatedCode");
11242        query = query.arg_lazy(
11243            "code",
11244            Box::new(move || {
11245                let code = code.clone();
11246                Box::pin(async move { code.into_id().await.unwrap().quote() })
11247            }),
11248        );
11249        GeneratedCode {
11250            proc: self.proc.clone(),
11251            selection: query,
11252            graphql_client: self.graphql_client.clone(),
11253        }
11254    }
11255    /// Queries a Git repository.
11256    ///
11257    /// # Arguments
11258    ///
11259    /// * `url` - URL of the git repository.
11260    ///
11261    /// Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.
11262    ///
11263    /// Suffix ".git" is optional.
11264    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11265    pub fn git(&self, url: impl Into<String>) -> GitRepository {
11266        let mut query = self.selection.select("git");
11267        query = query.arg("url", url.into());
11268        GitRepository {
11269            proc: self.proc.clone(),
11270            selection: query,
11271            graphql_client: self.graphql_client.clone(),
11272        }
11273    }
11274    /// Queries a Git repository.
11275    ///
11276    /// # Arguments
11277    ///
11278    /// * `url` - URL of the git repository.
11279    ///
11280    /// Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.
11281    ///
11282    /// Suffix ".git" is optional.
11283    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11284    pub fn git_opts<'a>(&self, url: impl Into<String>, opts: QueryGitOpts<'a>) -> GitRepository {
11285        let mut query = self.selection.select("git");
11286        query = query.arg("url", url.into());
11287        if let Some(keep_git_dir) = opts.keep_git_dir {
11288            query = query.arg("keepGitDir", keep_git_dir);
11289        }
11290        if let Some(ssh_known_hosts) = opts.ssh_known_hosts {
11291            query = query.arg("sshKnownHosts", ssh_known_hosts);
11292        }
11293        if let Some(ssh_auth_socket) = opts.ssh_auth_socket {
11294            query = query.arg("sshAuthSocket", ssh_auth_socket);
11295        }
11296        if let Some(http_auth_username) = opts.http_auth_username {
11297            query = query.arg("httpAuthUsername", http_auth_username);
11298        }
11299        if let Some(http_auth_token) = opts.http_auth_token {
11300            query = query.arg("httpAuthToken", http_auth_token);
11301        }
11302        if let Some(http_auth_header) = opts.http_auth_header {
11303            query = query.arg("httpAuthHeader", http_auth_header);
11304        }
11305        if let Some(experimental_service_host) = opts.experimental_service_host {
11306            query = query.arg("experimentalServiceHost", experimental_service_host);
11307        }
11308        GitRepository {
11309            proc: self.proc.clone(),
11310            selection: query,
11311            graphql_client: self.graphql_client.clone(),
11312        }
11313    }
11314    /// Queries the host environment.
11315    pub fn host(&self) -> Host {
11316        let query = self.selection.select("host");
11317        Host {
11318            proc: self.proc.clone(),
11319            selection: query,
11320            graphql_client: self.graphql_client.clone(),
11321        }
11322    }
11323    /// Returns a file containing an http remote url content.
11324    ///
11325    /// # Arguments
11326    ///
11327    /// * `url` - HTTP url to get the content from (e.g., "https://docs.dagger.io").
11328    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11329    pub fn http(&self, url: impl Into<String>) -> File {
11330        let mut query = self.selection.select("http");
11331        query = query.arg("url", url.into());
11332        File {
11333            proc: self.proc.clone(),
11334            selection: query,
11335            graphql_client: self.graphql_client.clone(),
11336        }
11337    }
11338    /// Returns a file containing an http remote url content.
11339    ///
11340    /// # Arguments
11341    ///
11342    /// * `url` - HTTP url to get the content from (e.g., "https://docs.dagger.io").
11343    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11344    pub fn http_opts<'a>(&self, url: impl Into<String>, opts: QueryHttpOpts<'a>) -> File {
11345        let mut query = self.selection.select("http");
11346        query = query.arg("url", url.into());
11347        if let Some(name) = opts.name {
11348            query = query.arg("name", name);
11349        }
11350        if let Some(permissions) = opts.permissions {
11351            query = query.arg("permissions", permissions);
11352        }
11353        if let Some(auth_header) = opts.auth_header {
11354            query = query.arg("authHeader", auth_header);
11355        }
11356        if let Some(experimental_service_host) = opts.experimental_service_host {
11357            query = query.arg("experimentalServiceHost", experimental_service_host);
11358        }
11359        File {
11360            proc: self.proc.clone(),
11361            selection: query,
11362            graphql_client: self.graphql_client.clone(),
11363        }
11364    }
11365    /// Initialize a JSON value
11366    pub fn json(&self) -> JsonValue {
11367        let query = self.selection.select("json");
11368        JsonValue {
11369            proc: self.proc.clone(),
11370            selection: query,
11371            graphql_client: self.graphql_client.clone(),
11372        }
11373    }
11374    /// Initialize a Large Language Model (LLM)
11375    ///
11376    /// # Arguments
11377    ///
11378    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11379    pub fn llm(&self) -> Llm {
11380        let query = self.selection.select("llm");
11381        Llm {
11382            proc: self.proc.clone(),
11383            selection: query,
11384            graphql_client: self.graphql_client.clone(),
11385        }
11386    }
11387    /// Initialize a Large Language Model (LLM)
11388    ///
11389    /// # Arguments
11390    ///
11391    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11392    pub fn llm_opts<'a>(&self, opts: QueryLlmOpts<'a>) -> Llm {
11393        let mut query = self.selection.select("llm");
11394        if let Some(model) = opts.model {
11395            query = query.arg("model", model);
11396        }
11397        if let Some(max_api_calls) = opts.max_api_calls {
11398            query = query.arg("maxAPICalls", max_api_calls);
11399        }
11400        Llm {
11401            proc: self.proc.clone(),
11402            selection: query,
11403            graphql_client: self.graphql_client.clone(),
11404        }
11405    }
11406    /// Load a Address from its ID.
11407    pub fn load_address_from_id(&self, id: impl IntoID<AddressId>) -> Address {
11408        let mut query = self.selection.select("loadAddressFromID");
11409        query = query.arg_lazy(
11410            "id",
11411            Box::new(move || {
11412                let id = id.clone();
11413                Box::pin(async move { id.into_id().await.unwrap().quote() })
11414            }),
11415        );
11416        Address {
11417            proc: self.proc.clone(),
11418            selection: query,
11419            graphql_client: self.graphql_client.clone(),
11420        }
11421    }
11422    /// Load a Binding from its ID.
11423    pub fn load_binding_from_id(&self, id: impl IntoID<BindingId>) -> Binding {
11424        let mut query = self.selection.select("loadBindingFromID");
11425        query = query.arg_lazy(
11426            "id",
11427            Box::new(move || {
11428                let id = id.clone();
11429                Box::pin(async move { id.into_id().await.unwrap().quote() })
11430            }),
11431        );
11432        Binding {
11433            proc: self.proc.clone(),
11434            selection: query,
11435            graphql_client: self.graphql_client.clone(),
11436        }
11437    }
11438    /// Load a CacheVolume from its ID.
11439    pub fn load_cache_volume_from_id(&self, id: impl IntoID<CacheVolumeId>) -> CacheVolume {
11440        let mut query = self.selection.select("loadCacheVolumeFromID");
11441        query = query.arg_lazy(
11442            "id",
11443            Box::new(move || {
11444                let id = id.clone();
11445                Box::pin(async move { id.into_id().await.unwrap().quote() })
11446            }),
11447        );
11448        CacheVolume {
11449            proc: self.proc.clone(),
11450            selection: query,
11451            graphql_client: self.graphql_client.clone(),
11452        }
11453    }
11454    /// Load a Changeset from its ID.
11455    pub fn load_changeset_from_id(&self, id: impl IntoID<ChangesetId>) -> Changeset {
11456        let mut query = self.selection.select("loadChangesetFromID");
11457        query = query.arg_lazy(
11458            "id",
11459            Box::new(move || {
11460                let id = id.clone();
11461                Box::pin(async move { id.into_id().await.unwrap().quote() })
11462            }),
11463        );
11464        Changeset {
11465            proc: self.proc.clone(),
11466            selection: query,
11467            graphql_client: self.graphql_client.clone(),
11468        }
11469    }
11470    /// Load a Check from its ID.
11471    pub fn load_check_from_id(&self, id: impl IntoID<CheckId>) -> Check {
11472        let mut query = self.selection.select("loadCheckFromID");
11473        query = query.arg_lazy(
11474            "id",
11475            Box::new(move || {
11476                let id = id.clone();
11477                Box::pin(async move { id.into_id().await.unwrap().quote() })
11478            }),
11479        );
11480        Check {
11481            proc: self.proc.clone(),
11482            selection: query,
11483            graphql_client: self.graphql_client.clone(),
11484        }
11485    }
11486    /// Load a CheckGroup from its ID.
11487    pub fn load_check_group_from_id(&self, id: impl IntoID<CheckGroupId>) -> CheckGroup {
11488        let mut query = self.selection.select("loadCheckGroupFromID");
11489        query = query.arg_lazy(
11490            "id",
11491            Box::new(move || {
11492                let id = id.clone();
11493                Box::pin(async move { id.into_id().await.unwrap().quote() })
11494            }),
11495        );
11496        CheckGroup {
11497            proc: self.proc.clone(),
11498            selection: query,
11499            graphql_client: self.graphql_client.clone(),
11500        }
11501    }
11502    /// Load a Cloud from its ID.
11503    pub fn load_cloud_from_id(&self, id: impl IntoID<CloudId>) -> Cloud {
11504        let mut query = self.selection.select("loadCloudFromID");
11505        query = query.arg_lazy(
11506            "id",
11507            Box::new(move || {
11508                let id = id.clone();
11509                Box::pin(async move { id.into_id().await.unwrap().quote() })
11510            }),
11511        );
11512        Cloud {
11513            proc: self.proc.clone(),
11514            selection: query,
11515            graphql_client: self.graphql_client.clone(),
11516        }
11517    }
11518    /// Load a Container from its ID.
11519    pub fn load_container_from_id(&self, id: impl IntoID<ContainerId>) -> Container {
11520        let mut query = self.selection.select("loadContainerFromID");
11521        query = query.arg_lazy(
11522            "id",
11523            Box::new(move || {
11524                let id = id.clone();
11525                Box::pin(async move { id.into_id().await.unwrap().quote() })
11526            }),
11527        );
11528        Container {
11529            proc: self.proc.clone(),
11530            selection: query,
11531            graphql_client: self.graphql_client.clone(),
11532        }
11533    }
11534    /// Load a CurrentModule from its ID.
11535    pub fn load_current_module_from_id(&self, id: impl IntoID<CurrentModuleId>) -> CurrentModule {
11536        let mut query = self.selection.select("loadCurrentModuleFromID");
11537        query = query.arg_lazy(
11538            "id",
11539            Box::new(move || {
11540                let id = id.clone();
11541                Box::pin(async move { id.into_id().await.unwrap().quote() })
11542            }),
11543        );
11544        CurrentModule {
11545            proc: self.proc.clone(),
11546            selection: query,
11547            graphql_client: self.graphql_client.clone(),
11548        }
11549    }
11550    /// Load a Directory from its ID.
11551    pub fn load_directory_from_id(&self, id: impl IntoID<DirectoryId>) -> Directory {
11552        let mut query = self.selection.select("loadDirectoryFromID");
11553        query = query.arg_lazy(
11554            "id",
11555            Box::new(move || {
11556                let id = id.clone();
11557                Box::pin(async move { id.into_id().await.unwrap().quote() })
11558            }),
11559        );
11560        Directory {
11561            proc: self.proc.clone(),
11562            selection: query,
11563            graphql_client: self.graphql_client.clone(),
11564        }
11565    }
11566    /// Load a EngineCacheEntry from its ID.
11567    pub fn load_engine_cache_entry_from_id(
11568        &self,
11569        id: impl IntoID<EngineCacheEntryId>,
11570    ) -> EngineCacheEntry {
11571        let mut query = self.selection.select("loadEngineCacheEntryFromID");
11572        query = query.arg_lazy(
11573            "id",
11574            Box::new(move || {
11575                let id = id.clone();
11576                Box::pin(async move { id.into_id().await.unwrap().quote() })
11577            }),
11578        );
11579        EngineCacheEntry {
11580            proc: self.proc.clone(),
11581            selection: query,
11582            graphql_client: self.graphql_client.clone(),
11583        }
11584    }
11585    /// Load a EngineCacheEntrySet from its ID.
11586    pub fn load_engine_cache_entry_set_from_id(
11587        &self,
11588        id: impl IntoID<EngineCacheEntrySetId>,
11589    ) -> EngineCacheEntrySet {
11590        let mut query = self.selection.select("loadEngineCacheEntrySetFromID");
11591        query = query.arg_lazy(
11592            "id",
11593            Box::new(move || {
11594                let id = id.clone();
11595                Box::pin(async move { id.into_id().await.unwrap().quote() })
11596            }),
11597        );
11598        EngineCacheEntrySet {
11599            proc: self.proc.clone(),
11600            selection: query,
11601            graphql_client: self.graphql_client.clone(),
11602        }
11603    }
11604    /// Load a EngineCache from its ID.
11605    pub fn load_engine_cache_from_id(&self, id: impl IntoID<EngineCacheId>) -> EngineCache {
11606        let mut query = self.selection.select("loadEngineCacheFromID");
11607        query = query.arg_lazy(
11608            "id",
11609            Box::new(move || {
11610                let id = id.clone();
11611                Box::pin(async move { id.into_id().await.unwrap().quote() })
11612            }),
11613        );
11614        EngineCache {
11615            proc: self.proc.clone(),
11616            selection: query,
11617            graphql_client: self.graphql_client.clone(),
11618        }
11619    }
11620    /// Load a Engine from its ID.
11621    pub fn load_engine_from_id(&self, id: impl IntoID<EngineId>) -> Engine {
11622        let mut query = self.selection.select("loadEngineFromID");
11623        query = query.arg_lazy(
11624            "id",
11625            Box::new(move || {
11626                let id = id.clone();
11627                Box::pin(async move { id.into_id().await.unwrap().quote() })
11628            }),
11629        );
11630        Engine {
11631            proc: self.proc.clone(),
11632            selection: query,
11633            graphql_client: self.graphql_client.clone(),
11634        }
11635    }
11636    /// Load a EnumTypeDef from its ID.
11637    pub fn load_enum_type_def_from_id(&self, id: impl IntoID<EnumTypeDefId>) -> EnumTypeDef {
11638        let mut query = self.selection.select("loadEnumTypeDefFromID");
11639        query = query.arg_lazy(
11640            "id",
11641            Box::new(move || {
11642                let id = id.clone();
11643                Box::pin(async move { id.into_id().await.unwrap().quote() })
11644            }),
11645        );
11646        EnumTypeDef {
11647            proc: self.proc.clone(),
11648            selection: query,
11649            graphql_client: self.graphql_client.clone(),
11650        }
11651    }
11652    /// Load a EnumValueTypeDef from its ID.
11653    pub fn load_enum_value_type_def_from_id(
11654        &self,
11655        id: impl IntoID<EnumValueTypeDefId>,
11656    ) -> EnumValueTypeDef {
11657        let mut query = self.selection.select("loadEnumValueTypeDefFromID");
11658        query = query.arg_lazy(
11659            "id",
11660            Box::new(move || {
11661                let id = id.clone();
11662                Box::pin(async move { id.into_id().await.unwrap().quote() })
11663            }),
11664        );
11665        EnumValueTypeDef {
11666            proc: self.proc.clone(),
11667            selection: query,
11668            graphql_client: self.graphql_client.clone(),
11669        }
11670    }
11671    /// Load a EnvFile from its ID.
11672    pub fn load_env_file_from_id(&self, id: impl IntoID<EnvFileId>) -> EnvFile {
11673        let mut query = self.selection.select("loadEnvFileFromID");
11674        query = query.arg_lazy(
11675            "id",
11676            Box::new(move || {
11677                let id = id.clone();
11678                Box::pin(async move { id.into_id().await.unwrap().quote() })
11679            }),
11680        );
11681        EnvFile {
11682            proc: self.proc.clone(),
11683            selection: query,
11684            graphql_client: self.graphql_client.clone(),
11685        }
11686    }
11687    /// Load a Env from its ID.
11688    pub fn load_env_from_id(&self, id: impl IntoID<EnvId>) -> Env {
11689        let mut query = self.selection.select("loadEnvFromID");
11690        query = query.arg_lazy(
11691            "id",
11692            Box::new(move || {
11693                let id = id.clone();
11694                Box::pin(async move { id.into_id().await.unwrap().quote() })
11695            }),
11696        );
11697        Env {
11698            proc: self.proc.clone(),
11699            selection: query,
11700            graphql_client: self.graphql_client.clone(),
11701        }
11702    }
11703    /// Load a EnvVariable from its ID.
11704    pub fn load_env_variable_from_id(&self, id: impl IntoID<EnvVariableId>) -> EnvVariable {
11705        let mut query = self.selection.select("loadEnvVariableFromID");
11706        query = query.arg_lazy(
11707            "id",
11708            Box::new(move || {
11709                let id = id.clone();
11710                Box::pin(async move { id.into_id().await.unwrap().quote() })
11711            }),
11712        );
11713        EnvVariable {
11714            proc: self.proc.clone(),
11715            selection: query,
11716            graphql_client: self.graphql_client.clone(),
11717        }
11718    }
11719    /// Load a Error from its ID.
11720    pub fn load_error_from_id(&self, id: impl IntoID<ErrorId>) -> Error {
11721        let mut query = self.selection.select("loadErrorFromID");
11722        query = query.arg_lazy(
11723            "id",
11724            Box::new(move || {
11725                let id = id.clone();
11726                Box::pin(async move { id.into_id().await.unwrap().quote() })
11727            }),
11728        );
11729        Error {
11730            proc: self.proc.clone(),
11731            selection: query,
11732            graphql_client: self.graphql_client.clone(),
11733        }
11734    }
11735    /// Load a ErrorValue from its ID.
11736    pub fn load_error_value_from_id(&self, id: impl IntoID<ErrorValueId>) -> ErrorValue {
11737        let mut query = self.selection.select("loadErrorValueFromID");
11738        query = query.arg_lazy(
11739            "id",
11740            Box::new(move || {
11741                let id = id.clone();
11742                Box::pin(async move { id.into_id().await.unwrap().quote() })
11743            }),
11744        );
11745        ErrorValue {
11746            proc: self.proc.clone(),
11747            selection: query,
11748            graphql_client: self.graphql_client.clone(),
11749        }
11750    }
11751    /// Load a FieldTypeDef from its ID.
11752    pub fn load_field_type_def_from_id(&self, id: impl IntoID<FieldTypeDefId>) -> FieldTypeDef {
11753        let mut query = self.selection.select("loadFieldTypeDefFromID");
11754        query = query.arg_lazy(
11755            "id",
11756            Box::new(move || {
11757                let id = id.clone();
11758                Box::pin(async move { id.into_id().await.unwrap().quote() })
11759            }),
11760        );
11761        FieldTypeDef {
11762            proc: self.proc.clone(),
11763            selection: query,
11764            graphql_client: self.graphql_client.clone(),
11765        }
11766    }
11767    /// Load a File from its ID.
11768    pub fn load_file_from_id(&self, id: impl IntoID<FileId>) -> File {
11769        let mut query = self.selection.select("loadFileFromID");
11770        query = query.arg_lazy(
11771            "id",
11772            Box::new(move || {
11773                let id = id.clone();
11774                Box::pin(async move { id.into_id().await.unwrap().quote() })
11775            }),
11776        );
11777        File {
11778            proc: self.proc.clone(),
11779            selection: query,
11780            graphql_client: self.graphql_client.clone(),
11781        }
11782    }
11783    /// Load a FunctionArg from its ID.
11784    pub fn load_function_arg_from_id(&self, id: impl IntoID<FunctionArgId>) -> FunctionArg {
11785        let mut query = self.selection.select("loadFunctionArgFromID");
11786        query = query.arg_lazy(
11787            "id",
11788            Box::new(move || {
11789                let id = id.clone();
11790                Box::pin(async move { id.into_id().await.unwrap().quote() })
11791            }),
11792        );
11793        FunctionArg {
11794            proc: self.proc.clone(),
11795            selection: query,
11796            graphql_client: self.graphql_client.clone(),
11797        }
11798    }
11799    /// Load a FunctionCallArgValue from its ID.
11800    pub fn load_function_call_arg_value_from_id(
11801        &self,
11802        id: impl IntoID<FunctionCallArgValueId>,
11803    ) -> FunctionCallArgValue {
11804        let mut query = self.selection.select("loadFunctionCallArgValueFromID");
11805        query = query.arg_lazy(
11806            "id",
11807            Box::new(move || {
11808                let id = id.clone();
11809                Box::pin(async move { id.into_id().await.unwrap().quote() })
11810            }),
11811        );
11812        FunctionCallArgValue {
11813            proc: self.proc.clone(),
11814            selection: query,
11815            graphql_client: self.graphql_client.clone(),
11816        }
11817    }
11818    /// Load a FunctionCall from its ID.
11819    pub fn load_function_call_from_id(&self, id: impl IntoID<FunctionCallId>) -> FunctionCall {
11820        let mut query = self.selection.select("loadFunctionCallFromID");
11821        query = query.arg_lazy(
11822            "id",
11823            Box::new(move || {
11824                let id = id.clone();
11825                Box::pin(async move { id.into_id().await.unwrap().quote() })
11826            }),
11827        );
11828        FunctionCall {
11829            proc: self.proc.clone(),
11830            selection: query,
11831            graphql_client: self.graphql_client.clone(),
11832        }
11833    }
11834    /// Load a Function from its ID.
11835    pub fn load_function_from_id(&self, id: impl IntoID<FunctionId>) -> Function {
11836        let mut query = self.selection.select("loadFunctionFromID");
11837        query = query.arg_lazy(
11838            "id",
11839            Box::new(move || {
11840                let id = id.clone();
11841                Box::pin(async move { id.into_id().await.unwrap().quote() })
11842            }),
11843        );
11844        Function {
11845            proc: self.proc.clone(),
11846            selection: query,
11847            graphql_client: self.graphql_client.clone(),
11848        }
11849    }
11850    /// Load a GeneratedCode from its ID.
11851    pub fn load_generated_code_from_id(&self, id: impl IntoID<GeneratedCodeId>) -> GeneratedCode {
11852        let mut query = self.selection.select("loadGeneratedCodeFromID");
11853        query = query.arg_lazy(
11854            "id",
11855            Box::new(move || {
11856                let id = id.clone();
11857                Box::pin(async move { id.into_id().await.unwrap().quote() })
11858            }),
11859        );
11860        GeneratedCode {
11861            proc: self.proc.clone(),
11862            selection: query,
11863            graphql_client: self.graphql_client.clone(),
11864        }
11865    }
11866    /// Load a GitRef from its ID.
11867    pub fn load_git_ref_from_id(&self, id: impl IntoID<GitRefId>) -> GitRef {
11868        let mut query = self.selection.select("loadGitRefFromID");
11869        query = query.arg_lazy(
11870            "id",
11871            Box::new(move || {
11872                let id = id.clone();
11873                Box::pin(async move { id.into_id().await.unwrap().quote() })
11874            }),
11875        );
11876        GitRef {
11877            proc: self.proc.clone(),
11878            selection: query,
11879            graphql_client: self.graphql_client.clone(),
11880        }
11881    }
11882    /// Load a GitRepository from its ID.
11883    pub fn load_git_repository_from_id(&self, id: impl IntoID<GitRepositoryId>) -> GitRepository {
11884        let mut query = self.selection.select("loadGitRepositoryFromID");
11885        query = query.arg_lazy(
11886            "id",
11887            Box::new(move || {
11888                let id = id.clone();
11889                Box::pin(async move { id.into_id().await.unwrap().quote() })
11890            }),
11891        );
11892        GitRepository {
11893            proc: self.proc.clone(),
11894            selection: query,
11895            graphql_client: self.graphql_client.clone(),
11896        }
11897    }
11898    /// Load a Host from its ID.
11899    pub fn load_host_from_id(&self, id: impl IntoID<HostId>) -> Host {
11900        let mut query = self.selection.select("loadHostFromID");
11901        query = query.arg_lazy(
11902            "id",
11903            Box::new(move || {
11904                let id = id.clone();
11905                Box::pin(async move { id.into_id().await.unwrap().quote() })
11906            }),
11907        );
11908        Host {
11909            proc: self.proc.clone(),
11910            selection: query,
11911            graphql_client: self.graphql_client.clone(),
11912        }
11913    }
11914    /// Load a InputTypeDef from its ID.
11915    pub fn load_input_type_def_from_id(&self, id: impl IntoID<InputTypeDefId>) -> InputTypeDef {
11916        let mut query = self.selection.select("loadInputTypeDefFromID");
11917        query = query.arg_lazy(
11918            "id",
11919            Box::new(move || {
11920                let id = id.clone();
11921                Box::pin(async move { id.into_id().await.unwrap().quote() })
11922            }),
11923        );
11924        InputTypeDef {
11925            proc: self.proc.clone(),
11926            selection: query,
11927            graphql_client: self.graphql_client.clone(),
11928        }
11929    }
11930    /// Load a InterfaceTypeDef from its ID.
11931    pub fn load_interface_type_def_from_id(
11932        &self,
11933        id: impl IntoID<InterfaceTypeDefId>,
11934    ) -> InterfaceTypeDef {
11935        let mut query = self.selection.select("loadInterfaceTypeDefFromID");
11936        query = query.arg_lazy(
11937            "id",
11938            Box::new(move || {
11939                let id = id.clone();
11940                Box::pin(async move { id.into_id().await.unwrap().quote() })
11941            }),
11942        );
11943        InterfaceTypeDef {
11944            proc: self.proc.clone(),
11945            selection: query,
11946            graphql_client: self.graphql_client.clone(),
11947        }
11948    }
11949    /// Load a JSONValue from its ID.
11950    pub fn load_json_value_from_id(&self, id: impl IntoID<JsonValueId>) -> JsonValue {
11951        let mut query = self.selection.select("loadJSONValueFromID");
11952        query = query.arg_lazy(
11953            "id",
11954            Box::new(move || {
11955                let id = id.clone();
11956                Box::pin(async move { id.into_id().await.unwrap().quote() })
11957            }),
11958        );
11959        JsonValue {
11960            proc: self.proc.clone(),
11961            selection: query,
11962            graphql_client: self.graphql_client.clone(),
11963        }
11964    }
11965    /// Load a LLM from its ID.
11966    pub fn load_llm_from_id(&self, id: impl IntoID<Llmid>) -> Llm {
11967        let mut query = self.selection.select("loadLLMFromID");
11968        query = query.arg_lazy(
11969            "id",
11970            Box::new(move || {
11971                let id = id.clone();
11972                Box::pin(async move { id.into_id().await.unwrap().quote() })
11973            }),
11974        );
11975        Llm {
11976            proc: self.proc.clone(),
11977            selection: query,
11978            graphql_client: self.graphql_client.clone(),
11979        }
11980    }
11981    /// Load a LLMTokenUsage from its ID.
11982    pub fn load_llm_token_usage_from_id(&self, id: impl IntoID<LlmTokenUsageId>) -> LlmTokenUsage {
11983        let mut query = self.selection.select("loadLLMTokenUsageFromID");
11984        query = query.arg_lazy(
11985            "id",
11986            Box::new(move || {
11987                let id = id.clone();
11988                Box::pin(async move { id.into_id().await.unwrap().quote() })
11989            }),
11990        );
11991        LlmTokenUsage {
11992            proc: self.proc.clone(),
11993            selection: query,
11994            graphql_client: self.graphql_client.clone(),
11995        }
11996    }
11997    /// Load a Label from its ID.
11998    pub fn load_label_from_id(&self, id: impl IntoID<LabelId>) -> Label {
11999        let mut query = self.selection.select("loadLabelFromID");
12000        query = query.arg_lazy(
12001            "id",
12002            Box::new(move || {
12003                let id = id.clone();
12004                Box::pin(async move { id.into_id().await.unwrap().quote() })
12005            }),
12006        );
12007        Label {
12008            proc: self.proc.clone(),
12009            selection: query,
12010            graphql_client: self.graphql_client.clone(),
12011        }
12012    }
12013    /// Load a ListTypeDef from its ID.
12014    pub fn load_list_type_def_from_id(&self, id: impl IntoID<ListTypeDefId>) -> ListTypeDef {
12015        let mut query = self.selection.select("loadListTypeDefFromID");
12016        query = query.arg_lazy(
12017            "id",
12018            Box::new(move || {
12019                let id = id.clone();
12020                Box::pin(async move { id.into_id().await.unwrap().quote() })
12021            }),
12022        );
12023        ListTypeDef {
12024            proc: self.proc.clone(),
12025            selection: query,
12026            graphql_client: self.graphql_client.clone(),
12027        }
12028    }
12029    /// Load a ModuleConfigClient from its ID.
12030    pub fn load_module_config_client_from_id(
12031        &self,
12032        id: impl IntoID<ModuleConfigClientId>,
12033    ) -> ModuleConfigClient {
12034        let mut query = self.selection.select("loadModuleConfigClientFromID");
12035        query = query.arg_lazy(
12036            "id",
12037            Box::new(move || {
12038                let id = id.clone();
12039                Box::pin(async move { id.into_id().await.unwrap().quote() })
12040            }),
12041        );
12042        ModuleConfigClient {
12043            proc: self.proc.clone(),
12044            selection: query,
12045            graphql_client: self.graphql_client.clone(),
12046        }
12047    }
12048    /// Load a Module from its ID.
12049    pub fn load_module_from_id(&self, id: impl IntoID<ModuleId>) -> Module {
12050        let mut query = self.selection.select("loadModuleFromID");
12051        query = query.arg_lazy(
12052            "id",
12053            Box::new(move || {
12054                let id = id.clone();
12055                Box::pin(async move { id.into_id().await.unwrap().quote() })
12056            }),
12057        );
12058        Module {
12059            proc: self.proc.clone(),
12060            selection: query,
12061            graphql_client: self.graphql_client.clone(),
12062        }
12063    }
12064    /// Load a ModuleSource from its ID.
12065    pub fn load_module_source_from_id(&self, id: impl IntoID<ModuleSourceId>) -> ModuleSource {
12066        let mut query = self.selection.select("loadModuleSourceFromID");
12067        query = query.arg_lazy(
12068            "id",
12069            Box::new(move || {
12070                let id = id.clone();
12071                Box::pin(async move { id.into_id().await.unwrap().quote() })
12072            }),
12073        );
12074        ModuleSource {
12075            proc: self.proc.clone(),
12076            selection: query,
12077            graphql_client: self.graphql_client.clone(),
12078        }
12079    }
12080    /// Load a ObjectTypeDef from its ID.
12081    pub fn load_object_type_def_from_id(&self, id: impl IntoID<ObjectTypeDefId>) -> ObjectTypeDef {
12082        let mut query = self.selection.select("loadObjectTypeDefFromID");
12083        query = query.arg_lazy(
12084            "id",
12085            Box::new(move || {
12086                let id = id.clone();
12087                Box::pin(async move { id.into_id().await.unwrap().quote() })
12088            }),
12089        );
12090        ObjectTypeDef {
12091            proc: self.proc.clone(),
12092            selection: query,
12093            graphql_client: self.graphql_client.clone(),
12094        }
12095    }
12096    /// Load a Port from its ID.
12097    pub fn load_port_from_id(&self, id: impl IntoID<PortId>) -> Port {
12098        let mut query = self.selection.select("loadPortFromID");
12099        query = query.arg_lazy(
12100            "id",
12101            Box::new(move || {
12102                let id = id.clone();
12103                Box::pin(async move { id.into_id().await.unwrap().quote() })
12104            }),
12105        );
12106        Port {
12107            proc: self.proc.clone(),
12108            selection: query,
12109            graphql_client: self.graphql_client.clone(),
12110        }
12111    }
12112    /// Load a SDKConfig from its ID.
12113    pub fn load_sdk_config_from_id(&self, id: impl IntoID<SdkConfigId>) -> SdkConfig {
12114        let mut query = self.selection.select("loadSDKConfigFromID");
12115        query = query.arg_lazy(
12116            "id",
12117            Box::new(move || {
12118                let id = id.clone();
12119                Box::pin(async move { id.into_id().await.unwrap().quote() })
12120            }),
12121        );
12122        SdkConfig {
12123            proc: self.proc.clone(),
12124            selection: query,
12125            graphql_client: self.graphql_client.clone(),
12126        }
12127    }
12128    /// Load a ScalarTypeDef from its ID.
12129    pub fn load_scalar_type_def_from_id(&self, id: impl IntoID<ScalarTypeDefId>) -> ScalarTypeDef {
12130        let mut query = self.selection.select("loadScalarTypeDefFromID");
12131        query = query.arg_lazy(
12132            "id",
12133            Box::new(move || {
12134                let id = id.clone();
12135                Box::pin(async move { id.into_id().await.unwrap().quote() })
12136            }),
12137        );
12138        ScalarTypeDef {
12139            proc: self.proc.clone(),
12140            selection: query,
12141            graphql_client: self.graphql_client.clone(),
12142        }
12143    }
12144    /// Load a SearchResult from its ID.
12145    pub fn load_search_result_from_id(&self, id: impl IntoID<SearchResultId>) -> SearchResult {
12146        let mut query = self.selection.select("loadSearchResultFromID");
12147        query = query.arg_lazy(
12148            "id",
12149            Box::new(move || {
12150                let id = id.clone();
12151                Box::pin(async move { id.into_id().await.unwrap().quote() })
12152            }),
12153        );
12154        SearchResult {
12155            proc: self.proc.clone(),
12156            selection: query,
12157            graphql_client: self.graphql_client.clone(),
12158        }
12159    }
12160    /// Load a SearchSubmatch from its ID.
12161    pub fn load_search_submatch_from_id(
12162        &self,
12163        id: impl IntoID<SearchSubmatchId>,
12164    ) -> SearchSubmatch {
12165        let mut query = self.selection.select("loadSearchSubmatchFromID");
12166        query = query.arg_lazy(
12167            "id",
12168            Box::new(move || {
12169                let id = id.clone();
12170                Box::pin(async move { id.into_id().await.unwrap().quote() })
12171            }),
12172        );
12173        SearchSubmatch {
12174            proc: self.proc.clone(),
12175            selection: query,
12176            graphql_client: self.graphql_client.clone(),
12177        }
12178    }
12179    /// Load a Secret from its ID.
12180    pub fn load_secret_from_id(&self, id: impl IntoID<SecretId>) -> Secret {
12181        let mut query = self.selection.select("loadSecretFromID");
12182        query = query.arg_lazy(
12183            "id",
12184            Box::new(move || {
12185                let id = id.clone();
12186                Box::pin(async move { id.into_id().await.unwrap().quote() })
12187            }),
12188        );
12189        Secret {
12190            proc: self.proc.clone(),
12191            selection: query,
12192            graphql_client: self.graphql_client.clone(),
12193        }
12194    }
12195    /// Load a Service from its ID.
12196    pub fn load_service_from_id(&self, id: impl IntoID<ServiceId>) -> Service {
12197        let mut query = self.selection.select("loadServiceFromID");
12198        query = query.arg_lazy(
12199            "id",
12200            Box::new(move || {
12201                let id = id.clone();
12202                Box::pin(async move { id.into_id().await.unwrap().quote() })
12203            }),
12204        );
12205        Service {
12206            proc: self.proc.clone(),
12207            selection: query,
12208            graphql_client: self.graphql_client.clone(),
12209        }
12210    }
12211    /// Load a Socket from its ID.
12212    pub fn load_socket_from_id(&self, id: impl IntoID<SocketId>) -> Socket {
12213        let mut query = self.selection.select("loadSocketFromID");
12214        query = query.arg_lazy(
12215            "id",
12216            Box::new(move || {
12217                let id = id.clone();
12218                Box::pin(async move { id.into_id().await.unwrap().quote() })
12219            }),
12220        );
12221        Socket {
12222            proc: self.proc.clone(),
12223            selection: query,
12224            graphql_client: self.graphql_client.clone(),
12225        }
12226    }
12227    /// Load a SourceMap from its ID.
12228    pub fn load_source_map_from_id(&self, id: impl IntoID<SourceMapId>) -> SourceMap {
12229        let mut query = self.selection.select("loadSourceMapFromID");
12230        query = query.arg_lazy(
12231            "id",
12232            Box::new(move || {
12233                let id = id.clone();
12234                Box::pin(async move { id.into_id().await.unwrap().quote() })
12235            }),
12236        );
12237        SourceMap {
12238            proc: self.proc.clone(),
12239            selection: query,
12240            graphql_client: self.graphql_client.clone(),
12241        }
12242    }
12243    /// Load a Terminal from its ID.
12244    pub fn load_terminal_from_id(&self, id: impl IntoID<TerminalId>) -> Terminal {
12245        let mut query = self.selection.select("loadTerminalFromID");
12246        query = query.arg_lazy(
12247            "id",
12248            Box::new(move || {
12249                let id = id.clone();
12250                Box::pin(async move { id.into_id().await.unwrap().quote() })
12251            }),
12252        );
12253        Terminal {
12254            proc: self.proc.clone(),
12255            selection: query,
12256            graphql_client: self.graphql_client.clone(),
12257        }
12258    }
12259    /// Load a TypeDef from its ID.
12260    pub fn load_type_def_from_id(&self, id: impl IntoID<TypeDefId>) -> TypeDef {
12261        let mut query = self.selection.select("loadTypeDefFromID");
12262        query = query.arg_lazy(
12263            "id",
12264            Box::new(move || {
12265                let id = id.clone();
12266                Box::pin(async move { id.into_id().await.unwrap().quote() })
12267            }),
12268        );
12269        TypeDef {
12270            proc: self.proc.clone(),
12271            selection: query,
12272            graphql_client: self.graphql_client.clone(),
12273        }
12274    }
12275    /// Create a new module.
12276    pub fn module(&self) -> Module {
12277        let query = self.selection.select("module");
12278        Module {
12279            proc: self.proc.clone(),
12280            selection: query,
12281            graphql_client: self.graphql_client.clone(),
12282        }
12283    }
12284    /// Create a new module source instance from a source ref string
12285    ///
12286    /// # Arguments
12287    ///
12288    /// * `ref_string` - The string ref representation of the module source
12289    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12290    pub fn module_source(&self, ref_string: impl Into<String>) -> ModuleSource {
12291        let mut query = self.selection.select("moduleSource");
12292        query = query.arg("refString", ref_string.into());
12293        ModuleSource {
12294            proc: self.proc.clone(),
12295            selection: query,
12296            graphql_client: self.graphql_client.clone(),
12297        }
12298    }
12299    /// Create a new module source instance from a source ref string
12300    ///
12301    /// # Arguments
12302    ///
12303    /// * `ref_string` - The string ref representation of the module source
12304    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12305    pub fn module_source_opts<'a>(
12306        &self,
12307        ref_string: impl Into<String>,
12308        opts: QueryModuleSourceOpts<'a>,
12309    ) -> ModuleSource {
12310        let mut query = self.selection.select("moduleSource");
12311        query = query.arg("refString", ref_string.into());
12312        if let Some(ref_pin) = opts.ref_pin {
12313            query = query.arg("refPin", ref_pin);
12314        }
12315        if let Some(disable_find_up) = opts.disable_find_up {
12316            query = query.arg("disableFindUp", disable_find_up);
12317        }
12318        if let Some(allow_not_exists) = opts.allow_not_exists {
12319            query = query.arg("allowNotExists", allow_not_exists);
12320        }
12321        if let Some(require_kind) = opts.require_kind {
12322            query = query.arg("requireKind", require_kind);
12323        }
12324        ModuleSource {
12325            proc: self.proc.clone(),
12326            selection: query,
12327            graphql_client: self.graphql_client.clone(),
12328        }
12329    }
12330    /// Creates a new secret.
12331    ///
12332    /// # Arguments
12333    ///
12334    /// * `uri` - The URI of the secret store
12335    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12336    pub fn secret(&self, uri: impl Into<String>) -> Secret {
12337        let mut query = self.selection.select("secret");
12338        query = query.arg("uri", uri.into());
12339        Secret {
12340            proc: self.proc.clone(),
12341            selection: query,
12342            graphql_client: self.graphql_client.clone(),
12343        }
12344    }
12345    /// Creates a new secret.
12346    ///
12347    /// # Arguments
12348    ///
12349    /// * `uri` - The URI of the secret store
12350    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12351    pub fn secret_opts<'a>(&self, uri: impl Into<String>, opts: QuerySecretOpts<'a>) -> Secret {
12352        let mut query = self.selection.select("secret");
12353        query = query.arg("uri", uri.into());
12354        if let Some(cache_key) = opts.cache_key {
12355            query = query.arg("cacheKey", cache_key);
12356        }
12357        Secret {
12358            proc: self.proc.clone(),
12359            selection: query,
12360            graphql_client: self.graphql_client.clone(),
12361        }
12362    }
12363    /// Sets a secret given a user defined name to its plaintext and returns the secret.
12364    /// The plaintext value is limited to a size of 128000 bytes.
12365    ///
12366    /// # Arguments
12367    ///
12368    /// * `name` - The user defined name for this secret
12369    /// * `plaintext` - The plaintext of the secret
12370    pub fn set_secret(&self, name: impl Into<String>, plaintext: impl Into<String>) -> Secret {
12371        let mut query = self.selection.select("setSecret");
12372        query = query.arg("name", name.into());
12373        query = query.arg("plaintext", plaintext.into());
12374        Secret {
12375            proc: self.proc.clone(),
12376            selection: query,
12377            graphql_client: self.graphql_client.clone(),
12378        }
12379    }
12380    /// Creates source map metadata.
12381    ///
12382    /// # Arguments
12383    ///
12384    /// * `filename` - The filename from the module source.
12385    /// * `line` - The line number within the filename.
12386    /// * `column` - The column number within the line.
12387    pub fn source_map(&self, filename: impl Into<String>, line: isize, column: isize) -> SourceMap {
12388        let mut query = self.selection.select("sourceMap");
12389        query = query.arg("filename", filename.into());
12390        query = query.arg("line", line);
12391        query = query.arg("column", column);
12392        SourceMap {
12393            proc: self.proc.clone(),
12394            selection: query,
12395            graphql_client: self.graphql_client.clone(),
12396        }
12397    }
12398    /// Create a new TypeDef.
12399    pub fn type_def(&self) -> TypeDef {
12400        let query = self.selection.select("typeDef");
12401        TypeDef {
12402            proc: self.proc.clone(),
12403            selection: query,
12404            graphql_client: self.graphql_client.clone(),
12405        }
12406    }
12407    /// Get the current Dagger Engine version.
12408    pub async fn version(&self) -> Result<String, DaggerError> {
12409        let query = self.selection.select("version");
12410        query.execute(self.graphql_client.clone()).await
12411    }
12412}
12413#[derive(Clone)]
12414pub struct SdkConfig {
12415    pub proc: Option<Arc<DaggerSessionProc>>,
12416    pub selection: Selection,
12417    pub graphql_client: DynGraphQLClient,
12418}
12419impl SdkConfig {
12420    /// Whether to start the SDK runtime in debug mode with an interactive terminal.
12421    pub async fn debug(&self) -> Result<bool, DaggerError> {
12422        let query = self.selection.select("debug");
12423        query.execute(self.graphql_client.clone()).await
12424    }
12425    /// A unique identifier for this SDKConfig.
12426    pub async fn id(&self) -> Result<SdkConfigId, DaggerError> {
12427        let query = self.selection.select("id");
12428        query.execute(self.graphql_client.clone()).await
12429    }
12430    /// Source of the SDK. Either a name of a builtin SDK or a module source ref string pointing to the SDK's implementation.
12431    pub async fn source(&self) -> Result<String, DaggerError> {
12432        let query = self.selection.select("source");
12433        query.execute(self.graphql_client.clone()).await
12434    }
12435}
12436#[derive(Clone)]
12437pub struct ScalarTypeDef {
12438    pub proc: Option<Arc<DaggerSessionProc>>,
12439    pub selection: Selection,
12440    pub graphql_client: DynGraphQLClient,
12441}
12442impl ScalarTypeDef {
12443    /// A doc string for the scalar, if any.
12444    pub async fn description(&self) -> Result<String, DaggerError> {
12445        let query = self.selection.select("description");
12446        query.execute(self.graphql_client.clone()).await
12447    }
12448    /// A unique identifier for this ScalarTypeDef.
12449    pub async fn id(&self) -> Result<ScalarTypeDefId, DaggerError> {
12450        let query = self.selection.select("id");
12451        query.execute(self.graphql_client.clone()).await
12452    }
12453    /// The name of the scalar.
12454    pub async fn name(&self) -> Result<String, DaggerError> {
12455        let query = self.selection.select("name");
12456        query.execute(self.graphql_client.clone()).await
12457    }
12458    /// If this ScalarTypeDef is associated with a Module, the name of the module. Unset otherwise.
12459    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
12460        let query = self.selection.select("sourceModuleName");
12461        query.execute(self.graphql_client.clone()).await
12462    }
12463}
12464#[derive(Clone)]
12465pub struct SearchResult {
12466    pub proc: Option<Arc<DaggerSessionProc>>,
12467    pub selection: Selection,
12468    pub graphql_client: DynGraphQLClient,
12469}
12470impl SearchResult {
12471    /// The byte offset of this line within the file.
12472    pub async fn absolute_offset(&self) -> Result<isize, DaggerError> {
12473        let query = self.selection.select("absoluteOffset");
12474        query.execute(self.graphql_client.clone()).await
12475    }
12476    /// The path to the file that matched.
12477    pub async fn file_path(&self) -> Result<String, DaggerError> {
12478        let query = self.selection.select("filePath");
12479        query.execute(self.graphql_client.clone()).await
12480    }
12481    /// A unique identifier for this SearchResult.
12482    pub async fn id(&self) -> Result<SearchResultId, DaggerError> {
12483        let query = self.selection.select("id");
12484        query.execute(self.graphql_client.clone()).await
12485    }
12486    /// The first line that matched.
12487    pub async fn line_number(&self) -> Result<isize, DaggerError> {
12488        let query = self.selection.select("lineNumber");
12489        query.execute(self.graphql_client.clone()).await
12490    }
12491    /// The line content that matched.
12492    pub async fn matched_lines(&self) -> Result<String, DaggerError> {
12493        let query = self.selection.select("matchedLines");
12494        query.execute(self.graphql_client.clone()).await
12495    }
12496    /// Sub-match positions and content within the matched lines.
12497    pub fn submatches(&self) -> Vec<SearchSubmatch> {
12498        let query = self.selection.select("submatches");
12499        vec![SearchSubmatch {
12500            proc: self.proc.clone(),
12501            selection: query,
12502            graphql_client: self.graphql_client.clone(),
12503        }]
12504    }
12505}
12506#[derive(Clone)]
12507pub struct SearchSubmatch {
12508    pub proc: Option<Arc<DaggerSessionProc>>,
12509    pub selection: Selection,
12510    pub graphql_client: DynGraphQLClient,
12511}
12512impl SearchSubmatch {
12513    /// The match's end offset within the matched lines.
12514    pub async fn end(&self) -> Result<isize, DaggerError> {
12515        let query = self.selection.select("end");
12516        query.execute(self.graphql_client.clone()).await
12517    }
12518    /// A unique identifier for this SearchSubmatch.
12519    pub async fn id(&self) -> Result<SearchSubmatchId, DaggerError> {
12520        let query = self.selection.select("id");
12521        query.execute(self.graphql_client.clone()).await
12522    }
12523    /// The match's start offset within the matched lines.
12524    pub async fn start(&self) -> Result<isize, DaggerError> {
12525        let query = self.selection.select("start");
12526        query.execute(self.graphql_client.clone()).await
12527    }
12528    /// The matched text.
12529    pub async fn text(&self) -> Result<String, DaggerError> {
12530        let query = self.selection.select("text");
12531        query.execute(self.graphql_client.clone()).await
12532    }
12533}
12534#[derive(Clone)]
12535pub struct Secret {
12536    pub proc: Option<Arc<DaggerSessionProc>>,
12537    pub selection: Selection,
12538    pub graphql_client: DynGraphQLClient,
12539}
12540impl Secret {
12541    /// A unique identifier for this Secret.
12542    pub async fn id(&self) -> Result<SecretId, DaggerError> {
12543        let query = self.selection.select("id");
12544        query.execute(self.graphql_client.clone()).await
12545    }
12546    /// The name of this secret.
12547    pub async fn name(&self) -> Result<String, DaggerError> {
12548        let query = self.selection.select("name");
12549        query.execute(self.graphql_client.clone()).await
12550    }
12551    /// The value of this secret.
12552    pub async fn plaintext(&self) -> Result<String, DaggerError> {
12553        let query = self.selection.select("plaintext");
12554        query.execute(self.graphql_client.clone()).await
12555    }
12556    /// The URI of this secret.
12557    pub async fn uri(&self) -> Result<String, DaggerError> {
12558        let query = self.selection.select("uri");
12559        query.execute(self.graphql_client.clone()).await
12560    }
12561}
12562#[derive(Clone)]
12563pub struct Service {
12564    pub proc: Option<Arc<DaggerSessionProc>>,
12565    pub selection: Selection,
12566    pub graphql_client: DynGraphQLClient,
12567}
12568#[derive(Builder, Debug, PartialEq)]
12569pub struct ServiceEndpointOpts<'a> {
12570    /// The exposed port number for the endpoint
12571    #[builder(setter(into, strip_option), default)]
12572    pub port: Option<isize>,
12573    /// Return a URL with the given scheme, eg. http for http://
12574    #[builder(setter(into, strip_option), default)]
12575    pub scheme: Option<&'a str>,
12576}
12577#[derive(Builder, Debug, PartialEq)]
12578pub struct ServiceStopOpts {
12579    /// Immediately kill the service without waiting for a graceful exit
12580    #[builder(setter(into, strip_option), default)]
12581    pub kill: Option<bool>,
12582}
12583#[derive(Builder, Debug, PartialEq)]
12584pub struct ServiceTerminalOpts<'a> {
12585    #[builder(setter(into, strip_option), default)]
12586    pub cmd: Option<Vec<&'a str>>,
12587}
12588#[derive(Builder, Debug, PartialEq)]
12589pub struct ServiceUpOpts {
12590    /// List of frontend/backend port mappings to forward.
12591    /// Frontend is the port accepting traffic on the host, backend is the service port.
12592    #[builder(setter(into, strip_option), default)]
12593    pub ports: Option<Vec<PortForward>>,
12594    /// Bind each tunnel port to a random port on the host.
12595    #[builder(setter(into, strip_option), default)]
12596    pub random: Option<bool>,
12597}
12598impl Service {
12599    /// Retrieves an endpoint that clients can use to reach this container.
12600    /// If no port is specified, the first exposed port is used. If none exist an error is returned.
12601    /// If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.
12602    ///
12603    /// # Arguments
12604    ///
12605    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12606    pub async fn endpoint(&self) -> Result<String, DaggerError> {
12607        let query = self.selection.select("endpoint");
12608        query.execute(self.graphql_client.clone()).await
12609    }
12610    /// Retrieves an endpoint that clients can use to reach this container.
12611    /// If no port is specified, the first exposed port is used. If none exist an error is returned.
12612    /// If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.
12613    ///
12614    /// # Arguments
12615    ///
12616    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12617    pub async fn endpoint_opts<'a>(
12618        &self,
12619        opts: ServiceEndpointOpts<'a>,
12620    ) -> Result<String, DaggerError> {
12621        let mut query = self.selection.select("endpoint");
12622        if let Some(port) = opts.port {
12623            query = query.arg("port", port);
12624        }
12625        if let Some(scheme) = opts.scheme {
12626            query = query.arg("scheme", scheme);
12627        }
12628        query.execute(self.graphql_client.clone()).await
12629    }
12630    /// Retrieves a hostname which can be used by clients to reach this container.
12631    pub async fn hostname(&self) -> Result<String, DaggerError> {
12632        let query = self.selection.select("hostname");
12633        query.execute(self.graphql_client.clone()).await
12634    }
12635    /// A unique identifier for this Service.
12636    pub async fn id(&self) -> Result<ServiceId, DaggerError> {
12637        let query = self.selection.select("id");
12638        query.execute(self.graphql_client.clone()).await
12639    }
12640    /// Retrieves the list of ports provided by the service.
12641    pub fn ports(&self) -> Vec<Port> {
12642        let query = self.selection.select("ports");
12643        vec![Port {
12644            proc: self.proc.clone(),
12645            selection: query,
12646            graphql_client: self.graphql_client.clone(),
12647        }]
12648    }
12649    /// Start the service and wait for its health checks to succeed.
12650    /// Services bound to a Container do not need to be manually started.
12651    pub async fn start(&self) -> Result<ServiceId, DaggerError> {
12652        let query = self.selection.select("start");
12653        query.execute(self.graphql_client.clone()).await
12654    }
12655    /// Stop the service.
12656    ///
12657    /// # Arguments
12658    ///
12659    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12660    pub async fn stop(&self) -> Result<ServiceId, DaggerError> {
12661        let query = self.selection.select("stop");
12662        query.execute(self.graphql_client.clone()).await
12663    }
12664    /// Stop the service.
12665    ///
12666    /// # Arguments
12667    ///
12668    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12669    pub async fn stop_opts(&self, opts: ServiceStopOpts) -> Result<ServiceId, DaggerError> {
12670        let mut query = self.selection.select("stop");
12671        if let Some(kill) = opts.kill {
12672            query = query.arg("kill", kill);
12673        }
12674        query.execute(self.graphql_client.clone()).await
12675    }
12676    /// Forces evaluation of the pipeline in the engine.
12677    pub async fn sync(&self) -> Result<ServiceId, DaggerError> {
12678        let query = self.selection.select("sync");
12679        query.execute(self.graphql_client.clone()).await
12680    }
12681    ///
12682    /// # Arguments
12683    ///
12684    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12685    pub fn terminal(&self) -> Service {
12686        let query = self.selection.select("terminal");
12687        Service {
12688            proc: self.proc.clone(),
12689            selection: query,
12690            graphql_client: self.graphql_client.clone(),
12691        }
12692    }
12693    ///
12694    /// # Arguments
12695    ///
12696    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12697    pub fn terminal_opts<'a>(&self, opts: ServiceTerminalOpts<'a>) -> Service {
12698        let mut query = self.selection.select("terminal");
12699        if let Some(cmd) = opts.cmd {
12700            query = query.arg("cmd", cmd);
12701        }
12702        Service {
12703            proc: self.proc.clone(),
12704            selection: query,
12705            graphql_client: self.graphql_client.clone(),
12706        }
12707    }
12708    /// Creates a tunnel that forwards traffic from the caller's network to this service.
12709    ///
12710    /// # Arguments
12711    ///
12712    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12713    pub async fn up(&self) -> Result<Void, DaggerError> {
12714        let query = self.selection.select("up");
12715        query.execute(self.graphql_client.clone()).await
12716    }
12717    /// Creates a tunnel that forwards traffic from the caller's network to this service.
12718    ///
12719    /// # Arguments
12720    ///
12721    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12722    pub async fn up_opts(&self, opts: ServiceUpOpts) -> Result<Void, DaggerError> {
12723        let mut query = self.selection.select("up");
12724        if let Some(ports) = opts.ports {
12725            query = query.arg("ports", ports);
12726        }
12727        if let Some(random) = opts.random {
12728            query = query.arg("random", random);
12729        }
12730        query.execute(self.graphql_client.clone()).await
12731    }
12732    /// Configures a hostname which can be used by clients within the session to reach this container.
12733    ///
12734    /// # Arguments
12735    ///
12736    /// * `hostname` - The hostname to use.
12737    pub fn with_hostname(&self, hostname: impl Into<String>) -> Service {
12738        let mut query = self.selection.select("withHostname");
12739        query = query.arg("hostname", hostname.into());
12740        Service {
12741            proc: self.proc.clone(),
12742            selection: query,
12743            graphql_client: self.graphql_client.clone(),
12744        }
12745    }
12746}
12747#[derive(Clone)]
12748pub struct Socket {
12749    pub proc: Option<Arc<DaggerSessionProc>>,
12750    pub selection: Selection,
12751    pub graphql_client: DynGraphQLClient,
12752}
12753impl Socket {
12754    /// A unique identifier for this Socket.
12755    pub async fn id(&self) -> Result<SocketId, DaggerError> {
12756        let query = self.selection.select("id");
12757        query.execute(self.graphql_client.clone()).await
12758    }
12759}
12760#[derive(Clone)]
12761pub struct SourceMap {
12762    pub proc: Option<Arc<DaggerSessionProc>>,
12763    pub selection: Selection,
12764    pub graphql_client: DynGraphQLClient,
12765}
12766impl SourceMap {
12767    /// The column number within the line.
12768    pub async fn column(&self) -> Result<isize, DaggerError> {
12769        let query = self.selection.select("column");
12770        query.execute(self.graphql_client.clone()).await
12771    }
12772    /// The filename from the module source.
12773    pub async fn filename(&self) -> Result<String, DaggerError> {
12774        let query = self.selection.select("filename");
12775        query.execute(self.graphql_client.clone()).await
12776    }
12777    /// A unique identifier for this SourceMap.
12778    pub async fn id(&self) -> Result<SourceMapId, DaggerError> {
12779        let query = self.selection.select("id");
12780        query.execute(self.graphql_client.clone()).await
12781    }
12782    /// The line number within the filename.
12783    pub async fn line(&self) -> Result<isize, DaggerError> {
12784        let query = self.selection.select("line");
12785        query.execute(self.graphql_client.clone()).await
12786    }
12787    /// The module dependency this was declared in.
12788    pub async fn module(&self) -> Result<String, DaggerError> {
12789        let query = self.selection.select("module");
12790        query.execute(self.graphql_client.clone()).await
12791    }
12792    /// The URL to the file, if any. This can be used to link to the source map in the browser.
12793    pub async fn url(&self) -> Result<String, DaggerError> {
12794        let query = self.selection.select("url");
12795        query.execute(self.graphql_client.clone()).await
12796    }
12797}
12798#[derive(Clone)]
12799pub struct Terminal {
12800    pub proc: Option<Arc<DaggerSessionProc>>,
12801    pub selection: Selection,
12802    pub graphql_client: DynGraphQLClient,
12803}
12804impl Terminal {
12805    /// A unique identifier for this Terminal.
12806    pub async fn id(&self) -> Result<TerminalId, DaggerError> {
12807        let query = self.selection.select("id");
12808        query.execute(self.graphql_client.clone()).await
12809    }
12810    /// Forces evaluation of the pipeline in the engine.
12811    /// It doesn't run the default command if no exec has been set.
12812    pub async fn sync(&self) -> Result<TerminalId, DaggerError> {
12813        let query = self.selection.select("sync");
12814        query.execute(self.graphql_client.clone()).await
12815    }
12816}
12817#[derive(Clone)]
12818pub struct TypeDef {
12819    pub proc: Option<Arc<DaggerSessionProc>>,
12820    pub selection: Selection,
12821    pub graphql_client: DynGraphQLClient,
12822}
12823#[derive(Builder, Debug, PartialEq)]
12824pub struct TypeDefWithEnumOpts<'a> {
12825    /// A doc string for the enum, if any
12826    #[builder(setter(into, strip_option), default)]
12827    pub description: Option<&'a str>,
12828    /// The source map for the enum definition.
12829    #[builder(setter(into, strip_option), default)]
12830    pub source_map: Option<SourceMapId>,
12831}
12832#[derive(Builder, Debug, PartialEq)]
12833pub struct TypeDefWithEnumMemberOpts<'a> {
12834    /// If deprecated, the reason or migration path.
12835    #[builder(setter(into, strip_option), default)]
12836    pub deprecated: Option<&'a str>,
12837    /// A doc string for the member, if any
12838    #[builder(setter(into, strip_option), default)]
12839    pub description: Option<&'a str>,
12840    /// The source map for the enum member definition.
12841    #[builder(setter(into, strip_option), default)]
12842    pub source_map: Option<SourceMapId>,
12843    /// The value of the member in the enum
12844    #[builder(setter(into, strip_option), default)]
12845    pub value: Option<&'a str>,
12846}
12847#[derive(Builder, Debug, PartialEq)]
12848pub struct TypeDefWithEnumValueOpts<'a> {
12849    /// If deprecated, the reason or migration path.
12850    #[builder(setter(into, strip_option), default)]
12851    pub deprecated: Option<&'a str>,
12852    /// A doc string for the value, if any
12853    #[builder(setter(into, strip_option), default)]
12854    pub description: Option<&'a str>,
12855    /// The source map for the enum value definition.
12856    #[builder(setter(into, strip_option), default)]
12857    pub source_map: Option<SourceMapId>,
12858}
12859#[derive(Builder, Debug, PartialEq)]
12860pub struct TypeDefWithFieldOpts<'a> {
12861    /// If deprecated, the reason or migration path.
12862    #[builder(setter(into, strip_option), default)]
12863    pub deprecated: Option<&'a str>,
12864    /// A doc string for the field, if any
12865    #[builder(setter(into, strip_option), default)]
12866    pub description: Option<&'a str>,
12867    /// The source map for the field definition.
12868    #[builder(setter(into, strip_option), default)]
12869    pub source_map: Option<SourceMapId>,
12870}
12871#[derive(Builder, Debug, PartialEq)]
12872pub struct TypeDefWithInterfaceOpts<'a> {
12873    #[builder(setter(into, strip_option), default)]
12874    pub description: Option<&'a str>,
12875    #[builder(setter(into, strip_option), default)]
12876    pub source_map: Option<SourceMapId>,
12877}
12878#[derive(Builder, Debug, PartialEq)]
12879pub struct TypeDefWithObjectOpts<'a> {
12880    #[builder(setter(into, strip_option), default)]
12881    pub deprecated: Option<&'a str>,
12882    #[builder(setter(into, strip_option), default)]
12883    pub description: Option<&'a str>,
12884    #[builder(setter(into, strip_option), default)]
12885    pub source_map: Option<SourceMapId>,
12886}
12887#[derive(Builder, Debug, PartialEq)]
12888pub struct TypeDefWithScalarOpts<'a> {
12889    #[builder(setter(into, strip_option), default)]
12890    pub description: Option<&'a str>,
12891}
12892impl TypeDef {
12893    /// If kind is ENUM, the enum-specific type definition. If kind is not ENUM, this will be null.
12894    pub fn as_enum(&self) -> EnumTypeDef {
12895        let query = self.selection.select("asEnum");
12896        EnumTypeDef {
12897            proc: self.proc.clone(),
12898            selection: query,
12899            graphql_client: self.graphql_client.clone(),
12900        }
12901    }
12902    /// If kind is INPUT, the input-specific type definition. If kind is not INPUT, this will be null.
12903    pub fn as_input(&self) -> InputTypeDef {
12904        let query = self.selection.select("asInput");
12905        InputTypeDef {
12906            proc: self.proc.clone(),
12907            selection: query,
12908            graphql_client: self.graphql_client.clone(),
12909        }
12910    }
12911    /// If kind is INTERFACE, the interface-specific type definition. If kind is not INTERFACE, this will be null.
12912    pub fn as_interface(&self) -> InterfaceTypeDef {
12913        let query = self.selection.select("asInterface");
12914        InterfaceTypeDef {
12915            proc: self.proc.clone(),
12916            selection: query,
12917            graphql_client: self.graphql_client.clone(),
12918        }
12919    }
12920    /// If kind is LIST, the list-specific type definition. If kind is not LIST, this will be null.
12921    pub fn as_list(&self) -> ListTypeDef {
12922        let query = self.selection.select("asList");
12923        ListTypeDef {
12924            proc: self.proc.clone(),
12925            selection: query,
12926            graphql_client: self.graphql_client.clone(),
12927        }
12928    }
12929    /// If kind is OBJECT, the object-specific type definition. If kind is not OBJECT, this will be null.
12930    pub fn as_object(&self) -> ObjectTypeDef {
12931        let query = self.selection.select("asObject");
12932        ObjectTypeDef {
12933            proc: self.proc.clone(),
12934            selection: query,
12935            graphql_client: self.graphql_client.clone(),
12936        }
12937    }
12938    /// If kind is SCALAR, the scalar-specific type definition. If kind is not SCALAR, this will be null.
12939    pub fn as_scalar(&self) -> ScalarTypeDef {
12940        let query = self.selection.select("asScalar");
12941        ScalarTypeDef {
12942            proc: self.proc.clone(),
12943            selection: query,
12944            graphql_client: self.graphql_client.clone(),
12945        }
12946    }
12947    /// A unique identifier for this TypeDef.
12948    pub async fn id(&self) -> Result<TypeDefId, DaggerError> {
12949        let query = self.selection.select("id");
12950        query.execute(self.graphql_client.clone()).await
12951    }
12952    /// The kind of type this is (e.g. primitive, list, object).
12953    pub async fn kind(&self) -> Result<TypeDefKind, DaggerError> {
12954        let query = self.selection.select("kind");
12955        query.execute(self.graphql_client.clone()).await
12956    }
12957    /// Whether this type can be set to null. Defaults to false.
12958    pub async fn optional(&self) -> Result<bool, DaggerError> {
12959        let query = self.selection.select("optional");
12960        query.execute(self.graphql_client.clone()).await
12961    }
12962    /// Adds a function for constructing a new instance of an Object TypeDef, failing if the type is not an object.
12963    pub fn with_constructor(&self, function: impl IntoID<FunctionId>) -> TypeDef {
12964        let mut query = self.selection.select("withConstructor");
12965        query = query.arg_lazy(
12966            "function",
12967            Box::new(move || {
12968                let function = function.clone();
12969                Box::pin(async move { function.into_id().await.unwrap().quote() })
12970            }),
12971        );
12972        TypeDef {
12973            proc: self.proc.clone(),
12974            selection: query,
12975            graphql_client: self.graphql_client.clone(),
12976        }
12977    }
12978    /// Returns a TypeDef of kind Enum with the provided name.
12979    /// 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.
12980    ///
12981    /// # Arguments
12982    ///
12983    /// * `name` - The name of the enum
12984    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12985    pub fn with_enum(&self, name: impl Into<String>) -> TypeDef {
12986        let mut query = self.selection.select("withEnum");
12987        query = query.arg("name", name.into());
12988        TypeDef {
12989            proc: self.proc.clone(),
12990            selection: query,
12991            graphql_client: self.graphql_client.clone(),
12992        }
12993    }
12994    /// Returns a TypeDef of kind Enum with the provided name.
12995    /// 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.
12996    ///
12997    /// # Arguments
12998    ///
12999    /// * `name` - The name of the enum
13000    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13001    pub fn with_enum_opts<'a>(
13002        &self,
13003        name: impl Into<String>,
13004        opts: TypeDefWithEnumOpts<'a>,
13005    ) -> TypeDef {
13006        let mut query = self.selection.select("withEnum");
13007        query = query.arg("name", name.into());
13008        if let Some(description) = opts.description {
13009            query = query.arg("description", description);
13010        }
13011        if let Some(source_map) = opts.source_map {
13012            query = query.arg("sourceMap", source_map);
13013        }
13014        TypeDef {
13015            proc: self.proc.clone(),
13016            selection: query,
13017            graphql_client: self.graphql_client.clone(),
13018        }
13019    }
13020    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
13021    ///
13022    /// # Arguments
13023    ///
13024    /// * `name` - The name of the member in the enum
13025    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13026    pub fn with_enum_member(&self, name: impl Into<String>) -> TypeDef {
13027        let mut query = self.selection.select("withEnumMember");
13028        query = query.arg("name", name.into());
13029        TypeDef {
13030            proc: self.proc.clone(),
13031            selection: query,
13032            graphql_client: self.graphql_client.clone(),
13033        }
13034    }
13035    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
13036    ///
13037    /// # Arguments
13038    ///
13039    /// * `name` - The name of the member in the enum
13040    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13041    pub fn with_enum_member_opts<'a>(
13042        &self,
13043        name: impl Into<String>,
13044        opts: TypeDefWithEnumMemberOpts<'a>,
13045    ) -> TypeDef {
13046        let mut query = self.selection.select("withEnumMember");
13047        query = query.arg("name", name.into());
13048        if let Some(value) = opts.value {
13049            query = query.arg("value", value);
13050        }
13051        if let Some(description) = opts.description {
13052            query = query.arg("description", description);
13053        }
13054        if let Some(source_map) = opts.source_map {
13055            query = query.arg("sourceMap", source_map);
13056        }
13057        if let Some(deprecated) = opts.deprecated {
13058            query = query.arg("deprecated", deprecated);
13059        }
13060        TypeDef {
13061            proc: self.proc.clone(),
13062            selection: query,
13063            graphql_client: self.graphql_client.clone(),
13064        }
13065    }
13066    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
13067    ///
13068    /// # Arguments
13069    ///
13070    /// * `value` - The name of the value in the enum
13071    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13072    pub fn with_enum_value(&self, value: impl Into<String>) -> TypeDef {
13073        let mut query = self.selection.select("withEnumValue");
13074        query = query.arg("value", value.into());
13075        TypeDef {
13076            proc: self.proc.clone(),
13077            selection: query,
13078            graphql_client: self.graphql_client.clone(),
13079        }
13080    }
13081    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
13082    ///
13083    /// # Arguments
13084    ///
13085    /// * `value` - The name of the value in the enum
13086    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13087    pub fn with_enum_value_opts<'a>(
13088        &self,
13089        value: impl Into<String>,
13090        opts: TypeDefWithEnumValueOpts<'a>,
13091    ) -> TypeDef {
13092        let mut query = self.selection.select("withEnumValue");
13093        query = query.arg("value", value.into());
13094        if let Some(description) = opts.description {
13095            query = query.arg("description", description);
13096        }
13097        if let Some(source_map) = opts.source_map {
13098            query = query.arg("sourceMap", source_map);
13099        }
13100        if let Some(deprecated) = opts.deprecated {
13101            query = query.arg("deprecated", deprecated);
13102        }
13103        TypeDef {
13104            proc: self.proc.clone(),
13105            selection: query,
13106            graphql_client: self.graphql_client.clone(),
13107        }
13108    }
13109    /// Adds a static field for an Object TypeDef, failing if the type is not an object.
13110    ///
13111    /// # Arguments
13112    ///
13113    /// * `name` - The name of the field in the object
13114    /// * `type_def` - The type of the field
13115    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13116    pub fn with_field(&self, name: impl Into<String>, type_def: impl IntoID<TypeDefId>) -> TypeDef {
13117        let mut query = self.selection.select("withField");
13118        query = query.arg("name", name.into());
13119        query = query.arg_lazy(
13120            "typeDef",
13121            Box::new(move || {
13122                let type_def = type_def.clone();
13123                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
13124            }),
13125        );
13126        TypeDef {
13127            proc: self.proc.clone(),
13128            selection: query,
13129            graphql_client: self.graphql_client.clone(),
13130        }
13131    }
13132    /// Adds a static field for an Object TypeDef, failing if the type is not an object.
13133    ///
13134    /// # Arguments
13135    ///
13136    /// * `name` - The name of the field in the object
13137    /// * `type_def` - The type of the field
13138    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13139    pub fn with_field_opts<'a>(
13140        &self,
13141        name: impl Into<String>,
13142        type_def: impl IntoID<TypeDefId>,
13143        opts: TypeDefWithFieldOpts<'a>,
13144    ) -> TypeDef {
13145        let mut query = self.selection.select("withField");
13146        query = query.arg("name", name.into());
13147        query = query.arg_lazy(
13148            "typeDef",
13149            Box::new(move || {
13150                let type_def = type_def.clone();
13151                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
13152            }),
13153        );
13154        if let Some(description) = opts.description {
13155            query = query.arg("description", description);
13156        }
13157        if let Some(source_map) = opts.source_map {
13158            query = query.arg("sourceMap", source_map);
13159        }
13160        if let Some(deprecated) = opts.deprecated {
13161            query = query.arg("deprecated", deprecated);
13162        }
13163        TypeDef {
13164            proc: self.proc.clone(),
13165            selection: query,
13166            graphql_client: self.graphql_client.clone(),
13167        }
13168    }
13169    /// Adds a function for an Object or Interface TypeDef, failing if the type is not one of those kinds.
13170    pub fn with_function(&self, function: impl IntoID<FunctionId>) -> TypeDef {
13171        let mut query = self.selection.select("withFunction");
13172        query = query.arg_lazy(
13173            "function",
13174            Box::new(move || {
13175                let function = function.clone();
13176                Box::pin(async move { function.into_id().await.unwrap().quote() })
13177            }),
13178        );
13179        TypeDef {
13180            proc: self.proc.clone(),
13181            selection: query,
13182            graphql_client: self.graphql_client.clone(),
13183        }
13184    }
13185    /// Returns a TypeDef of kind Interface with the provided name.
13186    ///
13187    /// # Arguments
13188    ///
13189    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13190    pub fn with_interface(&self, name: impl Into<String>) -> TypeDef {
13191        let mut query = self.selection.select("withInterface");
13192        query = query.arg("name", name.into());
13193        TypeDef {
13194            proc: self.proc.clone(),
13195            selection: query,
13196            graphql_client: self.graphql_client.clone(),
13197        }
13198    }
13199    /// Returns a TypeDef of kind Interface with the provided name.
13200    ///
13201    /// # Arguments
13202    ///
13203    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13204    pub fn with_interface_opts<'a>(
13205        &self,
13206        name: impl Into<String>,
13207        opts: TypeDefWithInterfaceOpts<'a>,
13208    ) -> TypeDef {
13209        let mut query = self.selection.select("withInterface");
13210        query = query.arg("name", name.into());
13211        if let Some(description) = opts.description {
13212            query = query.arg("description", description);
13213        }
13214        if let Some(source_map) = opts.source_map {
13215            query = query.arg("sourceMap", source_map);
13216        }
13217        TypeDef {
13218            proc: self.proc.clone(),
13219            selection: query,
13220            graphql_client: self.graphql_client.clone(),
13221        }
13222    }
13223    /// Sets the kind of the type.
13224    pub fn with_kind(&self, kind: TypeDefKind) -> TypeDef {
13225        let mut query = self.selection.select("withKind");
13226        query = query.arg("kind", kind);
13227        TypeDef {
13228            proc: self.proc.clone(),
13229            selection: query,
13230            graphql_client: self.graphql_client.clone(),
13231        }
13232    }
13233    /// Returns a TypeDef of kind List with the provided type for its elements.
13234    pub fn with_list_of(&self, element_type: impl IntoID<TypeDefId>) -> TypeDef {
13235        let mut query = self.selection.select("withListOf");
13236        query = query.arg_lazy(
13237            "elementType",
13238            Box::new(move || {
13239                let element_type = element_type.clone();
13240                Box::pin(async move { element_type.into_id().await.unwrap().quote() })
13241            }),
13242        );
13243        TypeDef {
13244            proc: self.proc.clone(),
13245            selection: query,
13246            graphql_client: self.graphql_client.clone(),
13247        }
13248    }
13249    /// Returns a TypeDef of kind Object with the provided name.
13250    /// 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.
13251    ///
13252    /// # Arguments
13253    ///
13254    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13255    pub fn with_object(&self, name: impl Into<String>) -> TypeDef {
13256        let mut query = self.selection.select("withObject");
13257        query = query.arg("name", name.into());
13258        TypeDef {
13259            proc: self.proc.clone(),
13260            selection: query,
13261            graphql_client: self.graphql_client.clone(),
13262        }
13263    }
13264    /// Returns a TypeDef of kind Object with the provided name.
13265    /// 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.
13266    ///
13267    /// # Arguments
13268    ///
13269    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13270    pub fn with_object_opts<'a>(
13271        &self,
13272        name: impl Into<String>,
13273        opts: TypeDefWithObjectOpts<'a>,
13274    ) -> TypeDef {
13275        let mut query = self.selection.select("withObject");
13276        query = query.arg("name", name.into());
13277        if let Some(description) = opts.description {
13278            query = query.arg("description", description);
13279        }
13280        if let Some(source_map) = opts.source_map {
13281            query = query.arg("sourceMap", source_map);
13282        }
13283        if let Some(deprecated) = opts.deprecated {
13284            query = query.arg("deprecated", deprecated);
13285        }
13286        TypeDef {
13287            proc: self.proc.clone(),
13288            selection: query,
13289            graphql_client: self.graphql_client.clone(),
13290        }
13291    }
13292    /// Sets whether this type can be set to null.
13293    pub fn with_optional(&self, optional: bool) -> TypeDef {
13294        let mut query = self.selection.select("withOptional");
13295        query = query.arg("optional", optional);
13296        TypeDef {
13297            proc: self.proc.clone(),
13298            selection: query,
13299            graphql_client: self.graphql_client.clone(),
13300        }
13301    }
13302    /// Returns a TypeDef of kind Scalar with the provided name.
13303    ///
13304    /// # Arguments
13305    ///
13306    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13307    pub fn with_scalar(&self, name: impl Into<String>) -> TypeDef {
13308        let mut query = self.selection.select("withScalar");
13309        query = query.arg("name", name.into());
13310        TypeDef {
13311            proc: self.proc.clone(),
13312            selection: query,
13313            graphql_client: self.graphql_client.clone(),
13314        }
13315    }
13316    /// Returns a TypeDef of kind Scalar with the provided name.
13317    ///
13318    /// # Arguments
13319    ///
13320    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13321    pub fn with_scalar_opts<'a>(
13322        &self,
13323        name: impl Into<String>,
13324        opts: TypeDefWithScalarOpts<'a>,
13325    ) -> TypeDef {
13326        let mut query = self.selection.select("withScalar");
13327        query = query.arg("name", name.into());
13328        if let Some(description) = opts.description {
13329            query = query.arg("description", description);
13330        }
13331        TypeDef {
13332            proc: self.proc.clone(),
13333            selection: query,
13334            graphql_client: self.graphql_client.clone(),
13335        }
13336    }
13337}
13338#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
13339pub enum CacheSharingMode {
13340    #[serde(rename = "LOCKED")]
13341    Locked,
13342    #[serde(rename = "PRIVATE")]
13343    Private,
13344    #[serde(rename = "SHARED")]
13345    Shared,
13346}
13347#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
13348pub enum ExistsType {
13349    #[serde(rename = "DIRECTORY_TYPE")]
13350    DirectoryType,
13351    #[serde(rename = "REGULAR_TYPE")]
13352    RegularType,
13353    #[serde(rename = "SYMLINK_TYPE")]
13354    SymlinkType,
13355}
13356#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
13357pub enum FunctionCachePolicy {
13358    #[serde(rename = "Default")]
13359    Default,
13360    #[serde(rename = "Never")]
13361    Never,
13362    #[serde(rename = "PerSession")]
13363    PerSession,
13364}
13365#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
13366pub enum ImageLayerCompression {
13367    #[serde(rename = "EStarGZ")]
13368    EStarGz,
13369    #[serde(rename = "ESTARGZ")]
13370    Estargz,
13371    #[serde(rename = "Gzip")]
13372    Gzip,
13373    #[serde(rename = "Uncompressed")]
13374    Uncompressed,
13375    #[serde(rename = "Zstd")]
13376    Zstd,
13377}
13378#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
13379pub enum ImageMediaTypes {
13380    #[serde(rename = "DOCKER")]
13381    Docker,
13382    #[serde(rename = "DockerMediaTypes")]
13383    DockerMediaTypes,
13384    #[serde(rename = "OCI")]
13385    Oci,
13386    #[serde(rename = "OCIMediaTypes")]
13387    OciMediaTypes,
13388}
13389#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
13390pub enum ModuleSourceExperimentalFeature {
13391    #[serde(rename = "SELF_CALLS")]
13392    SelfCalls,
13393}
13394#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
13395pub enum ModuleSourceKind {
13396    #[serde(rename = "DIR")]
13397    Dir,
13398    #[serde(rename = "DIR_SOURCE")]
13399    DirSource,
13400    #[serde(rename = "GIT")]
13401    Git,
13402    #[serde(rename = "GIT_SOURCE")]
13403    GitSource,
13404    #[serde(rename = "LOCAL")]
13405    Local,
13406    #[serde(rename = "LOCAL_SOURCE")]
13407    LocalSource,
13408}
13409#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
13410pub enum NetworkProtocol {
13411    #[serde(rename = "TCP")]
13412    Tcp,
13413    #[serde(rename = "UDP")]
13414    Udp,
13415}
13416#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
13417pub enum ReturnType {
13418    #[serde(rename = "ANY")]
13419    Any,
13420    #[serde(rename = "FAILURE")]
13421    Failure,
13422    #[serde(rename = "SUCCESS")]
13423    Success,
13424}
13425#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
13426pub enum TypeDefKind {
13427    #[serde(rename = "BOOLEAN")]
13428    Boolean,
13429    #[serde(rename = "BOOLEAN_KIND")]
13430    BooleanKind,
13431    #[serde(rename = "ENUM")]
13432    Enum,
13433    #[serde(rename = "ENUM_KIND")]
13434    EnumKind,
13435    #[serde(rename = "FLOAT")]
13436    Float,
13437    #[serde(rename = "FLOAT_KIND")]
13438    FloatKind,
13439    #[serde(rename = "INPUT")]
13440    Input,
13441    #[serde(rename = "INPUT_KIND")]
13442    InputKind,
13443    #[serde(rename = "INTEGER")]
13444    Integer,
13445    #[serde(rename = "INTEGER_KIND")]
13446    IntegerKind,
13447    #[serde(rename = "INTERFACE")]
13448    Interface,
13449    #[serde(rename = "INTERFACE_KIND")]
13450    InterfaceKind,
13451    #[serde(rename = "LIST")]
13452    List,
13453    #[serde(rename = "LIST_KIND")]
13454    ListKind,
13455    #[serde(rename = "OBJECT")]
13456    Object,
13457    #[serde(rename = "OBJECT_KIND")]
13458    ObjectKind,
13459    #[serde(rename = "SCALAR")]
13460    Scalar,
13461    #[serde(rename = "SCALAR_KIND")]
13462    ScalarKind,
13463    #[serde(rename = "STRING")]
13464    String,
13465    #[serde(rename = "STRING_KIND")]
13466    StringKind,
13467    #[serde(rename = "VOID")]
13468    Void,
13469    #[serde(rename = "VOID_KIND")]
13470    VoidKind,
13471}