Skip to main content

dagger_sdk/
gen.rs

1#![allow(clippy::needless_lifetimes)]
2
3use crate::core::cli_session::DaggerSessionProc;
4use crate::core::graphql_client::DynGraphQLClient;
5use crate::errors::DaggerError;
6use crate::id::IntoID;
7use crate::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 GeneratorGroupId(pub String);
974impl From<&str> for GeneratorGroupId {
975    fn from(value: &str) -> Self {
976        Self(value.to_string())
977    }
978}
979impl From<String> for GeneratorGroupId {
980    fn from(value: String) -> Self {
981        Self(value)
982    }
983}
984impl IntoID<GeneratorGroupId> for GeneratorGroup {
985    fn into_id(
986        self,
987    ) -> std::pin::Pin<
988        Box<dyn core::future::Future<Output = Result<GeneratorGroupId, DaggerError>> + Send>,
989    > {
990        Box::pin(async move { self.id().await })
991    }
992}
993impl IntoID<GeneratorGroupId> for GeneratorGroupId {
994    fn into_id(
995        self,
996    ) -> std::pin::Pin<
997        Box<dyn core::future::Future<Output = Result<GeneratorGroupId, DaggerError>> + Send>,
998    > {
999        Box::pin(async move { Ok::<GeneratorGroupId, DaggerError>(self) })
1000    }
1001}
1002impl GeneratorGroupId {
1003    fn quote(&self) -> String {
1004        format!("\"{}\"", self.0.clone())
1005    }
1006}
1007#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1008pub struct GeneratorId(pub String);
1009impl From<&str> for GeneratorId {
1010    fn from(value: &str) -> Self {
1011        Self(value.to_string())
1012    }
1013}
1014impl From<String> for GeneratorId {
1015    fn from(value: String) -> Self {
1016        Self(value)
1017    }
1018}
1019impl IntoID<GeneratorId> for Generator {
1020    fn into_id(
1021        self,
1022    ) -> std::pin::Pin<
1023        Box<dyn core::future::Future<Output = Result<GeneratorId, DaggerError>> + Send>,
1024    > {
1025        Box::pin(async move { self.id().await })
1026    }
1027}
1028impl IntoID<GeneratorId> for GeneratorId {
1029    fn into_id(
1030        self,
1031    ) -> std::pin::Pin<
1032        Box<dyn core::future::Future<Output = Result<GeneratorId, DaggerError>> + Send>,
1033    > {
1034        Box::pin(async move { Ok::<GeneratorId, DaggerError>(self) })
1035    }
1036}
1037impl GeneratorId {
1038    fn quote(&self) -> String {
1039        format!("\"{}\"", self.0.clone())
1040    }
1041}
1042#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1043pub struct GitRefId(pub String);
1044impl From<&str> for GitRefId {
1045    fn from(value: &str) -> Self {
1046        Self(value.to_string())
1047    }
1048}
1049impl From<String> for GitRefId {
1050    fn from(value: String) -> Self {
1051        Self(value)
1052    }
1053}
1054impl IntoID<GitRefId> for GitRef {
1055    fn into_id(
1056        self,
1057    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<GitRefId, DaggerError>> + Send>>
1058    {
1059        Box::pin(async move { self.id().await })
1060    }
1061}
1062impl IntoID<GitRefId> for GitRefId {
1063    fn into_id(
1064        self,
1065    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<GitRefId, DaggerError>> + Send>>
1066    {
1067        Box::pin(async move { Ok::<GitRefId, DaggerError>(self) })
1068    }
1069}
1070impl GitRefId {
1071    fn quote(&self) -> String {
1072        format!("\"{}\"", self.0.clone())
1073    }
1074}
1075#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1076pub struct GitRepositoryId(pub String);
1077impl From<&str> for GitRepositoryId {
1078    fn from(value: &str) -> Self {
1079        Self(value.to_string())
1080    }
1081}
1082impl From<String> for GitRepositoryId {
1083    fn from(value: String) -> Self {
1084        Self(value)
1085    }
1086}
1087impl IntoID<GitRepositoryId> for GitRepository {
1088    fn into_id(
1089        self,
1090    ) -> std::pin::Pin<
1091        Box<dyn core::future::Future<Output = Result<GitRepositoryId, DaggerError>> + Send>,
1092    > {
1093        Box::pin(async move { self.id().await })
1094    }
1095}
1096impl IntoID<GitRepositoryId> for GitRepositoryId {
1097    fn into_id(
1098        self,
1099    ) -> std::pin::Pin<
1100        Box<dyn core::future::Future<Output = Result<GitRepositoryId, DaggerError>> + Send>,
1101    > {
1102        Box::pin(async move { Ok::<GitRepositoryId, DaggerError>(self) })
1103    }
1104}
1105impl GitRepositoryId {
1106    fn quote(&self) -> String {
1107        format!("\"{}\"", self.0.clone())
1108    }
1109}
1110#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1111pub struct HostId(pub String);
1112impl From<&str> for HostId {
1113    fn from(value: &str) -> Self {
1114        Self(value.to_string())
1115    }
1116}
1117impl From<String> for HostId {
1118    fn from(value: String) -> Self {
1119        Self(value)
1120    }
1121}
1122impl IntoID<HostId> for Host {
1123    fn into_id(
1124        self,
1125    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<HostId, DaggerError>> + Send>>
1126    {
1127        Box::pin(async move { self.id().await })
1128    }
1129}
1130impl IntoID<HostId> for HostId {
1131    fn into_id(
1132        self,
1133    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<HostId, DaggerError>> + Send>>
1134    {
1135        Box::pin(async move { Ok::<HostId, DaggerError>(self) })
1136    }
1137}
1138impl HostId {
1139    fn quote(&self) -> String {
1140        format!("\"{}\"", self.0.clone())
1141    }
1142}
1143#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1144pub struct InputTypeDefId(pub String);
1145impl From<&str> for InputTypeDefId {
1146    fn from(value: &str) -> Self {
1147        Self(value.to_string())
1148    }
1149}
1150impl From<String> for InputTypeDefId {
1151    fn from(value: String) -> Self {
1152        Self(value)
1153    }
1154}
1155impl IntoID<InputTypeDefId> for InputTypeDef {
1156    fn into_id(
1157        self,
1158    ) -> std::pin::Pin<
1159        Box<dyn core::future::Future<Output = Result<InputTypeDefId, DaggerError>> + Send>,
1160    > {
1161        Box::pin(async move { self.id().await })
1162    }
1163}
1164impl IntoID<InputTypeDefId> for InputTypeDefId {
1165    fn into_id(
1166        self,
1167    ) -> std::pin::Pin<
1168        Box<dyn core::future::Future<Output = Result<InputTypeDefId, DaggerError>> + Send>,
1169    > {
1170        Box::pin(async move { Ok::<InputTypeDefId, DaggerError>(self) })
1171    }
1172}
1173impl InputTypeDefId {
1174    fn quote(&self) -> String {
1175        format!("\"{}\"", self.0.clone())
1176    }
1177}
1178#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1179pub struct InterfaceTypeDefId(pub String);
1180impl From<&str> for InterfaceTypeDefId {
1181    fn from(value: &str) -> Self {
1182        Self(value.to_string())
1183    }
1184}
1185impl From<String> for InterfaceTypeDefId {
1186    fn from(value: String) -> Self {
1187        Self(value)
1188    }
1189}
1190impl IntoID<InterfaceTypeDefId> for InterfaceTypeDef {
1191    fn into_id(
1192        self,
1193    ) -> std::pin::Pin<
1194        Box<dyn core::future::Future<Output = Result<InterfaceTypeDefId, DaggerError>> + Send>,
1195    > {
1196        Box::pin(async move { self.id().await })
1197    }
1198}
1199impl IntoID<InterfaceTypeDefId> for InterfaceTypeDefId {
1200    fn into_id(
1201        self,
1202    ) -> std::pin::Pin<
1203        Box<dyn core::future::Future<Output = Result<InterfaceTypeDefId, DaggerError>> + Send>,
1204    > {
1205        Box::pin(async move { Ok::<InterfaceTypeDefId, DaggerError>(self) })
1206    }
1207}
1208impl InterfaceTypeDefId {
1209    fn quote(&self) -> String {
1210        format!("\"{}\"", self.0.clone())
1211    }
1212}
1213#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1214pub struct Json(pub String);
1215impl From<&str> for Json {
1216    fn from(value: &str) -> Self {
1217        Self(value.to_string())
1218    }
1219}
1220impl From<String> for Json {
1221    fn from(value: String) -> Self {
1222        Self(value)
1223    }
1224}
1225impl Json {
1226    fn quote(&self) -> String {
1227        format!("\"{}\"", self.0.clone())
1228    }
1229}
1230#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1231pub struct JsonValueId(pub String);
1232impl From<&str> for JsonValueId {
1233    fn from(value: &str) -> Self {
1234        Self(value.to_string())
1235    }
1236}
1237impl From<String> for JsonValueId {
1238    fn from(value: String) -> Self {
1239        Self(value)
1240    }
1241}
1242impl IntoID<JsonValueId> for JsonValue {
1243    fn into_id(
1244        self,
1245    ) -> std::pin::Pin<
1246        Box<dyn core::future::Future<Output = Result<JsonValueId, DaggerError>> + Send>,
1247    > {
1248        Box::pin(async move { self.id().await })
1249    }
1250}
1251impl IntoID<JsonValueId> for JsonValueId {
1252    fn into_id(
1253        self,
1254    ) -> std::pin::Pin<
1255        Box<dyn core::future::Future<Output = Result<JsonValueId, DaggerError>> + Send>,
1256    > {
1257        Box::pin(async move { Ok::<JsonValueId, DaggerError>(self) })
1258    }
1259}
1260impl JsonValueId {
1261    fn quote(&self) -> String {
1262        format!("\"{}\"", self.0.clone())
1263    }
1264}
1265#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1266pub struct Llmid(pub String);
1267impl From<&str> for Llmid {
1268    fn from(value: &str) -> Self {
1269        Self(value.to_string())
1270    }
1271}
1272impl From<String> for Llmid {
1273    fn from(value: String) -> Self {
1274        Self(value)
1275    }
1276}
1277impl IntoID<Llmid> for Llm {
1278    fn into_id(
1279        self,
1280    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Llmid, DaggerError>> + Send>>
1281    {
1282        Box::pin(async move { self.id().await })
1283    }
1284}
1285impl IntoID<Llmid> for Llmid {
1286    fn into_id(
1287        self,
1288    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Llmid, DaggerError>> + Send>>
1289    {
1290        Box::pin(async move { Ok::<Llmid, DaggerError>(self) })
1291    }
1292}
1293impl Llmid {
1294    fn quote(&self) -> String {
1295        format!("\"{}\"", self.0.clone())
1296    }
1297}
1298#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1299pub struct LlmTokenUsageId(pub String);
1300impl From<&str> for LlmTokenUsageId {
1301    fn from(value: &str) -> Self {
1302        Self(value.to_string())
1303    }
1304}
1305impl From<String> for LlmTokenUsageId {
1306    fn from(value: String) -> Self {
1307        Self(value)
1308    }
1309}
1310impl IntoID<LlmTokenUsageId> for LlmTokenUsage {
1311    fn into_id(
1312        self,
1313    ) -> std::pin::Pin<
1314        Box<dyn core::future::Future<Output = Result<LlmTokenUsageId, DaggerError>> + Send>,
1315    > {
1316        Box::pin(async move { self.id().await })
1317    }
1318}
1319impl IntoID<LlmTokenUsageId> for LlmTokenUsageId {
1320    fn into_id(
1321        self,
1322    ) -> std::pin::Pin<
1323        Box<dyn core::future::Future<Output = Result<LlmTokenUsageId, DaggerError>> + Send>,
1324    > {
1325        Box::pin(async move { Ok::<LlmTokenUsageId, DaggerError>(self) })
1326    }
1327}
1328impl LlmTokenUsageId {
1329    fn quote(&self) -> String {
1330        format!("\"{}\"", self.0.clone())
1331    }
1332}
1333#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1334pub struct LabelId(pub String);
1335impl From<&str> for LabelId {
1336    fn from(value: &str) -> Self {
1337        Self(value.to_string())
1338    }
1339}
1340impl From<String> for LabelId {
1341    fn from(value: String) -> Self {
1342        Self(value)
1343    }
1344}
1345impl IntoID<LabelId> for Label {
1346    fn into_id(
1347        self,
1348    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<LabelId, DaggerError>> + Send>>
1349    {
1350        Box::pin(async move { self.id().await })
1351    }
1352}
1353impl IntoID<LabelId> for LabelId {
1354    fn into_id(
1355        self,
1356    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<LabelId, DaggerError>> + Send>>
1357    {
1358        Box::pin(async move { Ok::<LabelId, DaggerError>(self) })
1359    }
1360}
1361impl LabelId {
1362    fn quote(&self) -> String {
1363        format!("\"{}\"", self.0.clone())
1364    }
1365}
1366#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1367pub struct ListTypeDefId(pub String);
1368impl From<&str> for ListTypeDefId {
1369    fn from(value: &str) -> Self {
1370        Self(value.to_string())
1371    }
1372}
1373impl From<String> for ListTypeDefId {
1374    fn from(value: String) -> Self {
1375        Self(value)
1376    }
1377}
1378impl IntoID<ListTypeDefId> for ListTypeDef {
1379    fn into_id(
1380        self,
1381    ) -> std::pin::Pin<
1382        Box<dyn core::future::Future<Output = Result<ListTypeDefId, DaggerError>> + Send>,
1383    > {
1384        Box::pin(async move { self.id().await })
1385    }
1386}
1387impl IntoID<ListTypeDefId> for ListTypeDefId {
1388    fn into_id(
1389        self,
1390    ) -> std::pin::Pin<
1391        Box<dyn core::future::Future<Output = Result<ListTypeDefId, DaggerError>> + Send>,
1392    > {
1393        Box::pin(async move { Ok::<ListTypeDefId, DaggerError>(self) })
1394    }
1395}
1396impl ListTypeDefId {
1397    fn quote(&self) -> String {
1398        format!("\"{}\"", self.0.clone())
1399    }
1400}
1401#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1402pub struct ModuleConfigClientId(pub String);
1403impl From<&str> for ModuleConfigClientId {
1404    fn from(value: &str) -> Self {
1405        Self(value.to_string())
1406    }
1407}
1408impl From<String> for ModuleConfigClientId {
1409    fn from(value: String) -> Self {
1410        Self(value)
1411    }
1412}
1413impl IntoID<ModuleConfigClientId> for ModuleConfigClient {
1414    fn into_id(
1415        self,
1416    ) -> std::pin::Pin<
1417        Box<dyn core::future::Future<Output = Result<ModuleConfigClientId, DaggerError>> + Send>,
1418    > {
1419        Box::pin(async move { self.id().await })
1420    }
1421}
1422impl IntoID<ModuleConfigClientId> for ModuleConfigClientId {
1423    fn into_id(
1424        self,
1425    ) -> std::pin::Pin<
1426        Box<dyn core::future::Future<Output = Result<ModuleConfigClientId, DaggerError>> + Send>,
1427    > {
1428        Box::pin(async move { Ok::<ModuleConfigClientId, DaggerError>(self) })
1429    }
1430}
1431impl ModuleConfigClientId {
1432    fn quote(&self) -> String {
1433        format!("\"{}\"", self.0.clone())
1434    }
1435}
1436#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1437pub struct ModuleId(pub String);
1438impl From<&str> for ModuleId {
1439    fn from(value: &str) -> Self {
1440        Self(value.to_string())
1441    }
1442}
1443impl From<String> for ModuleId {
1444    fn from(value: String) -> Self {
1445        Self(value)
1446    }
1447}
1448impl IntoID<ModuleId> for Module {
1449    fn into_id(
1450        self,
1451    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ModuleId, DaggerError>> + Send>>
1452    {
1453        Box::pin(async move { self.id().await })
1454    }
1455}
1456impl IntoID<ModuleId> for ModuleId {
1457    fn into_id(
1458        self,
1459    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ModuleId, DaggerError>> + Send>>
1460    {
1461        Box::pin(async move { Ok::<ModuleId, DaggerError>(self) })
1462    }
1463}
1464impl ModuleId {
1465    fn quote(&self) -> String {
1466        format!("\"{}\"", self.0.clone())
1467    }
1468}
1469#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1470pub struct ModuleSourceId(pub String);
1471impl From<&str> for ModuleSourceId {
1472    fn from(value: &str) -> Self {
1473        Self(value.to_string())
1474    }
1475}
1476impl From<String> for ModuleSourceId {
1477    fn from(value: String) -> Self {
1478        Self(value)
1479    }
1480}
1481impl IntoID<ModuleSourceId> for ModuleSource {
1482    fn into_id(
1483        self,
1484    ) -> std::pin::Pin<
1485        Box<dyn core::future::Future<Output = Result<ModuleSourceId, DaggerError>> + Send>,
1486    > {
1487        Box::pin(async move { self.id().await })
1488    }
1489}
1490impl IntoID<ModuleSourceId> for ModuleSourceId {
1491    fn into_id(
1492        self,
1493    ) -> std::pin::Pin<
1494        Box<dyn core::future::Future<Output = Result<ModuleSourceId, DaggerError>> + Send>,
1495    > {
1496        Box::pin(async move { Ok::<ModuleSourceId, DaggerError>(self) })
1497    }
1498}
1499impl ModuleSourceId {
1500    fn quote(&self) -> String {
1501        format!("\"{}\"", self.0.clone())
1502    }
1503}
1504#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1505pub struct ObjectTypeDefId(pub String);
1506impl From<&str> for ObjectTypeDefId {
1507    fn from(value: &str) -> Self {
1508        Self(value.to_string())
1509    }
1510}
1511impl From<String> for ObjectTypeDefId {
1512    fn from(value: String) -> Self {
1513        Self(value)
1514    }
1515}
1516impl IntoID<ObjectTypeDefId> for ObjectTypeDef {
1517    fn into_id(
1518        self,
1519    ) -> std::pin::Pin<
1520        Box<dyn core::future::Future<Output = Result<ObjectTypeDefId, DaggerError>> + Send>,
1521    > {
1522        Box::pin(async move { self.id().await })
1523    }
1524}
1525impl IntoID<ObjectTypeDefId> for ObjectTypeDefId {
1526    fn into_id(
1527        self,
1528    ) -> std::pin::Pin<
1529        Box<dyn core::future::Future<Output = Result<ObjectTypeDefId, DaggerError>> + Send>,
1530    > {
1531        Box::pin(async move { Ok::<ObjectTypeDefId, DaggerError>(self) })
1532    }
1533}
1534impl ObjectTypeDefId {
1535    fn quote(&self) -> String {
1536        format!("\"{}\"", self.0.clone())
1537    }
1538}
1539#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1540pub struct Platform(pub String);
1541impl From<&str> for Platform {
1542    fn from(value: &str) -> Self {
1543        Self(value.to_string())
1544    }
1545}
1546impl From<String> for Platform {
1547    fn from(value: String) -> Self {
1548        Self(value)
1549    }
1550}
1551impl Platform {
1552    fn quote(&self) -> String {
1553        format!("\"{}\"", self.0.clone())
1554    }
1555}
1556#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1557pub struct PortId(pub String);
1558impl From<&str> for PortId {
1559    fn from(value: &str) -> Self {
1560        Self(value.to_string())
1561    }
1562}
1563impl From<String> for PortId {
1564    fn from(value: String) -> Self {
1565        Self(value)
1566    }
1567}
1568impl IntoID<PortId> for Port {
1569    fn into_id(
1570        self,
1571    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<PortId, DaggerError>> + Send>>
1572    {
1573        Box::pin(async move { self.id().await })
1574    }
1575}
1576impl IntoID<PortId> for PortId {
1577    fn into_id(
1578        self,
1579    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<PortId, DaggerError>> + Send>>
1580    {
1581        Box::pin(async move { Ok::<PortId, DaggerError>(self) })
1582    }
1583}
1584impl PortId {
1585    fn quote(&self) -> String {
1586        format!("\"{}\"", self.0.clone())
1587    }
1588}
1589#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1590pub struct SdkConfigId(pub String);
1591impl From<&str> for SdkConfigId {
1592    fn from(value: &str) -> Self {
1593        Self(value.to_string())
1594    }
1595}
1596impl From<String> for SdkConfigId {
1597    fn from(value: String) -> Self {
1598        Self(value)
1599    }
1600}
1601impl IntoID<SdkConfigId> for SdkConfig {
1602    fn into_id(
1603        self,
1604    ) -> std::pin::Pin<
1605        Box<dyn core::future::Future<Output = Result<SdkConfigId, DaggerError>> + Send>,
1606    > {
1607        Box::pin(async move { self.id().await })
1608    }
1609}
1610impl IntoID<SdkConfigId> for SdkConfigId {
1611    fn into_id(
1612        self,
1613    ) -> std::pin::Pin<
1614        Box<dyn core::future::Future<Output = Result<SdkConfigId, DaggerError>> + Send>,
1615    > {
1616        Box::pin(async move { Ok::<SdkConfigId, DaggerError>(self) })
1617    }
1618}
1619impl SdkConfigId {
1620    fn quote(&self) -> String {
1621        format!("\"{}\"", self.0.clone())
1622    }
1623}
1624#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1625pub struct ScalarTypeDefId(pub String);
1626impl From<&str> for ScalarTypeDefId {
1627    fn from(value: &str) -> Self {
1628        Self(value.to_string())
1629    }
1630}
1631impl From<String> for ScalarTypeDefId {
1632    fn from(value: String) -> Self {
1633        Self(value)
1634    }
1635}
1636impl IntoID<ScalarTypeDefId> for ScalarTypeDef {
1637    fn into_id(
1638        self,
1639    ) -> std::pin::Pin<
1640        Box<dyn core::future::Future<Output = Result<ScalarTypeDefId, DaggerError>> + Send>,
1641    > {
1642        Box::pin(async move { self.id().await })
1643    }
1644}
1645impl IntoID<ScalarTypeDefId> for ScalarTypeDefId {
1646    fn into_id(
1647        self,
1648    ) -> std::pin::Pin<
1649        Box<dyn core::future::Future<Output = Result<ScalarTypeDefId, DaggerError>> + Send>,
1650    > {
1651        Box::pin(async move { Ok::<ScalarTypeDefId, DaggerError>(self) })
1652    }
1653}
1654impl ScalarTypeDefId {
1655    fn quote(&self) -> String {
1656        format!("\"{}\"", self.0.clone())
1657    }
1658}
1659#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1660pub struct SearchResultId(pub String);
1661impl From<&str> for SearchResultId {
1662    fn from(value: &str) -> Self {
1663        Self(value.to_string())
1664    }
1665}
1666impl From<String> for SearchResultId {
1667    fn from(value: String) -> Self {
1668        Self(value)
1669    }
1670}
1671impl IntoID<SearchResultId> for SearchResult {
1672    fn into_id(
1673        self,
1674    ) -> std::pin::Pin<
1675        Box<dyn core::future::Future<Output = Result<SearchResultId, DaggerError>> + Send>,
1676    > {
1677        Box::pin(async move { self.id().await })
1678    }
1679}
1680impl IntoID<SearchResultId> for SearchResultId {
1681    fn into_id(
1682        self,
1683    ) -> std::pin::Pin<
1684        Box<dyn core::future::Future<Output = Result<SearchResultId, DaggerError>> + Send>,
1685    > {
1686        Box::pin(async move { Ok::<SearchResultId, DaggerError>(self) })
1687    }
1688}
1689impl SearchResultId {
1690    fn quote(&self) -> String {
1691        format!("\"{}\"", self.0.clone())
1692    }
1693}
1694#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1695pub struct SearchSubmatchId(pub String);
1696impl From<&str> for SearchSubmatchId {
1697    fn from(value: &str) -> Self {
1698        Self(value.to_string())
1699    }
1700}
1701impl From<String> for SearchSubmatchId {
1702    fn from(value: String) -> Self {
1703        Self(value)
1704    }
1705}
1706impl IntoID<SearchSubmatchId> for SearchSubmatch {
1707    fn into_id(
1708        self,
1709    ) -> std::pin::Pin<
1710        Box<dyn core::future::Future<Output = Result<SearchSubmatchId, DaggerError>> + Send>,
1711    > {
1712        Box::pin(async move { self.id().await })
1713    }
1714}
1715impl IntoID<SearchSubmatchId> for SearchSubmatchId {
1716    fn into_id(
1717        self,
1718    ) -> std::pin::Pin<
1719        Box<dyn core::future::Future<Output = Result<SearchSubmatchId, DaggerError>> + Send>,
1720    > {
1721        Box::pin(async move { Ok::<SearchSubmatchId, DaggerError>(self) })
1722    }
1723}
1724impl SearchSubmatchId {
1725    fn quote(&self) -> String {
1726        format!("\"{}\"", self.0.clone())
1727    }
1728}
1729#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1730pub struct SecretId(pub String);
1731impl From<&str> for SecretId {
1732    fn from(value: &str) -> Self {
1733        Self(value.to_string())
1734    }
1735}
1736impl From<String> for SecretId {
1737    fn from(value: String) -> Self {
1738        Self(value)
1739    }
1740}
1741impl IntoID<SecretId> for Secret {
1742    fn into_id(
1743        self,
1744    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SecretId, DaggerError>> + Send>>
1745    {
1746        Box::pin(async move { self.id().await })
1747    }
1748}
1749impl IntoID<SecretId> for SecretId {
1750    fn into_id(
1751        self,
1752    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SecretId, DaggerError>> + Send>>
1753    {
1754        Box::pin(async move { Ok::<SecretId, DaggerError>(self) })
1755    }
1756}
1757impl SecretId {
1758    fn quote(&self) -> String {
1759        format!("\"{}\"", self.0.clone())
1760    }
1761}
1762#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1763pub struct ServiceId(pub String);
1764impl From<&str> for ServiceId {
1765    fn from(value: &str) -> Self {
1766        Self(value.to_string())
1767    }
1768}
1769impl From<String> for ServiceId {
1770    fn from(value: String) -> Self {
1771        Self(value)
1772    }
1773}
1774impl IntoID<ServiceId> for Service {
1775    fn into_id(
1776        self,
1777    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ServiceId, DaggerError>> + Send>>
1778    {
1779        Box::pin(async move { self.id().await })
1780    }
1781}
1782impl IntoID<ServiceId> for ServiceId {
1783    fn into_id(
1784        self,
1785    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ServiceId, DaggerError>> + Send>>
1786    {
1787        Box::pin(async move { Ok::<ServiceId, DaggerError>(self) })
1788    }
1789}
1790impl ServiceId {
1791    fn quote(&self) -> String {
1792        format!("\"{}\"", self.0.clone())
1793    }
1794}
1795#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1796pub struct SocketId(pub String);
1797impl From<&str> for SocketId {
1798    fn from(value: &str) -> Self {
1799        Self(value.to_string())
1800    }
1801}
1802impl From<String> for SocketId {
1803    fn from(value: String) -> Self {
1804        Self(value)
1805    }
1806}
1807impl IntoID<SocketId> for Socket {
1808    fn into_id(
1809        self,
1810    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SocketId, DaggerError>> + Send>>
1811    {
1812        Box::pin(async move { self.id().await })
1813    }
1814}
1815impl IntoID<SocketId> for SocketId {
1816    fn into_id(
1817        self,
1818    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SocketId, DaggerError>> + Send>>
1819    {
1820        Box::pin(async move { Ok::<SocketId, DaggerError>(self) })
1821    }
1822}
1823impl SocketId {
1824    fn quote(&self) -> String {
1825        format!("\"{}\"", self.0.clone())
1826    }
1827}
1828#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1829pub struct SourceMapId(pub String);
1830impl From<&str> for SourceMapId {
1831    fn from(value: &str) -> Self {
1832        Self(value.to_string())
1833    }
1834}
1835impl From<String> for SourceMapId {
1836    fn from(value: String) -> Self {
1837        Self(value)
1838    }
1839}
1840impl IntoID<SourceMapId> for SourceMap {
1841    fn into_id(
1842        self,
1843    ) -> std::pin::Pin<
1844        Box<dyn core::future::Future<Output = Result<SourceMapId, DaggerError>> + Send>,
1845    > {
1846        Box::pin(async move { self.id().await })
1847    }
1848}
1849impl IntoID<SourceMapId> for SourceMapId {
1850    fn into_id(
1851        self,
1852    ) -> std::pin::Pin<
1853        Box<dyn core::future::Future<Output = Result<SourceMapId, DaggerError>> + Send>,
1854    > {
1855        Box::pin(async move { Ok::<SourceMapId, DaggerError>(self) })
1856    }
1857}
1858impl SourceMapId {
1859    fn quote(&self) -> String {
1860        format!("\"{}\"", self.0.clone())
1861    }
1862}
1863#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1864pub struct StatId(pub String);
1865impl From<&str> for StatId {
1866    fn from(value: &str) -> Self {
1867        Self(value.to_string())
1868    }
1869}
1870impl From<String> for StatId {
1871    fn from(value: String) -> Self {
1872        Self(value)
1873    }
1874}
1875impl IntoID<StatId> for Stat {
1876    fn into_id(
1877        self,
1878    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<StatId, DaggerError>> + Send>>
1879    {
1880        Box::pin(async move { self.id().await })
1881    }
1882}
1883impl IntoID<StatId> for StatId {
1884    fn into_id(
1885        self,
1886    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<StatId, DaggerError>> + Send>>
1887    {
1888        Box::pin(async move { Ok::<StatId, DaggerError>(self) })
1889    }
1890}
1891impl StatId {
1892    fn quote(&self) -> String {
1893        format!("\"{}\"", self.0.clone())
1894    }
1895}
1896#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1897pub struct TerminalId(pub String);
1898impl From<&str> for TerminalId {
1899    fn from(value: &str) -> Self {
1900        Self(value.to_string())
1901    }
1902}
1903impl From<String> for TerminalId {
1904    fn from(value: String) -> Self {
1905        Self(value)
1906    }
1907}
1908impl IntoID<TerminalId> for Terminal {
1909    fn into_id(
1910        self,
1911    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TerminalId, DaggerError>> + Send>>
1912    {
1913        Box::pin(async move { self.id().await })
1914    }
1915}
1916impl IntoID<TerminalId> for TerminalId {
1917    fn into_id(
1918        self,
1919    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TerminalId, DaggerError>> + Send>>
1920    {
1921        Box::pin(async move { Ok::<TerminalId, DaggerError>(self) })
1922    }
1923}
1924impl TerminalId {
1925    fn quote(&self) -> String {
1926        format!("\"{}\"", self.0.clone())
1927    }
1928}
1929#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1930pub struct TypeDefId(pub String);
1931impl From<&str> for TypeDefId {
1932    fn from(value: &str) -> Self {
1933        Self(value.to_string())
1934    }
1935}
1936impl From<String> for TypeDefId {
1937    fn from(value: String) -> Self {
1938        Self(value)
1939    }
1940}
1941impl IntoID<TypeDefId> for TypeDef {
1942    fn into_id(
1943        self,
1944    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TypeDefId, DaggerError>> + Send>>
1945    {
1946        Box::pin(async move { self.id().await })
1947    }
1948}
1949impl IntoID<TypeDefId> for TypeDefId {
1950    fn into_id(
1951        self,
1952    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TypeDefId, DaggerError>> + Send>>
1953    {
1954        Box::pin(async move { Ok::<TypeDefId, DaggerError>(self) })
1955    }
1956}
1957impl TypeDefId {
1958    fn quote(&self) -> String {
1959        format!("\"{}\"", self.0.clone())
1960    }
1961}
1962#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1963pub struct Void(pub String);
1964impl From<&str> for Void {
1965    fn from(value: &str) -> Self {
1966        Self(value.to_string())
1967    }
1968}
1969impl From<String> for Void {
1970    fn from(value: String) -> Self {
1971        Self(value)
1972    }
1973}
1974impl Void {
1975    fn quote(&self) -> String {
1976        format!("\"{}\"", self.0.clone())
1977    }
1978}
1979#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
1980pub struct BuildArg {
1981    pub name: String,
1982    pub value: String,
1983}
1984#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
1985pub struct PipelineLabel {
1986    pub name: String,
1987    pub value: String,
1988}
1989#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
1990pub struct PortForward {
1991    pub backend: isize,
1992    pub frontend: isize,
1993    pub protocol: NetworkProtocol,
1994}
1995#[derive(Clone)]
1996pub struct Address {
1997    pub proc: Option<Arc<DaggerSessionProc>>,
1998    pub selection: Selection,
1999    pub graphql_client: DynGraphQLClient,
2000}
2001#[derive(Builder, Debug, PartialEq)]
2002pub struct AddressDirectoryOpts<'a> {
2003    #[builder(setter(into, strip_option), default)]
2004    pub exclude: Option<Vec<&'a str>>,
2005    #[builder(setter(into, strip_option), default)]
2006    pub gitignore: Option<bool>,
2007    #[builder(setter(into, strip_option), default)]
2008    pub include: Option<Vec<&'a str>>,
2009    #[builder(setter(into, strip_option), default)]
2010    pub no_cache: Option<bool>,
2011}
2012#[derive(Builder, Debug, PartialEq)]
2013pub struct AddressFileOpts<'a> {
2014    #[builder(setter(into, strip_option), default)]
2015    pub exclude: Option<Vec<&'a str>>,
2016    #[builder(setter(into, strip_option), default)]
2017    pub gitignore: Option<bool>,
2018    #[builder(setter(into, strip_option), default)]
2019    pub include: Option<Vec<&'a str>>,
2020    #[builder(setter(into, strip_option), default)]
2021    pub no_cache: Option<bool>,
2022}
2023impl Address {
2024    /// Load a container from the address.
2025    pub fn container(&self) -> Container {
2026        let query = self.selection.select("container");
2027        Container {
2028            proc: self.proc.clone(),
2029            selection: query,
2030            graphql_client: self.graphql_client.clone(),
2031        }
2032    }
2033    /// Load a directory from the address.
2034    ///
2035    /// # Arguments
2036    ///
2037    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2038    pub fn directory(&self) -> Directory {
2039        let query = self.selection.select("directory");
2040        Directory {
2041            proc: self.proc.clone(),
2042            selection: query,
2043            graphql_client: self.graphql_client.clone(),
2044        }
2045    }
2046    /// Load a directory from the address.
2047    ///
2048    /// # Arguments
2049    ///
2050    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2051    pub fn directory_opts<'a>(&self, opts: AddressDirectoryOpts<'a>) -> Directory {
2052        let mut query = self.selection.select("directory");
2053        if let Some(exclude) = opts.exclude {
2054            query = query.arg("exclude", exclude);
2055        }
2056        if let Some(include) = opts.include {
2057            query = query.arg("include", include);
2058        }
2059        if let Some(gitignore) = opts.gitignore {
2060            query = query.arg("gitignore", gitignore);
2061        }
2062        if let Some(no_cache) = opts.no_cache {
2063            query = query.arg("noCache", no_cache);
2064        }
2065        Directory {
2066            proc: self.proc.clone(),
2067            selection: query,
2068            graphql_client: self.graphql_client.clone(),
2069        }
2070    }
2071    /// Load a file from the address.
2072    ///
2073    /// # Arguments
2074    ///
2075    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2076    pub fn file(&self) -> File {
2077        let query = self.selection.select("file");
2078        File {
2079            proc: self.proc.clone(),
2080            selection: query,
2081            graphql_client: self.graphql_client.clone(),
2082        }
2083    }
2084    /// Load a file from the address.
2085    ///
2086    /// # Arguments
2087    ///
2088    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2089    pub fn file_opts<'a>(&self, opts: AddressFileOpts<'a>) -> File {
2090        let mut query = self.selection.select("file");
2091        if let Some(exclude) = opts.exclude {
2092            query = query.arg("exclude", exclude);
2093        }
2094        if let Some(include) = opts.include {
2095            query = query.arg("include", include);
2096        }
2097        if let Some(gitignore) = opts.gitignore {
2098            query = query.arg("gitignore", gitignore);
2099        }
2100        if let Some(no_cache) = opts.no_cache {
2101            query = query.arg("noCache", no_cache);
2102        }
2103        File {
2104            proc: self.proc.clone(),
2105            selection: query,
2106            graphql_client: self.graphql_client.clone(),
2107        }
2108    }
2109    /// Load a git ref (branch, tag or commit) from the address.
2110    pub fn git_ref(&self) -> GitRef {
2111        let query = self.selection.select("gitRef");
2112        GitRef {
2113            proc: self.proc.clone(),
2114            selection: query,
2115            graphql_client: self.graphql_client.clone(),
2116        }
2117    }
2118    /// Load a git repository from the address.
2119    pub fn git_repository(&self) -> GitRepository {
2120        let query = self.selection.select("gitRepository");
2121        GitRepository {
2122            proc: self.proc.clone(),
2123            selection: query,
2124            graphql_client: self.graphql_client.clone(),
2125        }
2126    }
2127    /// A unique identifier for this Address.
2128    pub async fn id(&self) -> Result<AddressId, DaggerError> {
2129        let query = self.selection.select("id");
2130        query.execute(self.graphql_client.clone()).await
2131    }
2132    /// Load a secret from the address.
2133    pub fn secret(&self) -> Secret {
2134        let query = self.selection.select("secret");
2135        Secret {
2136            proc: self.proc.clone(),
2137            selection: query,
2138            graphql_client: self.graphql_client.clone(),
2139        }
2140    }
2141    /// Load a service from the address.
2142    pub fn service(&self) -> Service {
2143        let query = self.selection.select("service");
2144        Service {
2145            proc: self.proc.clone(),
2146            selection: query,
2147            graphql_client: self.graphql_client.clone(),
2148        }
2149    }
2150    /// Load a local socket from the address.
2151    pub fn socket(&self) -> Socket {
2152        let query = self.selection.select("socket");
2153        Socket {
2154            proc: self.proc.clone(),
2155            selection: query,
2156            graphql_client: self.graphql_client.clone(),
2157        }
2158    }
2159    /// The address value
2160    pub async fn value(&self) -> Result<String, DaggerError> {
2161        let query = self.selection.select("value");
2162        query.execute(self.graphql_client.clone()).await
2163    }
2164}
2165#[derive(Clone)]
2166pub struct Binding {
2167    pub proc: Option<Arc<DaggerSessionProc>>,
2168    pub selection: Selection,
2169    pub graphql_client: DynGraphQLClient,
2170}
2171impl Binding {
2172    /// Retrieve the binding value, as type Address
2173    pub fn as_address(&self) -> Address {
2174        let query = self.selection.select("asAddress");
2175        Address {
2176            proc: self.proc.clone(),
2177            selection: query,
2178            graphql_client: self.graphql_client.clone(),
2179        }
2180    }
2181    /// Retrieve the binding value, as type CacheVolume
2182    pub fn as_cache_volume(&self) -> CacheVolume {
2183        let query = self.selection.select("asCacheVolume");
2184        CacheVolume {
2185            proc: self.proc.clone(),
2186            selection: query,
2187            graphql_client: self.graphql_client.clone(),
2188        }
2189    }
2190    /// Retrieve the binding value, as type Changeset
2191    pub fn as_changeset(&self) -> Changeset {
2192        let query = self.selection.select("asChangeset");
2193        Changeset {
2194            proc: self.proc.clone(),
2195            selection: query,
2196            graphql_client: self.graphql_client.clone(),
2197        }
2198    }
2199    /// Retrieve the binding value, as type Check
2200    pub fn as_check(&self) -> Check {
2201        let query = self.selection.select("asCheck");
2202        Check {
2203            proc: self.proc.clone(),
2204            selection: query,
2205            graphql_client: self.graphql_client.clone(),
2206        }
2207    }
2208    /// Retrieve the binding value, as type CheckGroup
2209    pub fn as_check_group(&self) -> CheckGroup {
2210        let query = self.selection.select("asCheckGroup");
2211        CheckGroup {
2212            proc: self.proc.clone(),
2213            selection: query,
2214            graphql_client: self.graphql_client.clone(),
2215        }
2216    }
2217    /// Retrieve the binding value, as type Cloud
2218    pub fn as_cloud(&self) -> Cloud {
2219        let query = self.selection.select("asCloud");
2220        Cloud {
2221            proc: self.proc.clone(),
2222            selection: query,
2223            graphql_client: self.graphql_client.clone(),
2224        }
2225    }
2226    /// Retrieve the binding value, as type Container
2227    pub fn as_container(&self) -> Container {
2228        let query = self.selection.select("asContainer");
2229        Container {
2230            proc: self.proc.clone(),
2231            selection: query,
2232            graphql_client: self.graphql_client.clone(),
2233        }
2234    }
2235    /// Retrieve the binding value, as type Directory
2236    pub fn as_directory(&self) -> Directory {
2237        let query = self.selection.select("asDirectory");
2238        Directory {
2239            proc: self.proc.clone(),
2240            selection: query,
2241            graphql_client: self.graphql_client.clone(),
2242        }
2243    }
2244    /// Retrieve the binding value, as type Env
2245    pub fn as_env(&self) -> Env {
2246        let query = self.selection.select("asEnv");
2247        Env {
2248            proc: self.proc.clone(),
2249            selection: query,
2250            graphql_client: self.graphql_client.clone(),
2251        }
2252    }
2253    /// Retrieve the binding value, as type EnvFile
2254    pub fn as_env_file(&self) -> EnvFile {
2255        let query = self.selection.select("asEnvFile");
2256        EnvFile {
2257            proc: self.proc.clone(),
2258            selection: query,
2259            graphql_client: self.graphql_client.clone(),
2260        }
2261    }
2262    /// Retrieve the binding value, as type File
2263    pub fn as_file(&self) -> File {
2264        let query = self.selection.select("asFile");
2265        File {
2266            proc: self.proc.clone(),
2267            selection: query,
2268            graphql_client: self.graphql_client.clone(),
2269        }
2270    }
2271    /// Retrieve the binding value, as type Generator
2272    pub fn as_generator(&self) -> Generator {
2273        let query = self.selection.select("asGenerator");
2274        Generator {
2275            proc: self.proc.clone(),
2276            selection: query,
2277            graphql_client: self.graphql_client.clone(),
2278        }
2279    }
2280    /// Retrieve the binding value, as type GeneratorGroup
2281    pub fn as_generator_group(&self) -> GeneratorGroup {
2282        let query = self.selection.select("asGeneratorGroup");
2283        GeneratorGroup {
2284            proc: self.proc.clone(),
2285            selection: query,
2286            graphql_client: self.graphql_client.clone(),
2287        }
2288    }
2289    /// Retrieve the binding value, as type GitRef
2290    pub fn as_git_ref(&self) -> GitRef {
2291        let query = self.selection.select("asGitRef");
2292        GitRef {
2293            proc: self.proc.clone(),
2294            selection: query,
2295            graphql_client: self.graphql_client.clone(),
2296        }
2297    }
2298    /// Retrieve the binding value, as type GitRepository
2299    pub fn as_git_repository(&self) -> GitRepository {
2300        let query = self.selection.select("asGitRepository");
2301        GitRepository {
2302            proc: self.proc.clone(),
2303            selection: query,
2304            graphql_client: self.graphql_client.clone(),
2305        }
2306    }
2307    /// Retrieve the binding value, as type JSONValue
2308    pub fn as_json_value(&self) -> JsonValue {
2309        let query = self.selection.select("asJSONValue");
2310        JsonValue {
2311            proc: self.proc.clone(),
2312            selection: query,
2313            graphql_client: self.graphql_client.clone(),
2314        }
2315    }
2316    /// Retrieve the binding value, as type Module
2317    pub fn as_module(&self) -> Module {
2318        let query = self.selection.select("asModule");
2319        Module {
2320            proc: self.proc.clone(),
2321            selection: query,
2322            graphql_client: self.graphql_client.clone(),
2323        }
2324    }
2325    /// Retrieve the binding value, as type ModuleConfigClient
2326    pub fn as_module_config_client(&self) -> ModuleConfigClient {
2327        let query = self.selection.select("asModuleConfigClient");
2328        ModuleConfigClient {
2329            proc: self.proc.clone(),
2330            selection: query,
2331            graphql_client: self.graphql_client.clone(),
2332        }
2333    }
2334    /// Retrieve the binding value, as type ModuleSource
2335    pub fn as_module_source(&self) -> ModuleSource {
2336        let query = self.selection.select("asModuleSource");
2337        ModuleSource {
2338            proc: self.proc.clone(),
2339            selection: query,
2340            graphql_client: self.graphql_client.clone(),
2341        }
2342    }
2343    /// Retrieve the binding value, as type SearchResult
2344    pub fn as_search_result(&self) -> SearchResult {
2345        let query = self.selection.select("asSearchResult");
2346        SearchResult {
2347            proc: self.proc.clone(),
2348            selection: query,
2349            graphql_client: self.graphql_client.clone(),
2350        }
2351    }
2352    /// Retrieve the binding value, as type SearchSubmatch
2353    pub fn as_search_submatch(&self) -> SearchSubmatch {
2354        let query = self.selection.select("asSearchSubmatch");
2355        SearchSubmatch {
2356            proc: self.proc.clone(),
2357            selection: query,
2358            graphql_client: self.graphql_client.clone(),
2359        }
2360    }
2361    /// Retrieve the binding value, as type Secret
2362    pub fn as_secret(&self) -> Secret {
2363        let query = self.selection.select("asSecret");
2364        Secret {
2365            proc: self.proc.clone(),
2366            selection: query,
2367            graphql_client: self.graphql_client.clone(),
2368        }
2369    }
2370    /// Retrieve the binding value, as type Service
2371    pub fn as_service(&self) -> Service {
2372        let query = self.selection.select("asService");
2373        Service {
2374            proc: self.proc.clone(),
2375            selection: query,
2376            graphql_client: self.graphql_client.clone(),
2377        }
2378    }
2379    /// Retrieve the binding value, as type Socket
2380    pub fn as_socket(&self) -> Socket {
2381        let query = self.selection.select("asSocket");
2382        Socket {
2383            proc: self.proc.clone(),
2384            selection: query,
2385            graphql_client: self.graphql_client.clone(),
2386        }
2387    }
2388    /// Retrieve the binding value, as type Stat
2389    pub fn as_stat(&self) -> Stat {
2390        let query = self.selection.select("asStat");
2391        Stat {
2392            proc: self.proc.clone(),
2393            selection: query,
2394            graphql_client: self.graphql_client.clone(),
2395        }
2396    }
2397    /// Returns the binding's string value
2398    pub async fn as_string(&self) -> Result<String, DaggerError> {
2399        let query = self.selection.select("asString");
2400        query.execute(self.graphql_client.clone()).await
2401    }
2402    /// Returns the digest of the binding value
2403    pub async fn digest(&self) -> Result<String, DaggerError> {
2404        let query = self.selection.select("digest");
2405        query.execute(self.graphql_client.clone()).await
2406    }
2407    /// A unique identifier for this Binding.
2408    pub async fn id(&self) -> Result<BindingId, DaggerError> {
2409        let query = self.selection.select("id");
2410        query.execute(self.graphql_client.clone()).await
2411    }
2412    /// Returns true if the binding is null
2413    pub async fn is_null(&self) -> Result<bool, DaggerError> {
2414        let query = self.selection.select("isNull");
2415        query.execute(self.graphql_client.clone()).await
2416    }
2417    /// Returns the binding name
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    /// Returns the binding type
2423    pub async fn type_name(&self) -> Result<String, DaggerError> {
2424        let query = self.selection.select("typeName");
2425        query.execute(self.graphql_client.clone()).await
2426    }
2427}
2428#[derive(Clone)]
2429pub struct CacheVolume {
2430    pub proc: Option<Arc<DaggerSessionProc>>,
2431    pub selection: Selection,
2432    pub graphql_client: DynGraphQLClient,
2433}
2434impl CacheVolume {
2435    /// A unique identifier for this CacheVolume.
2436    pub async fn id(&self) -> Result<CacheVolumeId, DaggerError> {
2437        let query = self.selection.select("id");
2438        query.execute(self.graphql_client.clone()).await
2439    }
2440}
2441#[derive(Clone)]
2442pub struct Changeset {
2443    pub proc: Option<Arc<DaggerSessionProc>>,
2444    pub selection: Selection,
2445    pub graphql_client: DynGraphQLClient,
2446}
2447#[derive(Builder, Debug, PartialEq)]
2448pub struct ChangesetWithChangesetOpts {
2449    /// What to do on a merge conflict
2450    #[builder(setter(into, strip_option), default)]
2451    pub on_conflict: Option<ChangesetMergeConflict>,
2452}
2453#[derive(Builder, Debug, PartialEq)]
2454pub struct ChangesetWithChangesetsOpts {
2455    /// What to do on a merge conflict
2456    #[builder(setter(into, strip_option), default)]
2457    pub on_conflict: Option<ChangesetsMergeConflict>,
2458}
2459impl Changeset {
2460    /// Files and directories that were added in the newer directory.
2461    pub async fn added_paths(&self) -> Result<Vec<String>, DaggerError> {
2462        let query = self.selection.select("addedPaths");
2463        query.execute(self.graphql_client.clone()).await
2464    }
2465    /// The newer/upper snapshot.
2466    pub fn after(&self) -> Directory {
2467        let query = self.selection.select("after");
2468        Directory {
2469            proc: self.proc.clone(),
2470            selection: query,
2471            graphql_client: self.graphql_client.clone(),
2472        }
2473    }
2474    /// Return a Git-compatible patch of the changes
2475    pub fn as_patch(&self) -> File {
2476        let query = self.selection.select("asPatch");
2477        File {
2478            proc: self.proc.clone(),
2479            selection: query,
2480            graphql_client: self.graphql_client.clone(),
2481        }
2482    }
2483    /// The older/lower snapshot to compare against.
2484    pub fn before(&self) -> Directory {
2485        let query = self.selection.select("before");
2486        Directory {
2487            proc: self.proc.clone(),
2488            selection: query,
2489            graphql_client: self.graphql_client.clone(),
2490        }
2491    }
2492    /// Applies the diff represented by this changeset to a path on the host.
2493    ///
2494    /// # Arguments
2495    ///
2496    /// * `path` - Location of the copied directory (e.g., "logs/").
2497    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
2498        let mut query = self.selection.select("export");
2499        query = query.arg("path", path.into());
2500        query.execute(self.graphql_client.clone()).await
2501    }
2502    /// A unique identifier for this Changeset.
2503    pub async fn id(&self) -> Result<ChangesetId, DaggerError> {
2504        let query = self.selection.select("id");
2505        query.execute(self.graphql_client.clone()).await
2506    }
2507    /// Returns true if the changeset is empty (i.e. there are no changes).
2508    pub async fn is_empty(&self) -> Result<bool, DaggerError> {
2509        let query = self.selection.select("isEmpty");
2510        query.execute(self.graphql_client.clone()).await
2511    }
2512    /// Return a snapshot containing only the created and modified files
2513    pub fn layer(&self) -> Directory {
2514        let query = self.selection.select("layer");
2515        Directory {
2516            proc: self.proc.clone(),
2517            selection: query,
2518            graphql_client: self.graphql_client.clone(),
2519        }
2520    }
2521    /// Files and directories that existed before and were updated in the newer directory.
2522    pub async fn modified_paths(&self) -> Result<Vec<String>, DaggerError> {
2523        let query = self.selection.select("modifiedPaths");
2524        query.execute(self.graphql_client.clone()).await
2525    }
2526    /// Files and directories that were removed. Directories are indicated by a trailing slash, and their child paths are not included.
2527    pub async fn removed_paths(&self) -> Result<Vec<String>, DaggerError> {
2528        let query = self.selection.select("removedPaths");
2529        query.execute(self.graphql_client.clone()).await
2530    }
2531    /// Force evaluation in the engine.
2532    pub async fn sync(&self) -> Result<ChangesetId, DaggerError> {
2533        let query = self.selection.select("sync");
2534        query.execute(self.graphql_client.clone()).await
2535    }
2536    /// Add changes to an existing changeset
2537    /// By default the operation will fail in case of conflicts, for instance a file modified in both changesets. The behavior can be adjusted using onConflict argument
2538    ///
2539    /// # Arguments
2540    ///
2541    /// * `changes` - Changes to merge into the actual changeset
2542    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2543    pub fn with_changeset(&self, changes: impl IntoID<ChangesetId>) -> Changeset {
2544        let mut query = self.selection.select("withChangeset");
2545        query = query.arg_lazy(
2546            "changes",
2547            Box::new(move || {
2548                let changes = changes.clone();
2549                Box::pin(async move { changes.into_id().await.unwrap().quote() })
2550            }),
2551        );
2552        Changeset {
2553            proc: self.proc.clone(),
2554            selection: query,
2555            graphql_client: self.graphql_client.clone(),
2556        }
2557    }
2558    /// Add changes to an existing changeset
2559    /// By default the operation will fail in case of conflicts, for instance a file modified in both changesets. The behavior can be adjusted using onConflict argument
2560    ///
2561    /// # Arguments
2562    ///
2563    /// * `changes` - Changes to merge into the actual changeset
2564    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2565    pub fn with_changeset_opts(
2566        &self,
2567        changes: impl IntoID<ChangesetId>,
2568        opts: ChangesetWithChangesetOpts,
2569    ) -> Changeset {
2570        let mut query = self.selection.select("withChangeset");
2571        query = query.arg_lazy(
2572            "changes",
2573            Box::new(move || {
2574                let changes = changes.clone();
2575                Box::pin(async move { changes.into_id().await.unwrap().quote() })
2576            }),
2577        );
2578        if let Some(on_conflict) = opts.on_conflict {
2579            query = query.arg("onConflict", on_conflict);
2580        }
2581        Changeset {
2582            proc: self.proc.clone(),
2583            selection: query,
2584            graphql_client: self.graphql_client.clone(),
2585        }
2586    }
2587    /// Add changes from multiple changesets using git octopus merge strategy
2588    /// This is more efficient than chaining multiple withChangeset calls when merging many changesets.
2589    /// Only FAIL and FAIL_EARLY conflict strategies are supported (octopus merge cannot use -X ours/theirs).
2590    ///
2591    /// # Arguments
2592    ///
2593    /// * `changes` - List of changesets to merge into the actual changeset
2594    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2595    pub fn with_changesets(&self, changes: Vec<ChangesetId>) -> Changeset {
2596        let mut query = self.selection.select("withChangesets");
2597        query = query.arg("changes", changes);
2598        Changeset {
2599            proc: self.proc.clone(),
2600            selection: query,
2601            graphql_client: self.graphql_client.clone(),
2602        }
2603    }
2604    /// Add changes from multiple changesets using git octopus merge strategy
2605    /// This is more efficient than chaining multiple withChangeset calls when merging many changesets.
2606    /// Only FAIL and FAIL_EARLY conflict strategies are supported (octopus merge cannot use -X ours/theirs).
2607    ///
2608    /// # Arguments
2609    ///
2610    /// * `changes` - List of changesets to merge into the actual changeset
2611    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2612    pub fn with_changesets_opts(
2613        &self,
2614        changes: Vec<ChangesetId>,
2615        opts: ChangesetWithChangesetsOpts,
2616    ) -> Changeset {
2617        let mut query = self.selection.select("withChangesets");
2618        query = query.arg("changes", changes);
2619        if let Some(on_conflict) = opts.on_conflict {
2620            query = query.arg("onConflict", on_conflict);
2621        }
2622        Changeset {
2623            proc: self.proc.clone(),
2624            selection: query,
2625            graphql_client: self.graphql_client.clone(),
2626        }
2627    }
2628}
2629#[derive(Clone)]
2630pub struct Check {
2631    pub proc: Option<Arc<DaggerSessionProc>>,
2632    pub selection: Selection,
2633    pub graphql_client: DynGraphQLClient,
2634}
2635impl Check {
2636    /// Whether the check completed
2637    pub async fn completed(&self) -> Result<bool, DaggerError> {
2638        let query = self.selection.select("completed");
2639        query.execute(self.graphql_client.clone()).await
2640    }
2641    /// The description of the check
2642    pub async fn description(&self) -> Result<String, DaggerError> {
2643        let query = self.selection.select("description");
2644        query.execute(self.graphql_client.clone()).await
2645    }
2646    /// A unique identifier for this Check.
2647    pub async fn id(&self) -> Result<CheckId, DaggerError> {
2648        let query = self.selection.select("id");
2649        query.execute(self.graphql_client.clone()).await
2650    }
2651    /// Return the fully qualified name of the check
2652    pub async fn name(&self) -> Result<String, DaggerError> {
2653        let query = self.selection.select("name");
2654        query.execute(self.graphql_client.clone()).await
2655    }
2656    /// Whether the check passed
2657    pub async fn passed(&self) -> Result<bool, DaggerError> {
2658        let query = self.selection.select("passed");
2659        query.execute(self.graphql_client.clone()).await
2660    }
2661    /// The path of the check within its module
2662    pub async fn path(&self) -> Result<Vec<String>, DaggerError> {
2663        let query = self.selection.select("path");
2664        query.execute(self.graphql_client.clone()).await
2665    }
2666    /// An emoji representing the result of the check
2667    pub async fn result_emoji(&self) -> Result<String, DaggerError> {
2668        let query = self.selection.select("resultEmoji");
2669        query.execute(self.graphql_client.clone()).await
2670    }
2671    /// Execute the check
2672    pub fn run(&self) -> Check {
2673        let query = self.selection.select("run");
2674        Check {
2675            proc: self.proc.clone(),
2676            selection: query,
2677            graphql_client: self.graphql_client.clone(),
2678        }
2679    }
2680}
2681#[derive(Clone)]
2682pub struct CheckGroup {
2683    pub proc: Option<Arc<DaggerSessionProc>>,
2684    pub selection: Selection,
2685    pub graphql_client: DynGraphQLClient,
2686}
2687impl CheckGroup {
2688    /// A unique identifier for this CheckGroup.
2689    pub async fn id(&self) -> Result<CheckGroupId, DaggerError> {
2690        let query = self.selection.select("id");
2691        query.execute(self.graphql_client.clone()).await
2692    }
2693    /// Return a list of individual checks and their details
2694    pub fn list(&self) -> Vec<Check> {
2695        let query = self.selection.select("list");
2696        vec![Check {
2697            proc: self.proc.clone(),
2698            selection: query,
2699            graphql_client: self.graphql_client.clone(),
2700        }]
2701    }
2702    /// Generate a markdown report
2703    pub fn report(&self) -> File {
2704        let query = self.selection.select("report");
2705        File {
2706            proc: self.proc.clone(),
2707            selection: query,
2708            graphql_client: self.graphql_client.clone(),
2709        }
2710    }
2711    /// Execute all selected checks
2712    pub fn run(&self) -> CheckGroup {
2713        let query = self.selection.select("run");
2714        CheckGroup {
2715            proc: self.proc.clone(),
2716            selection: query,
2717            graphql_client: self.graphql_client.clone(),
2718        }
2719    }
2720}
2721#[derive(Clone)]
2722pub struct Cloud {
2723    pub proc: Option<Arc<DaggerSessionProc>>,
2724    pub selection: Selection,
2725    pub graphql_client: DynGraphQLClient,
2726}
2727impl Cloud {
2728    /// A unique identifier for this Cloud.
2729    pub async fn id(&self) -> Result<CloudId, DaggerError> {
2730        let query = self.selection.select("id");
2731        query.execute(self.graphql_client.clone()).await
2732    }
2733    /// The trace URL for the current session
2734    pub async fn trace_url(&self) -> Result<String, DaggerError> {
2735        let query = self.selection.select("traceURL");
2736        query.execute(self.graphql_client.clone()).await
2737    }
2738}
2739#[derive(Clone)]
2740pub struct Container {
2741    pub proc: Option<Arc<DaggerSessionProc>>,
2742    pub selection: Selection,
2743    pub graphql_client: DynGraphQLClient,
2744}
2745#[derive(Builder, Debug, PartialEq)]
2746pub struct ContainerAsServiceOpts<'a> {
2747    /// Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).
2748    /// If empty, the container's default command is used.
2749    #[builder(setter(into, strip_option), default)]
2750    pub args: Option<Vec<&'a str>>,
2751    /// Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2752    #[builder(setter(into, strip_option), default)]
2753    pub expand: Option<bool>,
2754    /// Provides Dagger access to the executed command.
2755    #[builder(setter(into, strip_option), default)]
2756    pub experimental_privileged_nesting: Option<bool>,
2757    /// 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.
2758    #[builder(setter(into, strip_option), default)]
2759    pub insecure_root_capabilities: Option<bool>,
2760    /// If set, skip the automatic init process injected into containers by default.
2761    /// 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.
2762    #[builder(setter(into, strip_option), default)]
2763    pub no_init: Option<bool>,
2764    /// If the container has an entrypoint, prepend it to the args.
2765    #[builder(setter(into, strip_option), default)]
2766    pub use_entrypoint: Option<bool>,
2767}
2768#[derive(Builder, Debug, PartialEq)]
2769pub struct ContainerAsTarballOpts {
2770    /// Force each layer of the image to use the specified compression algorithm.
2771    /// 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.
2772    #[builder(setter(into, strip_option), default)]
2773    pub forced_compression: Option<ImageLayerCompression>,
2774    /// Use the specified media types for the image's layers.
2775    /// Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
2776    #[builder(setter(into, strip_option), default)]
2777    pub media_types: Option<ImageMediaTypes>,
2778    /// Identifiers for other platform specific containers.
2779    /// Used for multi-platform images.
2780    #[builder(setter(into, strip_option), default)]
2781    pub platform_variants: Option<Vec<ContainerId>>,
2782}
2783#[derive(Builder, Debug, PartialEq)]
2784pub struct ContainerDirectoryOpts {
2785    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2786    #[builder(setter(into, strip_option), default)]
2787    pub expand: Option<bool>,
2788}
2789#[derive(Builder, Debug, PartialEq)]
2790pub struct ContainerExistsOpts {
2791    /// If specified, do not follow symlinks.
2792    #[builder(setter(into, strip_option), default)]
2793    pub do_not_follow_symlinks: Option<bool>,
2794    /// If specified, also validate the type of file (e.g. "REGULAR_TYPE", "DIRECTORY_TYPE", or "SYMLINK_TYPE").
2795    #[builder(setter(into, strip_option), default)]
2796    pub expected_type: Option<ExistsType>,
2797}
2798#[derive(Builder, Debug, PartialEq)]
2799pub struct ContainerExportOpts {
2800    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2801    #[builder(setter(into, strip_option), default)]
2802    pub expand: Option<bool>,
2803    /// Force each layer of the exported image to use the specified compression algorithm.
2804    /// 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.
2805    #[builder(setter(into, strip_option), default)]
2806    pub forced_compression: Option<ImageLayerCompression>,
2807    /// Use the specified media types for the exported image's layers.
2808    /// Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
2809    #[builder(setter(into, strip_option), default)]
2810    pub media_types: Option<ImageMediaTypes>,
2811    /// Identifiers for other platform specific containers.
2812    /// Used for multi-platform image.
2813    #[builder(setter(into, strip_option), default)]
2814    pub platform_variants: Option<Vec<ContainerId>>,
2815}
2816#[derive(Builder, Debug, PartialEq)]
2817pub struct ContainerExportImageOpts {
2818    /// Force each layer of the exported image to use the specified compression algorithm.
2819    /// 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.
2820    #[builder(setter(into, strip_option), default)]
2821    pub forced_compression: Option<ImageLayerCompression>,
2822    /// Use the specified media types for the exported image's layers.
2823    /// Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
2824    #[builder(setter(into, strip_option), default)]
2825    pub media_types: Option<ImageMediaTypes>,
2826    /// Identifiers for other platform specific containers.
2827    /// Used for multi-platform image.
2828    #[builder(setter(into, strip_option), default)]
2829    pub platform_variants: Option<Vec<ContainerId>>,
2830}
2831#[derive(Builder, Debug, PartialEq)]
2832pub struct ContainerFileOpts {
2833    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2834    #[builder(setter(into, strip_option), default)]
2835    pub expand: Option<bool>,
2836}
2837#[derive(Builder, Debug, PartialEq)]
2838pub struct ContainerImportOpts<'a> {
2839    /// Identifies the tag to import from the archive, if the archive bundles multiple tags.
2840    #[builder(setter(into, strip_option), default)]
2841    pub tag: Option<&'a str>,
2842}
2843#[derive(Builder, Debug, PartialEq)]
2844pub struct ContainerPublishOpts {
2845    /// Force each layer of the published image to use the specified compression algorithm.
2846    /// 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.
2847    #[builder(setter(into, strip_option), default)]
2848    pub forced_compression: Option<ImageLayerCompression>,
2849    /// Use the specified media types for the published image's layers.
2850    /// Defaults to "OCI", which is compatible with most recent registries, but "Docker" may be needed for older registries without OCI support.
2851    #[builder(setter(into, strip_option), default)]
2852    pub media_types: Option<ImageMediaTypes>,
2853    /// Identifiers for other platform specific containers.
2854    /// Used for multi-platform image.
2855    #[builder(setter(into, strip_option), default)]
2856    pub platform_variants: Option<Vec<ContainerId>>,
2857}
2858#[derive(Builder, Debug, PartialEq)]
2859pub struct ContainerStatOpts {
2860    /// If specified, do not follow symlinks.
2861    #[builder(setter(into, strip_option), default)]
2862    pub do_not_follow_symlinks: Option<bool>,
2863}
2864#[derive(Builder, Debug, PartialEq)]
2865pub struct ContainerTerminalOpts<'a> {
2866    /// If set, override the container's default terminal command and invoke these command arguments instead.
2867    #[builder(setter(into, strip_option), default)]
2868    pub cmd: Option<Vec<&'a str>>,
2869    /// Provides Dagger access to the executed command.
2870    #[builder(setter(into, strip_option), default)]
2871    pub experimental_privileged_nesting: Option<bool>,
2872    /// 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.
2873    #[builder(setter(into, strip_option), default)]
2874    pub insecure_root_capabilities: Option<bool>,
2875}
2876#[derive(Builder, Debug, PartialEq)]
2877pub struct ContainerUpOpts<'a> {
2878    /// Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).
2879    /// If empty, the container's default command is used.
2880    #[builder(setter(into, strip_option), default)]
2881    pub args: Option<Vec<&'a str>>,
2882    /// Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2883    #[builder(setter(into, strip_option), default)]
2884    pub expand: Option<bool>,
2885    /// Provides Dagger access to the executed command.
2886    #[builder(setter(into, strip_option), default)]
2887    pub experimental_privileged_nesting: Option<bool>,
2888    /// 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.
2889    #[builder(setter(into, strip_option), default)]
2890    pub insecure_root_capabilities: Option<bool>,
2891    /// If set, skip the automatic init process injected into containers by default.
2892    /// 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.
2893    #[builder(setter(into, strip_option), default)]
2894    pub no_init: Option<bool>,
2895    /// List of frontend/backend port mappings to forward.
2896    /// Frontend is the port accepting traffic on the host, backend is the service port.
2897    #[builder(setter(into, strip_option), default)]
2898    pub ports: Option<Vec<PortForward>>,
2899    /// Bind each tunnel port to a random port on the host.
2900    #[builder(setter(into, strip_option), default)]
2901    pub random: Option<bool>,
2902    /// If the container has an entrypoint, prepend it to the args.
2903    #[builder(setter(into, strip_option), default)]
2904    pub use_entrypoint: Option<bool>,
2905}
2906#[derive(Builder, Debug, PartialEq)]
2907pub struct ContainerWithDefaultTerminalCmdOpts {
2908    /// Provides Dagger access to the executed command.
2909    #[builder(setter(into, strip_option), default)]
2910    pub experimental_privileged_nesting: Option<bool>,
2911    /// 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.
2912    #[builder(setter(into, strip_option), default)]
2913    pub insecure_root_capabilities: Option<bool>,
2914}
2915#[derive(Builder, Debug, PartialEq)]
2916pub struct ContainerWithDirectoryOpts<'a> {
2917    /// Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]).
2918    #[builder(setter(into, strip_option), default)]
2919    pub exclude: Option<Vec<&'a str>>,
2920    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2921    #[builder(setter(into, strip_option), default)]
2922    pub expand: Option<bool>,
2923    /// Apply .gitignore rules when writing the directory.
2924    #[builder(setter(into, strip_option), default)]
2925    pub gitignore: Option<bool>,
2926    /// Patterns to include in the written directory (e.g. ["*.go", "go.mod", "go.sum"]).
2927    #[builder(setter(into, strip_option), default)]
2928    pub include: Option<Vec<&'a str>>,
2929    /// A user:group to set for the directory and its contents.
2930    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2931    /// If the group is omitted, it defaults to the same as the user.
2932    #[builder(setter(into, strip_option), default)]
2933    pub owner: Option<&'a str>,
2934}
2935#[derive(Builder, Debug, PartialEq)]
2936pub struct ContainerWithEntrypointOpts {
2937    /// Don't reset the default arguments when setting the entrypoint. By default it is reset, since entrypoint and default args are often tightly coupled.
2938    #[builder(setter(into, strip_option), default)]
2939    pub keep_default_args: Option<bool>,
2940}
2941#[derive(Builder, Debug, PartialEq)]
2942pub struct ContainerWithEnvVariableOpts {
2943    /// Replace "${VAR}" or "$VAR" in the value according to the current environment variables defined in the container (e.g. "/opt/bin:$PATH").
2944    #[builder(setter(into, strip_option), default)]
2945    pub expand: Option<bool>,
2946}
2947#[derive(Builder, Debug, PartialEq)]
2948pub struct ContainerWithExecOpts<'a> {
2949    /// Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2950    #[builder(setter(into, strip_option), default)]
2951    pub expand: Option<bool>,
2952    /// Exit codes this command is allowed to exit with without error
2953    #[builder(setter(into, strip_option), default)]
2954    pub expect: Option<ReturnType>,
2955    /// Provides Dagger access to the executed command.
2956    #[builder(setter(into, strip_option), default)]
2957    pub experimental_privileged_nesting: Option<bool>,
2958    /// Execute the command with all root capabilities. Like --privileged in Docker
2959    /// 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.
2960    #[builder(setter(into, strip_option), default)]
2961    pub insecure_root_capabilities: Option<bool>,
2962    /// Skip the automatic init process injected into containers by default.
2963    /// 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.
2964    #[builder(setter(into, strip_option), default)]
2965    pub no_init: Option<bool>,
2966    /// Redirect the command's standard error to a file in the container. Example: "./stderr.txt"
2967    #[builder(setter(into, strip_option), default)]
2968    pub redirect_stderr: Option<&'a str>,
2969    /// Redirect the command's standard input from a file in the container. Example: "./stdin.txt"
2970    #[builder(setter(into, strip_option), default)]
2971    pub redirect_stdin: Option<&'a str>,
2972    /// Redirect the command's standard output to a file in the container. Example: "./stdout.txt"
2973    #[builder(setter(into, strip_option), default)]
2974    pub redirect_stdout: Option<&'a str>,
2975    /// Content to write to the command's standard input. Example: "Hello world")
2976    #[builder(setter(into, strip_option), default)]
2977    pub stdin: Option<&'a str>,
2978    /// Apply the OCI entrypoint, if present, by prepending it to the args. Ignored by default.
2979    #[builder(setter(into, strip_option), default)]
2980    pub use_entrypoint: Option<bool>,
2981}
2982#[derive(Builder, Debug, PartialEq)]
2983pub struct ContainerWithExposedPortOpts<'a> {
2984    /// Port description. Example: "payment API endpoint"
2985    #[builder(setter(into, strip_option), default)]
2986    pub description: Option<&'a str>,
2987    /// Skip the health check when run as a service.
2988    #[builder(setter(into, strip_option), default)]
2989    pub experimental_skip_healthcheck: Option<bool>,
2990    /// Network protocol. Example: "tcp"
2991    #[builder(setter(into, strip_option), default)]
2992    pub protocol: Option<NetworkProtocol>,
2993}
2994#[derive(Builder, Debug, PartialEq)]
2995pub struct ContainerWithFileOpts<'a> {
2996    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2997    #[builder(setter(into, strip_option), default)]
2998    pub expand: Option<bool>,
2999    /// A user:group to set for the file.
3000    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
3001    /// If the group is omitted, it defaults to the same as the user.
3002    #[builder(setter(into, strip_option), default)]
3003    pub owner: Option<&'a str>,
3004    /// Permissions of the new file. Example: 0600
3005    #[builder(setter(into, strip_option), default)]
3006    pub permissions: Option<isize>,
3007}
3008#[derive(Builder, Debug, PartialEq)]
3009pub struct ContainerWithFilesOpts<'a> {
3010    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
3011    #[builder(setter(into, strip_option), default)]
3012    pub expand: Option<bool>,
3013    /// A user:group to set for the files.
3014    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
3015    /// If the group is omitted, it defaults to the same as the user.
3016    #[builder(setter(into, strip_option), default)]
3017    pub owner: Option<&'a str>,
3018    /// Permission given to the copied files (e.g., 0600).
3019    #[builder(setter(into, strip_option), default)]
3020    pub permissions: Option<isize>,
3021}
3022#[derive(Builder, Debug, PartialEq)]
3023pub struct ContainerWithMountedCacheOpts<'a> {
3024    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
3025    #[builder(setter(into, strip_option), default)]
3026    pub expand: Option<bool>,
3027    /// A user:group to set for the mounted cache directory.
3028    /// 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.
3029    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
3030    /// If the group is omitted, it defaults to the same as the user.
3031    #[builder(setter(into, strip_option), default)]
3032    pub owner: Option<&'a str>,
3033    /// Sharing mode of the cache volume.
3034    #[builder(setter(into, strip_option), default)]
3035    pub sharing: Option<CacheSharingMode>,
3036    /// Identifier of the directory to use as the cache volume's root.
3037    #[builder(setter(into, strip_option), default)]
3038    pub source: Option<DirectoryId>,
3039}
3040#[derive(Builder, Debug, PartialEq)]
3041pub struct ContainerWithMountedDirectoryOpts<'a> {
3042    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
3043    #[builder(setter(into, strip_option), default)]
3044    pub expand: Option<bool>,
3045    /// A user:group to set for the mounted directory and its contents.
3046    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
3047    /// If the group is omitted, it defaults to the same as the user.
3048    #[builder(setter(into, strip_option), default)]
3049    pub owner: Option<&'a str>,
3050}
3051#[derive(Builder, Debug, PartialEq)]
3052pub struct ContainerWithMountedFileOpts<'a> {
3053    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
3054    #[builder(setter(into, strip_option), default)]
3055    pub expand: Option<bool>,
3056    /// A user or user:group to set for the mounted file.
3057    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
3058    /// If the group is omitted, it defaults to the same as the user.
3059    #[builder(setter(into, strip_option), default)]
3060    pub owner: Option<&'a str>,
3061}
3062#[derive(Builder, Debug, PartialEq)]
3063pub struct ContainerWithMountedSecretOpts<'a> {
3064    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
3065    #[builder(setter(into, strip_option), default)]
3066    pub expand: Option<bool>,
3067    /// Permission given to the mounted secret (e.g., 0600).
3068    /// This option requires an owner to be set to be active.
3069    #[builder(setter(into, strip_option), default)]
3070    pub mode: Option<isize>,
3071    /// A user:group to set for the mounted secret.
3072    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
3073    /// If the group is omitted, it defaults to the same as the user.
3074    #[builder(setter(into, strip_option), default)]
3075    pub owner: Option<&'a str>,
3076}
3077#[derive(Builder, Debug, PartialEq)]
3078pub struct ContainerWithMountedTempOpts {
3079    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
3080    #[builder(setter(into, strip_option), default)]
3081    pub expand: Option<bool>,
3082    /// Size of the temporary directory in bytes.
3083    #[builder(setter(into, strip_option), default)]
3084    pub size: Option<isize>,
3085}
3086#[derive(Builder, Debug, PartialEq)]
3087pub struct ContainerWithNewFileOpts<'a> {
3088    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
3089    #[builder(setter(into, strip_option), default)]
3090    pub expand: Option<bool>,
3091    /// A user:group to set for the file.
3092    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
3093    /// If the group is omitted, it defaults to the same as the user.
3094    #[builder(setter(into, strip_option), default)]
3095    pub owner: Option<&'a str>,
3096    /// Permissions of the new file. Example: 0600
3097    #[builder(setter(into, strip_option), default)]
3098    pub permissions: Option<isize>,
3099}
3100#[derive(Builder, Debug, PartialEq)]
3101pub struct ContainerWithSymlinkOpts {
3102    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
3103    #[builder(setter(into, strip_option), default)]
3104    pub expand: Option<bool>,
3105}
3106#[derive(Builder, Debug, PartialEq)]
3107pub struct ContainerWithUnixSocketOpts<'a> {
3108    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
3109    #[builder(setter(into, strip_option), default)]
3110    pub expand: Option<bool>,
3111    /// A user:group to set for the mounted socket.
3112    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
3113    /// If the group is omitted, it defaults to the same as the user.
3114    #[builder(setter(into, strip_option), default)]
3115    pub owner: Option<&'a str>,
3116}
3117#[derive(Builder, Debug, PartialEq)]
3118pub struct ContainerWithWorkdirOpts {
3119    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
3120    #[builder(setter(into, strip_option), default)]
3121    pub expand: Option<bool>,
3122}
3123#[derive(Builder, Debug, PartialEq)]
3124pub struct ContainerWithoutDirectoryOpts {
3125    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
3126    #[builder(setter(into, strip_option), default)]
3127    pub expand: Option<bool>,
3128}
3129#[derive(Builder, Debug, PartialEq)]
3130pub struct ContainerWithoutEntrypointOpts {
3131    /// Don't remove the default arguments when unsetting the entrypoint.
3132    #[builder(setter(into, strip_option), default)]
3133    pub keep_default_args: Option<bool>,
3134}
3135#[derive(Builder, Debug, PartialEq)]
3136pub struct ContainerWithoutExposedPortOpts {
3137    /// Port protocol to unexpose
3138    #[builder(setter(into, strip_option), default)]
3139    pub protocol: Option<NetworkProtocol>,
3140}
3141#[derive(Builder, Debug, PartialEq)]
3142pub struct ContainerWithoutFileOpts {
3143    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
3144    #[builder(setter(into, strip_option), default)]
3145    pub expand: Option<bool>,
3146}
3147#[derive(Builder, Debug, PartialEq)]
3148pub struct ContainerWithoutFilesOpts {
3149    /// Replace "${VAR}" or "$VAR" in the value of paths according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
3150    #[builder(setter(into, strip_option), default)]
3151    pub expand: Option<bool>,
3152}
3153#[derive(Builder, Debug, PartialEq)]
3154pub struct ContainerWithoutMountOpts {
3155    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
3156    #[builder(setter(into, strip_option), default)]
3157    pub expand: Option<bool>,
3158}
3159#[derive(Builder, Debug, PartialEq)]
3160pub struct ContainerWithoutUnixSocketOpts {
3161    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
3162    #[builder(setter(into, strip_option), default)]
3163    pub expand: Option<bool>,
3164}
3165impl Container {
3166    /// Turn the container into a Service.
3167    /// Be sure to set any exposed ports before this conversion.
3168    ///
3169    /// # Arguments
3170    ///
3171    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3172    pub fn as_service(&self) -> Service {
3173        let query = self.selection.select("asService");
3174        Service {
3175            proc: self.proc.clone(),
3176            selection: query,
3177            graphql_client: self.graphql_client.clone(),
3178        }
3179    }
3180    /// Turn the container into a Service.
3181    /// Be sure to set any exposed ports before this conversion.
3182    ///
3183    /// # Arguments
3184    ///
3185    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3186    pub fn as_service_opts<'a>(&self, opts: ContainerAsServiceOpts<'a>) -> Service {
3187        let mut query = self.selection.select("asService");
3188        if let Some(args) = opts.args {
3189            query = query.arg("args", args);
3190        }
3191        if let Some(use_entrypoint) = opts.use_entrypoint {
3192            query = query.arg("useEntrypoint", use_entrypoint);
3193        }
3194        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
3195            query = query.arg(
3196                "experimentalPrivilegedNesting",
3197                experimental_privileged_nesting,
3198            );
3199        }
3200        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
3201            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
3202        }
3203        if let Some(expand) = opts.expand {
3204            query = query.arg("expand", expand);
3205        }
3206        if let Some(no_init) = opts.no_init {
3207            query = query.arg("noInit", no_init);
3208        }
3209        Service {
3210            proc: self.proc.clone(),
3211            selection: query,
3212            graphql_client: self.graphql_client.clone(),
3213        }
3214    }
3215    /// Package the container state as an OCI image, and return it as a tar archive
3216    ///
3217    /// # Arguments
3218    ///
3219    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3220    pub fn as_tarball(&self) -> File {
3221        let query = self.selection.select("asTarball");
3222        File {
3223            proc: self.proc.clone(),
3224            selection: query,
3225            graphql_client: self.graphql_client.clone(),
3226        }
3227    }
3228    /// Package the container state as an OCI image, and return it as a tar archive
3229    ///
3230    /// # Arguments
3231    ///
3232    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3233    pub fn as_tarball_opts(&self, opts: ContainerAsTarballOpts) -> File {
3234        let mut query = self.selection.select("asTarball");
3235        if let Some(platform_variants) = opts.platform_variants {
3236            query = query.arg("platformVariants", platform_variants);
3237        }
3238        if let Some(forced_compression) = opts.forced_compression {
3239            query = query.arg("forcedCompression", forced_compression);
3240        }
3241        if let Some(media_types) = opts.media_types {
3242            query = query.arg("mediaTypes", media_types);
3243        }
3244        File {
3245            proc: self.proc.clone(),
3246            selection: query,
3247            graphql_client: self.graphql_client.clone(),
3248        }
3249    }
3250    /// The combined buffered standard output and standard error stream of the last executed command
3251    /// Returns an error if no command was executed
3252    pub async fn combined_output(&self) -> Result<String, DaggerError> {
3253        let query = self.selection.select("combinedOutput");
3254        query.execute(self.graphql_client.clone()).await
3255    }
3256    /// Return the container's default arguments.
3257    pub async fn default_args(&self) -> Result<Vec<String>, DaggerError> {
3258        let query = self.selection.select("defaultArgs");
3259        query.execute(self.graphql_client.clone()).await
3260    }
3261    /// Retrieve a directory from the container's root filesystem
3262    /// Mounts are included.
3263    ///
3264    /// # Arguments
3265    ///
3266    /// * `path` - The path of the directory to retrieve (e.g., "./src").
3267    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3268    pub fn directory(&self, path: impl Into<String>) -> Directory {
3269        let mut query = self.selection.select("directory");
3270        query = query.arg("path", path.into());
3271        Directory {
3272            proc: self.proc.clone(),
3273            selection: query,
3274            graphql_client: self.graphql_client.clone(),
3275        }
3276    }
3277    /// Retrieve a directory from the container's root filesystem
3278    /// Mounts are included.
3279    ///
3280    /// # Arguments
3281    ///
3282    /// * `path` - The path of the directory to retrieve (e.g., "./src").
3283    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3284    pub fn directory_opts(
3285        &self,
3286        path: impl Into<String>,
3287        opts: ContainerDirectoryOpts,
3288    ) -> Directory {
3289        let mut query = self.selection.select("directory");
3290        query = query.arg("path", path.into());
3291        if let Some(expand) = opts.expand {
3292            query = query.arg("expand", expand);
3293        }
3294        Directory {
3295            proc: self.proc.clone(),
3296            selection: query,
3297            graphql_client: self.graphql_client.clone(),
3298        }
3299    }
3300    /// Return the container's OCI entrypoint.
3301    pub async fn entrypoint(&self) -> Result<Vec<String>, DaggerError> {
3302        let query = self.selection.select("entrypoint");
3303        query.execute(self.graphql_client.clone()).await
3304    }
3305    /// Retrieves the value of the specified environment variable.
3306    ///
3307    /// # Arguments
3308    ///
3309    /// * `name` - The name of the environment variable to retrieve (e.g., "PATH").
3310    pub async fn env_variable(&self, name: impl Into<String>) -> Result<String, DaggerError> {
3311        let mut query = self.selection.select("envVariable");
3312        query = query.arg("name", name.into());
3313        query.execute(self.graphql_client.clone()).await
3314    }
3315    /// Retrieves the list of environment variables passed to commands.
3316    pub fn env_variables(&self) -> Vec<EnvVariable> {
3317        let query = self.selection.select("envVariables");
3318        vec![EnvVariable {
3319            proc: self.proc.clone(),
3320            selection: query,
3321            graphql_client: self.graphql_client.clone(),
3322        }]
3323    }
3324    /// check if a file or directory exists
3325    ///
3326    /// # Arguments
3327    ///
3328    /// * `path` - Path to check (e.g., "/file.txt").
3329    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3330    pub async fn exists(&self, path: impl Into<String>) -> Result<bool, DaggerError> {
3331        let mut query = self.selection.select("exists");
3332        query = query.arg("path", path.into());
3333        query.execute(self.graphql_client.clone()).await
3334    }
3335    /// check if a file or directory exists
3336    ///
3337    /// # Arguments
3338    ///
3339    /// * `path` - Path to check (e.g., "/file.txt").
3340    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3341    pub async fn exists_opts(
3342        &self,
3343        path: impl Into<String>,
3344        opts: ContainerExistsOpts,
3345    ) -> Result<bool, DaggerError> {
3346        let mut query = self.selection.select("exists");
3347        query = query.arg("path", path.into());
3348        if let Some(expected_type) = opts.expected_type {
3349            query = query.arg("expectedType", expected_type);
3350        }
3351        if let Some(do_not_follow_symlinks) = opts.do_not_follow_symlinks {
3352            query = query.arg("doNotFollowSymlinks", do_not_follow_symlinks);
3353        }
3354        query.execute(self.graphql_client.clone()).await
3355    }
3356    /// The exit code of the last executed command
3357    /// Returns an error if no command was executed
3358    pub async fn exit_code(&self) -> Result<isize, DaggerError> {
3359        let query = self.selection.select("exitCode");
3360        query.execute(self.graphql_client.clone()).await
3361    }
3362    /// EXPERIMENTAL API! Subject to change/removal at any time.
3363    /// Configures all available GPUs on the host to be accessible to this container.
3364    /// This currently works for Nvidia devices only.
3365    pub fn experimental_with_all_gp_us(&self) -> Container {
3366        let query = self.selection.select("experimentalWithAllGPUs");
3367        Container {
3368            proc: self.proc.clone(),
3369            selection: query,
3370            graphql_client: self.graphql_client.clone(),
3371        }
3372    }
3373    /// EXPERIMENTAL API! Subject to change/removal at any time.
3374    /// Configures the provided list of devices to be accessible to this container.
3375    /// This currently works for Nvidia devices only.
3376    ///
3377    /// # Arguments
3378    ///
3379    /// * `devices` - List of devices to be accessible to this container.
3380    pub fn experimental_with_gpu(&self, devices: Vec<impl Into<String>>) -> Container {
3381        let mut query = self.selection.select("experimentalWithGPU");
3382        query = query.arg(
3383            "devices",
3384            devices
3385                .into_iter()
3386                .map(|i| i.into())
3387                .collect::<Vec<String>>(),
3388        );
3389        Container {
3390            proc: self.proc.clone(),
3391            selection: query,
3392            graphql_client: self.graphql_client.clone(),
3393        }
3394    }
3395    /// Writes the container as an OCI tarball to the destination file path on the host.
3396    /// It can also export platform variants.
3397    ///
3398    /// # Arguments
3399    ///
3400    /// * `path` - Host's destination path (e.g., "./tarball").
3401    ///
3402    /// Path can be relative to the engine's workdir or absolute.
3403    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3404    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
3405        let mut query = self.selection.select("export");
3406        query = query.arg("path", path.into());
3407        query.execute(self.graphql_client.clone()).await
3408    }
3409    /// Writes the container as an OCI tarball to the destination file path on the host.
3410    /// It can also export platform variants.
3411    ///
3412    /// # Arguments
3413    ///
3414    /// * `path` - Host's destination path (e.g., "./tarball").
3415    ///
3416    /// Path can be relative to the engine's workdir or absolute.
3417    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3418    pub async fn export_opts(
3419        &self,
3420        path: impl Into<String>,
3421        opts: ContainerExportOpts,
3422    ) -> Result<String, DaggerError> {
3423        let mut query = self.selection.select("export");
3424        query = query.arg("path", path.into());
3425        if let Some(platform_variants) = opts.platform_variants {
3426            query = query.arg("platformVariants", platform_variants);
3427        }
3428        if let Some(forced_compression) = opts.forced_compression {
3429            query = query.arg("forcedCompression", forced_compression);
3430        }
3431        if let Some(media_types) = opts.media_types {
3432            query = query.arg("mediaTypes", media_types);
3433        }
3434        if let Some(expand) = opts.expand {
3435            query = query.arg("expand", expand);
3436        }
3437        query.execute(self.graphql_client.clone()).await
3438    }
3439    /// Exports the container as an image to the host's container image store.
3440    ///
3441    /// # Arguments
3442    ///
3443    /// * `name` - Name of image to export to in the host's store
3444    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3445    pub async fn export_image(&self, name: impl Into<String>) -> Result<Void, DaggerError> {
3446        let mut query = self.selection.select("exportImage");
3447        query = query.arg("name", name.into());
3448        query.execute(self.graphql_client.clone()).await
3449    }
3450    /// Exports the container as an image to the host's container image store.
3451    ///
3452    /// # Arguments
3453    ///
3454    /// * `name` - Name of image to export to in the host's store
3455    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3456    pub async fn export_image_opts(
3457        &self,
3458        name: impl Into<String>,
3459        opts: ContainerExportImageOpts,
3460    ) -> Result<Void, DaggerError> {
3461        let mut query = self.selection.select("exportImage");
3462        query = query.arg("name", name.into());
3463        if let Some(platform_variants) = opts.platform_variants {
3464            query = query.arg("platformVariants", platform_variants);
3465        }
3466        if let Some(forced_compression) = opts.forced_compression {
3467            query = query.arg("forcedCompression", forced_compression);
3468        }
3469        if let Some(media_types) = opts.media_types {
3470            query = query.arg("mediaTypes", media_types);
3471        }
3472        query.execute(self.graphql_client.clone()).await
3473    }
3474    /// Retrieves the list of exposed ports.
3475    /// This includes ports already exposed by the image, even if not explicitly added with dagger.
3476    pub fn exposed_ports(&self) -> Vec<Port> {
3477        let query = self.selection.select("exposedPorts");
3478        vec![Port {
3479            proc: self.proc.clone(),
3480            selection: query,
3481            graphql_client: self.graphql_client.clone(),
3482        }]
3483    }
3484    /// Retrieves a file at the given path.
3485    /// Mounts are included.
3486    ///
3487    /// # Arguments
3488    ///
3489    /// * `path` - The path of the file to retrieve (e.g., "./README.md").
3490    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3491    pub fn file(&self, path: impl Into<String>) -> File {
3492        let mut query = self.selection.select("file");
3493        query = query.arg("path", path.into());
3494        File {
3495            proc: self.proc.clone(),
3496            selection: query,
3497            graphql_client: self.graphql_client.clone(),
3498        }
3499    }
3500    /// Retrieves a file at the given path.
3501    /// Mounts are included.
3502    ///
3503    /// # Arguments
3504    ///
3505    /// * `path` - The path of the file to retrieve (e.g., "./README.md").
3506    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3507    pub fn file_opts(&self, path: impl Into<String>, opts: ContainerFileOpts) -> File {
3508        let mut query = self.selection.select("file");
3509        query = query.arg("path", path.into());
3510        if let Some(expand) = opts.expand {
3511            query = query.arg("expand", expand);
3512        }
3513        File {
3514            proc: self.proc.clone(),
3515            selection: query,
3516            graphql_client: self.graphql_client.clone(),
3517        }
3518    }
3519    /// Download a container image, and apply it to the container state. All previous state will be lost.
3520    ///
3521    /// # Arguments
3522    ///
3523    /// * `address` - Address of the container image to download, in standard OCI ref format. Example:"registry.dagger.io/engine:latest"
3524    pub fn from(&self, address: impl Into<String>) -> Container {
3525        let mut query = self.selection.select("from");
3526        query = query.arg("address", address.into());
3527        Container {
3528            proc: self.proc.clone(),
3529            selection: query,
3530            graphql_client: self.graphql_client.clone(),
3531        }
3532    }
3533    /// A unique identifier for this Container.
3534    pub async fn id(&self) -> Result<ContainerId, DaggerError> {
3535        let query = self.selection.select("id");
3536        query.execute(self.graphql_client.clone()).await
3537    }
3538    /// The unique image reference which can only be retrieved immediately after the 'Container.From' call.
3539    pub async fn image_ref(&self) -> Result<String, DaggerError> {
3540        let query = self.selection.select("imageRef");
3541        query.execute(self.graphql_client.clone()).await
3542    }
3543    /// Reads the container from an OCI tarball.
3544    ///
3545    /// # Arguments
3546    ///
3547    /// * `source` - File to read the container from.
3548    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3549    pub fn import(&self, source: impl IntoID<FileId>) -> Container {
3550        let mut query = self.selection.select("import");
3551        query = query.arg_lazy(
3552            "source",
3553            Box::new(move || {
3554                let source = source.clone();
3555                Box::pin(async move { source.into_id().await.unwrap().quote() })
3556            }),
3557        );
3558        Container {
3559            proc: self.proc.clone(),
3560            selection: query,
3561            graphql_client: self.graphql_client.clone(),
3562        }
3563    }
3564    /// Reads the container from an OCI tarball.
3565    ///
3566    /// # Arguments
3567    ///
3568    /// * `source` - File to read the container from.
3569    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3570    pub fn import_opts<'a>(
3571        &self,
3572        source: impl IntoID<FileId>,
3573        opts: ContainerImportOpts<'a>,
3574    ) -> Container {
3575        let mut query = self.selection.select("import");
3576        query = query.arg_lazy(
3577            "source",
3578            Box::new(move || {
3579                let source = source.clone();
3580                Box::pin(async move { source.into_id().await.unwrap().quote() })
3581            }),
3582        );
3583        if let Some(tag) = opts.tag {
3584            query = query.arg("tag", tag);
3585        }
3586        Container {
3587            proc: self.proc.clone(),
3588            selection: query,
3589            graphql_client: self.graphql_client.clone(),
3590        }
3591    }
3592    /// Retrieves the value of the specified label.
3593    ///
3594    /// # Arguments
3595    ///
3596    /// * `name` - The name of the label (e.g., "org.opencontainers.artifact.created").
3597    pub async fn label(&self, name: impl Into<String>) -> Result<String, DaggerError> {
3598        let mut query = self.selection.select("label");
3599        query = query.arg("name", name.into());
3600        query.execute(self.graphql_client.clone()).await
3601    }
3602    /// Retrieves the list of labels passed to container.
3603    pub fn labels(&self) -> Vec<Label> {
3604        let query = self.selection.select("labels");
3605        vec![Label {
3606            proc: self.proc.clone(),
3607            selection: query,
3608            graphql_client: self.graphql_client.clone(),
3609        }]
3610    }
3611    /// Retrieves the list of paths where a directory is mounted.
3612    pub async fn mounts(&self) -> Result<Vec<String>, DaggerError> {
3613        let query = self.selection.select("mounts");
3614        query.execute(self.graphql_client.clone()).await
3615    }
3616    /// The platform this container executes and publishes as.
3617    pub async fn platform(&self) -> Result<Platform, DaggerError> {
3618        let query = self.selection.select("platform");
3619        query.execute(self.graphql_client.clone()).await
3620    }
3621    /// Package the container state as an OCI image, and publish it to a registry
3622    /// Returns the fully qualified address of the published image, with digest
3623    ///
3624    /// # Arguments
3625    ///
3626    /// * `address` - The OCI address to publish to
3627    ///
3628    /// Same format as "docker push". Example: "registry.example.com/user/repo:tag"
3629    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3630    pub async fn publish(&self, address: impl Into<String>) -> Result<String, DaggerError> {
3631        let mut query = self.selection.select("publish");
3632        query = query.arg("address", address.into());
3633        query.execute(self.graphql_client.clone()).await
3634    }
3635    /// Package the container state as an OCI image, and publish it to a registry
3636    /// Returns the fully qualified address of the published image, with digest
3637    ///
3638    /// # Arguments
3639    ///
3640    /// * `address` - The OCI address to publish to
3641    ///
3642    /// Same format as "docker push". Example: "registry.example.com/user/repo:tag"
3643    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3644    pub async fn publish_opts(
3645        &self,
3646        address: impl Into<String>,
3647        opts: ContainerPublishOpts,
3648    ) -> Result<String, DaggerError> {
3649        let mut query = self.selection.select("publish");
3650        query = query.arg("address", address.into());
3651        if let Some(platform_variants) = opts.platform_variants {
3652            query = query.arg("platformVariants", platform_variants);
3653        }
3654        if let Some(forced_compression) = opts.forced_compression {
3655            query = query.arg("forcedCompression", forced_compression);
3656        }
3657        if let Some(media_types) = opts.media_types {
3658            query = query.arg("mediaTypes", media_types);
3659        }
3660        query.execute(self.graphql_client.clone()).await
3661    }
3662    /// 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.
3663    pub fn rootfs(&self) -> Directory {
3664        let query = self.selection.select("rootfs");
3665        Directory {
3666            proc: self.proc.clone(),
3667            selection: query,
3668            graphql_client: self.graphql_client.clone(),
3669        }
3670    }
3671    /// Return file status
3672    ///
3673    /// # Arguments
3674    ///
3675    /// * `path` - Path to check (e.g., "/file.txt").
3676    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3677    pub fn stat(&self, path: impl Into<String>) -> Stat {
3678        let mut query = self.selection.select("stat");
3679        query = query.arg("path", path.into());
3680        Stat {
3681            proc: self.proc.clone(),
3682            selection: query,
3683            graphql_client: self.graphql_client.clone(),
3684        }
3685    }
3686    /// Return file status
3687    ///
3688    /// # Arguments
3689    ///
3690    /// * `path` - Path to check (e.g., "/file.txt").
3691    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3692    pub fn stat_opts(&self, path: impl Into<String>, opts: ContainerStatOpts) -> Stat {
3693        let mut query = self.selection.select("stat");
3694        query = query.arg("path", path.into());
3695        if let Some(do_not_follow_symlinks) = opts.do_not_follow_symlinks {
3696            query = query.arg("doNotFollowSymlinks", do_not_follow_symlinks);
3697        }
3698        Stat {
3699            proc: self.proc.clone(),
3700            selection: query,
3701            graphql_client: self.graphql_client.clone(),
3702        }
3703    }
3704    /// The buffered standard error stream of the last executed command
3705    /// Returns an error if no command was executed
3706    pub async fn stderr(&self) -> Result<String, DaggerError> {
3707        let query = self.selection.select("stderr");
3708        query.execute(self.graphql_client.clone()).await
3709    }
3710    /// The buffered standard output stream of the last executed command
3711    /// Returns an error if no command was executed
3712    pub async fn stdout(&self) -> Result<String, DaggerError> {
3713        let query = self.selection.select("stdout");
3714        query.execute(self.graphql_client.clone()).await
3715    }
3716    /// Forces evaluation of the pipeline in the engine.
3717    /// It doesn't run the default command if no exec has been set.
3718    pub async fn sync(&self) -> Result<ContainerId, DaggerError> {
3719        let query = self.selection.select("sync");
3720        query.execute(self.graphql_client.clone()).await
3721    }
3722    /// Opens an interactive terminal for this container using its configured default terminal command if not overridden by args (or sh as a fallback default).
3723    ///
3724    /// # Arguments
3725    ///
3726    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3727    pub fn terminal(&self) -> Container {
3728        let query = self.selection.select("terminal");
3729        Container {
3730            proc: self.proc.clone(),
3731            selection: query,
3732            graphql_client: self.graphql_client.clone(),
3733        }
3734    }
3735    /// Opens an interactive terminal for this container using its configured default terminal command if not overridden by args (or sh as a fallback default).
3736    ///
3737    /// # Arguments
3738    ///
3739    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3740    pub fn terminal_opts<'a>(&self, opts: ContainerTerminalOpts<'a>) -> Container {
3741        let mut query = self.selection.select("terminal");
3742        if let Some(cmd) = opts.cmd {
3743            query = query.arg("cmd", cmd);
3744        }
3745        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
3746            query = query.arg(
3747                "experimentalPrivilegedNesting",
3748                experimental_privileged_nesting,
3749            );
3750        }
3751        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
3752            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
3753        }
3754        Container {
3755            proc: self.proc.clone(),
3756            selection: query,
3757            graphql_client: self.graphql_client.clone(),
3758        }
3759    }
3760    /// Starts a Service and creates a tunnel that forwards traffic from the caller's network to that service.
3761    /// Be sure to set any exposed ports before calling this api.
3762    ///
3763    /// # Arguments
3764    ///
3765    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3766    pub async fn up(&self) -> Result<Void, DaggerError> {
3767        let query = self.selection.select("up");
3768        query.execute(self.graphql_client.clone()).await
3769    }
3770    /// Starts a Service and creates a tunnel that forwards traffic from the caller's network to that service.
3771    /// Be sure to set any exposed ports before calling this api.
3772    ///
3773    /// # Arguments
3774    ///
3775    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3776    pub async fn up_opts<'a>(&self, opts: ContainerUpOpts<'a>) -> Result<Void, DaggerError> {
3777        let mut query = self.selection.select("up");
3778        if let Some(random) = opts.random {
3779            query = query.arg("random", random);
3780        }
3781        if let Some(ports) = opts.ports {
3782            query = query.arg("ports", ports);
3783        }
3784        if let Some(args) = opts.args {
3785            query = query.arg("args", args);
3786        }
3787        if let Some(use_entrypoint) = opts.use_entrypoint {
3788            query = query.arg("useEntrypoint", use_entrypoint);
3789        }
3790        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
3791            query = query.arg(
3792                "experimentalPrivilegedNesting",
3793                experimental_privileged_nesting,
3794            );
3795        }
3796        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
3797            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
3798        }
3799        if let Some(expand) = opts.expand {
3800            query = query.arg("expand", expand);
3801        }
3802        if let Some(no_init) = opts.no_init {
3803            query = query.arg("noInit", no_init);
3804        }
3805        query.execute(self.graphql_client.clone()).await
3806    }
3807    /// Retrieves the user to be set for all commands.
3808    pub async fn user(&self) -> Result<String, DaggerError> {
3809        let query = self.selection.select("user");
3810        query.execute(self.graphql_client.clone()).await
3811    }
3812    /// Retrieves this container plus the given OCI annotation.
3813    ///
3814    /// # Arguments
3815    ///
3816    /// * `name` - The name of the annotation.
3817    /// * `value` - The value of the annotation.
3818    pub fn with_annotation(&self, name: impl Into<String>, value: impl Into<String>) -> Container {
3819        let mut query = self.selection.select("withAnnotation");
3820        query = query.arg("name", name.into());
3821        query = query.arg("value", value.into());
3822        Container {
3823            proc: self.proc.clone(),
3824            selection: query,
3825            graphql_client: self.graphql_client.clone(),
3826        }
3827    }
3828    /// Configures default arguments for future commands. Like CMD in Dockerfile.
3829    ///
3830    /// # Arguments
3831    ///
3832    /// * `args` - Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]).
3833    pub fn with_default_args(&self, args: Vec<impl Into<String>>) -> Container {
3834        let mut query = self.selection.select("withDefaultArgs");
3835        query = query.arg(
3836            "args",
3837            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3838        );
3839        Container {
3840            proc: self.proc.clone(),
3841            selection: query,
3842            graphql_client: self.graphql_client.clone(),
3843        }
3844    }
3845    /// Set the default command to invoke for the container's terminal API.
3846    ///
3847    /// # Arguments
3848    ///
3849    /// * `args` - The args of the command.
3850    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3851    pub fn with_default_terminal_cmd(&self, args: Vec<impl Into<String>>) -> Container {
3852        let mut query = self.selection.select("withDefaultTerminalCmd");
3853        query = query.arg(
3854            "args",
3855            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3856        );
3857        Container {
3858            proc: self.proc.clone(),
3859            selection: query,
3860            graphql_client: self.graphql_client.clone(),
3861        }
3862    }
3863    /// Set the default command to invoke for the container's terminal API.
3864    ///
3865    /// # Arguments
3866    ///
3867    /// * `args` - The args of the command.
3868    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3869    pub fn with_default_terminal_cmd_opts(
3870        &self,
3871        args: Vec<impl Into<String>>,
3872        opts: ContainerWithDefaultTerminalCmdOpts,
3873    ) -> Container {
3874        let mut query = self.selection.select("withDefaultTerminalCmd");
3875        query = query.arg(
3876            "args",
3877            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3878        );
3879        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
3880            query = query.arg(
3881                "experimentalPrivilegedNesting",
3882                experimental_privileged_nesting,
3883            );
3884        }
3885        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
3886            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
3887        }
3888        Container {
3889            proc: self.proc.clone(),
3890            selection: query,
3891            graphql_client: self.graphql_client.clone(),
3892        }
3893    }
3894    /// Return a new container snapshot, with a directory added to its filesystem
3895    ///
3896    /// # Arguments
3897    ///
3898    /// * `path` - Location of the written directory (e.g., "/tmp/directory").
3899    /// * `source` - Identifier of the directory to write
3900    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3901    pub fn with_directory(
3902        &self,
3903        path: impl Into<String>,
3904        source: impl IntoID<DirectoryId>,
3905    ) -> Container {
3906        let mut query = self.selection.select("withDirectory");
3907        query = query.arg("path", path.into());
3908        query = query.arg_lazy(
3909            "source",
3910            Box::new(move || {
3911                let source = source.clone();
3912                Box::pin(async move { source.into_id().await.unwrap().quote() })
3913            }),
3914        );
3915        Container {
3916            proc: self.proc.clone(),
3917            selection: query,
3918            graphql_client: self.graphql_client.clone(),
3919        }
3920    }
3921    /// Return a new container snapshot, with a directory added to its filesystem
3922    ///
3923    /// # Arguments
3924    ///
3925    /// * `path` - Location of the written directory (e.g., "/tmp/directory").
3926    /// * `source` - Identifier of the directory to write
3927    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3928    pub fn with_directory_opts<'a>(
3929        &self,
3930        path: impl Into<String>,
3931        source: impl IntoID<DirectoryId>,
3932        opts: ContainerWithDirectoryOpts<'a>,
3933    ) -> Container {
3934        let mut query = self.selection.select("withDirectory");
3935        query = query.arg("path", path.into());
3936        query = query.arg_lazy(
3937            "source",
3938            Box::new(move || {
3939                let source = source.clone();
3940                Box::pin(async move { source.into_id().await.unwrap().quote() })
3941            }),
3942        );
3943        if let Some(exclude) = opts.exclude {
3944            query = query.arg("exclude", exclude);
3945        }
3946        if let Some(include) = opts.include {
3947            query = query.arg("include", include);
3948        }
3949        if let Some(gitignore) = opts.gitignore {
3950            query = query.arg("gitignore", gitignore);
3951        }
3952        if let Some(owner) = opts.owner {
3953            query = query.arg("owner", owner);
3954        }
3955        if let Some(expand) = opts.expand {
3956            query = query.arg("expand", expand);
3957        }
3958        Container {
3959            proc: self.proc.clone(),
3960            selection: query,
3961            graphql_client: self.graphql_client.clone(),
3962        }
3963    }
3964    /// Set an OCI-style entrypoint. It will be included in the container's OCI configuration. Note, withExec ignores the entrypoint by default.
3965    ///
3966    /// # Arguments
3967    ///
3968    /// * `args` - Arguments of the entrypoint. Example: ["go", "run"].
3969    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3970    pub fn with_entrypoint(&self, args: Vec<impl Into<String>>) -> Container {
3971        let mut query = self.selection.select("withEntrypoint");
3972        query = query.arg(
3973            "args",
3974            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3975        );
3976        Container {
3977            proc: self.proc.clone(),
3978            selection: query,
3979            graphql_client: self.graphql_client.clone(),
3980        }
3981    }
3982    /// Set an OCI-style entrypoint. It will be included in the container's OCI configuration. Note, withExec ignores the entrypoint by default.
3983    ///
3984    /// # Arguments
3985    ///
3986    /// * `args` - Arguments of the entrypoint. Example: ["go", "run"].
3987    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3988    pub fn with_entrypoint_opts(
3989        &self,
3990        args: Vec<impl Into<String>>,
3991        opts: ContainerWithEntrypointOpts,
3992    ) -> Container {
3993        let mut query = self.selection.select("withEntrypoint");
3994        query = query.arg(
3995            "args",
3996            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3997        );
3998        if let Some(keep_default_args) = opts.keep_default_args {
3999            query = query.arg("keepDefaultArgs", keep_default_args);
4000        }
4001        Container {
4002            proc: self.proc.clone(),
4003            selection: query,
4004            graphql_client: self.graphql_client.clone(),
4005        }
4006    }
4007    /// Export environment variables from an env-file to the container.
4008    ///
4009    /// # Arguments
4010    ///
4011    /// * `source` - Identifier of the envfile
4012    pub fn with_env_file_variables(&self, source: impl IntoID<EnvFileId>) -> Container {
4013        let mut query = self.selection.select("withEnvFileVariables");
4014        query = query.arg_lazy(
4015            "source",
4016            Box::new(move || {
4017                let source = source.clone();
4018                Box::pin(async move { source.into_id().await.unwrap().quote() })
4019            }),
4020        );
4021        Container {
4022            proc: self.proc.clone(),
4023            selection: query,
4024            graphql_client: self.graphql_client.clone(),
4025        }
4026    }
4027    /// Set a new environment variable in the container.
4028    ///
4029    /// # Arguments
4030    ///
4031    /// * `name` - Name of the environment variable (e.g., "HOST").
4032    /// * `value` - Value of the environment variable. (e.g., "localhost").
4033    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4034    pub fn with_env_variable(
4035        &self,
4036        name: impl Into<String>,
4037        value: impl Into<String>,
4038    ) -> Container {
4039        let mut query = self.selection.select("withEnvVariable");
4040        query = query.arg("name", name.into());
4041        query = query.arg("value", value.into());
4042        Container {
4043            proc: self.proc.clone(),
4044            selection: query,
4045            graphql_client: self.graphql_client.clone(),
4046        }
4047    }
4048    /// Set a new environment variable in the container.
4049    ///
4050    /// # Arguments
4051    ///
4052    /// * `name` - Name of the environment variable (e.g., "HOST").
4053    /// * `value` - Value of the environment variable. (e.g., "localhost").
4054    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4055    pub fn with_env_variable_opts(
4056        &self,
4057        name: impl Into<String>,
4058        value: impl Into<String>,
4059        opts: ContainerWithEnvVariableOpts,
4060    ) -> Container {
4061        let mut query = self.selection.select("withEnvVariable");
4062        query = query.arg("name", name.into());
4063        query = query.arg("value", value.into());
4064        if let Some(expand) = opts.expand {
4065            query = query.arg("expand", expand);
4066        }
4067        Container {
4068            proc: self.proc.clone(),
4069            selection: query,
4070            graphql_client: self.graphql_client.clone(),
4071        }
4072    }
4073    /// Raise an error.
4074    ///
4075    /// # Arguments
4076    ///
4077    /// * `err` - Message of the error to raise. If empty, the error will be ignored.
4078    pub fn with_error(&self, err: impl Into<String>) -> Container {
4079        let mut query = self.selection.select("withError");
4080        query = query.arg("err", err.into());
4081        Container {
4082            proc: self.proc.clone(),
4083            selection: query,
4084            graphql_client: self.graphql_client.clone(),
4085        }
4086    }
4087    /// Execute a command in the container, and return a new snapshot of the container state after execution.
4088    ///
4089    /// # Arguments
4090    ///
4091    /// * `args` - Command to execute. Must be valid exec() arguments, not a shell command. Example: ["go", "run", "main.go"].
4092    ///
4093    /// To run a shell command, execute the shell and pass the shell command as argument. Example: ["sh", "-c", "ls -l | grep foo"]
4094    ///
4095    /// Defaults to the container's default arguments (see "defaultArgs" and "withDefaultArgs").
4096    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4097    pub fn with_exec(&self, args: Vec<impl Into<String>>) -> Container {
4098        let mut query = self.selection.select("withExec");
4099        query = query.arg(
4100            "args",
4101            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
4102        );
4103        Container {
4104            proc: self.proc.clone(),
4105            selection: query,
4106            graphql_client: self.graphql_client.clone(),
4107        }
4108    }
4109    /// Execute a command in the container, and return a new snapshot of the container state after execution.
4110    ///
4111    /// # Arguments
4112    ///
4113    /// * `args` - Command to execute. Must be valid exec() arguments, not a shell command. Example: ["go", "run", "main.go"].
4114    ///
4115    /// To run a shell command, execute the shell and pass the shell command as argument. Example: ["sh", "-c", "ls -l | grep foo"]
4116    ///
4117    /// Defaults to the container's default arguments (see "defaultArgs" and "withDefaultArgs").
4118    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4119    pub fn with_exec_opts<'a>(
4120        &self,
4121        args: Vec<impl Into<String>>,
4122        opts: ContainerWithExecOpts<'a>,
4123    ) -> Container {
4124        let mut query = self.selection.select("withExec");
4125        query = query.arg(
4126            "args",
4127            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
4128        );
4129        if let Some(use_entrypoint) = opts.use_entrypoint {
4130            query = query.arg("useEntrypoint", use_entrypoint);
4131        }
4132        if let Some(stdin) = opts.stdin {
4133            query = query.arg("stdin", stdin);
4134        }
4135        if let Some(redirect_stdin) = opts.redirect_stdin {
4136            query = query.arg("redirectStdin", redirect_stdin);
4137        }
4138        if let Some(redirect_stdout) = opts.redirect_stdout {
4139            query = query.arg("redirectStdout", redirect_stdout);
4140        }
4141        if let Some(redirect_stderr) = opts.redirect_stderr {
4142            query = query.arg("redirectStderr", redirect_stderr);
4143        }
4144        if let Some(expect) = opts.expect {
4145            query = query.arg("expect", expect);
4146        }
4147        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
4148            query = query.arg(
4149                "experimentalPrivilegedNesting",
4150                experimental_privileged_nesting,
4151            );
4152        }
4153        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
4154            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
4155        }
4156        if let Some(expand) = opts.expand {
4157            query = query.arg("expand", expand);
4158        }
4159        if let Some(no_init) = opts.no_init {
4160            query = query.arg("noInit", no_init);
4161        }
4162        Container {
4163            proc: self.proc.clone(),
4164            selection: query,
4165            graphql_client: self.graphql_client.clone(),
4166        }
4167    }
4168    /// Expose a network port. Like EXPOSE in Dockerfile (but with healthcheck support)
4169    /// Exposed ports serve two purposes:
4170    /// - For health checks and introspection, when running services
4171    /// - For setting the EXPOSE OCI field when publishing the container
4172    ///
4173    /// # Arguments
4174    ///
4175    /// * `port` - Port number to expose. Example: 8080
4176    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4177    pub fn with_exposed_port(&self, port: isize) -> Container {
4178        let mut query = self.selection.select("withExposedPort");
4179        query = query.arg("port", port);
4180        Container {
4181            proc: self.proc.clone(),
4182            selection: query,
4183            graphql_client: self.graphql_client.clone(),
4184        }
4185    }
4186    /// Expose a network port. Like EXPOSE in Dockerfile (but with healthcheck support)
4187    /// Exposed ports serve two purposes:
4188    /// - For health checks and introspection, when running services
4189    /// - For setting the EXPOSE OCI field when publishing the container
4190    ///
4191    /// # Arguments
4192    ///
4193    /// * `port` - Port number to expose. Example: 8080
4194    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4195    pub fn with_exposed_port_opts<'a>(
4196        &self,
4197        port: isize,
4198        opts: ContainerWithExposedPortOpts<'a>,
4199    ) -> Container {
4200        let mut query = self.selection.select("withExposedPort");
4201        query = query.arg("port", port);
4202        if let Some(protocol) = opts.protocol {
4203            query = query.arg("protocol", protocol);
4204        }
4205        if let Some(description) = opts.description {
4206            query = query.arg("description", description);
4207        }
4208        if let Some(experimental_skip_healthcheck) = opts.experimental_skip_healthcheck {
4209            query = query.arg("experimentalSkipHealthcheck", experimental_skip_healthcheck);
4210        }
4211        Container {
4212            proc: self.proc.clone(),
4213            selection: query,
4214            graphql_client: self.graphql_client.clone(),
4215        }
4216    }
4217    /// Return a container snapshot with a file added
4218    ///
4219    /// # Arguments
4220    ///
4221    /// * `path` - Path of the new file. Example: "/path/to/new-file.txt"
4222    /// * `source` - File to add
4223    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4224    pub fn with_file(&self, path: impl Into<String>, source: impl IntoID<FileId>) -> Container {
4225        let mut query = self.selection.select("withFile");
4226        query = query.arg("path", path.into());
4227        query = query.arg_lazy(
4228            "source",
4229            Box::new(move || {
4230                let source = source.clone();
4231                Box::pin(async move { source.into_id().await.unwrap().quote() })
4232            }),
4233        );
4234        Container {
4235            proc: self.proc.clone(),
4236            selection: query,
4237            graphql_client: self.graphql_client.clone(),
4238        }
4239    }
4240    /// Return a container snapshot with a file added
4241    ///
4242    /// # Arguments
4243    ///
4244    /// * `path` - Path of the new file. Example: "/path/to/new-file.txt"
4245    /// * `source` - File to add
4246    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4247    pub fn with_file_opts<'a>(
4248        &self,
4249        path: impl Into<String>,
4250        source: impl IntoID<FileId>,
4251        opts: ContainerWithFileOpts<'a>,
4252    ) -> Container {
4253        let mut query = self.selection.select("withFile");
4254        query = query.arg("path", path.into());
4255        query = query.arg_lazy(
4256            "source",
4257            Box::new(move || {
4258                let source = source.clone();
4259                Box::pin(async move { source.into_id().await.unwrap().quote() })
4260            }),
4261        );
4262        if let Some(permissions) = opts.permissions {
4263            query = query.arg("permissions", permissions);
4264        }
4265        if let Some(owner) = opts.owner {
4266            query = query.arg("owner", owner);
4267        }
4268        if let Some(expand) = opts.expand {
4269            query = query.arg("expand", expand);
4270        }
4271        Container {
4272            proc: self.proc.clone(),
4273            selection: query,
4274            graphql_client: self.graphql_client.clone(),
4275        }
4276    }
4277    /// Retrieves this container plus the contents of the given files copied to the given path.
4278    ///
4279    /// # Arguments
4280    ///
4281    /// * `path` - Location where copied files should be placed (e.g., "/src").
4282    /// * `sources` - Identifiers of the files to copy.
4283    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4284    pub fn with_files(&self, path: impl Into<String>, sources: Vec<FileId>) -> Container {
4285        let mut query = self.selection.select("withFiles");
4286        query = query.arg("path", path.into());
4287        query = query.arg("sources", sources);
4288        Container {
4289            proc: self.proc.clone(),
4290            selection: query,
4291            graphql_client: self.graphql_client.clone(),
4292        }
4293    }
4294    /// Retrieves this container plus the contents of the given files copied to the given path.
4295    ///
4296    /// # Arguments
4297    ///
4298    /// * `path` - Location where copied files should be placed (e.g., "/src").
4299    /// * `sources` - Identifiers of the files to copy.
4300    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4301    pub fn with_files_opts<'a>(
4302        &self,
4303        path: impl Into<String>,
4304        sources: Vec<FileId>,
4305        opts: ContainerWithFilesOpts<'a>,
4306    ) -> Container {
4307        let mut query = self.selection.select("withFiles");
4308        query = query.arg("path", path.into());
4309        query = query.arg("sources", sources);
4310        if let Some(permissions) = opts.permissions {
4311            query = query.arg("permissions", permissions);
4312        }
4313        if let Some(owner) = opts.owner {
4314            query = query.arg("owner", owner);
4315        }
4316        if let Some(expand) = opts.expand {
4317            query = query.arg("expand", expand);
4318        }
4319        Container {
4320            proc: self.proc.clone(),
4321            selection: query,
4322            graphql_client: self.graphql_client.clone(),
4323        }
4324    }
4325    /// Retrieves this container plus the given label.
4326    ///
4327    /// # Arguments
4328    ///
4329    /// * `name` - The name of the label (e.g., "org.opencontainers.artifact.created").
4330    /// * `value` - The value of the label (e.g., "2023-01-01T00:00:00Z").
4331    pub fn with_label(&self, name: impl Into<String>, value: impl Into<String>) -> Container {
4332        let mut query = self.selection.select("withLabel");
4333        query = query.arg("name", name.into());
4334        query = query.arg("value", value.into());
4335        Container {
4336            proc: self.proc.clone(),
4337            selection: query,
4338            graphql_client: self.graphql_client.clone(),
4339        }
4340    }
4341    /// Retrieves this container plus a cache volume mounted at the given path.
4342    ///
4343    /// # Arguments
4344    ///
4345    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
4346    /// * `cache` - Identifier of the cache volume to mount.
4347    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4348    pub fn with_mounted_cache(
4349        &self,
4350        path: impl Into<String>,
4351        cache: impl IntoID<CacheVolumeId>,
4352    ) -> Container {
4353        let mut query = self.selection.select("withMountedCache");
4354        query = query.arg("path", path.into());
4355        query = query.arg_lazy(
4356            "cache",
4357            Box::new(move || {
4358                let cache = cache.clone();
4359                Box::pin(async move { cache.into_id().await.unwrap().quote() })
4360            }),
4361        );
4362        Container {
4363            proc: self.proc.clone(),
4364            selection: query,
4365            graphql_client: self.graphql_client.clone(),
4366        }
4367    }
4368    /// Retrieves this container plus a cache volume mounted at the given path.
4369    ///
4370    /// # Arguments
4371    ///
4372    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
4373    /// * `cache` - Identifier of the cache volume to mount.
4374    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4375    pub fn with_mounted_cache_opts<'a>(
4376        &self,
4377        path: impl Into<String>,
4378        cache: impl IntoID<CacheVolumeId>,
4379        opts: ContainerWithMountedCacheOpts<'a>,
4380    ) -> Container {
4381        let mut query = self.selection.select("withMountedCache");
4382        query = query.arg("path", path.into());
4383        query = query.arg_lazy(
4384            "cache",
4385            Box::new(move || {
4386                let cache = cache.clone();
4387                Box::pin(async move { cache.into_id().await.unwrap().quote() })
4388            }),
4389        );
4390        if let Some(source) = opts.source {
4391            query = query.arg("source", source);
4392        }
4393        if let Some(sharing) = opts.sharing {
4394            query = query.arg("sharing", sharing);
4395        }
4396        if let Some(owner) = opts.owner {
4397            query = query.arg("owner", owner);
4398        }
4399        if let Some(expand) = opts.expand {
4400            query = query.arg("expand", expand);
4401        }
4402        Container {
4403            proc: self.proc.clone(),
4404            selection: query,
4405            graphql_client: self.graphql_client.clone(),
4406        }
4407    }
4408    /// Retrieves this container plus a directory mounted at the given path.
4409    ///
4410    /// # Arguments
4411    ///
4412    /// * `path` - Location of the mounted directory (e.g., "/mnt/directory").
4413    /// * `source` - Identifier of the mounted directory.
4414    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4415    pub fn with_mounted_directory(
4416        &self,
4417        path: impl Into<String>,
4418        source: impl IntoID<DirectoryId>,
4419    ) -> Container {
4420        let mut query = self.selection.select("withMountedDirectory");
4421        query = query.arg("path", path.into());
4422        query = query.arg_lazy(
4423            "source",
4424            Box::new(move || {
4425                let source = source.clone();
4426                Box::pin(async move { source.into_id().await.unwrap().quote() })
4427            }),
4428        );
4429        Container {
4430            proc: self.proc.clone(),
4431            selection: query,
4432            graphql_client: self.graphql_client.clone(),
4433        }
4434    }
4435    /// Retrieves this container plus a directory mounted at the given path.
4436    ///
4437    /// # Arguments
4438    ///
4439    /// * `path` - Location of the mounted directory (e.g., "/mnt/directory").
4440    /// * `source` - Identifier of the mounted directory.
4441    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4442    pub fn with_mounted_directory_opts<'a>(
4443        &self,
4444        path: impl Into<String>,
4445        source: impl IntoID<DirectoryId>,
4446        opts: ContainerWithMountedDirectoryOpts<'a>,
4447    ) -> Container {
4448        let mut query = self.selection.select("withMountedDirectory");
4449        query = query.arg("path", path.into());
4450        query = query.arg_lazy(
4451            "source",
4452            Box::new(move || {
4453                let source = source.clone();
4454                Box::pin(async move { source.into_id().await.unwrap().quote() })
4455            }),
4456        );
4457        if let Some(owner) = opts.owner {
4458            query = query.arg("owner", owner);
4459        }
4460        if let Some(expand) = opts.expand {
4461            query = query.arg("expand", expand);
4462        }
4463        Container {
4464            proc: self.proc.clone(),
4465            selection: query,
4466            graphql_client: self.graphql_client.clone(),
4467        }
4468    }
4469    /// Retrieves this container plus a file mounted at the given path.
4470    ///
4471    /// # Arguments
4472    ///
4473    /// * `path` - Location of the mounted file (e.g., "/tmp/file.txt").
4474    /// * `source` - Identifier of the mounted file.
4475    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4476    pub fn with_mounted_file(
4477        &self,
4478        path: impl Into<String>,
4479        source: impl IntoID<FileId>,
4480    ) -> Container {
4481        let mut query = self.selection.select("withMountedFile");
4482        query = query.arg("path", path.into());
4483        query = query.arg_lazy(
4484            "source",
4485            Box::new(move || {
4486                let source = source.clone();
4487                Box::pin(async move { source.into_id().await.unwrap().quote() })
4488            }),
4489        );
4490        Container {
4491            proc: self.proc.clone(),
4492            selection: query,
4493            graphql_client: self.graphql_client.clone(),
4494        }
4495    }
4496    /// Retrieves this container plus a file mounted at the given path.
4497    ///
4498    /// # Arguments
4499    ///
4500    /// * `path` - Location of the mounted file (e.g., "/tmp/file.txt").
4501    /// * `source` - Identifier of the mounted file.
4502    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4503    pub fn with_mounted_file_opts<'a>(
4504        &self,
4505        path: impl Into<String>,
4506        source: impl IntoID<FileId>,
4507        opts: ContainerWithMountedFileOpts<'a>,
4508    ) -> Container {
4509        let mut query = self.selection.select("withMountedFile");
4510        query = query.arg("path", path.into());
4511        query = query.arg_lazy(
4512            "source",
4513            Box::new(move || {
4514                let source = source.clone();
4515                Box::pin(async move { source.into_id().await.unwrap().quote() })
4516            }),
4517        );
4518        if let Some(owner) = opts.owner {
4519            query = query.arg("owner", owner);
4520        }
4521        if let Some(expand) = opts.expand {
4522            query = query.arg("expand", expand);
4523        }
4524        Container {
4525            proc: self.proc.clone(),
4526            selection: query,
4527            graphql_client: self.graphql_client.clone(),
4528        }
4529    }
4530    /// Retrieves this container plus a secret mounted into a file at the given path.
4531    ///
4532    /// # Arguments
4533    ///
4534    /// * `path` - Location of the secret file (e.g., "/tmp/secret.txt").
4535    /// * `source` - Identifier of the secret to mount.
4536    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4537    pub fn with_mounted_secret(
4538        &self,
4539        path: impl Into<String>,
4540        source: impl IntoID<SecretId>,
4541    ) -> Container {
4542        let mut query = self.selection.select("withMountedSecret");
4543        query = query.arg("path", path.into());
4544        query = query.arg_lazy(
4545            "source",
4546            Box::new(move || {
4547                let source = source.clone();
4548                Box::pin(async move { source.into_id().await.unwrap().quote() })
4549            }),
4550        );
4551        Container {
4552            proc: self.proc.clone(),
4553            selection: query,
4554            graphql_client: self.graphql_client.clone(),
4555        }
4556    }
4557    /// Retrieves this container plus a secret mounted into a file at the given path.
4558    ///
4559    /// # Arguments
4560    ///
4561    /// * `path` - Location of the secret file (e.g., "/tmp/secret.txt").
4562    /// * `source` - Identifier of the secret to mount.
4563    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4564    pub fn with_mounted_secret_opts<'a>(
4565        &self,
4566        path: impl Into<String>,
4567        source: impl IntoID<SecretId>,
4568        opts: ContainerWithMountedSecretOpts<'a>,
4569    ) -> Container {
4570        let mut query = self.selection.select("withMountedSecret");
4571        query = query.arg("path", path.into());
4572        query = query.arg_lazy(
4573            "source",
4574            Box::new(move || {
4575                let source = source.clone();
4576                Box::pin(async move { source.into_id().await.unwrap().quote() })
4577            }),
4578        );
4579        if let Some(owner) = opts.owner {
4580            query = query.arg("owner", owner);
4581        }
4582        if let Some(mode) = opts.mode {
4583            query = query.arg("mode", mode);
4584        }
4585        if let Some(expand) = opts.expand {
4586            query = query.arg("expand", expand);
4587        }
4588        Container {
4589            proc: self.proc.clone(),
4590            selection: query,
4591            graphql_client: self.graphql_client.clone(),
4592        }
4593    }
4594    /// 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.
4595    ///
4596    /// # Arguments
4597    ///
4598    /// * `path` - Location of the temporary directory (e.g., "/tmp/temp_dir").
4599    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4600    pub fn with_mounted_temp(&self, path: impl Into<String>) -> Container {
4601        let mut query = self.selection.select("withMountedTemp");
4602        query = query.arg("path", path.into());
4603        Container {
4604            proc: self.proc.clone(),
4605            selection: query,
4606            graphql_client: self.graphql_client.clone(),
4607        }
4608    }
4609    /// 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.
4610    ///
4611    /// # Arguments
4612    ///
4613    /// * `path` - Location of the temporary directory (e.g., "/tmp/temp_dir").
4614    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4615    pub fn with_mounted_temp_opts(
4616        &self,
4617        path: impl Into<String>,
4618        opts: ContainerWithMountedTempOpts,
4619    ) -> Container {
4620        let mut query = self.selection.select("withMountedTemp");
4621        query = query.arg("path", path.into());
4622        if let Some(size) = opts.size {
4623            query = query.arg("size", size);
4624        }
4625        if let Some(expand) = opts.expand {
4626            query = query.arg("expand", expand);
4627        }
4628        Container {
4629            proc: self.proc.clone(),
4630            selection: query,
4631            graphql_client: self.graphql_client.clone(),
4632        }
4633    }
4634    /// Return a new container snapshot, with a file added to its filesystem with text content
4635    ///
4636    /// # Arguments
4637    ///
4638    /// * `path` - Path of the new file. May be relative or absolute. Example: "README.md" or "/etc/profile"
4639    /// * `contents` - Contents of the new file. Example: "Hello world!"
4640    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4641    pub fn with_new_file(&self, path: impl Into<String>, contents: impl Into<String>) -> Container {
4642        let mut query = self.selection.select("withNewFile");
4643        query = query.arg("path", path.into());
4644        query = query.arg("contents", contents.into());
4645        Container {
4646            proc: self.proc.clone(),
4647            selection: query,
4648            graphql_client: self.graphql_client.clone(),
4649        }
4650    }
4651    /// Return a new container snapshot, with a file added to its filesystem with text content
4652    ///
4653    /// # Arguments
4654    ///
4655    /// * `path` - Path of the new file. May be relative or absolute. Example: "README.md" or "/etc/profile"
4656    /// * `contents` - Contents of the new file. Example: "Hello world!"
4657    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4658    pub fn with_new_file_opts<'a>(
4659        &self,
4660        path: impl Into<String>,
4661        contents: impl Into<String>,
4662        opts: ContainerWithNewFileOpts<'a>,
4663    ) -> Container {
4664        let mut query = self.selection.select("withNewFile");
4665        query = query.arg("path", path.into());
4666        query = query.arg("contents", contents.into());
4667        if let Some(permissions) = opts.permissions {
4668            query = query.arg("permissions", permissions);
4669        }
4670        if let Some(owner) = opts.owner {
4671            query = query.arg("owner", owner);
4672        }
4673        if let Some(expand) = opts.expand {
4674            query = query.arg("expand", expand);
4675        }
4676        Container {
4677            proc: self.proc.clone(),
4678            selection: query,
4679            graphql_client: self.graphql_client.clone(),
4680        }
4681    }
4682    /// Attach credentials for future publishing to a registry. Use in combination with publish
4683    ///
4684    /// # Arguments
4685    ///
4686    /// * `address` - The image address that needs authentication. Same format as "docker push". Example: "registry.dagger.io/dagger:latest"
4687    /// * `username` - The username to authenticate with. Example: "alice"
4688    /// * `secret` - The API key, password or token to authenticate to this registry
4689    pub fn with_registry_auth(
4690        &self,
4691        address: impl Into<String>,
4692        username: impl Into<String>,
4693        secret: impl IntoID<SecretId>,
4694    ) -> Container {
4695        let mut query = self.selection.select("withRegistryAuth");
4696        query = query.arg("address", address.into());
4697        query = query.arg("username", username.into());
4698        query = query.arg_lazy(
4699            "secret",
4700            Box::new(move || {
4701                let secret = secret.clone();
4702                Box::pin(async move { secret.into_id().await.unwrap().quote() })
4703            }),
4704        );
4705        Container {
4706            proc: self.proc.clone(),
4707            selection: query,
4708            graphql_client: self.graphql_client.clone(),
4709        }
4710    }
4711    /// Change the container's root filesystem. The previous root filesystem will be lost.
4712    ///
4713    /// # Arguments
4714    ///
4715    /// * `directory` - The new root filesystem.
4716    pub fn with_rootfs(&self, directory: impl IntoID<DirectoryId>) -> Container {
4717        let mut query = self.selection.select("withRootfs");
4718        query = query.arg_lazy(
4719            "directory",
4720            Box::new(move || {
4721                let directory = directory.clone();
4722                Box::pin(async move { directory.into_id().await.unwrap().quote() })
4723            }),
4724        );
4725        Container {
4726            proc: self.proc.clone(),
4727            selection: query,
4728            graphql_client: self.graphql_client.clone(),
4729        }
4730    }
4731    /// Set a new environment variable, using a secret value
4732    ///
4733    /// # Arguments
4734    ///
4735    /// * `name` - Name of the secret variable (e.g., "API_SECRET").
4736    /// * `secret` - Identifier of the secret value.
4737    pub fn with_secret_variable(
4738        &self,
4739        name: impl Into<String>,
4740        secret: impl IntoID<SecretId>,
4741    ) -> Container {
4742        let mut query = self.selection.select("withSecretVariable");
4743        query = query.arg("name", name.into());
4744        query = query.arg_lazy(
4745            "secret",
4746            Box::new(move || {
4747                let secret = secret.clone();
4748                Box::pin(async move { secret.into_id().await.unwrap().quote() })
4749            }),
4750        );
4751        Container {
4752            proc: self.proc.clone(),
4753            selection: query,
4754            graphql_client: self.graphql_client.clone(),
4755        }
4756    }
4757    /// Establish a runtime dependency from a container to a network service.
4758    /// The service will be started automatically when needed and detached when it is no longer needed, executing the default command if none is set.
4759    /// The service will be reachable from the container via the provided hostname alias.
4760    /// The service dependency will also convey to any files or directories produced by the container.
4761    ///
4762    /// # Arguments
4763    ///
4764    /// * `alias` - Hostname that will resolve to the target service (only accessible from within this container)
4765    /// * `service` - The target service
4766    pub fn with_service_binding(
4767        &self,
4768        alias: impl Into<String>,
4769        service: impl IntoID<ServiceId>,
4770    ) -> Container {
4771        let mut query = self.selection.select("withServiceBinding");
4772        query = query.arg("alias", alias.into());
4773        query = query.arg_lazy(
4774            "service",
4775            Box::new(move || {
4776                let service = service.clone();
4777                Box::pin(async move { service.into_id().await.unwrap().quote() })
4778            }),
4779        );
4780        Container {
4781            proc: self.proc.clone(),
4782            selection: query,
4783            graphql_client: self.graphql_client.clone(),
4784        }
4785    }
4786    /// Return a snapshot with a symlink
4787    ///
4788    /// # Arguments
4789    ///
4790    /// * `target` - Location of the file or directory to link to (e.g., "/existing/file").
4791    /// * `link_name` - Location where the symbolic link will be created (e.g., "/new-file-link").
4792    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4793    pub fn with_symlink(
4794        &self,
4795        target: impl Into<String>,
4796        link_name: impl Into<String>,
4797    ) -> Container {
4798        let mut query = self.selection.select("withSymlink");
4799        query = query.arg("target", target.into());
4800        query = query.arg("linkName", link_name.into());
4801        Container {
4802            proc: self.proc.clone(),
4803            selection: query,
4804            graphql_client: self.graphql_client.clone(),
4805        }
4806    }
4807    /// Return a snapshot with a symlink
4808    ///
4809    /// # Arguments
4810    ///
4811    /// * `target` - Location of the file or directory to link to (e.g., "/existing/file").
4812    /// * `link_name` - Location where the symbolic link will be created (e.g., "/new-file-link").
4813    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4814    pub fn with_symlink_opts(
4815        &self,
4816        target: impl Into<String>,
4817        link_name: impl Into<String>,
4818        opts: ContainerWithSymlinkOpts,
4819    ) -> Container {
4820        let mut query = self.selection.select("withSymlink");
4821        query = query.arg("target", target.into());
4822        query = query.arg("linkName", link_name.into());
4823        if let Some(expand) = opts.expand {
4824            query = query.arg("expand", expand);
4825        }
4826        Container {
4827            proc: self.proc.clone(),
4828            selection: query,
4829            graphql_client: self.graphql_client.clone(),
4830        }
4831    }
4832    /// Retrieves this container plus a socket forwarded to the given Unix socket path.
4833    ///
4834    /// # Arguments
4835    ///
4836    /// * `path` - Location of the forwarded Unix socket (e.g., "/tmp/socket").
4837    /// * `source` - Identifier of the socket to forward.
4838    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4839    pub fn with_unix_socket(
4840        &self,
4841        path: impl Into<String>,
4842        source: impl IntoID<SocketId>,
4843    ) -> Container {
4844        let mut query = self.selection.select("withUnixSocket");
4845        query = query.arg("path", path.into());
4846        query = query.arg_lazy(
4847            "source",
4848            Box::new(move || {
4849                let source = source.clone();
4850                Box::pin(async move { source.into_id().await.unwrap().quote() })
4851            }),
4852        );
4853        Container {
4854            proc: self.proc.clone(),
4855            selection: query,
4856            graphql_client: self.graphql_client.clone(),
4857        }
4858    }
4859    /// Retrieves this container plus a socket forwarded to the given Unix socket path.
4860    ///
4861    /// # Arguments
4862    ///
4863    /// * `path` - Location of the forwarded Unix socket (e.g., "/tmp/socket").
4864    /// * `source` - Identifier of the socket to forward.
4865    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4866    pub fn with_unix_socket_opts<'a>(
4867        &self,
4868        path: impl Into<String>,
4869        source: impl IntoID<SocketId>,
4870        opts: ContainerWithUnixSocketOpts<'a>,
4871    ) -> Container {
4872        let mut query = self.selection.select("withUnixSocket");
4873        query = query.arg("path", path.into());
4874        query = query.arg_lazy(
4875            "source",
4876            Box::new(move || {
4877                let source = source.clone();
4878                Box::pin(async move { source.into_id().await.unwrap().quote() })
4879            }),
4880        );
4881        if let Some(owner) = opts.owner {
4882            query = query.arg("owner", owner);
4883        }
4884        if let Some(expand) = opts.expand {
4885            query = query.arg("expand", expand);
4886        }
4887        Container {
4888            proc: self.proc.clone(),
4889            selection: query,
4890            graphql_client: self.graphql_client.clone(),
4891        }
4892    }
4893    /// Retrieves this container with a different command user.
4894    ///
4895    /// # Arguments
4896    ///
4897    /// * `name` - The user to set (e.g., "root").
4898    pub fn with_user(&self, name: impl Into<String>) -> Container {
4899        let mut query = self.selection.select("withUser");
4900        query = query.arg("name", name.into());
4901        Container {
4902            proc: self.proc.clone(),
4903            selection: query,
4904            graphql_client: self.graphql_client.clone(),
4905        }
4906    }
4907    /// Change the container's working directory. Like WORKDIR in Dockerfile.
4908    ///
4909    /// # Arguments
4910    ///
4911    /// * `path` - The path to set as the working directory (e.g., "/app").
4912    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4913    pub fn with_workdir(&self, path: impl Into<String>) -> Container {
4914        let mut query = self.selection.select("withWorkdir");
4915        query = query.arg("path", path.into());
4916        Container {
4917            proc: self.proc.clone(),
4918            selection: query,
4919            graphql_client: self.graphql_client.clone(),
4920        }
4921    }
4922    /// Change the container's working directory. Like WORKDIR in Dockerfile.
4923    ///
4924    /// # Arguments
4925    ///
4926    /// * `path` - The path to set as the working directory (e.g., "/app").
4927    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4928    pub fn with_workdir_opts(
4929        &self,
4930        path: impl Into<String>,
4931        opts: ContainerWithWorkdirOpts,
4932    ) -> Container {
4933        let mut query = self.selection.select("withWorkdir");
4934        query = query.arg("path", path.into());
4935        if let Some(expand) = opts.expand {
4936            query = query.arg("expand", expand);
4937        }
4938        Container {
4939            proc: self.proc.clone(),
4940            selection: query,
4941            graphql_client: self.graphql_client.clone(),
4942        }
4943    }
4944    /// Retrieves this container minus the given OCI annotation.
4945    ///
4946    /// # Arguments
4947    ///
4948    /// * `name` - The name of the annotation.
4949    pub fn without_annotation(&self, name: impl Into<String>) -> Container {
4950        let mut query = self.selection.select("withoutAnnotation");
4951        query = query.arg("name", name.into());
4952        Container {
4953            proc: self.proc.clone(),
4954            selection: query,
4955            graphql_client: self.graphql_client.clone(),
4956        }
4957    }
4958    /// Remove the container's default arguments.
4959    pub fn without_default_args(&self) -> Container {
4960        let query = self.selection.select("withoutDefaultArgs");
4961        Container {
4962            proc: self.proc.clone(),
4963            selection: query,
4964            graphql_client: self.graphql_client.clone(),
4965        }
4966    }
4967    /// Return a new container snapshot, with a directory removed from its filesystem
4968    ///
4969    /// # Arguments
4970    ///
4971    /// * `path` - Location of the directory to remove (e.g., ".github/").
4972    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4973    pub fn without_directory(&self, path: impl Into<String>) -> Container {
4974        let mut query = self.selection.select("withoutDirectory");
4975        query = query.arg("path", path.into());
4976        Container {
4977            proc: self.proc.clone(),
4978            selection: query,
4979            graphql_client: self.graphql_client.clone(),
4980        }
4981    }
4982    /// Return a new container snapshot, with a directory removed from its filesystem
4983    ///
4984    /// # Arguments
4985    ///
4986    /// * `path` - Location of the directory to remove (e.g., ".github/").
4987    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4988    pub fn without_directory_opts(
4989        &self,
4990        path: impl Into<String>,
4991        opts: ContainerWithoutDirectoryOpts,
4992    ) -> Container {
4993        let mut query = self.selection.select("withoutDirectory");
4994        query = query.arg("path", path.into());
4995        if let Some(expand) = opts.expand {
4996            query = query.arg("expand", expand);
4997        }
4998        Container {
4999            proc: self.proc.clone(),
5000            selection: query,
5001            graphql_client: self.graphql_client.clone(),
5002        }
5003    }
5004    /// Reset the container's OCI entrypoint.
5005    ///
5006    /// # Arguments
5007    ///
5008    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5009    pub fn without_entrypoint(&self) -> Container {
5010        let query = self.selection.select("withoutEntrypoint");
5011        Container {
5012            proc: self.proc.clone(),
5013            selection: query,
5014            graphql_client: self.graphql_client.clone(),
5015        }
5016    }
5017    /// Reset the container's OCI entrypoint.
5018    ///
5019    /// # Arguments
5020    ///
5021    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5022    pub fn without_entrypoint_opts(&self, opts: ContainerWithoutEntrypointOpts) -> Container {
5023        let mut query = self.selection.select("withoutEntrypoint");
5024        if let Some(keep_default_args) = opts.keep_default_args {
5025            query = query.arg("keepDefaultArgs", keep_default_args);
5026        }
5027        Container {
5028            proc: self.proc.clone(),
5029            selection: query,
5030            graphql_client: self.graphql_client.clone(),
5031        }
5032    }
5033    /// Retrieves this container minus the given environment variable.
5034    ///
5035    /// # Arguments
5036    ///
5037    /// * `name` - The name of the environment variable (e.g., "HOST").
5038    pub fn without_env_variable(&self, name: impl Into<String>) -> Container {
5039        let mut query = self.selection.select("withoutEnvVariable");
5040        query = query.arg("name", name.into());
5041        Container {
5042            proc: self.proc.clone(),
5043            selection: query,
5044            graphql_client: self.graphql_client.clone(),
5045        }
5046    }
5047    /// Unexpose a previously exposed port.
5048    ///
5049    /// # Arguments
5050    ///
5051    /// * `port` - Port number to unexpose
5052    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5053    pub fn without_exposed_port(&self, port: isize) -> Container {
5054        let mut query = self.selection.select("withoutExposedPort");
5055        query = query.arg("port", port);
5056        Container {
5057            proc: self.proc.clone(),
5058            selection: query,
5059            graphql_client: self.graphql_client.clone(),
5060        }
5061    }
5062    /// Unexpose a previously exposed port.
5063    ///
5064    /// # Arguments
5065    ///
5066    /// * `port` - Port number to unexpose
5067    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5068    pub fn without_exposed_port_opts(
5069        &self,
5070        port: isize,
5071        opts: ContainerWithoutExposedPortOpts,
5072    ) -> Container {
5073        let mut query = self.selection.select("withoutExposedPort");
5074        query = query.arg("port", port);
5075        if let Some(protocol) = opts.protocol {
5076            query = query.arg("protocol", protocol);
5077        }
5078        Container {
5079            proc: self.proc.clone(),
5080            selection: query,
5081            graphql_client: self.graphql_client.clone(),
5082        }
5083    }
5084    /// Retrieves this container with the file at the given path removed.
5085    ///
5086    /// # Arguments
5087    ///
5088    /// * `path` - Location of the file to remove (e.g., "/file.txt").
5089    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5090    pub fn without_file(&self, path: impl Into<String>) -> Container {
5091        let mut query = self.selection.select("withoutFile");
5092        query = query.arg("path", path.into());
5093        Container {
5094            proc: self.proc.clone(),
5095            selection: query,
5096            graphql_client: self.graphql_client.clone(),
5097        }
5098    }
5099    /// Retrieves this container with the file at the given path removed.
5100    ///
5101    /// # Arguments
5102    ///
5103    /// * `path` - Location of the file to remove (e.g., "/file.txt").
5104    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5105    pub fn without_file_opts(
5106        &self,
5107        path: impl Into<String>,
5108        opts: ContainerWithoutFileOpts,
5109    ) -> Container {
5110        let mut query = self.selection.select("withoutFile");
5111        query = query.arg("path", path.into());
5112        if let Some(expand) = opts.expand {
5113            query = query.arg("expand", expand);
5114        }
5115        Container {
5116            proc: self.proc.clone(),
5117            selection: query,
5118            graphql_client: self.graphql_client.clone(),
5119        }
5120    }
5121    /// Return a new container spanshot with specified files removed
5122    ///
5123    /// # Arguments
5124    ///
5125    /// * `paths` - Paths of the files to remove. Example: ["foo.txt, "/root/.ssh/config"
5126    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5127    pub fn without_files(&self, paths: Vec<impl Into<String>>) -> Container {
5128        let mut query = self.selection.select("withoutFiles");
5129        query = query.arg(
5130            "paths",
5131            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
5132        );
5133        Container {
5134            proc: self.proc.clone(),
5135            selection: query,
5136            graphql_client: self.graphql_client.clone(),
5137        }
5138    }
5139    /// Return a new container spanshot with specified files removed
5140    ///
5141    /// # Arguments
5142    ///
5143    /// * `paths` - Paths of the files to remove. Example: ["foo.txt, "/root/.ssh/config"
5144    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5145    pub fn without_files_opts(
5146        &self,
5147        paths: Vec<impl Into<String>>,
5148        opts: ContainerWithoutFilesOpts,
5149    ) -> Container {
5150        let mut query = self.selection.select("withoutFiles");
5151        query = query.arg(
5152            "paths",
5153            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
5154        );
5155        if let Some(expand) = opts.expand {
5156            query = query.arg("expand", expand);
5157        }
5158        Container {
5159            proc: self.proc.clone(),
5160            selection: query,
5161            graphql_client: self.graphql_client.clone(),
5162        }
5163    }
5164    /// Retrieves this container minus the given environment label.
5165    ///
5166    /// # Arguments
5167    ///
5168    /// * `name` - The name of the label to remove (e.g., "org.opencontainers.artifact.created").
5169    pub fn without_label(&self, name: impl Into<String>) -> Container {
5170        let mut query = self.selection.select("withoutLabel");
5171        query = query.arg("name", name.into());
5172        Container {
5173            proc: self.proc.clone(),
5174            selection: query,
5175            graphql_client: self.graphql_client.clone(),
5176        }
5177    }
5178    /// Retrieves this container after unmounting everything at the given path.
5179    ///
5180    /// # Arguments
5181    ///
5182    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
5183    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5184    pub fn without_mount(&self, path: impl Into<String>) -> Container {
5185        let mut query = self.selection.select("withoutMount");
5186        query = query.arg("path", path.into());
5187        Container {
5188            proc: self.proc.clone(),
5189            selection: query,
5190            graphql_client: self.graphql_client.clone(),
5191        }
5192    }
5193    /// Retrieves this container after unmounting everything at the given path.
5194    ///
5195    /// # Arguments
5196    ///
5197    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
5198    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5199    pub fn without_mount_opts(
5200        &self,
5201        path: impl Into<String>,
5202        opts: ContainerWithoutMountOpts,
5203    ) -> Container {
5204        let mut query = self.selection.select("withoutMount");
5205        query = query.arg("path", path.into());
5206        if let Some(expand) = opts.expand {
5207            query = query.arg("expand", expand);
5208        }
5209        Container {
5210            proc: self.proc.clone(),
5211            selection: query,
5212            graphql_client: self.graphql_client.clone(),
5213        }
5214    }
5215    /// Retrieves this container without the registry authentication of a given address.
5216    ///
5217    /// # Arguments
5218    ///
5219    /// * `address` - Registry's address to remove the authentication from.
5220    ///
5221    /// Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
5222    pub fn without_registry_auth(&self, address: impl Into<String>) -> Container {
5223        let mut query = self.selection.select("withoutRegistryAuth");
5224        query = query.arg("address", address.into());
5225        Container {
5226            proc: self.proc.clone(),
5227            selection: query,
5228            graphql_client: self.graphql_client.clone(),
5229        }
5230    }
5231    /// Retrieves this container minus the given environment variable containing the secret.
5232    ///
5233    /// # Arguments
5234    ///
5235    /// * `name` - The name of the environment variable (e.g., "HOST").
5236    pub fn without_secret_variable(&self, name: impl Into<String>) -> Container {
5237        let mut query = self.selection.select("withoutSecretVariable");
5238        query = query.arg("name", name.into());
5239        Container {
5240            proc: self.proc.clone(),
5241            selection: query,
5242            graphql_client: self.graphql_client.clone(),
5243        }
5244    }
5245    /// Retrieves this container with a previously added Unix socket removed.
5246    ///
5247    /// # Arguments
5248    ///
5249    /// * `path` - Location of the socket to remove (e.g., "/tmp/socket").
5250    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5251    pub fn without_unix_socket(&self, path: impl Into<String>) -> Container {
5252        let mut query = self.selection.select("withoutUnixSocket");
5253        query = query.arg("path", path.into());
5254        Container {
5255            proc: self.proc.clone(),
5256            selection: query,
5257            graphql_client: self.graphql_client.clone(),
5258        }
5259    }
5260    /// Retrieves this container with a previously added Unix socket removed.
5261    ///
5262    /// # Arguments
5263    ///
5264    /// * `path` - Location of the socket to remove (e.g., "/tmp/socket").
5265    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5266    pub fn without_unix_socket_opts(
5267        &self,
5268        path: impl Into<String>,
5269        opts: ContainerWithoutUnixSocketOpts,
5270    ) -> Container {
5271        let mut query = self.selection.select("withoutUnixSocket");
5272        query = query.arg("path", path.into());
5273        if let Some(expand) = opts.expand {
5274            query = query.arg("expand", expand);
5275        }
5276        Container {
5277            proc: self.proc.clone(),
5278            selection: query,
5279            graphql_client: self.graphql_client.clone(),
5280        }
5281    }
5282    /// Retrieves this container with an unset command user.
5283    /// Should default to root.
5284    pub fn without_user(&self) -> Container {
5285        let query = self.selection.select("withoutUser");
5286        Container {
5287            proc: self.proc.clone(),
5288            selection: query,
5289            graphql_client: self.graphql_client.clone(),
5290        }
5291    }
5292    /// Unset the container's working directory.
5293    /// Should default to "/".
5294    pub fn without_workdir(&self) -> Container {
5295        let query = self.selection.select("withoutWorkdir");
5296        Container {
5297            proc: self.proc.clone(),
5298            selection: query,
5299            graphql_client: self.graphql_client.clone(),
5300        }
5301    }
5302    /// Retrieves the working directory for all commands.
5303    pub async fn workdir(&self) -> Result<String, DaggerError> {
5304        let query = self.selection.select("workdir");
5305        query.execute(self.graphql_client.clone()).await
5306    }
5307}
5308#[derive(Clone)]
5309pub struct CurrentModule {
5310    pub proc: Option<Arc<DaggerSessionProc>>,
5311    pub selection: Selection,
5312    pub graphql_client: DynGraphQLClient,
5313}
5314#[derive(Builder, Debug, PartialEq)]
5315pub struct CurrentModuleGeneratorsOpts<'a> {
5316    /// Only include generators matching the specified patterns
5317    #[builder(setter(into, strip_option), default)]
5318    pub include: Option<Vec<&'a str>>,
5319}
5320#[derive(Builder, Debug, PartialEq)]
5321pub struct CurrentModuleWorkdirOpts<'a> {
5322    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
5323    #[builder(setter(into, strip_option), default)]
5324    pub exclude: Option<Vec<&'a str>>,
5325    /// Apply .gitignore filter rules inside the directory
5326    #[builder(setter(into, strip_option), default)]
5327    pub gitignore: Option<bool>,
5328    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
5329    #[builder(setter(into, strip_option), default)]
5330    pub include: Option<Vec<&'a str>>,
5331}
5332impl CurrentModule {
5333    /// The dependencies of the module.
5334    pub fn dependencies(&self) -> Vec<Module> {
5335        let query = self.selection.select("dependencies");
5336        vec![Module {
5337            proc: self.proc.clone(),
5338            selection: query,
5339            graphql_client: self.graphql_client.clone(),
5340        }]
5341    }
5342    /// The generated files and directories made on top of the module source's context directory.
5343    pub fn generated_context_directory(&self) -> Directory {
5344        let query = self.selection.select("generatedContextDirectory");
5345        Directory {
5346            proc: self.proc.clone(),
5347            selection: query,
5348            graphql_client: self.graphql_client.clone(),
5349        }
5350    }
5351    /// Return all generators defined by the module
5352    ///
5353    /// # Arguments
5354    ///
5355    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5356    pub fn generators(&self) -> GeneratorGroup {
5357        let query = self.selection.select("generators");
5358        GeneratorGroup {
5359            proc: self.proc.clone(),
5360            selection: query,
5361            graphql_client: self.graphql_client.clone(),
5362        }
5363    }
5364    /// Return all generators defined by the module
5365    ///
5366    /// # Arguments
5367    ///
5368    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5369    pub fn generators_opts<'a>(&self, opts: CurrentModuleGeneratorsOpts<'a>) -> GeneratorGroup {
5370        let mut query = self.selection.select("generators");
5371        if let Some(include) = opts.include {
5372            query = query.arg("include", include);
5373        }
5374        GeneratorGroup {
5375            proc: self.proc.clone(),
5376            selection: query,
5377            graphql_client: self.graphql_client.clone(),
5378        }
5379    }
5380    /// A unique identifier for this CurrentModule.
5381    pub async fn id(&self) -> Result<CurrentModuleId, DaggerError> {
5382        let query = self.selection.select("id");
5383        query.execute(self.graphql_client.clone()).await
5384    }
5385    /// The name of the module being executed in
5386    pub async fn name(&self) -> Result<String, DaggerError> {
5387        let query = self.selection.select("name");
5388        query.execute(self.graphql_client.clone()).await
5389    }
5390    /// The directory containing the module's source code loaded into the engine (plus any generated code that may have been created).
5391    pub fn source(&self) -> Directory {
5392        let query = self.selection.select("source");
5393        Directory {
5394            proc: self.proc.clone(),
5395            selection: query,
5396            graphql_client: self.graphql_client.clone(),
5397        }
5398    }
5399    /// Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.
5400    ///
5401    /// # Arguments
5402    ///
5403    /// * `path` - Location of the directory to access (e.g., ".").
5404    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5405    pub fn workdir(&self, path: impl Into<String>) -> Directory {
5406        let mut query = self.selection.select("workdir");
5407        query = query.arg("path", path.into());
5408        Directory {
5409            proc: self.proc.clone(),
5410            selection: query,
5411            graphql_client: self.graphql_client.clone(),
5412        }
5413    }
5414    /// Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.
5415    ///
5416    /// # Arguments
5417    ///
5418    /// * `path` - Location of the directory to access (e.g., ".").
5419    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5420    pub fn workdir_opts<'a>(
5421        &self,
5422        path: impl Into<String>,
5423        opts: CurrentModuleWorkdirOpts<'a>,
5424    ) -> Directory {
5425        let mut query = self.selection.select("workdir");
5426        query = query.arg("path", path.into());
5427        if let Some(exclude) = opts.exclude {
5428            query = query.arg("exclude", exclude);
5429        }
5430        if let Some(include) = opts.include {
5431            query = query.arg("include", include);
5432        }
5433        if let Some(gitignore) = opts.gitignore {
5434            query = query.arg("gitignore", gitignore);
5435        }
5436        Directory {
5437            proc: self.proc.clone(),
5438            selection: query,
5439            graphql_client: self.graphql_client.clone(),
5440        }
5441    }
5442    /// 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.
5443    ///
5444    /// # Arguments
5445    ///
5446    /// * `path` - Location of the file to retrieve (e.g., "README.md").
5447    pub fn workdir_file(&self, path: impl Into<String>) -> File {
5448        let mut query = self.selection.select("workdirFile");
5449        query = query.arg("path", path.into());
5450        File {
5451            proc: self.proc.clone(),
5452            selection: query,
5453            graphql_client: self.graphql_client.clone(),
5454        }
5455    }
5456}
5457#[derive(Clone)]
5458pub struct Directory {
5459    pub proc: Option<Arc<DaggerSessionProc>>,
5460    pub selection: Selection,
5461    pub graphql_client: DynGraphQLClient,
5462}
5463#[derive(Builder, Debug, PartialEq)]
5464pub struct DirectoryAsModuleOpts<'a> {
5465    /// An optional subpath of the directory which contains the module's configuration file.
5466    /// If not set, the module source code is loaded from the root of the directory.
5467    #[builder(setter(into, strip_option), default)]
5468    pub source_root_path: Option<&'a str>,
5469}
5470#[derive(Builder, Debug, PartialEq)]
5471pub struct DirectoryAsModuleSourceOpts<'a> {
5472    /// An optional subpath of the directory which contains the module's configuration file.
5473    /// If not set, the module source code is loaded from the root of the directory.
5474    #[builder(setter(into, strip_option), default)]
5475    pub source_root_path: Option<&'a str>,
5476}
5477#[derive(Builder, Debug, PartialEq)]
5478pub struct DirectoryDockerBuildOpts<'a> {
5479    /// Build arguments to use in the build.
5480    #[builder(setter(into, strip_option), default)]
5481    pub build_args: Option<Vec<BuildArg>>,
5482    /// Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
5483    #[builder(setter(into, strip_option), default)]
5484    pub dockerfile: Option<&'a str>,
5485    /// If set, skip the automatic init process injected into containers created by RUN statements.
5486    /// 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.
5487    #[builder(setter(into, strip_option), default)]
5488    pub no_init: Option<bool>,
5489    /// The platform to build.
5490    #[builder(setter(into, strip_option), default)]
5491    pub platform: Option<Platform>,
5492    /// Secrets to pass to the build.
5493    /// They will be mounted at /run/secrets/[secret-name].
5494    #[builder(setter(into, strip_option), default)]
5495    pub secrets: Option<Vec<SecretId>>,
5496    /// A socket to use for SSH authentication during the build
5497    /// (e.g., for Dockerfile RUN --mount=type=ssh instructions).
5498    /// Typically obtained via host.unixSocket() pointing to the SSH_AUTH_SOCK.
5499    #[builder(setter(into, strip_option), default)]
5500    pub ssh: Option<SocketId>,
5501    /// Target build stage to build.
5502    #[builder(setter(into, strip_option), default)]
5503    pub target: Option<&'a str>,
5504}
5505#[derive(Builder, Debug, PartialEq)]
5506pub struct DirectoryEntriesOpts<'a> {
5507    /// Location of the directory to look at (e.g., "/src").
5508    #[builder(setter(into, strip_option), default)]
5509    pub path: Option<&'a str>,
5510}
5511#[derive(Builder, Debug, PartialEq)]
5512pub struct DirectoryExistsOpts {
5513    /// If specified, do not follow symlinks.
5514    #[builder(setter(into, strip_option), default)]
5515    pub do_not_follow_symlinks: Option<bool>,
5516    /// If specified, also validate the type of file (e.g. "REGULAR_TYPE", "DIRECTORY_TYPE", or "SYMLINK_TYPE").
5517    #[builder(setter(into, strip_option), default)]
5518    pub expected_type: Option<ExistsType>,
5519}
5520#[derive(Builder, Debug, PartialEq)]
5521pub struct DirectoryExportOpts {
5522    /// 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.
5523    #[builder(setter(into, strip_option), default)]
5524    pub wipe: Option<bool>,
5525}
5526#[derive(Builder, Debug, PartialEq)]
5527pub struct DirectoryFilterOpts<'a> {
5528    /// If set, paths matching one of these glob patterns is excluded from the new snapshot. Example: ["node_modules/", ".git*", ".env"]
5529    #[builder(setter(into, strip_option), default)]
5530    pub exclude: Option<Vec<&'a str>>,
5531    /// If set, apply .gitignore rules when filtering the directory.
5532    #[builder(setter(into, strip_option), default)]
5533    pub gitignore: Option<bool>,
5534    /// If set, only paths matching one of these glob patterns is included in the new snapshot. Example: (e.g., ["app/", "package.*"]).
5535    #[builder(setter(into, strip_option), default)]
5536    pub include: Option<Vec<&'a str>>,
5537}
5538#[derive(Builder, Debug, PartialEq)]
5539pub struct DirectorySearchOpts<'a> {
5540    /// Allow the . pattern to match newlines in multiline mode.
5541    #[builder(setter(into, strip_option), default)]
5542    pub dotall: Option<bool>,
5543    /// Only return matching files, not lines and content
5544    #[builder(setter(into, strip_option), default)]
5545    pub files_only: Option<bool>,
5546    /// Glob patterns to match (e.g., "*.md")
5547    #[builder(setter(into, strip_option), default)]
5548    pub globs: Option<Vec<&'a str>>,
5549    /// Enable case-insensitive matching.
5550    #[builder(setter(into, strip_option), default)]
5551    pub insensitive: Option<bool>,
5552    /// Limit the number of results to return
5553    #[builder(setter(into, strip_option), default)]
5554    pub limit: Option<isize>,
5555    /// Interpret the pattern as a literal string instead of a regular expression.
5556    #[builder(setter(into, strip_option), default)]
5557    pub literal: Option<bool>,
5558    /// Enable searching across multiple lines.
5559    #[builder(setter(into, strip_option), default)]
5560    pub multiline: Option<bool>,
5561    /// Directory or file paths to search
5562    #[builder(setter(into, strip_option), default)]
5563    pub paths: Option<Vec<&'a str>>,
5564    /// Skip hidden files (files starting with .).
5565    #[builder(setter(into, strip_option), default)]
5566    pub skip_hidden: Option<bool>,
5567    /// Honor .gitignore, .ignore, and .rgignore files.
5568    #[builder(setter(into, strip_option), default)]
5569    pub skip_ignored: Option<bool>,
5570}
5571#[derive(Builder, Debug, PartialEq)]
5572pub struct DirectoryStatOpts {
5573    /// If specified, do not follow symlinks.
5574    #[builder(setter(into, strip_option), default)]
5575    pub do_not_follow_symlinks: Option<bool>,
5576}
5577#[derive(Builder, Debug, PartialEq)]
5578pub struct DirectoryTerminalOpts<'a> {
5579    /// If set, override the container's default terminal command and invoke these command arguments instead.
5580    #[builder(setter(into, strip_option), default)]
5581    pub cmd: Option<Vec<&'a str>>,
5582    /// If set, override the default container used for the terminal.
5583    #[builder(setter(into, strip_option), default)]
5584    pub container: Option<ContainerId>,
5585    /// Provides Dagger access to the executed command.
5586    #[builder(setter(into, strip_option), default)]
5587    pub experimental_privileged_nesting: Option<bool>,
5588    /// 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.
5589    #[builder(setter(into, strip_option), default)]
5590    pub insecure_root_capabilities: Option<bool>,
5591}
5592#[derive(Builder, Debug, PartialEq)]
5593pub struct DirectoryWithDirectoryOpts<'a> {
5594    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
5595    #[builder(setter(into, strip_option), default)]
5596    pub exclude: Option<Vec<&'a str>>,
5597    /// Apply .gitignore filter rules inside the directory
5598    #[builder(setter(into, strip_option), default)]
5599    pub gitignore: Option<bool>,
5600    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
5601    #[builder(setter(into, strip_option), default)]
5602    pub include: Option<Vec<&'a str>>,
5603    /// A user:group to set for the copied directory and its contents.
5604    /// The user and group must be an ID (1000:1000), not a name (foo:bar).
5605    /// If the group is omitted, it defaults to the same as the user.
5606    #[builder(setter(into, strip_option), default)]
5607    pub owner: Option<&'a str>,
5608}
5609#[derive(Builder, Debug, PartialEq)]
5610pub struct DirectoryWithFileOpts<'a> {
5611    /// A user:group to set for the copied directory and its contents.
5612    /// The user and group must be an ID (1000:1000), not a name (foo:bar).
5613    /// If the group is omitted, it defaults to the same as the user.
5614    #[builder(setter(into, strip_option), default)]
5615    pub owner: Option<&'a str>,
5616    /// Permission given to the copied file (e.g., 0600).
5617    #[builder(setter(into, strip_option), default)]
5618    pub permissions: Option<isize>,
5619}
5620#[derive(Builder, Debug, PartialEq)]
5621pub struct DirectoryWithFilesOpts {
5622    /// Permission given to the copied files (e.g., 0600).
5623    #[builder(setter(into, strip_option), default)]
5624    pub permissions: Option<isize>,
5625}
5626#[derive(Builder, Debug, PartialEq)]
5627pub struct DirectoryWithNewDirectoryOpts {
5628    /// Permission granted to the created directory (e.g., 0777).
5629    #[builder(setter(into, strip_option), default)]
5630    pub permissions: Option<isize>,
5631}
5632#[derive(Builder, Debug, PartialEq)]
5633pub struct DirectoryWithNewFileOpts {
5634    /// Permissions of the new file. Example: 0600
5635    #[builder(setter(into, strip_option), default)]
5636    pub permissions: Option<isize>,
5637}
5638impl Directory {
5639    /// Converts this directory to a local git repository
5640    pub fn as_git(&self) -> GitRepository {
5641        let query = self.selection.select("asGit");
5642        GitRepository {
5643            proc: self.proc.clone(),
5644            selection: query,
5645            graphql_client: self.graphql_client.clone(),
5646        }
5647    }
5648    /// Load the directory as a Dagger module source
5649    ///
5650    /// # Arguments
5651    ///
5652    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5653    pub fn as_module(&self) -> Module {
5654        let query = self.selection.select("asModule");
5655        Module {
5656            proc: self.proc.clone(),
5657            selection: query,
5658            graphql_client: self.graphql_client.clone(),
5659        }
5660    }
5661    /// Load the directory as a Dagger module source
5662    ///
5663    /// # Arguments
5664    ///
5665    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5666    pub fn as_module_opts<'a>(&self, opts: DirectoryAsModuleOpts<'a>) -> Module {
5667        let mut query = self.selection.select("asModule");
5668        if let Some(source_root_path) = opts.source_root_path {
5669            query = query.arg("sourceRootPath", source_root_path);
5670        }
5671        Module {
5672            proc: self.proc.clone(),
5673            selection: query,
5674            graphql_client: self.graphql_client.clone(),
5675        }
5676    }
5677    /// Load the directory as a Dagger module source
5678    ///
5679    /// # Arguments
5680    ///
5681    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5682    pub fn as_module_source(&self) -> ModuleSource {
5683        let query = self.selection.select("asModuleSource");
5684        ModuleSource {
5685            proc: self.proc.clone(),
5686            selection: query,
5687            graphql_client: self.graphql_client.clone(),
5688        }
5689    }
5690    /// Load the directory as a Dagger module source
5691    ///
5692    /// # Arguments
5693    ///
5694    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5695    pub fn as_module_source_opts<'a>(&self, opts: DirectoryAsModuleSourceOpts<'a>) -> ModuleSource {
5696        let mut query = self.selection.select("asModuleSource");
5697        if let Some(source_root_path) = opts.source_root_path {
5698            query = query.arg("sourceRootPath", source_root_path);
5699        }
5700        ModuleSource {
5701            proc: self.proc.clone(),
5702            selection: query,
5703            graphql_client: self.graphql_client.clone(),
5704        }
5705    }
5706    /// Return the difference between this directory and another directory, typically an older snapshot.
5707    /// The difference is encoded as a changeset, which also tracks removed files, and can be applied to other directories.
5708    ///
5709    /// # Arguments
5710    ///
5711    /// * `from` - The base directory snapshot to compare against
5712    pub fn changes(&self, from: impl IntoID<DirectoryId>) -> Changeset {
5713        let mut query = self.selection.select("changes");
5714        query = query.arg_lazy(
5715            "from",
5716            Box::new(move || {
5717                let from = from.clone();
5718                Box::pin(async move { from.into_id().await.unwrap().quote() })
5719            }),
5720        );
5721        Changeset {
5722            proc: self.proc.clone(),
5723            selection: query,
5724            graphql_client: self.graphql_client.clone(),
5725        }
5726    }
5727    /// Change the owner of the directory contents recursively.
5728    ///
5729    /// # Arguments
5730    ///
5731    /// * `path` - Path of the directory to change ownership of (e.g., "/").
5732    /// * `owner` - A user:group to set for the mounted directory and its contents.
5733    ///
5734    /// The user and group must be an ID (1000:1000), not a name (foo:bar).
5735    ///
5736    /// If the group is omitted, it defaults to the same as the user.
5737    pub fn chown(&self, path: impl Into<String>, owner: impl Into<String>) -> Directory {
5738        let mut query = self.selection.select("chown");
5739        query = query.arg("path", path.into());
5740        query = query.arg("owner", owner.into());
5741        Directory {
5742            proc: self.proc.clone(),
5743            selection: query,
5744            graphql_client: self.graphql_client.clone(),
5745        }
5746    }
5747    /// Return the difference between this directory and an another directory. The difference is encoded as a directory.
5748    ///
5749    /// # Arguments
5750    ///
5751    /// * `other` - The directory to compare against
5752    pub fn diff(&self, other: impl IntoID<DirectoryId>) -> Directory {
5753        let mut query = self.selection.select("diff");
5754        query = query.arg_lazy(
5755            "other",
5756            Box::new(move || {
5757                let other = other.clone();
5758                Box::pin(async move { other.into_id().await.unwrap().quote() })
5759            }),
5760        );
5761        Directory {
5762            proc: self.proc.clone(),
5763            selection: query,
5764            graphql_client: self.graphql_client.clone(),
5765        }
5766    }
5767    /// 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.
5768    pub async fn digest(&self) -> Result<String, DaggerError> {
5769        let query = self.selection.select("digest");
5770        query.execute(self.graphql_client.clone()).await
5771    }
5772    /// Retrieves a directory at the given path.
5773    ///
5774    /// # Arguments
5775    ///
5776    /// * `path` - Location of the directory to retrieve. Example: "/src"
5777    pub fn directory(&self, path: impl Into<String>) -> Directory {
5778        let mut query = self.selection.select("directory");
5779        query = query.arg("path", path.into());
5780        Directory {
5781            proc: self.proc.clone(),
5782            selection: query,
5783            graphql_client: self.graphql_client.clone(),
5784        }
5785    }
5786    /// 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.
5787    ///
5788    /// # Arguments
5789    ///
5790    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5791    pub fn docker_build(&self) -> Container {
5792        let query = self.selection.select("dockerBuild");
5793        Container {
5794            proc: self.proc.clone(),
5795            selection: query,
5796            graphql_client: self.graphql_client.clone(),
5797        }
5798    }
5799    /// 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.
5800    ///
5801    /// # Arguments
5802    ///
5803    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5804    pub fn docker_build_opts<'a>(&self, opts: DirectoryDockerBuildOpts<'a>) -> Container {
5805        let mut query = self.selection.select("dockerBuild");
5806        if let Some(dockerfile) = opts.dockerfile {
5807            query = query.arg("dockerfile", dockerfile);
5808        }
5809        if let Some(platform) = opts.platform {
5810            query = query.arg("platform", platform);
5811        }
5812        if let Some(build_args) = opts.build_args {
5813            query = query.arg("buildArgs", build_args);
5814        }
5815        if let Some(target) = opts.target {
5816            query = query.arg("target", target);
5817        }
5818        if let Some(secrets) = opts.secrets {
5819            query = query.arg("secrets", secrets);
5820        }
5821        if let Some(no_init) = opts.no_init {
5822            query = query.arg("noInit", no_init);
5823        }
5824        if let Some(ssh) = opts.ssh {
5825            query = query.arg("ssh", ssh);
5826        }
5827        Container {
5828            proc: self.proc.clone(),
5829            selection: query,
5830            graphql_client: self.graphql_client.clone(),
5831        }
5832    }
5833    /// Returns a list of files and directories at the given path.
5834    ///
5835    /// # Arguments
5836    ///
5837    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5838    pub async fn entries(&self) -> Result<Vec<String>, DaggerError> {
5839        let query = self.selection.select("entries");
5840        query.execute(self.graphql_client.clone()).await
5841    }
5842    /// Returns a list of files and directories at the given path.
5843    ///
5844    /// # Arguments
5845    ///
5846    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5847    pub async fn entries_opts<'a>(
5848        &self,
5849        opts: DirectoryEntriesOpts<'a>,
5850    ) -> Result<Vec<String>, DaggerError> {
5851        let mut query = self.selection.select("entries");
5852        if let Some(path) = opts.path {
5853            query = query.arg("path", path);
5854        }
5855        query.execute(self.graphql_client.clone()).await
5856    }
5857    /// check if a file or directory exists
5858    ///
5859    /// # Arguments
5860    ///
5861    /// * `path` - Path to check (e.g., "/file.txt").
5862    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5863    pub async fn exists(&self, path: impl Into<String>) -> Result<bool, DaggerError> {
5864        let mut query = self.selection.select("exists");
5865        query = query.arg("path", path.into());
5866        query.execute(self.graphql_client.clone()).await
5867    }
5868    /// check if a file or directory exists
5869    ///
5870    /// # Arguments
5871    ///
5872    /// * `path` - Path to check (e.g., "/file.txt").
5873    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5874    pub async fn exists_opts(
5875        &self,
5876        path: impl Into<String>,
5877        opts: DirectoryExistsOpts,
5878    ) -> Result<bool, DaggerError> {
5879        let mut query = self.selection.select("exists");
5880        query = query.arg("path", path.into());
5881        if let Some(expected_type) = opts.expected_type {
5882            query = query.arg("expectedType", expected_type);
5883        }
5884        if let Some(do_not_follow_symlinks) = opts.do_not_follow_symlinks {
5885            query = query.arg("doNotFollowSymlinks", do_not_follow_symlinks);
5886        }
5887        query.execute(self.graphql_client.clone()).await
5888    }
5889    /// Writes the contents of the directory to a path on the host.
5890    ///
5891    /// # Arguments
5892    ///
5893    /// * `path` - Location of the copied directory (e.g., "logs/").
5894    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5895    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
5896        let mut query = self.selection.select("export");
5897        query = query.arg("path", path.into());
5898        query.execute(self.graphql_client.clone()).await
5899    }
5900    /// Writes the contents of the directory to a path on the host.
5901    ///
5902    /// # Arguments
5903    ///
5904    /// * `path` - Location of the copied directory (e.g., "logs/").
5905    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5906    pub async fn export_opts(
5907        &self,
5908        path: impl Into<String>,
5909        opts: DirectoryExportOpts,
5910    ) -> Result<String, DaggerError> {
5911        let mut query = self.selection.select("export");
5912        query = query.arg("path", path.into());
5913        if let Some(wipe) = opts.wipe {
5914            query = query.arg("wipe", wipe);
5915        }
5916        query.execute(self.graphql_client.clone()).await
5917    }
5918    /// Retrieve a file at the given path.
5919    ///
5920    /// # Arguments
5921    ///
5922    /// * `path` - Location of the file to retrieve (e.g., "README.md").
5923    pub fn file(&self, path: impl Into<String>) -> File {
5924        let mut query = self.selection.select("file");
5925        query = query.arg("path", path.into());
5926        File {
5927            proc: self.proc.clone(),
5928            selection: query,
5929            graphql_client: self.graphql_client.clone(),
5930        }
5931    }
5932    /// Return a snapshot with some paths included or excluded
5933    ///
5934    /// # Arguments
5935    ///
5936    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5937    pub fn filter(&self) -> Directory {
5938        let query = self.selection.select("filter");
5939        Directory {
5940            proc: self.proc.clone(),
5941            selection: query,
5942            graphql_client: self.graphql_client.clone(),
5943        }
5944    }
5945    /// Return a snapshot with some paths included or excluded
5946    ///
5947    /// # Arguments
5948    ///
5949    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5950    pub fn filter_opts<'a>(&self, opts: DirectoryFilterOpts<'a>) -> Directory {
5951        let mut query = self.selection.select("filter");
5952        if let Some(exclude) = opts.exclude {
5953            query = query.arg("exclude", exclude);
5954        }
5955        if let Some(include) = opts.include {
5956            query = query.arg("include", include);
5957        }
5958        if let Some(gitignore) = opts.gitignore {
5959            query = query.arg("gitignore", gitignore);
5960        }
5961        Directory {
5962            proc: self.proc.clone(),
5963            selection: query,
5964            graphql_client: self.graphql_client.clone(),
5965        }
5966    }
5967    /// Search up the directory tree for a file or directory, and return its path. If no match, return null
5968    ///
5969    /// # Arguments
5970    ///
5971    /// * `name` - The name of the file or directory to search for
5972    /// * `start` - The path to start the search from
5973    pub async fn find_up(
5974        &self,
5975        name: impl Into<String>,
5976        start: impl Into<String>,
5977    ) -> Result<String, DaggerError> {
5978        let mut query = self.selection.select("findUp");
5979        query = query.arg("name", name.into());
5980        query = query.arg("start", start.into());
5981        query.execute(self.graphql_client.clone()).await
5982    }
5983    /// Returns a list of files and directories that matche the given pattern.
5984    ///
5985    /// # Arguments
5986    ///
5987    /// * `pattern` - Pattern to match (e.g., "*.md").
5988    pub async fn glob(&self, pattern: impl Into<String>) -> Result<Vec<String>, DaggerError> {
5989        let mut query = self.selection.select("glob");
5990        query = query.arg("pattern", pattern.into());
5991        query.execute(self.graphql_client.clone()).await
5992    }
5993    /// A unique identifier for this Directory.
5994    pub async fn id(&self) -> Result<DirectoryId, DaggerError> {
5995        let query = self.selection.select("id");
5996        query.execute(self.graphql_client.clone()).await
5997    }
5998    /// Returns the name of the directory.
5999    pub async fn name(&self) -> Result<String, DaggerError> {
6000        let query = self.selection.select("name");
6001        query.execute(self.graphql_client.clone()).await
6002    }
6003    /// Searches for content matching the given regular expression or literal string.
6004    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
6005    ///
6006    /// # Arguments
6007    ///
6008    /// * `pattern` - The text to match.
6009    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6010    pub fn search(&self, pattern: impl Into<String>) -> Vec<SearchResult> {
6011        let mut query = self.selection.select("search");
6012        query = query.arg("pattern", pattern.into());
6013        vec![SearchResult {
6014            proc: self.proc.clone(),
6015            selection: query,
6016            graphql_client: self.graphql_client.clone(),
6017        }]
6018    }
6019    /// Searches for content matching the given regular expression or literal string.
6020    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
6021    ///
6022    /// # Arguments
6023    ///
6024    /// * `pattern` - The text to match.
6025    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6026    pub fn search_opts<'a>(
6027        &self,
6028        pattern: impl Into<String>,
6029        opts: DirectorySearchOpts<'a>,
6030    ) -> Vec<SearchResult> {
6031        let mut query = self.selection.select("search");
6032        query = query.arg("pattern", pattern.into());
6033        if let Some(paths) = opts.paths {
6034            query = query.arg("paths", paths);
6035        }
6036        if let Some(globs) = opts.globs {
6037            query = query.arg("globs", globs);
6038        }
6039        if let Some(literal) = opts.literal {
6040            query = query.arg("literal", literal);
6041        }
6042        if let Some(multiline) = opts.multiline {
6043            query = query.arg("multiline", multiline);
6044        }
6045        if let Some(dotall) = opts.dotall {
6046            query = query.arg("dotall", dotall);
6047        }
6048        if let Some(insensitive) = opts.insensitive {
6049            query = query.arg("insensitive", insensitive);
6050        }
6051        if let Some(skip_ignored) = opts.skip_ignored {
6052            query = query.arg("skipIgnored", skip_ignored);
6053        }
6054        if let Some(skip_hidden) = opts.skip_hidden {
6055            query = query.arg("skipHidden", skip_hidden);
6056        }
6057        if let Some(files_only) = opts.files_only {
6058            query = query.arg("filesOnly", files_only);
6059        }
6060        if let Some(limit) = opts.limit {
6061            query = query.arg("limit", limit);
6062        }
6063        vec![SearchResult {
6064            proc: self.proc.clone(),
6065            selection: query,
6066            graphql_client: self.graphql_client.clone(),
6067        }]
6068    }
6069    /// Return file status
6070    ///
6071    /// # Arguments
6072    ///
6073    /// * `path` - Path to stat (e.g., "/file.txt").
6074    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6075    pub fn stat(&self, path: impl Into<String>) -> Stat {
6076        let mut query = self.selection.select("stat");
6077        query = query.arg("path", path.into());
6078        Stat {
6079            proc: self.proc.clone(),
6080            selection: query,
6081            graphql_client: self.graphql_client.clone(),
6082        }
6083    }
6084    /// Return file status
6085    ///
6086    /// # Arguments
6087    ///
6088    /// * `path` - Path to stat (e.g., "/file.txt").
6089    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6090    pub fn stat_opts(&self, path: impl Into<String>, opts: DirectoryStatOpts) -> Stat {
6091        let mut query = self.selection.select("stat");
6092        query = query.arg("path", path.into());
6093        if let Some(do_not_follow_symlinks) = opts.do_not_follow_symlinks {
6094            query = query.arg("doNotFollowSymlinks", do_not_follow_symlinks);
6095        }
6096        Stat {
6097            proc: self.proc.clone(),
6098            selection: query,
6099            graphql_client: self.graphql_client.clone(),
6100        }
6101    }
6102    /// Force evaluation in the engine.
6103    pub async fn sync(&self) -> Result<DirectoryId, DaggerError> {
6104        let query = self.selection.select("sync");
6105        query.execute(self.graphql_client.clone()).await
6106    }
6107    /// Opens an interactive terminal in new container with this directory mounted inside.
6108    ///
6109    /// # Arguments
6110    ///
6111    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6112    pub fn terminal(&self) -> Directory {
6113        let query = self.selection.select("terminal");
6114        Directory {
6115            proc: self.proc.clone(),
6116            selection: query,
6117            graphql_client: self.graphql_client.clone(),
6118        }
6119    }
6120    /// Opens an interactive terminal in new container with this directory mounted inside.
6121    ///
6122    /// # Arguments
6123    ///
6124    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6125    pub fn terminal_opts<'a>(&self, opts: DirectoryTerminalOpts<'a>) -> Directory {
6126        let mut query = self.selection.select("terminal");
6127        if let Some(container) = opts.container {
6128            query = query.arg("container", container);
6129        }
6130        if let Some(cmd) = opts.cmd {
6131            query = query.arg("cmd", cmd);
6132        }
6133        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
6134            query = query.arg(
6135                "experimentalPrivilegedNesting",
6136                experimental_privileged_nesting,
6137            );
6138        }
6139        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
6140            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
6141        }
6142        Directory {
6143            proc: self.proc.clone(),
6144            selection: query,
6145            graphql_client: self.graphql_client.clone(),
6146        }
6147    }
6148    /// Return a directory with changes from another directory applied to it.
6149    ///
6150    /// # Arguments
6151    ///
6152    /// * `changes` - Changes to apply to the directory
6153    pub fn with_changes(&self, changes: impl IntoID<ChangesetId>) -> Directory {
6154        let mut query = self.selection.select("withChanges");
6155        query = query.arg_lazy(
6156            "changes",
6157            Box::new(move || {
6158                let changes = changes.clone();
6159                Box::pin(async move { changes.into_id().await.unwrap().quote() })
6160            }),
6161        );
6162        Directory {
6163            proc: self.proc.clone(),
6164            selection: query,
6165            graphql_client: self.graphql_client.clone(),
6166        }
6167    }
6168    /// Return a snapshot with a directory added
6169    ///
6170    /// # Arguments
6171    ///
6172    /// * `path` - Location of the written directory (e.g., "/src/").
6173    /// * `source` - Identifier of the directory to copy.
6174    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6175    pub fn with_directory(
6176        &self,
6177        path: impl Into<String>,
6178        source: impl IntoID<DirectoryId>,
6179    ) -> Directory {
6180        let mut query = self.selection.select("withDirectory");
6181        query = query.arg("path", path.into());
6182        query = query.arg_lazy(
6183            "source",
6184            Box::new(move || {
6185                let source = source.clone();
6186                Box::pin(async move { source.into_id().await.unwrap().quote() })
6187            }),
6188        );
6189        Directory {
6190            proc: self.proc.clone(),
6191            selection: query,
6192            graphql_client: self.graphql_client.clone(),
6193        }
6194    }
6195    /// Return a snapshot with a directory added
6196    ///
6197    /// # Arguments
6198    ///
6199    /// * `path` - Location of the written directory (e.g., "/src/").
6200    /// * `source` - Identifier of the directory to copy.
6201    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6202    pub fn with_directory_opts<'a>(
6203        &self,
6204        path: impl Into<String>,
6205        source: impl IntoID<DirectoryId>,
6206        opts: DirectoryWithDirectoryOpts<'a>,
6207    ) -> Directory {
6208        let mut query = self.selection.select("withDirectory");
6209        query = query.arg("path", path.into());
6210        query = query.arg_lazy(
6211            "source",
6212            Box::new(move || {
6213                let source = source.clone();
6214                Box::pin(async move { source.into_id().await.unwrap().quote() })
6215            }),
6216        );
6217        if let Some(exclude) = opts.exclude {
6218            query = query.arg("exclude", exclude);
6219        }
6220        if let Some(include) = opts.include {
6221            query = query.arg("include", include);
6222        }
6223        if let Some(gitignore) = opts.gitignore {
6224            query = query.arg("gitignore", gitignore);
6225        }
6226        if let Some(owner) = opts.owner {
6227            query = query.arg("owner", owner);
6228        }
6229        Directory {
6230            proc: self.proc.clone(),
6231            selection: query,
6232            graphql_client: self.graphql_client.clone(),
6233        }
6234    }
6235    /// Raise an error.
6236    ///
6237    /// # Arguments
6238    ///
6239    /// * `err` - Message of the error to raise. If empty, the error will be ignored.
6240    pub fn with_error(&self, err: impl Into<String>) -> Directory {
6241        let mut query = self.selection.select("withError");
6242        query = query.arg("err", err.into());
6243        Directory {
6244            proc: self.proc.clone(),
6245            selection: query,
6246            graphql_client: self.graphql_client.clone(),
6247        }
6248    }
6249    /// Retrieves this directory plus the contents of the given file copied to the given path.
6250    ///
6251    /// # Arguments
6252    ///
6253    /// * `path` - Location of the copied file (e.g., "/file.txt").
6254    /// * `source` - Identifier of the file to copy.
6255    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6256    pub fn with_file(&self, path: impl Into<String>, source: impl IntoID<FileId>) -> Directory {
6257        let mut query = self.selection.select("withFile");
6258        query = query.arg("path", path.into());
6259        query = query.arg_lazy(
6260            "source",
6261            Box::new(move || {
6262                let source = source.clone();
6263                Box::pin(async move { source.into_id().await.unwrap().quote() })
6264            }),
6265        );
6266        Directory {
6267            proc: self.proc.clone(),
6268            selection: query,
6269            graphql_client: self.graphql_client.clone(),
6270        }
6271    }
6272    /// Retrieves this directory plus the contents of the given file copied to the given path.
6273    ///
6274    /// # Arguments
6275    ///
6276    /// * `path` - Location of the copied file (e.g., "/file.txt").
6277    /// * `source` - Identifier of the file to copy.
6278    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6279    pub fn with_file_opts<'a>(
6280        &self,
6281        path: impl Into<String>,
6282        source: impl IntoID<FileId>,
6283        opts: DirectoryWithFileOpts<'a>,
6284    ) -> Directory {
6285        let mut query = self.selection.select("withFile");
6286        query = query.arg("path", path.into());
6287        query = query.arg_lazy(
6288            "source",
6289            Box::new(move || {
6290                let source = source.clone();
6291                Box::pin(async move { source.into_id().await.unwrap().quote() })
6292            }),
6293        );
6294        if let Some(permissions) = opts.permissions {
6295            query = query.arg("permissions", permissions);
6296        }
6297        if let Some(owner) = opts.owner {
6298            query = query.arg("owner", owner);
6299        }
6300        Directory {
6301            proc: self.proc.clone(),
6302            selection: query,
6303            graphql_client: self.graphql_client.clone(),
6304        }
6305    }
6306    /// Retrieves this directory plus the contents of the given files copied to the given path.
6307    ///
6308    /// # Arguments
6309    ///
6310    /// * `path` - Location where copied files should be placed (e.g., "/src").
6311    /// * `sources` - Identifiers of the files to copy.
6312    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6313    pub fn with_files(&self, path: impl Into<String>, sources: Vec<FileId>) -> Directory {
6314        let mut query = self.selection.select("withFiles");
6315        query = query.arg("path", path.into());
6316        query = query.arg("sources", sources);
6317        Directory {
6318            proc: self.proc.clone(),
6319            selection: query,
6320            graphql_client: self.graphql_client.clone(),
6321        }
6322    }
6323    /// Retrieves this directory plus the contents of the given files copied to the given path.
6324    ///
6325    /// # Arguments
6326    ///
6327    /// * `path` - Location where copied files should be placed (e.g., "/src").
6328    /// * `sources` - Identifiers of the files to copy.
6329    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6330    pub fn with_files_opts(
6331        &self,
6332        path: impl Into<String>,
6333        sources: Vec<FileId>,
6334        opts: DirectoryWithFilesOpts,
6335    ) -> Directory {
6336        let mut query = self.selection.select("withFiles");
6337        query = query.arg("path", path.into());
6338        query = query.arg("sources", sources);
6339        if let Some(permissions) = opts.permissions {
6340            query = query.arg("permissions", permissions);
6341        }
6342        Directory {
6343            proc: self.proc.clone(),
6344            selection: query,
6345            graphql_client: self.graphql_client.clone(),
6346        }
6347    }
6348    /// Retrieves this directory plus a new directory created at the given path.
6349    ///
6350    /// # Arguments
6351    ///
6352    /// * `path` - Location of the directory created (e.g., "/logs").
6353    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6354    pub fn with_new_directory(&self, path: impl Into<String>) -> Directory {
6355        let mut query = self.selection.select("withNewDirectory");
6356        query = query.arg("path", path.into());
6357        Directory {
6358            proc: self.proc.clone(),
6359            selection: query,
6360            graphql_client: self.graphql_client.clone(),
6361        }
6362    }
6363    /// Retrieves this directory plus a new directory created at the given path.
6364    ///
6365    /// # Arguments
6366    ///
6367    /// * `path` - Location of the directory created (e.g., "/logs").
6368    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6369    pub fn with_new_directory_opts(
6370        &self,
6371        path: impl Into<String>,
6372        opts: DirectoryWithNewDirectoryOpts,
6373    ) -> Directory {
6374        let mut query = self.selection.select("withNewDirectory");
6375        query = query.arg("path", path.into());
6376        if let Some(permissions) = opts.permissions {
6377            query = query.arg("permissions", permissions);
6378        }
6379        Directory {
6380            proc: self.proc.clone(),
6381            selection: query,
6382            graphql_client: self.graphql_client.clone(),
6383        }
6384    }
6385    /// Return a snapshot with a new file added
6386    ///
6387    /// # Arguments
6388    ///
6389    /// * `path` - Path of the new file. Example: "foo/bar.txt"
6390    /// * `contents` - Contents of the new file. Example: "Hello world!"
6391    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6392    pub fn with_new_file(&self, path: impl Into<String>, contents: impl Into<String>) -> Directory {
6393        let mut query = self.selection.select("withNewFile");
6394        query = query.arg("path", path.into());
6395        query = query.arg("contents", contents.into());
6396        Directory {
6397            proc: self.proc.clone(),
6398            selection: query,
6399            graphql_client: self.graphql_client.clone(),
6400        }
6401    }
6402    /// Return a snapshot with a new file added
6403    ///
6404    /// # Arguments
6405    ///
6406    /// * `path` - Path of the new file. Example: "foo/bar.txt"
6407    /// * `contents` - Contents of the new file. Example: "Hello world!"
6408    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6409    pub fn with_new_file_opts(
6410        &self,
6411        path: impl Into<String>,
6412        contents: impl Into<String>,
6413        opts: DirectoryWithNewFileOpts,
6414    ) -> Directory {
6415        let mut query = self.selection.select("withNewFile");
6416        query = query.arg("path", path.into());
6417        query = query.arg("contents", contents.into());
6418        if let Some(permissions) = opts.permissions {
6419            query = query.arg("permissions", permissions);
6420        }
6421        Directory {
6422            proc: self.proc.clone(),
6423            selection: query,
6424            graphql_client: self.graphql_client.clone(),
6425        }
6426    }
6427    /// Retrieves this directory with the given Git-compatible patch applied.
6428    ///
6429    /// # Arguments
6430    ///
6431    /// * `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").
6432    pub fn with_patch(&self, patch: impl Into<String>) -> Directory {
6433        let mut query = self.selection.select("withPatch");
6434        query = query.arg("patch", patch.into());
6435        Directory {
6436            proc: self.proc.clone(),
6437            selection: query,
6438            graphql_client: self.graphql_client.clone(),
6439        }
6440    }
6441    /// Retrieves this directory with the given Git-compatible patch file applied.
6442    ///
6443    /// # Arguments
6444    ///
6445    /// * `patch` - File containing the patch to apply
6446    pub fn with_patch_file(&self, patch: impl IntoID<FileId>) -> Directory {
6447        let mut query = self.selection.select("withPatchFile");
6448        query = query.arg_lazy(
6449            "patch",
6450            Box::new(move || {
6451                let patch = patch.clone();
6452                Box::pin(async move { patch.into_id().await.unwrap().quote() })
6453            }),
6454        );
6455        Directory {
6456            proc: self.proc.clone(),
6457            selection: query,
6458            graphql_client: self.graphql_client.clone(),
6459        }
6460    }
6461    /// Return a snapshot with a symlink
6462    ///
6463    /// # Arguments
6464    ///
6465    /// * `target` - Location of the file or directory to link to (e.g., "/existing/file").
6466    /// * `link_name` - Location where the symbolic link will be created (e.g., "/new-file-link").
6467    pub fn with_symlink(
6468        &self,
6469        target: impl Into<String>,
6470        link_name: impl Into<String>,
6471    ) -> Directory {
6472        let mut query = self.selection.select("withSymlink");
6473        query = query.arg("target", target.into());
6474        query = query.arg("linkName", link_name.into());
6475        Directory {
6476            proc: self.proc.clone(),
6477            selection: query,
6478            graphql_client: self.graphql_client.clone(),
6479        }
6480    }
6481    /// Retrieves this directory with all file/dir timestamps set to the given time.
6482    ///
6483    /// # Arguments
6484    ///
6485    /// * `timestamp` - Timestamp to set dir/files in.
6486    ///
6487    /// Formatted in seconds following Unix epoch (e.g., 1672531199).
6488    pub fn with_timestamps(&self, timestamp: isize) -> Directory {
6489        let mut query = self.selection.select("withTimestamps");
6490        query = query.arg("timestamp", timestamp);
6491        Directory {
6492            proc: self.proc.clone(),
6493            selection: query,
6494            graphql_client: self.graphql_client.clone(),
6495        }
6496    }
6497    /// Return a snapshot with a subdirectory removed
6498    ///
6499    /// # Arguments
6500    ///
6501    /// * `path` - Path of the subdirectory to remove. Example: ".github/workflows"
6502    pub fn without_directory(&self, path: impl Into<String>) -> Directory {
6503        let mut query = self.selection.select("withoutDirectory");
6504        query = query.arg("path", path.into());
6505        Directory {
6506            proc: self.proc.clone(),
6507            selection: query,
6508            graphql_client: self.graphql_client.clone(),
6509        }
6510    }
6511    /// Return a snapshot with a file removed
6512    ///
6513    /// # Arguments
6514    ///
6515    /// * `path` - Path of the file to remove (e.g., "/file.txt").
6516    pub fn without_file(&self, path: impl Into<String>) -> Directory {
6517        let mut query = self.selection.select("withoutFile");
6518        query = query.arg("path", path.into());
6519        Directory {
6520            proc: self.proc.clone(),
6521            selection: query,
6522            graphql_client: self.graphql_client.clone(),
6523        }
6524    }
6525    /// Return a snapshot with files removed
6526    ///
6527    /// # Arguments
6528    ///
6529    /// * `paths` - Paths of the files to remove (e.g., ["/file.txt"]).
6530    pub fn without_files(&self, paths: Vec<impl Into<String>>) -> Directory {
6531        let mut query = self.selection.select("withoutFiles");
6532        query = query.arg(
6533            "paths",
6534            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
6535        );
6536        Directory {
6537            proc: self.proc.clone(),
6538            selection: query,
6539            graphql_client: self.graphql_client.clone(),
6540        }
6541    }
6542}
6543#[derive(Clone)]
6544pub struct Engine {
6545    pub proc: Option<Arc<DaggerSessionProc>>,
6546    pub selection: Selection,
6547    pub graphql_client: DynGraphQLClient,
6548}
6549impl Engine {
6550    /// The list of connected client IDs
6551    pub async fn clients(&self) -> Result<Vec<String>, DaggerError> {
6552        let query = self.selection.select("clients");
6553        query.execute(self.graphql_client.clone()).await
6554    }
6555    /// A unique identifier for this Engine.
6556    pub async fn id(&self) -> Result<EngineId, DaggerError> {
6557        let query = self.selection.select("id");
6558        query.execute(self.graphql_client.clone()).await
6559    }
6560    /// The local (on-disk) cache for the Dagger engine
6561    pub fn local_cache(&self) -> EngineCache {
6562        let query = self.selection.select("localCache");
6563        EngineCache {
6564            proc: self.proc.clone(),
6565            selection: query,
6566            graphql_client: self.graphql_client.clone(),
6567        }
6568    }
6569    /// The name of the engine instance.
6570    pub async fn name(&self) -> Result<String, DaggerError> {
6571        let query = self.selection.select("name");
6572        query.execute(self.graphql_client.clone()).await
6573    }
6574}
6575#[derive(Clone)]
6576pub struct EngineCache {
6577    pub proc: Option<Arc<DaggerSessionProc>>,
6578    pub selection: Selection,
6579    pub graphql_client: DynGraphQLClient,
6580}
6581#[derive(Builder, Debug, PartialEq)]
6582pub struct EngineCacheEntrySetOpts<'a> {
6583    #[builder(setter(into, strip_option), default)]
6584    pub key: Option<&'a str>,
6585}
6586#[derive(Builder, Debug, PartialEq)]
6587pub struct EngineCachePruneOpts {
6588    /// Use the engine-wide default pruning policy if true, otherwise prune the whole cache of any releasable entries.
6589    #[builder(setter(into, strip_option), default)]
6590    pub use_default_policy: Option<bool>,
6591}
6592impl EngineCache {
6593    /// The current set of entries in the cache
6594    ///
6595    /// # Arguments
6596    ///
6597    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6598    pub fn entry_set(&self) -> EngineCacheEntrySet {
6599        let query = self.selection.select("entrySet");
6600        EngineCacheEntrySet {
6601            proc: self.proc.clone(),
6602            selection: query,
6603            graphql_client: self.graphql_client.clone(),
6604        }
6605    }
6606    /// The current set of entries in the cache
6607    ///
6608    /// # Arguments
6609    ///
6610    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6611    pub fn entry_set_opts<'a>(&self, opts: EngineCacheEntrySetOpts<'a>) -> EngineCacheEntrySet {
6612        let mut query = self.selection.select("entrySet");
6613        if let Some(key) = opts.key {
6614            query = query.arg("key", key);
6615        }
6616        EngineCacheEntrySet {
6617            proc: self.proc.clone(),
6618            selection: query,
6619            graphql_client: self.graphql_client.clone(),
6620        }
6621    }
6622    /// A unique identifier for this EngineCache.
6623    pub async fn id(&self) -> Result<EngineCacheId, DaggerError> {
6624        let query = self.selection.select("id");
6625        query.execute(self.graphql_client.clone()).await
6626    }
6627    /// The maximum bytes to keep in the cache without pruning.
6628    pub async fn max_used_space(&self) -> Result<isize, DaggerError> {
6629        let query = self.selection.select("maxUsedSpace");
6630        query.execute(self.graphql_client.clone()).await
6631    }
6632    /// The target amount of free disk space the garbage collector will attempt to leave.
6633    pub async fn min_free_space(&self) -> Result<isize, DaggerError> {
6634        let query = self.selection.select("minFreeSpace");
6635        query.execute(self.graphql_client.clone()).await
6636    }
6637    /// Prune the cache of releaseable entries
6638    ///
6639    /// # Arguments
6640    ///
6641    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6642    pub async fn prune(&self) -> Result<Void, DaggerError> {
6643        let query = self.selection.select("prune");
6644        query.execute(self.graphql_client.clone()).await
6645    }
6646    /// Prune the cache of releaseable entries
6647    ///
6648    /// # Arguments
6649    ///
6650    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6651    pub async fn prune_opts(&self, opts: EngineCachePruneOpts) -> Result<Void, DaggerError> {
6652        let mut query = self.selection.select("prune");
6653        if let Some(use_default_policy) = opts.use_default_policy {
6654            query = query.arg("useDefaultPolicy", use_default_policy);
6655        }
6656        query.execute(self.graphql_client.clone()).await
6657    }
6658    /// The minimum amount of disk space this policy is guaranteed to retain.
6659    pub async fn reserved_space(&self) -> Result<isize, DaggerError> {
6660        let query = self.selection.select("reservedSpace");
6661        query.execute(self.graphql_client.clone()).await
6662    }
6663    /// The target number of bytes to keep when pruning.
6664    pub async fn target_space(&self) -> Result<isize, DaggerError> {
6665        let query = self.selection.select("targetSpace");
6666        query.execute(self.graphql_client.clone()).await
6667    }
6668}
6669#[derive(Clone)]
6670pub struct EngineCacheEntry {
6671    pub proc: Option<Arc<DaggerSessionProc>>,
6672    pub selection: Selection,
6673    pub graphql_client: DynGraphQLClient,
6674}
6675impl EngineCacheEntry {
6676    /// Whether the cache entry is actively being used.
6677    pub async fn actively_used(&self) -> Result<bool, DaggerError> {
6678        let query = self.selection.select("activelyUsed");
6679        query.execute(self.graphql_client.clone()).await
6680    }
6681    /// The time the cache entry was created, in Unix nanoseconds.
6682    pub async fn created_time_unix_nano(&self) -> Result<isize, DaggerError> {
6683        let query = self.selection.select("createdTimeUnixNano");
6684        query.execute(self.graphql_client.clone()).await
6685    }
6686    /// The description of the cache entry.
6687    pub async fn description(&self) -> Result<String, DaggerError> {
6688        let query = self.selection.select("description");
6689        query.execute(self.graphql_client.clone()).await
6690    }
6691    /// The disk space used by the cache entry.
6692    pub async fn disk_space_bytes(&self) -> Result<isize, DaggerError> {
6693        let query = self.selection.select("diskSpaceBytes");
6694        query.execute(self.graphql_client.clone()).await
6695    }
6696    /// A unique identifier for this EngineCacheEntry.
6697    pub async fn id(&self) -> Result<EngineCacheEntryId, DaggerError> {
6698        let query = self.selection.select("id");
6699        query.execute(self.graphql_client.clone()).await
6700    }
6701    /// The most recent time the cache entry was used, in Unix nanoseconds.
6702    pub async fn most_recent_use_time_unix_nano(&self) -> Result<isize, DaggerError> {
6703        let query = self.selection.select("mostRecentUseTimeUnixNano");
6704        query.execute(self.graphql_client.clone()).await
6705    }
6706}
6707#[derive(Clone)]
6708pub struct EngineCacheEntrySet {
6709    pub proc: Option<Arc<DaggerSessionProc>>,
6710    pub selection: Selection,
6711    pub graphql_client: DynGraphQLClient,
6712}
6713impl EngineCacheEntrySet {
6714    /// The total disk space used by the cache entries in this set.
6715    pub async fn disk_space_bytes(&self) -> Result<isize, DaggerError> {
6716        let query = self.selection.select("diskSpaceBytes");
6717        query.execute(self.graphql_client.clone()).await
6718    }
6719    /// The list of individual cache entries in the set
6720    pub fn entries(&self) -> Vec<EngineCacheEntry> {
6721        let query = self.selection.select("entries");
6722        vec![EngineCacheEntry {
6723            proc: self.proc.clone(),
6724            selection: query,
6725            graphql_client: self.graphql_client.clone(),
6726        }]
6727    }
6728    /// The number of cache entries in this set.
6729    pub async fn entry_count(&self) -> Result<isize, DaggerError> {
6730        let query = self.selection.select("entryCount");
6731        query.execute(self.graphql_client.clone()).await
6732    }
6733    /// A unique identifier for this EngineCacheEntrySet.
6734    pub async fn id(&self) -> Result<EngineCacheEntrySetId, DaggerError> {
6735        let query = self.selection.select("id");
6736        query.execute(self.graphql_client.clone()).await
6737    }
6738}
6739#[derive(Clone)]
6740pub struct EnumTypeDef {
6741    pub proc: Option<Arc<DaggerSessionProc>>,
6742    pub selection: Selection,
6743    pub graphql_client: DynGraphQLClient,
6744}
6745impl EnumTypeDef {
6746    /// A doc string for the enum, if any.
6747    pub async fn description(&self) -> Result<String, DaggerError> {
6748        let query = self.selection.select("description");
6749        query.execute(self.graphql_client.clone()).await
6750    }
6751    /// A unique identifier for this EnumTypeDef.
6752    pub async fn id(&self) -> Result<EnumTypeDefId, DaggerError> {
6753        let query = self.selection.select("id");
6754        query.execute(self.graphql_client.clone()).await
6755    }
6756    /// The members of the enum.
6757    pub fn members(&self) -> Vec<EnumValueTypeDef> {
6758        let query = self.selection.select("members");
6759        vec![EnumValueTypeDef {
6760            proc: self.proc.clone(),
6761            selection: query,
6762            graphql_client: self.graphql_client.clone(),
6763        }]
6764    }
6765    /// The name of the enum.
6766    pub async fn name(&self) -> Result<String, DaggerError> {
6767        let query = self.selection.select("name");
6768        query.execute(self.graphql_client.clone()).await
6769    }
6770    /// The location of this enum declaration.
6771    pub fn source_map(&self) -> SourceMap {
6772        let query = self.selection.select("sourceMap");
6773        SourceMap {
6774            proc: self.proc.clone(),
6775            selection: query,
6776            graphql_client: self.graphql_client.clone(),
6777        }
6778    }
6779    /// If this EnumTypeDef is associated with a Module, the name of the module. Unset otherwise.
6780    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
6781        let query = self.selection.select("sourceModuleName");
6782        query.execute(self.graphql_client.clone()).await
6783    }
6784    pub fn values(&self) -> Vec<EnumValueTypeDef> {
6785        let query = self.selection.select("values");
6786        vec![EnumValueTypeDef {
6787            proc: self.proc.clone(),
6788            selection: query,
6789            graphql_client: self.graphql_client.clone(),
6790        }]
6791    }
6792}
6793#[derive(Clone)]
6794pub struct EnumValueTypeDef {
6795    pub proc: Option<Arc<DaggerSessionProc>>,
6796    pub selection: Selection,
6797    pub graphql_client: DynGraphQLClient,
6798}
6799impl EnumValueTypeDef {
6800    /// The reason this enum member is deprecated, if any.
6801    pub async fn deprecated(&self) -> Result<String, DaggerError> {
6802        let query = self.selection.select("deprecated");
6803        query.execute(self.graphql_client.clone()).await
6804    }
6805    /// A doc string for the enum member, if any.
6806    pub async fn description(&self) -> Result<String, DaggerError> {
6807        let query = self.selection.select("description");
6808        query.execute(self.graphql_client.clone()).await
6809    }
6810    /// A unique identifier for this EnumValueTypeDef.
6811    pub async fn id(&self) -> Result<EnumValueTypeDefId, DaggerError> {
6812        let query = self.selection.select("id");
6813        query.execute(self.graphql_client.clone()).await
6814    }
6815    /// The name of the enum member.
6816    pub async fn name(&self) -> Result<String, DaggerError> {
6817        let query = self.selection.select("name");
6818        query.execute(self.graphql_client.clone()).await
6819    }
6820    /// The location of this enum member declaration.
6821    pub fn source_map(&self) -> SourceMap {
6822        let query = self.selection.select("sourceMap");
6823        SourceMap {
6824            proc: self.proc.clone(),
6825            selection: query,
6826            graphql_client: self.graphql_client.clone(),
6827        }
6828    }
6829    /// The value of the enum member
6830    pub async fn value(&self) -> Result<String, DaggerError> {
6831        let query = self.selection.select("value");
6832        query.execute(self.graphql_client.clone()).await
6833    }
6834}
6835#[derive(Clone)]
6836pub struct Env {
6837    pub proc: Option<Arc<DaggerSessionProc>>,
6838    pub selection: Selection,
6839    pub graphql_client: DynGraphQLClient,
6840}
6841#[derive(Builder, Debug, PartialEq)]
6842pub struct EnvChecksOpts<'a> {
6843    /// Only include checks matching the specified patterns
6844    #[builder(setter(into, strip_option), default)]
6845    pub include: Option<Vec<&'a str>>,
6846}
6847impl Env {
6848    /// Return the check with the given name from the installed modules. Must match exactly one check.
6849    ///
6850    /// # Arguments
6851    ///
6852    /// * `name` - The name of the check to retrieve
6853    pub fn check(&self, name: impl Into<String>) -> Check {
6854        let mut query = self.selection.select("check");
6855        query = query.arg("name", name.into());
6856        Check {
6857            proc: self.proc.clone(),
6858            selection: query,
6859            graphql_client: self.graphql_client.clone(),
6860        }
6861    }
6862    /// Return all checks defined by the installed modules
6863    ///
6864    /// # Arguments
6865    ///
6866    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6867    pub fn checks(&self) -> CheckGroup {
6868        let query = self.selection.select("checks");
6869        CheckGroup {
6870            proc: self.proc.clone(),
6871            selection: query,
6872            graphql_client: self.graphql_client.clone(),
6873        }
6874    }
6875    /// Return all checks defined by the installed modules
6876    ///
6877    /// # Arguments
6878    ///
6879    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6880    pub fn checks_opts<'a>(&self, opts: EnvChecksOpts<'a>) -> CheckGroup {
6881        let mut query = self.selection.select("checks");
6882        if let Some(include) = opts.include {
6883            query = query.arg("include", include);
6884        }
6885        CheckGroup {
6886            proc: self.proc.clone(),
6887            selection: query,
6888            graphql_client: self.graphql_client.clone(),
6889        }
6890    }
6891    /// A unique identifier for this Env.
6892    pub async fn id(&self) -> Result<EnvId, DaggerError> {
6893        let query = self.selection.select("id");
6894        query.execute(self.graphql_client.clone()).await
6895    }
6896    /// Retrieves an input binding by name
6897    pub fn input(&self, name: impl Into<String>) -> Binding {
6898        let mut query = self.selection.select("input");
6899        query = query.arg("name", name.into());
6900        Binding {
6901            proc: self.proc.clone(),
6902            selection: query,
6903            graphql_client: self.graphql_client.clone(),
6904        }
6905    }
6906    /// Returns all input bindings provided to the environment
6907    pub fn inputs(&self) -> Vec<Binding> {
6908        let query = self.selection.select("inputs");
6909        vec![Binding {
6910            proc: self.proc.clone(),
6911            selection: query,
6912            graphql_client: self.graphql_client.clone(),
6913        }]
6914    }
6915    /// Retrieves an output binding by name
6916    pub fn output(&self, name: impl Into<String>) -> Binding {
6917        let mut query = self.selection.select("output");
6918        query = query.arg("name", name.into());
6919        Binding {
6920            proc: self.proc.clone(),
6921            selection: query,
6922            graphql_client: self.graphql_client.clone(),
6923        }
6924    }
6925    /// Returns all declared output bindings for the environment
6926    pub fn outputs(&self) -> Vec<Binding> {
6927        let query = self.selection.select("outputs");
6928        vec![Binding {
6929            proc: self.proc.clone(),
6930            selection: query,
6931            graphql_client: self.graphql_client.clone(),
6932        }]
6933    }
6934    /// Create or update a binding of type Address in the environment
6935    ///
6936    /// # Arguments
6937    ///
6938    /// * `name` - The name of the binding
6939    /// * `value` - The Address value to assign to the binding
6940    /// * `description` - The purpose of the input
6941    pub fn with_address_input(
6942        &self,
6943        name: impl Into<String>,
6944        value: impl IntoID<AddressId>,
6945        description: impl Into<String>,
6946    ) -> Env {
6947        let mut query = self.selection.select("withAddressInput");
6948        query = query.arg("name", name.into());
6949        query = query.arg_lazy(
6950            "value",
6951            Box::new(move || {
6952                let value = value.clone();
6953                Box::pin(async move { value.into_id().await.unwrap().quote() })
6954            }),
6955        );
6956        query = query.arg("description", description.into());
6957        Env {
6958            proc: self.proc.clone(),
6959            selection: query,
6960            graphql_client: self.graphql_client.clone(),
6961        }
6962    }
6963    /// Declare a desired Address output to be assigned in the environment
6964    ///
6965    /// # Arguments
6966    ///
6967    /// * `name` - The name of the binding
6968    /// * `description` - A description of the desired value of the binding
6969    pub fn with_address_output(
6970        &self,
6971        name: impl Into<String>,
6972        description: impl Into<String>,
6973    ) -> Env {
6974        let mut query = self.selection.select("withAddressOutput");
6975        query = query.arg("name", name.into());
6976        query = query.arg("description", description.into());
6977        Env {
6978            proc: self.proc.clone(),
6979            selection: query,
6980            graphql_client: self.graphql_client.clone(),
6981        }
6982    }
6983    /// Create or update a binding of type CacheVolume in the environment
6984    ///
6985    /// # Arguments
6986    ///
6987    /// * `name` - The name of the binding
6988    /// * `value` - The CacheVolume value to assign to the binding
6989    /// * `description` - The purpose of the input
6990    pub fn with_cache_volume_input(
6991        &self,
6992        name: impl Into<String>,
6993        value: impl IntoID<CacheVolumeId>,
6994        description: impl Into<String>,
6995    ) -> Env {
6996        let mut query = self.selection.select("withCacheVolumeInput");
6997        query = query.arg("name", name.into());
6998        query = query.arg_lazy(
6999            "value",
7000            Box::new(move || {
7001                let value = value.clone();
7002                Box::pin(async move { value.into_id().await.unwrap().quote() })
7003            }),
7004        );
7005        query = query.arg("description", description.into());
7006        Env {
7007            proc: self.proc.clone(),
7008            selection: query,
7009            graphql_client: self.graphql_client.clone(),
7010        }
7011    }
7012    /// Declare a desired CacheVolume output to be assigned in the environment
7013    ///
7014    /// # Arguments
7015    ///
7016    /// * `name` - The name of the binding
7017    /// * `description` - A description of the desired value of the binding
7018    pub fn with_cache_volume_output(
7019        &self,
7020        name: impl Into<String>,
7021        description: impl Into<String>,
7022    ) -> Env {
7023        let mut query = self.selection.select("withCacheVolumeOutput");
7024        query = query.arg("name", name.into());
7025        query = query.arg("description", description.into());
7026        Env {
7027            proc: self.proc.clone(),
7028            selection: query,
7029            graphql_client: self.graphql_client.clone(),
7030        }
7031    }
7032    /// Create or update a binding of type Changeset in the environment
7033    ///
7034    /// # Arguments
7035    ///
7036    /// * `name` - The name of the binding
7037    /// * `value` - The Changeset value to assign to the binding
7038    /// * `description` - The purpose of the input
7039    pub fn with_changeset_input(
7040        &self,
7041        name: impl Into<String>,
7042        value: impl IntoID<ChangesetId>,
7043        description: impl Into<String>,
7044    ) -> Env {
7045        let mut query = self.selection.select("withChangesetInput");
7046        query = query.arg("name", name.into());
7047        query = query.arg_lazy(
7048            "value",
7049            Box::new(move || {
7050                let value = value.clone();
7051                Box::pin(async move { value.into_id().await.unwrap().quote() })
7052            }),
7053        );
7054        query = query.arg("description", description.into());
7055        Env {
7056            proc: self.proc.clone(),
7057            selection: query,
7058            graphql_client: self.graphql_client.clone(),
7059        }
7060    }
7061    /// Declare a desired Changeset output to be assigned in the environment
7062    ///
7063    /// # Arguments
7064    ///
7065    /// * `name` - The name of the binding
7066    /// * `description` - A description of the desired value of the binding
7067    pub fn with_changeset_output(
7068        &self,
7069        name: impl Into<String>,
7070        description: impl Into<String>,
7071    ) -> Env {
7072        let mut query = self.selection.select("withChangesetOutput");
7073        query = query.arg("name", name.into());
7074        query = query.arg("description", description.into());
7075        Env {
7076            proc: self.proc.clone(),
7077            selection: query,
7078            graphql_client: self.graphql_client.clone(),
7079        }
7080    }
7081    /// Create or update a binding of type CheckGroup in the environment
7082    ///
7083    /// # Arguments
7084    ///
7085    /// * `name` - The name of the binding
7086    /// * `value` - The CheckGroup value to assign to the binding
7087    /// * `description` - The purpose of the input
7088    pub fn with_check_group_input(
7089        &self,
7090        name: impl Into<String>,
7091        value: impl IntoID<CheckGroupId>,
7092        description: impl Into<String>,
7093    ) -> Env {
7094        let mut query = self.selection.select("withCheckGroupInput");
7095        query = query.arg("name", name.into());
7096        query = query.arg_lazy(
7097            "value",
7098            Box::new(move || {
7099                let value = value.clone();
7100                Box::pin(async move { value.into_id().await.unwrap().quote() })
7101            }),
7102        );
7103        query = query.arg("description", description.into());
7104        Env {
7105            proc: self.proc.clone(),
7106            selection: query,
7107            graphql_client: self.graphql_client.clone(),
7108        }
7109    }
7110    /// Declare a desired CheckGroup output to be assigned in the environment
7111    ///
7112    /// # Arguments
7113    ///
7114    /// * `name` - The name of the binding
7115    /// * `description` - A description of the desired value of the binding
7116    pub fn with_check_group_output(
7117        &self,
7118        name: impl Into<String>,
7119        description: impl Into<String>,
7120    ) -> Env {
7121        let mut query = self.selection.select("withCheckGroupOutput");
7122        query = query.arg("name", name.into());
7123        query = query.arg("description", description.into());
7124        Env {
7125            proc: self.proc.clone(),
7126            selection: query,
7127            graphql_client: self.graphql_client.clone(),
7128        }
7129    }
7130    /// Create or update a binding of type Check in the environment
7131    ///
7132    /// # Arguments
7133    ///
7134    /// * `name` - The name of the binding
7135    /// * `value` - The Check value to assign to the binding
7136    /// * `description` - The purpose of the input
7137    pub fn with_check_input(
7138        &self,
7139        name: impl Into<String>,
7140        value: impl IntoID<CheckId>,
7141        description: impl Into<String>,
7142    ) -> Env {
7143        let mut query = self.selection.select("withCheckInput");
7144        query = query.arg("name", name.into());
7145        query = query.arg_lazy(
7146            "value",
7147            Box::new(move || {
7148                let value = value.clone();
7149                Box::pin(async move { value.into_id().await.unwrap().quote() })
7150            }),
7151        );
7152        query = query.arg("description", description.into());
7153        Env {
7154            proc: self.proc.clone(),
7155            selection: query,
7156            graphql_client: self.graphql_client.clone(),
7157        }
7158    }
7159    /// Declare a desired Check output to be assigned in the environment
7160    ///
7161    /// # Arguments
7162    ///
7163    /// * `name` - The name of the binding
7164    /// * `description` - A description of the desired value of the binding
7165    pub fn with_check_output(
7166        &self,
7167        name: impl Into<String>,
7168        description: impl Into<String>,
7169    ) -> Env {
7170        let mut query = self.selection.select("withCheckOutput");
7171        query = query.arg("name", name.into());
7172        query = query.arg("description", description.into());
7173        Env {
7174            proc: self.proc.clone(),
7175            selection: query,
7176            graphql_client: self.graphql_client.clone(),
7177        }
7178    }
7179    /// Create or update a binding of type Cloud in the environment
7180    ///
7181    /// # Arguments
7182    ///
7183    /// * `name` - The name of the binding
7184    /// * `value` - The Cloud value to assign to the binding
7185    /// * `description` - The purpose of the input
7186    pub fn with_cloud_input(
7187        &self,
7188        name: impl Into<String>,
7189        value: impl IntoID<CloudId>,
7190        description: impl Into<String>,
7191    ) -> Env {
7192        let mut query = self.selection.select("withCloudInput");
7193        query = query.arg("name", name.into());
7194        query = query.arg_lazy(
7195            "value",
7196            Box::new(move || {
7197                let value = value.clone();
7198                Box::pin(async move { value.into_id().await.unwrap().quote() })
7199            }),
7200        );
7201        query = query.arg("description", description.into());
7202        Env {
7203            proc: self.proc.clone(),
7204            selection: query,
7205            graphql_client: self.graphql_client.clone(),
7206        }
7207    }
7208    /// Declare a desired Cloud output to be assigned in the environment
7209    ///
7210    /// # Arguments
7211    ///
7212    /// * `name` - The name of the binding
7213    /// * `description` - A description of the desired value of the binding
7214    pub fn with_cloud_output(
7215        &self,
7216        name: impl Into<String>,
7217        description: impl Into<String>,
7218    ) -> Env {
7219        let mut query = self.selection.select("withCloudOutput");
7220        query = query.arg("name", name.into());
7221        query = query.arg("description", description.into());
7222        Env {
7223            proc: self.proc.clone(),
7224            selection: query,
7225            graphql_client: self.graphql_client.clone(),
7226        }
7227    }
7228    /// Create or update a binding of type Container in the environment
7229    ///
7230    /// # Arguments
7231    ///
7232    /// * `name` - The name of the binding
7233    /// * `value` - The Container value to assign to the binding
7234    /// * `description` - The purpose of the input
7235    pub fn with_container_input(
7236        &self,
7237        name: impl Into<String>,
7238        value: impl IntoID<ContainerId>,
7239        description: impl Into<String>,
7240    ) -> Env {
7241        let mut query = self.selection.select("withContainerInput");
7242        query = query.arg("name", name.into());
7243        query = query.arg_lazy(
7244            "value",
7245            Box::new(move || {
7246                let value = value.clone();
7247                Box::pin(async move { value.into_id().await.unwrap().quote() })
7248            }),
7249        );
7250        query = query.arg("description", description.into());
7251        Env {
7252            proc: self.proc.clone(),
7253            selection: query,
7254            graphql_client: self.graphql_client.clone(),
7255        }
7256    }
7257    /// Declare a desired Container output to be assigned in the environment
7258    ///
7259    /// # Arguments
7260    ///
7261    /// * `name` - The name of the binding
7262    /// * `description` - A description of the desired value of the binding
7263    pub fn with_container_output(
7264        &self,
7265        name: impl Into<String>,
7266        description: impl Into<String>,
7267    ) -> Env {
7268        let mut query = self.selection.select("withContainerOutput");
7269        query = query.arg("name", name.into());
7270        query = query.arg("description", description.into());
7271        Env {
7272            proc: self.proc.clone(),
7273            selection: query,
7274            graphql_client: self.graphql_client.clone(),
7275        }
7276    }
7277    /// Installs the current module into the environment, exposing its functions to the model
7278    /// Contextual path arguments will be populated using the environment's workspace.
7279    pub fn with_current_module(&self) -> Env {
7280        let query = self.selection.select("withCurrentModule");
7281        Env {
7282            proc: self.proc.clone(),
7283            selection: query,
7284            graphql_client: self.graphql_client.clone(),
7285        }
7286    }
7287    /// Create or update a binding of type Directory in the environment
7288    ///
7289    /// # Arguments
7290    ///
7291    /// * `name` - The name of the binding
7292    /// * `value` - The Directory value to assign to the binding
7293    /// * `description` - The purpose of the input
7294    pub fn with_directory_input(
7295        &self,
7296        name: impl Into<String>,
7297        value: impl IntoID<DirectoryId>,
7298        description: impl Into<String>,
7299    ) -> Env {
7300        let mut query = self.selection.select("withDirectoryInput");
7301        query = query.arg("name", name.into());
7302        query = query.arg_lazy(
7303            "value",
7304            Box::new(move || {
7305                let value = value.clone();
7306                Box::pin(async move { value.into_id().await.unwrap().quote() })
7307            }),
7308        );
7309        query = query.arg("description", description.into());
7310        Env {
7311            proc: self.proc.clone(),
7312            selection: query,
7313            graphql_client: self.graphql_client.clone(),
7314        }
7315    }
7316    /// Declare a desired Directory output to be assigned in the environment
7317    ///
7318    /// # Arguments
7319    ///
7320    /// * `name` - The name of the binding
7321    /// * `description` - A description of the desired value of the binding
7322    pub fn with_directory_output(
7323        &self,
7324        name: impl Into<String>,
7325        description: impl Into<String>,
7326    ) -> Env {
7327        let mut query = self.selection.select("withDirectoryOutput");
7328        query = query.arg("name", name.into());
7329        query = query.arg("description", description.into());
7330        Env {
7331            proc: self.proc.clone(),
7332            selection: query,
7333            graphql_client: self.graphql_client.clone(),
7334        }
7335    }
7336    /// Create or update a binding of type EnvFile in the environment
7337    ///
7338    /// # Arguments
7339    ///
7340    /// * `name` - The name of the binding
7341    /// * `value` - The EnvFile value to assign to the binding
7342    /// * `description` - The purpose of the input
7343    pub fn with_env_file_input(
7344        &self,
7345        name: impl Into<String>,
7346        value: impl IntoID<EnvFileId>,
7347        description: impl Into<String>,
7348    ) -> Env {
7349        let mut query = self.selection.select("withEnvFileInput");
7350        query = query.arg("name", name.into());
7351        query = query.arg_lazy(
7352            "value",
7353            Box::new(move || {
7354                let value = value.clone();
7355                Box::pin(async move { value.into_id().await.unwrap().quote() })
7356            }),
7357        );
7358        query = query.arg("description", description.into());
7359        Env {
7360            proc: self.proc.clone(),
7361            selection: query,
7362            graphql_client: self.graphql_client.clone(),
7363        }
7364    }
7365    /// Declare a desired EnvFile output to be assigned in the environment
7366    ///
7367    /// # Arguments
7368    ///
7369    /// * `name` - The name of the binding
7370    /// * `description` - A description of the desired value of the binding
7371    pub fn with_env_file_output(
7372        &self,
7373        name: impl Into<String>,
7374        description: impl Into<String>,
7375    ) -> Env {
7376        let mut query = self.selection.select("withEnvFileOutput");
7377        query = query.arg("name", name.into());
7378        query = query.arg("description", description.into());
7379        Env {
7380            proc: self.proc.clone(),
7381            selection: query,
7382            graphql_client: self.graphql_client.clone(),
7383        }
7384    }
7385    /// Create or update a binding of type Env in the environment
7386    ///
7387    /// # Arguments
7388    ///
7389    /// * `name` - The name of the binding
7390    /// * `value` - The Env value to assign to the binding
7391    /// * `description` - The purpose of the input
7392    pub fn with_env_input(
7393        &self,
7394        name: impl Into<String>,
7395        value: impl IntoID<EnvId>,
7396        description: impl Into<String>,
7397    ) -> Env {
7398        let mut query = self.selection.select("withEnvInput");
7399        query = query.arg("name", name.into());
7400        query = query.arg_lazy(
7401            "value",
7402            Box::new(move || {
7403                let value = value.clone();
7404                Box::pin(async move { value.into_id().await.unwrap().quote() })
7405            }),
7406        );
7407        query = query.arg("description", description.into());
7408        Env {
7409            proc: self.proc.clone(),
7410            selection: query,
7411            graphql_client: self.graphql_client.clone(),
7412        }
7413    }
7414    /// Declare a desired Env output to be assigned in the environment
7415    ///
7416    /// # Arguments
7417    ///
7418    /// * `name` - The name of the binding
7419    /// * `description` - A description of the desired value of the binding
7420    pub fn with_env_output(&self, name: impl Into<String>, description: impl Into<String>) -> Env {
7421        let mut query = self.selection.select("withEnvOutput");
7422        query = query.arg("name", name.into());
7423        query = query.arg("description", description.into());
7424        Env {
7425            proc: self.proc.clone(),
7426            selection: query,
7427            graphql_client: self.graphql_client.clone(),
7428        }
7429    }
7430    /// Create or update a binding of type File in the environment
7431    ///
7432    /// # Arguments
7433    ///
7434    /// * `name` - The name of the binding
7435    /// * `value` - The File value to assign to the binding
7436    /// * `description` - The purpose of the input
7437    pub fn with_file_input(
7438        &self,
7439        name: impl Into<String>,
7440        value: impl IntoID<FileId>,
7441        description: impl Into<String>,
7442    ) -> Env {
7443        let mut query = self.selection.select("withFileInput");
7444        query = query.arg("name", name.into());
7445        query = query.arg_lazy(
7446            "value",
7447            Box::new(move || {
7448                let value = value.clone();
7449                Box::pin(async move { value.into_id().await.unwrap().quote() })
7450            }),
7451        );
7452        query = query.arg("description", description.into());
7453        Env {
7454            proc: self.proc.clone(),
7455            selection: query,
7456            graphql_client: self.graphql_client.clone(),
7457        }
7458    }
7459    /// Declare a desired File output to be assigned in the environment
7460    ///
7461    /// # Arguments
7462    ///
7463    /// * `name` - The name of the binding
7464    /// * `description` - A description of the desired value of the binding
7465    pub fn with_file_output(&self, name: impl Into<String>, description: impl Into<String>) -> Env {
7466        let mut query = self.selection.select("withFileOutput");
7467        query = query.arg("name", name.into());
7468        query = query.arg("description", description.into());
7469        Env {
7470            proc: self.proc.clone(),
7471            selection: query,
7472            graphql_client: self.graphql_client.clone(),
7473        }
7474    }
7475    /// Create or update a binding of type GeneratorGroup in the environment
7476    ///
7477    /// # Arguments
7478    ///
7479    /// * `name` - The name of the binding
7480    /// * `value` - The GeneratorGroup value to assign to the binding
7481    /// * `description` - The purpose of the input
7482    pub fn with_generator_group_input(
7483        &self,
7484        name: impl Into<String>,
7485        value: impl IntoID<GeneratorGroupId>,
7486        description: impl Into<String>,
7487    ) -> Env {
7488        let mut query = self.selection.select("withGeneratorGroupInput");
7489        query = query.arg("name", name.into());
7490        query = query.arg_lazy(
7491            "value",
7492            Box::new(move || {
7493                let value = value.clone();
7494                Box::pin(async move { value.into_id().await.unwrap().quote() })
7495            }),
7496        );
7497        query = query.arg("description", description.into());
7498        Env {
7499            proc: self.proc.clone(),
7500            selection: query,
7501            graphql_client: self.graphql_client.clone(),
7502        }
7503    }
7504    /// Declare a desired GeneratorGroup output to be assigned in the environment
7505    ///
7506    /// # Arguments
7507    ///
7508    /// * `name` - The name of the binding
7509    /// * `description` - A description of the desired value of the binding
7510    pub fn with_generator_group_output(
7511        &self,
7512        name: impl Into<String>,
7513        description: impl Into<String>,
7514    ) -> Env {
7515        let mut query = self.selection.select("withGeneratorGroupOutput");
7516        query = query.arg("name", name.into());
7517        query = query.arg("description", description.into());
7518        Env {
7519            proc: self.proc.clone(),
7520            selection: query,
7521            graphql_client: self.graphql_client.clone(),
7522        }
7523    }
7524    /// Create or update a binding of type Generator in the environment
7525    ///
7526    /// # Arguments
7527    ///
7528    /// * `name` - The name of the binding
7529    /// * `value` - The Generator value to assign to the binding
7530    /// * `description` - The purpose of the input
7531    pub fn with_generator_input(
7532        &self,
7533        name: impl Into<String>,
7534        value: impl IntoID<GeneratorId>,
7535        description: impl Into<String>,
7536    ) -> Env {
7537        let mut query = self.selection.select("withGeneratorInput");
7538        query = query.arg("name", name.into());
7539        query = query.arg_lazy(
7540            "value",
7541            Box::new(move || {
7542                let value = value.clone();
7543                Box::pin(async move { value.into_id().await.unwrap().quote() })
7544            }),
7545        );
7546        query = query.arg("description", description.into());
7547        Env {
7548            proc: self.proc.clone(),
7549            selection: query,
7550            graphql_client: self.graphql_client.clone(),
7551        }
7552    }
7553    /// Declare a desired Generator output to be assigned in the environment
7554    ///
7555    /// # Arguments
7556    ///
7557    /// * `name` - The name of the binding
7558    /// * `description` - A description of the desired value of the binding
7559    pub fn with_generator_output(
7560        &self,
7561        name: impl Into<String>,
7562        description: impl Into<String>,
7563    ) -> Env {
7564        let mut query = self.selection.select("withGeneratorOutput");
7565        query = query.arg("name", name.into());
7566        query = query.arg("description", description.into());
7567        Env {
7568            proc: self.proc.clone(),
7569            selection: query,
7570            graphql_client: self.graphql_client.clone(),
7571        }
7572    }
7573    /// Create or update a binding of type GitRef in the environment
7574    ///
7575    /// # Arguments
7576    ///
7577    /// * `name` - The name of the binding
7578    /// * `value` - The GitRef value to assign to the binding
7579    /// * `description` - The purpose of the input
7580    pub fn with_git_ref_input(
7581        &self,
7582        name: impl Into<String>,
7583        value: impl IntoID<GitRefId>,
7584        description: impl Into<String>,
7585    ) -> Env {
7586        let mut query = self.selection.select("withGitRefInput");
7587        query = query.arg("name", name.into());
7588        query = query.arg_lazy(
7589            "value",
7590            Box::new(move || {
7591                let value = value.clone();
7592                Box::pin(async move { value.into_id().await.unwrap().quote() })
7593            }),
7594        );
7595        query = query.arg("description", description.into());
7596        Env {
7597            proc: self.proc.clone(),
7598            selection: query,
7599            graphql_client: self.graphql_client.clone(),
7600        }
7601    }
7602    /// Declare a desired GitRef output to be assigned in the environment
7603    ///
7604    /// # Arguments
7605    ///
7606    /// * `name` - The name of the binding
7607    /// * `description` - A description of the desired value of the binding
7608    pub fn with_git_ref_output(
7609        &self,
7610        name: impl Into<String>,
7611        description: impl Into<String>,
7612    ) -> Env {
7613        let mut query = self.selection.select("withGitRefOutput");
7614        query = query.arg("name", name.into());
7615        query = query.arg("description", description.into());
7616        Env {
7617            proc: self.proc.clone(),
7618            selection: query,
7619            graphql_client: self.graphql_client.clone(),
7620        }
7621    }
7622    /// Create or update a binding of type GitRepository in the environment
7623    ///
7624    /// # Arguments
7625    ///
7626    /// * `name` - The name of the binding
7627    /// * `value` - The GitRepository value to assign to the binding
7628    /// * `description` - The purpose of the input
7629    pub fn with_git_repository_input(
7630        &self,
7631        name: impl Into<String>,
7632        value: impl IntoID<GitRepositoryId>,
7633        description: impl Into<String>,
7634    ) -> Env {
7635        let mut query = self.selection.select("withGitRepositoryInput");
7636        query = query.arg("name", name.into());
7637        query = query.arg_lazy(
7638            "value",
7639            Box::new(move || {
7640                let value = value.clone();
7641                Box::pin(async move { value.into_id().await.unwrap().quote() })
7642            }),
7643        );
7644        query = query.arg("description", description.into());
7645        Env {
7646            proc: self.proc.clone(),
7647            selection: query,
7648            graphql_client: self.graphql_client.clone(),
7649        }
7650    }
7651    /// Declare a desired GitRepository output to be assigned in the environment
7652    ///
7653    /// # Arguments
7654    ///
7655    /// * `name` - The name of the binding
7656    /// * `description` - A description of the desired value of the binding
7657    pub fn with_git_repository_output(
7658        &self,
7659        name: impl Into<String>,
7660        description: impl Into<String>,
7661    ) -> Env {
7662        let mut query = self.selection.select("withGitRepositoryOutput");
7663        query = query.arg("name", name.into());
7664        query = query.arg("description", description.into());
7665        Env {
7666            proc: self.proc.clone(),
7667            selection: query,
7668            graphql_client: self.graphql_client.clone(),
7669        }
7670    }
7671    /// Create or update a binding of type JSONValue in the environment
7672    ///
7673    /// # Arguments
7674    ///
7675    /// * `name` - The name of the binding
7676    /// * `value` - The JSONValue value to assign to the binding
7677    /// * `description` - The purpose of the input
7678    pub fn with_json_value_input(
7679        &self,
7680        name: impl Into<String>,
7681        value: impl IntoID<JsonValueId>,
7682        description: impl Into<String>,
7683    ) -> Env {
7684        let mut query = self.selection.select("withJSONValueInput");
7685        query = query.arg("name", name.into());
7686        query = query.arg_lazy(
7687            "value",
7688            Box::new(move || {
7689                let value = value.clone();
7690                Box::pin(async move { value.into_id().await.unwrap().quote() })
7691            }),
7692        );
7693        query = query.arg("description", description.into());
7694        Env {
7695            proc: self.proc.clone(),
7696            selection: query,
7697            graphql_client: self.graphql_client.clone(),
7698        }
7699    }
7700    /// Declare a desired JSONValue output to be assigned in the environment
7701    ///
7702    /// # Arguments
7703    ///
7704    /// * `name` - The name of the binding
7705    /// * `description` - A description of the desired value of the binding
7706    pub fn with_json_value_output(
7707        &self,
7708        name: impl Into<String>,
7709        description: impl Into<String>,
7710    ) -> Env {
7711        let mut query = self.selection.select("withJSONValueOutput");
7712        query = query.arg("name", name.into());
7713        query = query.arg("description", description.into());
7714        Env {
7715            proc: self.proc.clone(),
7716            selection: query,
7717            graphql_client: self.graphql_client.clone(),
7718        }
7719    }
7720    /// Sets the main module for this environment (the project being worked on)
7721    /// Contextual path arguments will be populated using the environment's workspace.
7722    pub fn with_main_module(&self, module: impl IntoID<ModuleId>) -> Env {
7723        let mut query = self.selection.select("withMainModule");
7724        query = query.arg_lazy(
7725            "module",
7726            Box::new(move || {
7727                let module = module.clone();
7728                Box::pin(async move { module.into_id().await.unwrap().quote() })
7729            }),
7730        );
7731        Env {
7732            proc: self.proc.clone(),
7733            selection: query,
7734            graphql_client: self.graphql_client.clone(),
7735        }
7736    }
7737    /// Installs a module into the environment, exposing its functions to the model
7738    /// Contextual path arguments will be populated using the environment's workspace.
7739    pub fn with_module(&self, module: impl IntoID<ModuleId>) -> Env {
7740        let mut query = self.selection.select("withModule");
7741        query = query.arg_lazy(
7742            "module",
7743            Box::new(move || {
7744                let module = module.clone();
7745                Box::pin(async move { module.into_id().await.unwrap().quote() })
7746            }),
7747        );
7748        Env {
7749            proc: self.proc.clone(),
7750            selection: query,
7751            graphql_client: self.graphql_client.clone(),
7752        }
7753    }
7754    /// Create or update a binding of type ModuleConfigClient in the environment
7755    ///
7756    /// # Arguments
7757    ///
7758    /// * `name` - The name of the binding
7759    /// * `value` - The ModuleConfigClient value to assign to the binding
7760    /// * `description` - The purpose of the input
7761    pub fn with_module_config_client_input(
7762        &self,
7763        name: impl Into<String>,
7764        value: impl IntoID<ModuleConfigClientId>,
7765        description: impl Into<String>,
7766    ) -> Env {
7767        let mut query = self.selection.select("withModuleConfigClientInput");
7768        query = query.arg("name", name.into());
7769        query = query.arg_lazy(
7770            "value",
7771            Box::new(move || {
7772                let value = value.clone();
7773                Box::pin(async move { value.into_id().await.unwrap().quote() })
7774            }),
7775        );
7776        query = query.arg("description", description.into());
7777        Env {
7778            proc: self.proc.clone(),
7779            selection: query,
7780            graphql_client: self.graphql_client.clone(),
7781        }
7782    }
7783    /// Declare a desired ModuleConfigClient output to be assigned in the environment
7784    ///
7785    /// # Arguments
7786    ///
7787    /// * `name` - The name of the binding
7788    /// * `description` - A description of the desired value of the binding
7789    pub fn with_module_config_client_output(
7790        &self,
7791        name: impl Into<String>,
7792        description: impl Into<String>,
7793    ) -> Env {
7794        let mut query = self.selection.select("withModuleConfigClientOutput");
7795        query = query.arg("name", name.into());
7796        query = query.arg("description", description.into());
7797        Env {
7798            proc: self.proc.clone(),
7799            selection: query,
7800            graphql_client: self.graphql_client.clone(),
7801        }
7802    }
7803    /// Create or update a binding of type Module in the environment
7804    ///
7805    /// # Arguments
7806    ///
7807    /// * `name` - The name of the binding
7808    /// * `value` - The Module value to assign to the binding
7809    /// * `description` - The purpose of the input
7810    pub fn with_module_input(
7811        &self,
7812        name: impl Into<String>,
7813        value: impl IntoID<ModuleId>,
7814        description: impl Into<String>,
7815    ) -> Env {
7816        let mut query = self.selection.select("withModuleInput");
7817        query = query.arg("name", name.into());
7818        query = query.arg_lazy(
7819            "value",
7820            Box::new(move || {
7821                let value = value.clone();
7822                Box::pin(async move { value.into_id().await.unwrap().quote() })
7823            }),
7824        );
7825        query = query.arg("description", description.into());
7826        Env {
7827            proc: self.proc.clone(),
7828            selection: query,
7829            graphql_client: self.graphql_client.clone(),
7830        }
7831    }
7832    /// Declare a desired Module output to be assigned in the environment
7833    ///
7834    /// # Arguments
7835    ///
7836    /// * `name` - The name of the binding
7837    /// * `description` - A description of the desired value of the binding
7838    pub fn with_module_output(
7839        &self,
7840        name: impl Into<String>,
7841        description: impl Into<String>,
7842    ) -> Env {
7843        let mut query = self.selection.select("withModuleOutput");
7844        query = query.arg("name", name.into());
7845        query = query.arg("description", description.into());
7846        Env {
7847            proc: self.proc.clone(),
7848            selection: query,
7849            graphql_client: self.graphql_client.clone(),
7850        }
7851    }
7852    /// Create or update a binding of type ModuleSource in the environment
7853    ///
7854    /// # Arguments
7855    ///
7856    /// * `name` - The name of the binding
7857    /// * `value` - The ModuleSource value to assign to the binding
7858    /// * `description` - The purpose of the input
7859    pub fn with_module_source_input(
7860        &self,
7861        name: impl Into<String>,
7862        value: impl IntoID<ModuleSourceId>,
7863        description: impl Into<String>,
7864    ) -> Env {
7865        let mut query = self.selection.select("withModuleSourceInput");
7866        query = query.arg("name", name.into());
7867        query = query.arg_lazy(
7868            "value",
7869            Box::new(move || {
7870                let value = value.clone();
7871                Box::pin(async move { value.into_id().await.unwrap().quote() })
7872            }),
7873        );
7874        query = query.arg("description", description.into());
7875        Env {
7876            proc: self.proc.clone(),
7877            selection: query,
7878            graphql_client: self.graphql_client.clone(),
7879        }
7880    }
7881    /// Declare a desired ModuleSource output to be assigned in the environment
7882    ///
7883    /// # Arguments
7884    ///
7885    /// * `name` - The name of the binding
7886    /// * `description` - A description of the desired value of the binding
7887    pub fn with_module_source_output(
7888        &self,
7889        name: impl Into<String>,
7890        description: impl Into<String>,
7891    ) -> Env {
7892        let mut query = self.selection.select("withModuleSourceOutput");
7893        query = query.arg("name", name.into());
7894        query = query.arg("description", description.into());
7895        Env {
7896            proc: self.proc.clone(),
7897            selection: query,
7898            graphql_client: self.graphql_client.clone(),
7899        }
7900    }
7901    /// Create or update a binding of type SearchResult in the environment
7902    ///
7903    /// # Arguments
7904    ///
7905    /// * `name` - The name of the binding
7906    /// * `value` - The SearchResult value to assign to the binding
7907    /// * `description` - The purpose of the input
7908    pub fn with_search_result_input(
7909        &self,
7910        name: impl Into<String>,
7911        value: impl IntoID<SearchResultId>,
7912        description: impl Into<String>,
7913    ) -> Env {
7914        let mut query = self.selection.select("withSearchResultInput");
7915        query = query.arg("name", name.into());
7916        query = query.arg_lazy(
7917            "value",
7918            Box::new(move || {
7919                let value = value.clone();
7920                Box::pin(async move { value.into_id().await.unwrap().quote() })
7921            }),
7922        );
7923        query = query.arg("description", description.into());
7924        Env {
7925            proc: self.proc.clone(),
7926            selection: query,
7927            graphql_client: self.graphql_client.clone(),
7928        }
7929    }
7930    /// Declare a desired SearchResult output to be assigned in the environment
7931    ///
7932    /// # Arguments
7933    ///
7934    /// * `name` - The name of the binding
7935    /// * `description` - A description of the desired value of the binding
7936    pub fn with_search_result_output(
7937        &self,
7938        name: impl Into<String>,
7939        description: impl Into<String>,
7940    ) -> Env {
7941        let mut query = self.selection.select("withSearchResultOutput");
7942        query = query.arg("name", name.into());
7943        query = query.arg("description", description.into());
7944        Env {
7945            proc: self.proc.clone(),
7946            selection: query,
7947            graphql_client: self.graphql_client.clone(),
7948        }
7949    }
7950    /// Create or update a binding of type SearchSubmatch in the environment
7951    ///
7952    /// # Arguments
7953    ///
7954    /// * `name` - The name of the binding
7955    /// * `value` - The SearchSubmatch value to assign to the binding
7956    /// * `description` - The purpose of the input
7957    pub fn with_search_submatch_input(
7958        &self,
7959        name: impl Into<String>,
7960        value: impl IntoID<SearchSubmatchId>,
7961        description: impl Into<String>,
7962    ) -> Env {
7963        let mut query = self.selection.select("withSearchSubmatchInput");
7964        query = query.arg("name", name.into());
7965        query = query.arg_lazy(
7966            "value",
7967            Box::new(move || {
7968                let value = value.clone();
7969                Box::pin(async move { value.into_id().await.unwrap().quote() })
7970            }),
7971        );
7972        query = query.arg("description", description.into());
7973        Env {
7974            proc: self.proc.clone(),
7975            selection: query,
7976            graphql_client: self.graphql_client.clone(),
7977        }
7978    }
7979    /// Declare a desired SearchSubmatch output to be assigned in the environment
7980    ///
7981    /// # Arguments
7982    ///
7983    /// * `name` - The name of the binding
7984    /// * `description` - A description of the desired value of the binding
7985    pub fn with_search_submatch_output(
7986        &self,
7987        name: impl Into<String>,
7988        description: impl Into<String>,
7989    ) -> Env {
7990        let mut query = self.selection.select("withSearchSubmatchOutput");
7991        query = query.arg("name", name.into());
7992        query = query.arg("description", description.into());
7993        Env {
7994            proc: self.proc.clone(),
7995            selection: query,
7996            graphql_client: self.graphql_client.clone(),
7997        }
7998    }
7999    /// Create or update a binding of type Secret in the environment
8000    ///
8001    /// # Arguments
8002    ///
8003    /// * `name` - The name of the binding
8004    /// * `value` - The Secret value to assign to the binding
8005    /// * `description` - The purpose of the input
8006    pub fn with_secret_input(
8007        &self,
8008        name: impl Into<String>,
8009        value: impl IntoID<SecretId>,
8010        description: impl Into<String>,
8011    ) -> Env {
8012        let mut query = self.selection.select("withSecretInput");
8013        query = query.arg("name", name.into());
8014        query = query.arg_lazy(
8015            "value",
8016            Box::new(move || {
8017                let value = value.clone();
8018                Box::pin(async move { value.into_id().await.unwrap().quote() })
8019            }),
8020        );
8021        query = query.arg("description", description.into());
8022        Env {
8023            proc: self.proc.clone(),
8024            selection: query,
8025            graphql_client: self.graphql_client.clone(),
8026        }
8027    }
8028    /// Declare a desired Secret output to be assigned in the environment
8029    ///
8030    /// # Arguments
8031    ///
8032    /// * `name` - The name of the binding
8033    /// * `description` - A description of the desired value of the binding
8034    pub fn with_secret_output(
8035        &self,
8036        name: impl Into<String>,
8037        description: impl Into<String>,
8038    ) -> Env {
8039        let mut query = self.selection.select("withSecretOutput");
8040        query = query.arg("name", name.into());
8041        query = query.arg("description", description.into());
8042        Env {
8043            proc: self.proc.clone(),
8044            selection: query,
8045            graphql_client: self.graphql_client.clone(),
8046        }
8047    }
8048    /// Create or update a binding of type Service in the environment
8049    ///
8050    /// # Arguments
8051    ///
8052    /// * `name` - The name of the binding
8053    /// * `value` - The Service value to assign to the binding
8054    /// * `description` - The purpose of the input
8055    pub fn with_service_input(
8056        &self,
8057        name: impl Into<String>,
8058        value: impl IntoID<ServiceId>,
8059        description: impl Into<String>,
8060    ) -> Env {
8061        let mut query = self.selection.select("withServiceInput");
8062        query = query.arg("name", name.into());
8063        query = query.arg_lazy(
8064            "value",
8065            Box::new(move || {
8066                let value = value.clone();
8067                Box::pin(async move { value.into_id().await.unwrap().quote() })
8068            }),
8069        );
8070        query = query.arg("description", description.into());
8071        Env {
8072            proc: self.proc.clone(),
8073            selection: query,
8074            graphql_client: self.graphql_client.clone(),
8075        }
8076    }
8077    /// Declare a desired Service output to be assigned in the environment
8078    ///
8079    /// # Arguments
8080    ///
8081    /// * `name` - The name of the binding
8082    /// * `description` - A description of the desired value of the binding
8083    pub fn with_service_output(
8084        &self,
8085        name: impl Into<String>,
8086        description: impl Into<String>,
8087    ) -> Env {
8088        let mut query = self.selection.select("withServiceOutput");
8089        query = query.arg("name", name.into());
8090        query = query.arg("description", description.into());
8091        Env {
8092            proc: self.proc.clone(),
8093            selection: query,
8094            graphql_client: self.graphql_client.clone(),
8095        }
8096    }
8097    /// Create or update a binding of type Socket in the environment
8098    ///
8099    /// # Arguments
8100    ///
8101    /// * `name` - The name of the binding
8102    /// * `value` - The Socket value to assign to the binding
8103    /// * `description` - The purpose of the input
8104    pub fn with_socket_input(
8105        &self,
8106        name: impl Into<String>,
8107        value: impl IntoID<SocketId>,
8108        description: impl Into<String>,
8109    ) -> Env {
8110        let mut query = self.selection.select("withSocketInput");
8111        query = query.arg("name", name.into());
8112        query = query.arg_lazy(
8113            "value",
8114            Box::new(move || {
8115                let value = value.clone();
8116                Box::pin(async move { value.into_id().await.unwrap().quote() })
8117            }),
8118        );
8119        query = query.arg("description", description.into());
8120        Env {
8121            proc: self.proc.clone(),
8122            selection: query,
8123            graphql_client: self.graphql_client.clone(),
8124        }
8125    }
8126    /// Declare a desired Socket output to be assigned in the environment
8127    ///
8128    /// # Arguments
8129    ///
8130    /// * `name` - The name of the binding
8131    /// * `description` - A description of the desired value of the binding
8132    pub fn with_socket_output(
8133        &self,
8134        name: impl Into<String>,
8135        description: impl Into<String>,
8136    ) -> Env {
8137        let mut query = self.selection.select("withSocketOutput");
8138        query = query.arg("name", name.into());
8139        query = query.arg("description", description.into());
8140        Env {
8141            proc: self.proc.clone(),
8142            selection: query,
8143            graphql_client: self.graphql_client.clone(),
8144        }
8145    }
8146    /// Create or update a binding of type Stat in the environment
8147    ///
8148    /// # Arguments
8149    ///
8150    /// * `name` - The name of the binding
8151    /// * `value` - The Stat value to assign to the binding
8152    /// * `description` - The purpose of the input
8153    pub fn with_stat_input(
8154        &self,
8155        name: impl Into<String>,
8156        value: impl IntoID<StatId>,
8157        description: impl Into<String>,
8158    ) -> Env {
8159        let mut query = self.selection.select("withStatInput");
8160        query = query.arg("name", name.into());
8161        query = query.arg_lazy(
8162            "value",
8163            Box::new(move || {
8164                let value = value.clone();
8165                Box::pin(async move { value.into_id().await.unwrap().quote() })
8166            }),
8167        );
8168        query = query.arg("description", description.into());
8169        Env {
8170            proc: self.proc.clone(),
8171            selection: query,
8172            graphql_client: self.graphql_client.clone(),
8173        }
8174    }
8175    /// Declare a desired Stat output to be assigned in the environment
8176    ///
8177    /// # Arguments
8178    ///
8179    /// * `name` - The name of the binding
8180    /// * `description` - A description of the desired value of the binding
8181    pub fn with_stat_output(&self, name: impl Into<String>, description: impl Into<String>) -> Env {
8182        let mut query = self.selection.select("withStatOutput");
8183        query = query.arg("name", name.into());
8184        query = query.arg("description", description.into());
8185        Env {
8186            proc: self.proc.clone(),
8187            selection: query,
8188            graphql_client: self.graphql_client.clone(),
8189        }
8190    }
8191    /// Provides a string input binding to the environment
8192    ///
8193    /// # Arguments
8194    ///
8195    /// * `name` - The name of the binding
8196    /// * `value` - The string value to assign to the binding
8197    /// * `description` - The description of the input
8198    pub fn with_string_input(
8199        &self,
8200        name: impl Into<String>,
8201        value: impl Into<String>,
8202        description: impl Into<String>,
8203    ) -> Env {
8204        let mut query = self.selection.select("withStringInput");
8205        query = query.arg("name", name.into());
8206        query = query.arg("value", value.into());
8207        query = query.arg("description", description.into());
8208        Env {
8209            proc: self.proc.clone(),
8210            selection: query,
8211            graphql_client: self.graphql_client.clone(),
8212        }
8213    }
8214    /// Declares a desired string output binding
8215    ///
8216    /// # Arguments
8217    ///
8218    /// * `name` - The name of the binding
8219    /// * `description` - The description of the output
8220    pub fn with_string_output(
8221        &self,
8222        name: impl Into<String>,
8223        description: impl Into<String>,
8224    ) -> Env {
8225        let mut query = self.selection.select("withStringOutput");
8226        query = query.arg("name", name.into());
8227        query = query.arg("description", description.into());
8228        Env {
8229            proc: self.proc.clone(),
8230            selection: query,
8231            graphql_client: self.graphql_client.clone(),
8232        }
8233    }
8234    /// Returns a new environment with the provided workspace
8235    ///
8236    /// # Arguments
8237    ///
8238    /// * `workspace` - The directory to set as the host filesystem
8239    pub fn with_workspace(&self, workspace: impl IntoID<DirectoryId>) -> Env {
8240        let mut query = self.selection.select("withWorkspace");
8241        query = query.arg_lazy(
8242            "workspace",
8243            Box::new(move || {
8244                let workspace = workspace.clone();
8245                Box::pin(async move { workspace.into_id().await.unwrap().quote() })
8246            }),
8247        );
8248        Env {
8249            proc: self.proc.clone(),
8250            selection: query,
8251            graphql_client: self.graphql_client.clone(),
8252        }
8253    }
8254    /// Returns a new environment without any outputs
8255    pub fn without_outputs(&self) -> Env {
8256        let query = self.selection.select("withoutOutputs");
8257        Env {
8258            proc: self.proc.clone(),
8259            selection: query,
8260            graphql_client: self.graphql_client.clone(),
8261        }
8262    }
8263    pub fn workspace(&self) -> Directory {
8264        let query = self.selection.select("workspace");
8265        Directory {
8266            proc: self.proc.clone(),
8267            selection: query,
8268            graphql_client: self.graphql_client.clone(),
8269        }
8270    }
8271}
8272#[derive(Clone)]
8273pub struct EnvFile {
8274    pub proc: Option<Arc<DaggerSessionProc>>,
8275    pub selection: Selection,
8276    pub graphql_client: DynGraphQLClient,
8277}
8278#[derive(Builder, Debug, PartialEq)]
8279pub struct EnvFileGetOpts {
8280    /// Return the value exactly as written to the file. No quote removal or variable expansion
8281    #[builder(setter(into, strip_option), default)]
8282    pub raw: Option<bool>,
8283}
8284#[derive(Builder, Debug, PartialEq)]
8285pub struct EnvFileVariablesOpts {
8286    /// Return values exactly as written to the file. No quote removal or variable expansion
8287    #[builder(setter(into, strip_option), default)]
8288    pub raw: Option<bool>,
8289}
8290impl EnvFile {
8291    /// Return as a file
8292    pub fn as_file(&self) -> File {
8293        let query = self.selection.select("asFile");
8294        File {
8295            proc: self.proc.clone(),
8296            selection: query,
8297            graphql_client: self.graphql_client.clone(),
8298        }
8299    }
8300    /// Check if a variable exists
8301    ///
8302    /// # Arguments
8303    ///
8304    /// * `name` - Variable name
8305    pub async fn exists(&self, name: impl Into<String>) -> Result<bool, DaggerError> {
8306        let mut query = self.selection.select("exists");
8307        query = query.arg("name", name.into());
8308        query.execute(self.graphql_client.clone()).await
8309    }
8310    /// Lookup a variable (last occurrence wins) and return its value, or an empty string
8311    ///
8312    /// # Arguments
8313    ///
8314    /// * `name` - Variable name
8315    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8316    pub async fn get(&self, name: impl Into<String>) -> Result<String, DaggerError> {
8317        let mut query = self.selection.select("get");
8318        query = query.arg("name", name.into());
8319        query.execute(self.graphql_client.clone()).await
8320    }
8321    /// Lookup a variable (last occurrence wins) and return its value, or an empty string
8322    ///
8323    /// # Arguments
8324    ///
8325    /// * `name` - Variable name
8326    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8327    pub async fn get_opts(
8328        &self,
8329        name: impl Into<String>,
8330        opts: EnvFileGetOpts,
8331    ) -> Result<String, DaggerError> {
8332        let mut query = self.selection.select("get");
8333        query = query.arg("name", name.into());
8334        if let Some(raw) = opts.raw {
8335            query = query.arg("raw", raw);
8336        }
8337        query.execute(self.graphql_client.clone()).await
8338    }
8339    /// A unique identifier for this EnvFile.
8340    pub async fn id(&self) -> Result<EnvFileId, DaggerError> {
8341        let query = self.selection.select("id");
8342        query.execute(self.graphql_client.clone()).await
8343    }
8344    /// 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
8345    ///
8346    /// # Arguments
8347    ///
8348    /// * `prefix` - The prefix to filter by
8349    pub fn namespace(&self, prefix: impl Into<String>) -> EnvFile {
8350        let mut query = self.selection.select("namespace");
8351        query = query.arg("prefix", prefix.into());
8352        EnvFile {
8353            proc: self.proc.clone(),
8354            selection: query,
8355            graphql_client: self.graphql_client.clone(),
8356        }
8357    }
8358    /// Return all variables
8359    ///
8360    /// # Arguments
8361    ///
8362    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8363    pub fn variables(&self) -> Vec<EnvVariable> {
8364        let query = self.selection.select("variables");
8365        vec![EnvVariable {
8366            proc: self.proc.clone(),
8367            selection: query,
8368            graphql_client: self.graphql_client.clone(),
8369        }]
8370    }
8371    /// Return all variables
8372    ///
8373    /// # Arguments
8374    ///
8375    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8376    pub fn variables_opts(&self, opts: EnvFileVariablesOpts) -> Vec<EnvVariable> {
8377        let mut query = self.selection.select("variables");
8378        if let Some(raw) = opts.raw {
8379            query = query.arg("raw", raw);
8380        }
8381        vec![EnvVariable {
8382            proc: self.proc.clone(),
8383            selection: query,
8384            graphql_client: self.graphql_client.clone(),
8385        }]
8386    }
8387    /// Add a variable
8388    ///
8389    /// # Arguments
8390    ///
8391    /// * `name` - Variable name
8392    /// * `value` - Variable value
8393    pub fn with_variable(&self, name: impl Into<String>, value: impl Into<String>) -> EnvFile {
8394        let mut query = self.selection.select("withVariable");
8395        query = query.arg("name", name.into());
8396        query = query.arg("value", value.into());
8397        EnvFile {
8398            proc: self.proc.clone(),
8399            selection: query,
8400            graphql_client: self.graphql_client.clone(),
8401        }
8402    }
8403    /// Remove all occurrences of the named variable
8404    ///
8405    /// # Arguments
8406    ///
8407    /// * `name` - Variable name
8408    pub fn without_variable(&self, name: impl Into<String>) -> EnvFile {
8409        let mut query = self.selection.select("withoutVariable");
8410        query = query.arg("name", name.into());
8411        EnvFile {
8412            proc: self.proc.clone(),
8413            selection: query,
8414            graphql_client: self.graphql_client.clone(),
8415        }
8416    }
8417}
8418#[derive(Clone)]
8419pub struct EnvVariable {
8420    pub proc: Option<Arc<DaggerSessionProc>>,
8421    pub selection: Selection,
8422    pub graphql_client: DynGraphQLClient,
8423}
8424impl EnvVariable {
8425    /// A unique identifier for this EnvVariable.
8426    pub async fn id(&self) -> Result<EnvVariableId, DaggerError> {
8427        let query = self.selection.select("id");
8428        query.execute(self.graphql_client.clone()).await
8429    }
8430    /// The environment variable name.
8431    pub async fn name(&self) -> Result<String, DaggerError> {
8432        let query = self.selection.select("name");
8433        query.execute(self.graphql_client.clone()).await
8434    }
8435    /// The environment variable value.
8436    pub async fn value(&self) -> Result<String, DaggerError> {
8437        let query = self.selection.select("value");
8438        query.execute(self.graphql_client.clone()).await
8439    }
8440}
8441#[derive(Clone)]
8442pub struct Error {
8443    pub proc: Option<Arc<DaggerSessionProc>>,
8444    pub selection: Selection,
8445    pub graphql_client: DynGraphQLClient,
8446}
8447impl Error {
8448    /// A unique identifier for this Error.
8449    pub async fn id(&self) -> Result<ErrorId, DaggerError> {
8450        let query = self.selection.select("id");
8451        query.execute(self.graphql_client.clone()).await
8452    }
8453    /// A description of the error.
8454    pub async fn message(&self) -> Result<String, DaggerError> {
8455        let query = self.selection.select("message");
8456        query.execute(self.graphql_client.clone()).await
8457    }
8458    /// The extensions of the error.
8459    pub fn values(&self) -> Vec<ErrorValue> {
8460        let query = self.selection.select("values");
8461        vec![ErrorValue {
8462            proc: self.proc.clone(),
8463            selection: query,
8464            graphql_client: self.graphql_client.clone(),
8465        }]
8466    }
8467    /// Add a value to the error.
8468    ///
8469    /// # Arguments
8470    ///
8471    /// * `name` - The name of the value.
8472    /// * `value` - The value to store on the error.
8473    pub fn with_value(&self, name: impl Into<String>, value: Json) -> Error {
8474        let mut query = self.selection.select("withValue");
8475        query = query.arg("name", name.into());
8476        query = query.arg("value", value);
8477        Error {
8478            proc: self.proc.clone(),
8479            selection: query,
8480            graphql_client: self.graphql_client.clone(),
8481        }
8482    }
8483}
8484#[derive(Clone)]
8485pub struct ErrorValue {
8486    pub proc: Option<Arc<DaggerSessionProc>>,
8487    pub selection: Selection,
8488    pub graphql_client: DynGraphQLClient,
8489}
8490impl ErrorValue {
8491    /// A unique identifier for this ErrorValue.
8492    pub async fn id(&self) -> Result<ErrorValueId, DaggerError> {
8493        let query = self.selection.select("id");
8494        query.execute(self.graphql_client.clone()).await
8495    }
8496    /// The name of the value.
8497    pub async fn name(&self) -> Result<String, DaggerError> {
8498        let query = self.selection.select("name");
8499        query.execute(self.graphql_client.clone()).await
8500    }
8501    /// The value.
8502    pub async fn value(&self) -> Result<Json, DaggerError> {
8503        let query = self.selection.select("value");
8504        query.execute(self.graphql_client.clone()).await
8505    }
8506}
8507#[derive(Clone)]
8508pub struct FieldTypeDef {
8509    pub proc: Option<Arc<DaggerSessionProc>>,
8510    pub selection: Selection,
8511    pub graphql_client: DynGraphQLClient,
8512}
8513impl FieldTypeDef {
8514    /// The reason this enum member is deprecated, if any.
8515    pub async fn deprecated(&self) -> Result<String, DaggerError> {
8516        let query = self.selection.select("deprecated");
8517        query.execute(self.graphql_client.clone()).await
8518    }
8519    /// A doc string for the field, if any.
8520    pub async fn description(&self) -> Result<String, DaggerError> {
8521        let query = self.selection.select("description");
8522        query.execute(self.graphql_client.clone()).await
8523    }
8524    /// A unique identifier for this FieldTypeDef.
8525    pub async fn id(&self) -> Result<FieldTypeDefId, DaggerError> {
8526        let query = self.selection.select("id");
8527        query.execute(self.graphql_client.clone()).await
8528    }
8529    /// The name of the field in lowerCamelCase format.
8530    pub async fn name(&self) -> Result<String, DaggerError> {
8531        let query = self.selection.select("name");
8532        query.execute(self.graphql_client.clone()).await
8533    }
8534    /// The location of this field declaration.
8535    pub fn source_map(&self) -> SourceMap {
8536        let query = self.selection.select("sourceMap");
8537        SourceMap {
8538            proc: self.proc.clone(),
8539            selection: query,
8540            graphql_client: self.graphql_client.clone(),
8541        }
8542    }
8543    /// The type of the field.
8544    pub fn type_def(&self) -> TypeDef {
8545        let query = self.selection.select("typeDef");
8546        TypeDef {
8547            proc: self.proc.clone(),
8548            selection: query,
8549            graphql_client: self.graphql_client.clone(),
8550        }
8551    }
8552}
8553#[derive(Clone)]
8554pub struct File {
8555    pub proc: Option<Arc<DaggerSessionProc>>,
8556    pub selection: Selection,
8557    pub graphql_client: DynGraphQLClient,
8558}
8559#[derive(Builder, Debug, PartialEq)]
8560pub struct FileAsEnvFileOpts {
8561    /// Replace "${VAR}" or "$VAR" with the value of other vars
8562    #[builder(setter(into, strip_option), default)]
8563    pub expand: Option<bool>,
8564}
8565#[derive(Builder, Debug, PartialEq)]
8566pub struct FileContentsOpts {
8567    /// Maximum number of lines to read
8568    #[builder(setter(into, strip_option), default)]
8569    pub limit_lines: Option<isize>,
8570    /// Start reading after this line
8571    #[builder(setter(into, strip_option), default)]
8572    pub offset_lines: Option<isize>,
8573}
8574#[derive(Builder, Debug, PartialEq)]
8575pub struct FileDigestOpts {
8576    /// If true, exclude metadata from the digest.
8577    #[builder(setter(into, strip_option), default)]
8578    pub exclude_metadata: Option<bool>,
8579}
8580#[derive(Builder, Debug, PartialEq)]
8581pub struct FileExportOpts {
8582    /// If allowParentDirPath is true, the path argument can be a directory path, in which case the file will be created in that directory.
8583    #[builder(setter(into, strip_option), default)]
8584    pub allow_parent_dir_path: Option<bool>,
8585}
8586#[derive(Builder, Debug, PartialEq)]
8587pub struct FileSearchOpts<'a> {
8588    /// Allow the . pattern to match newlines in multiline mode.
8589    #[builder(setter(into, strip_option), default)]
8590    pub dotall: Option<bool>,
8591    /// Only return matching files, not lines and content
8592    #[builder(setter(into, strip_option), default)]
8593    pub files_only: Option<bool>,
8594    #[builder(setter(into, strip_option), default)]
8595    pub globs: Option<Vec<&'a str>>,
8596    /// Enable case-insensitive matching.
8597    #[builder(setter(into, strip_option), default)]
8598    pub insensitive: Option<bool>,
8599    /// Limit the number of results to return
8600    #[builder(setter(into, strip_option), default)]
8601    pub limit: Option<isize>,
8602    /// Interpret the pattern as a literal string instead of a regular expression.
8603    #[builder(setter(into, strip_option), default)]
8604    pub literal: Option<bool>,
8605    /// Enable searching across multiple lines.
8606    #[builder(setter(into, strip_option), default)]
8607    pub multiline: Option<bool>,
8608    #[builder(setter(into, strip_option), default)]
8609    pub paths: Option<Vec<&'a str>>,
8610    /// Skip hidden files (files starting with .).
8611    #[builder(setter(into, strip_option), default)]
8612    pub skip_hidden: Option<bool>,
8613    /// Honor .gitignore, .ignore, and .rgignore files.
8614    #[builder(setter(into, strip_option), default)]
8615    pub skip_ignored: Option<bool>,
8616}
8617#[derive(Builder, Debug, PartialEq)]
8618pub struct FileWithReplacedOpts {
8619    /// Replace all occurrences of the pattern.
8620    #[builder(setter(into, strip_option), default)]
8621    pub all: Option<bool>,
8622    /// Replace the first match starting from the specified line.
8623    #[builder(setter(into, strip_option), default)]
8624    pub first_from: Option<isize>,
8625}
8626impl File {
8627    /// Parse as an env file
8628    ///
8629    /// # Arguments
8630    ///
8631    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8632    pub fn as_env_file(&self) -> EnvFile {
8633        let query = self.selection.select("asEnvFile");
8634        EnvFile {
8635            proc: self.proc.clone(),
8636            selection: query,
8637            graphql_client: self.graphql_client.clone(),
8638        }
8639    }
8640    /// Parse as an env file
8641    ///
8642    /// # Arguments
8643    ///
8644    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8645    pub fn as_env_file_opts(&self, opts: FileAsEnvFileOpts) -> EnvFile {
8646        let mut query = self.selection.select("asEnvFile");
8647        if let Some(expand) = opts.expand {
8648            query = query.arg("expand", expand);
8649        }
8650        EnvFile {
8651            proc: self.proc.clone(),
8652            selection: query,
8653            graphql_client: self.graphql_client.clone(),
8654        }
8655    }
8656    /// Parse the file contents as JSON.
8657    pub fn as_json(&self) -> JsonValue {
8658        let query = self.selection.select("asJSON");
8659        JsonValue {
8660            proc: self.proc.clone(),
8661            selection: query,
8662            graphql_client: self.graphql_client.clone(),
8663        }
8664    }
8665    /// Change the owner of the file recursively.
8666    ///
8667    /// # Arguments
8668    ///
8669    /// * `owner` - A user:group to set for the file.
8670    ///
8671    /// The user and group must be an ID (1000:1000), not a name (foo:bar).
8672    ///
8673    /// If the group is omitted, it defaults to the same as the user.
8674    pub fn chown(&self, owner: impl Into<String>) -> File {
8675        let mut query = self.selection.select("chown");
8676        query = query.arg("owner", owner.into());
8677        File {
8678            proc: self.proc.clone(),
8679            selection: query,
8680            graphql_client: self.graphql_client.clone(),
8681        }
8682    }
8683    /// Retrieves the contents of the file.
8684    ///
8685    /// # Arguments
8686    ///
8687    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8688    pub async fn contents(&self) -> Result<String, DaggerError> {
8689        let query = self.selection.select("contents");
8690        query.execute(self.graphql_client.clone()).await
8691    }
8692    /// Retrieves the contents of the file.
8693    ///
8694    /// # Arguments
8695    ///
8696    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8697    pub async fn contents_opts(&self, opts: FileContentsOpts) -> Result<String, DaggerError> {
8698        let mut query = self.selection.select("contents");
8699        if let Some(offset_lines) = opts.offset_lines {
8700            query = query.arg("offsetLines", offset_lines);
8701        }
8702        if let Some(limit_lines) = opts.limit_lines {
8703            query = query.arg("limitLines", limit_lines);
8704        }
8705        query.execute(self.graphql_client.clone()).await
8706    }
8707    /// 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.
8708    ///
8709    /// # Arguments
8710    ///
8711    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8712    pub async fn digest(&self) -> Result<String, DaggerError> {
8713        let query = self.selection.select("digest");
8714        query.execute(self.graphql_client.clone()).await
8715    }
8716    /// 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.
8717    ///
8718    /// # Arguments
8719    ///
8720    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8721    pub async fn digest_opts(&self, opts: FileDigestOpts) -> Result<String, DaggerError> {
8722        let mut query = self.selection.select("digest");
8723        if let Some(exclude_metadata) = opts.exclude_metadata {
8724            query = query.arg("excludeMetadata", exclude_metadata);
8725        }
8726        query.execute(self.graphql_client.clone()).await
8727    }
8728    /// Writes the file to a file path on the host.
8729    ///
8730    /// # Arguments
8731    ///
8732    /// * `path` - Location of the written directory (e.g., "output.txt").
8733    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8734    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
8735        let mut query = self.selection.select("export");
8736        query = query.arg("path", path.into());
8737        query.execute(self.graphql_client.clone()).await
8738    }
8739    /// Writes the file to a file path on the host.
8740    ///
8741    /// # Arguments
8742    ///
8743    /// * `path` - Location of the written directory (e.g., "output.txt").
8744    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8745    pub async fn export_opts(
8746        &self,
8747        path: impl Into<String>,
8748        opts: FileExportOpts,
8749    ) -> Result<String, DaggerError> {
8750        let mut query = self.selection.select("export");
8751        query = query.arg("path", path.into());
8752        if let Some(allow_parent_dir_path) = opts.allow_parent_dir_path {
8753            query = query.arg("allowParentDirPath", allow_parent_dir_path);
8754        }
8755        query.execute(self.graphql_client.clone()).await
8756    }
8757    /// A unique identifier for this File.
8758    pub async fn id(&self) -> Result<FileId, DaggerError> {
8759        let query = self.selection.select("id");
8760        query.execute(self.graphql_client.clone()).await
8761    }
8762    /// Retrieves the name of the file.
8763    pub async fn name(&self) -> Result<String, DaggerError> {
8764        let query = self.selection.select("name");
8765        query.execute(self.graphql_client.clone()).await
8766    }
8767    /// Searches for content matching the given regular expression or literal string.
8768    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
8769    ///
8770    /// # Arguments
8771    ///
8772    /// * `pattern` - The text to match.
8773    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8774    pub fn search(&self, pattern: impl Into<String>) -> Vec<SearchResult> {
8775        let mut query = self.selection.select("search");
8776        query = query.arg("pattern", pattern.into());
8777        vec![SearchResult {
8778            proc: self.proc.clone(),
8779            selection: query,
8780            graphql_client: self.graphql_client.clone(),
8781        }]
8782    }
8783    /// Searches for content matching the given regular expression or literal string.
8784    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
8785    ///
8786    /// # Arguments
8787    ///
8788    /// * `pattern` - The text to match.
8789    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8790    pub fn search_opts<'a>(
8791        &self,
8792        pattern: impl Into<String>,
8793        opts: FileSearchOpts<'a>,
8794    ) -> Vec<SearchResult> {
8795        let mut query = self.selection.select("search");
8796        query = query.arg("pattern", pattern.into());
8797        if let Some(literal) = opts.literal {
8798            query = query.arg("literal", literal);
8799        }
8800        if let Some(multiline) = opts.multiline {
8801            query = query.arg("multiline", multiline);
8802        }
8803        if let Some(dotall) = opts.dotall {
8804            query = query.arg("dotall", dotall);
8805        }
8806        if let Some(insensitive) = opts.insensitive {
8807            query = query.arg("insensitive", insensitive);
8808        }
8809        if let Some(skip_ignored) = opts.skip_ignored {
8810            query = query.arg("skipIgnored", skip_ignored);
8811        }
8812        if let Some(skip_hidden) = opts.skip_hidden {
8813            query = query.arg("skipHidden", skip_hidden);
8814        }
8815        if let Some(files_only) = opts.files_only {
8816            query = query.arg("filesOnly", files_only);
8817        }
8818        if let Some(limit) = opts.limit {
8819            query = query.arg("limit", limit);
8820        }
8821        if let Some(paths) = opts.paths {
8822            query = query.arg("paths", paths);
8823        }
8824        if let Some(globs) = opts.globs {
8825            query = query.arg("globs", globs);
8826        }
8827        vec![SearchResult {
8828            proc: self.proc.clone(),
8829            selection: query,
8830            graphql_client: self.graphql_client.clone(),
8831        }]
8832    }
8833    /// Retrieves the size of the file, in bytes.
8834    pub async fn size(&self) -> Result<isize, DaggerError> {
8835        let query = self.selection.select("size");
8836        query.execute(self.graphql_client.clone()).await
8837    }
8838    /// Return file status
8839    pub fn stat(&self) -> Stat {
8840        let query = self.selection.select("stat");
8841        Stat {
8842            proc: self.proc.clone(),
8843            selection: query,
8844            graphql_client: self.graphql_client.clone(),
8845        }
8846    }
8847    /// Force evaluation in the engine.
8848    pub async fn sync(&self) -> Result<FileId, DaggerError> {
8849        let query = self.selection.select("sync");
8850        query.execute(self.graphql_client.clone()).await
8851    }
8852    /// Retrieves this file with its name set to the given name.
8853    ///
8854    /// # Arguments
8855    ///
8856    /// * `name` - Name to set file to.
8857    pub fn with_name(&self, name: impl Into<String>) -> File {
8858        let mut query = self.selection.select("withName");
8859        query = query.arg("name", name.into());
8860        File {
8861            proc: self.proc.clone(),
8862            selection: query,
8863            graphql_client: self.graphql_client.clone(),
8864        }
8865    }
8866    /// Retrieves the file with content replaced with the given text.
8867    /// If 'all' is true, all occurrences of the pattern will be replaced.
8868    /// If 'firstAfter' is specified, only the first match starting at the specified line will be replaced.
8869    /// If neither are specified, and there are multiple matches for the pattern, this will error.
8870    /// If there are no matches for the pattern, this will error.
8871    ///
8872    /// # Arguments
8873    ///
8874    /// * `search` - The text to match.
8875    /// * `replacement` - The text to match.
8876    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8877    pub fn with_replaced(&self, search: impl Into<String>, replacement: impl Into<String>) -> File {
8878        let mut query = self.selection.select("withReplaced");
8879        query = query.arg("search", search.into());
8880        query = query.arg("replacement", replacement.into());
8881        File {
8882            proc: self.proc.clone(),
8883            selection: query,
8884            graphql_client: self.graphql_client.clone(),
8885        }
8886    }
8887    /// Retrieves the file with content replaced with the given text.
8888    /// If 'all' is true, all occurrences of the pattern will be replaced.
8889    /// If 'firstAfter' is specified, only the first match starting at the specified line will be replaced.
8890    /// If neither are specified, and there are multiple matches for the pattern, this will error.
8891    /// If there are no matches for the pattern, this will error.
8892    ///
8893    /// # Arguments
8894    ///
8895    /// * `search` - The text to match.
8896    /// * `replacement` - The text to match.
8897    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8898    pub fn with_replaced_opts(
8899        &self,
8900        search: impl Into<String>,
8901        replacement: impl Into<String>,
8902        opts: FileWithReplacedOpts,
8903    ) -> File {
8904        let mut query = self.selection.select("withReplaced");
8905        query = query.arg("search", search.into());
8906        query = query.arg("replacement", replacement.into());
8907        if let Some(all) = opts.all {
8908            query = query.arg("all", all);
8909        }
8910        if let Some(first_from) = opts.first_from {
8911            query = query.arg("firstFrom", first_from);
8912        }
8913        File {
8914            proc: self.proc.clone(),
8915            selection: query,
8916            graphql_client: self.graphql_client.clone(),
8917        }
8918    }
8919    /// Retrieves this file with its created/modified timestamps set to the given time.
8920    ///
8921    /// # Arguments
8922    ///
8923    /// * `timestamp` - Timestamp to set dir/files in.
8924    ///
8925    /// Formatted in seconds following Unix epoch (e.g., 1672531199).
8926    pub fn with_timestamps(&self, timestamp: isize) -> File {
8927        let mut query = self.selection.select("withTimestamps");
8928        query = query.arg("timestamp", timestamp);
8929        File {
8930            proc: self.proc.clone(),
8931            selection: query,
8932            graphql_client: self.graphql_client.clone(),
8933        }
8934    }
8935}
8936#[derive(Clone)]
8937pub struct Function {
8938    pub proc: Option<Arc<DaggerSessionProc>>,
8939    pub selection: Selection,
8940    pub graphql_client: DynGraphQLClient,
8941}
8942#[derive(Builder, Debug, PartialEq)]
8943pub struct FunctionWithArgOpts<'a> {
8944    #[builder(setter(into, strip_option), default)]
8945    pub default_address: Option<&'a str>,
8946    /// If the argument is a Directory or File type, default to load path from context directory, relative to root directory.
8947    #[builder(setter(into, strip_option), default)]
8948    pub default_path: Option<&'a str>,
8949    /// A default value to use for this argument if not explicitly set by the caller, if any
8950    #[builder(setter(into, strip_option), default)]
8951    pub default_value: Option<Json>,
8952    /// If deprecated, the reason or migration path.
8953    #[builder(setter(into, strip_option), default)]
8954    pub deprecated: Option<&'a str>,
8955    /// A doc string for the argument, if any
8956    #[builder(setter(into, strip_option), default)]
8957    pub description: Option<&'a str>,
8958    /// Patterns to ignore when loading the contextual argument value.
8959    #[builder(setter(into, strip_option), default)]
8960    pub ignore: Option<Vec<&'a str>>,
8961    /// The source map for the argument definition.
8962    #[builder(setter(into, strip_option), default)]
8963    pub source_map: Option<SourceMapId>,
8964}
8965#[derive(Builder, Debug, PartialEq)]
8966pub struct FunctionWithCachePolicyOpts<'a> {
8967    /// The TTL for the cache policy, if applicable. Provided as a duration string, e.g. "5m", "1h30s".
8968    #[builder(setter(into, strip_option), default)]
8969    pub time_to_live: Option<&'a str>,
8970}
8971#[derive(Builder, Debug, PartialEq)]
8972pub struct FunctionWithDeprecatedOpts<'a> {
8973    /// Reason or migration path describing the deprecation.
8974    #[builder(setter(into, strip_option), default)]
8975    pub reason: Option<&'a str>,
8976}
8977impl Function {
8978    /// Arguments accepted by the function, if any.
8979    pub fn args(&self) -> Vec<FunctionArg> {
8980        let query = self.selection.select("args");
8981        vec![FunctionArg {
8982            proc: self.proc.clone(),
8983            selection: query,
8984            graphql_client: self.graphql_client.clone(),
8985        }]
8986    }
8987    /// The reason this function is deprecated, if any.
8988    pub async fn deprecated(&self) -> Result<String, DaggerError> {
8989        let query = self.selection.select("deprecated");
8990        query.execute(self.graphql_client.clone()).await
8991    }
8992    /// A doc string for the function, if any.
8993    pub async fn description(&self) -> Result<String, DaggerError> {
8994        let query = self.selection.select("description");
8995        query.execute(self.graphql_client.clone()).await
8996    }
8997    /// A unique identifier for this Function.
8998    pub async fn id(&self) -> Result<FunctionId, DaggerError> {
8999        let query = self.selection.select("id");
9000        query.execute(self.graphql_client.clone()).await
9001    }
9002    /// The name of the function.
9003    pub async fn name(&self) -> Result<String, DaggerError> {
9004        let query = self.selection.select("name");
9005        query.execute(self.graphql_client.clone()).await
9006    }
9007    /// The type returned by the function.
9008    pub fn return_type(&self) -> TypeDef {
9009        let query = self.selection.select("returnType");
9010        TypeDef {
9011            proc: self.proc.clone(),
9012            selection: query,
9013            graphql_client: self.graphql_client.clone(),
9014        }
9015    }
9016    /// The location of this function declaration.
9017    pub fn source_map(&self) -> SourceMap {
9018        let query = self.selection.select("sourceMap");
9019        SourceMap {
9020            proc: self.proc.clone(),
9021            selection: query,
9022            graphql_client: self.graphql_client.clone(),
9023        }
9024    }
9025    /// Returns the function with the provided argument
9026    ///
9027    /// # Arguments
9028    ///
9029    /// * `name` - The name of the argument
9030    /// * `type_def` - The type of the argument
9031    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9032    pub fn with_arg(&self, name: impl Into<String>, type_def: impl IntoID<TypeDefId>) -> Function {
9033        let mut query = self.selection.select("withArg");
9034        query = query.arg("name", name.into());
9035        query = query.arg_lazy(
9036            "typeDef",
9037            Box::new(move || {
9038                let type_def = type_def.clone();
9039                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
9040            }),
9041        );
9042        Function {
9043            proc: self.proc.clone(),
9044            selection: query,
9045            graphql_client: self.graphql_client.clone(),
9046        }
9047    }
9048    /// Returns the function with the provided argument
9049    ///
9050    /// # Arguments
9051    ///
9052    /// * `name` - The name of the argument
9053    /// * `type_def` - The type of the argument
9054    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9055    pub fn with_arg_opts<'a>(
9056        &self,
9057        name: impl Into<String>,
9058        type_def: impl IntoID<TypeDefId>,
9059        opts: FunctionWithArgOpts<'a>,
9060    ) -> Function {
9061        let mut query = self.selection.select("withArg");
9062        query = query.arg("name", name.into());
9063        query = query.arg_lazy(
9064            "typeDef",
9065            Box::new(move || {
9066                let type_def = type_def.clone();
9067                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
9068            }),
9069        );
9070        if let Some(description) = opts.description {
9071            query = query.arg("description", description);
9072        }
9073        if let Some(default_value) = opts.default_value {
9074            query = query.arg("defaultValue", default_value);
9075        }
9076        if let Some(default_path) = opts.default_path {
9077            query = query.arg("defaultPath", default_path);
9078        }
9079        if let Some(ignore) = opts.ignore {
9080            query = query.arg("ignore", ignore);
9081        }
9082        if let Some(source_map) = opts.source_map {
9083            query = query.arg("sourceMap", source_map);
9084        }
9085        if let Some(deprecated) = opts.deprecated {
9086            query = query.arg("deprecated", deprecated);
9087        }
9088        if let Some(default_address) = opts.default_address {
9089            query = query.arg("defaultAddress", default_address);
9090        }
9091        Function {
9092            proc: self.proc.clone(),
9093            selection: query,
9094            graphql_client: self.graphql_client.clone(),
9095        }
9096    }
9097    /// Returns the function updated to use the provided cache policy.
9098    ///
9099    /// # Arguments
9100    ///
9101    /// * `policy` - The cache policy to use.
9102    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9103    pub fn with_cache_policy(&self, policy: FunctionCachePolicy) -> Function {
9104        let mut query = self.selection.select("withCachePolicy");
9105        query = query.arg("policy", policy);
9106        Function {
9107            proc: self.proc.clone(),
9108            selection: query,
9109            graphql_client: self.graphql_client.clone(),
9110        }
9111    }
9112    /// Returns the function updated to use the provided cache policy.
9113    ///
9114    /// # Arguments
9115    ///
9116    /// * `policy` - The cache policy to use.
9117    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9118    pub fn with_cache_policy_opts<'a>(
9119        &self,
9120        policy: FunctionCachePolicy,
9121        opts: FunctionWithCachePolicyOpts<'a>,
9122    ) -> Function {
9123        let mut query = self.selection.select("withCachePolicy");
9124        query = query.arg("policy", policy);
9125        if let Some(time_to_live) = opts.time_to_live {
9126            query = query.arg("timeToLive", time_to_live);
9127        }
9128        Function {
9129            proc: self.proc.clone(),
9130            selection: query,
9131            graphql_client: self.graphql_client.clone(),
9132        }
9133    }
9134    /// Returns the function with a flag indicating it's a check.
9135    pub fn with_check(&self) -> Function {
9136        let query = self.selection.select("withCheck");
9137        Function {
9138            proc: self.proc.clone(),
9139            selection: query,
9140            graphql_client: self.graphql_client.clone(),
9141        }
9142    }
9143    /// Returns the function with the provided deprecation reason.
9144    ///
9145    /// # Arguments
9146    ///
9147    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9148    pub fn with_deprecated(&self) -> Function {
9149        let query = self.selection.select("withDeprecated");
9150        Function {
9151            proc: self.proc.clone(),
9152            selection: query,
9153            graphql_client: self.graphql_client.clone(),
9154        }
9155    }
9156    /// Returns the function with the provided deprecation reason.
9157    ///
9158    /// # Arguments
9159    ///
9160    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9161    pub fn with_deprecated_opts<'a>(&self, opts: FunctionWithDeprecatedOpts<'a>) -> Function {
9162        let mut query = self.selection.select("withDeprecated");
9163        if let Some(reason) = opts.reason {
9164            query = query.arg("reason", reason);
9165        }
9166        Function {
9167            proc: self.proc.clone(),
9168            selection: query,
9169            graphql_client: self.graphql_client.clone(),
9170        }
9171    }
9172    /// Returns the function with the given doc string.
9173    ///
9174    /// # Arguments
9175    ///
9176    /// * `description` - The doc string to set.
9177    pub fn with_description(&self, description: impl Into<String>) -> Function {
9178        let mut query = self.selection.select("withDescription");
9179        query = query.arg("description", description.into());
9180        Function {
9181            proc: self.proc.clone(),
9182            selection: query,
9183            graphql_client: self.graphql_client.clone(),
9184        }
9185    }
9186    /// Returns the function with a flag indicating it's a generator.
9187    pub fn with_generator(&self) -> Function {
9188        let query = self.selection.select("withGenerator");
9189        Function {
9190            proc: self.proc.clone(),
9191            selection: query,
9192            graphql_client: self.graphql_client.clone(),
9193        }
9194    }
9195    /// Returns the function with the given source map.
9196    ///
9197    /// # Arguments
9198    ///
9199    /// * `source_map` - The source map for the function definition.
9200    pub fn with_source_map(&self, source_map: impl IntoID<SourceMapId>) -> Function {
9201        let mut query = self.selection.select("withSourceMap");
9202        query = query.arg_lazy(
9203            "sourceMap",
9204            Box::new(move || {
9205                let source_map = source_map.clone();
9206                Box::pin(async move { source_map.into_id().await.unwrap().quote() })
9207            }),
9208        );
9209        Function {
9210            proc: self.proc.clone(),
9211            selection: query,
9212            graphql_client: self.graphql_client.clone(),
9213        }
9214    }
9215}
9216#[derive(Clone)]
9217pub struct FunctionArg {
9218    pub proc: Option<Arc<DaggerSessionProc>>,
9219    pub selection: Selection,
9220    pub graphql_client: DynGraphQLClient,
9221}
9222impl FunctionArg {
9223    /// Only applies to arguments of type Container. If the argument is not set, load it from the given address (e.g. alpine:latest)
9224    pub async fn default_address(&self) -> Result<String, DaggerError> {
9225        let query = self.selection.select("defaultAddress");
9226        query.execute(self.graphql_client.clone()).await
9227    }
9228    /// 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
9229    pub async fn default_path(&self) -> Result<String, DaggerError> {
9230        let query = self.selection.select("defaultPath");
9231        query.execute(self.graphql_client.clone()).await
9232    }
9233    /// A default value to use for this argument when not explicitly set by the caller, if any.
9234    pub async fn default_value(&self) -> Result<Json, DaggerError> {
9235        let query = self.selection.select("defaultValue");
9236        query.execute(self.graphql_client.clone()).await
9237    }
9238    /// The reason this function is deprecated, if any.
9239    pub async fn deprecated(&self) -> Result<String, DaggerError> {
9240        let query = self.selection.select("deprecated");
9241        query.execute(self.graphql_client.clone()).await
9242    }
9243    /// A doc string for the argument, if any.
9244    pub async fn description(&self) -> Result<String, DaggerError> {
9245        let query = self.selection.select("description");
9246        query.execute(self.graphql_client.clone()).await
9247    }
9248    /// A unique identifier for this FunctionArg.
9249    pub async fn id(&self) -> Result<FunctionArgId, DaggerError> {
9250        let query = self.selection.select("id");
9251        query.execute(self.graphql_client.clone()).await
9252    }
9253    /// 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.
9254    pub async fn ignore(&self) -> Result<Vec<String>, DaggerError> {
9255        let query = self.selection.select("ignore");
9256        query.execute(self.graphql_client.clone()).await
9257    }
9258    /// The name of the argument in lowerCamelCase format.
9259    pub async fn name(&self) -> Result<String, DaggerError> {
9260        let query = self.selection.select("name");
9261        query.execute(self.graphql_client.clone()).await
9262    }
9263    /// The location of this arg declaration.
9264    pub fn source_map(&self) -> SourceMap {
9265        let query = self.selection.select("sourceMap");
9266        SourceMap {
9267            proc: self.proc.clone(),
9268            selection: query,
9269            graphql_client: self.graphql_client.clone(),
9270        }
9271    }
9272    /// The type of the argument.
9273    pub fn type_def(&self) -> TypeDef {
9274        let query = self.selection.select("typeDef");
9275        TypeDef {
9276            proc: self.proc.clone(),
9277            selection: query,
9278            graphql_client: self.graphql_client.clone(),
9279        }
9280    }
9281}
9282#[derive(Clone)]
9283pub struct FunctionCall {
9284    pub proc: Option<Arc<DaggerSessionProc>>,
9285    pub selection: Selection,
9286    pub graphql_client: DynGraphQLClient,
9287}
9288impl FunctionCall {
9289    /// A unique identifier for this FunctionCall.
9290    pub async fn id(&self) -> Result<FunctionCallId, DaggerError> {
9291        let query = self.selection.select("id");
9292        query.execute(self.graphql_client.clone()).await
9293    }
9294    /// The argument values the function is being invoked with.
9295    pub fn input_args(&self) -> Vec<FunctionCallArgValue> {
9296        let query = self.selection.select("inputArgs");
9297        vec![FunctionCallArgValue {
9298            proc: self.proc.clone(),
9299            selection: query,
9300            graphql_client: self.graphql_client.clone(),
9301        }]
9302    }
9303    /// The name of the function being called.
9304    pub async fn name(&self) -> Result<String, DaggerError> {
9305        let query = self.selection.select("name");
9306        query.execute(self.graphql_client.clone()).await
9307    }
9308    /// 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.
9309    pub async fn parent(&self) -> Result<Json, DaggerError> {
9310        let query = self.selection.select("parent");
9311        query.execute(self.graphql_client.clone()).await
9312    }
9313    /// 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.
9314    pub async fn parent_name(&self) -> Result<String, DaggerError> {
9315        let query = self.selection.select("parentName");
9316        query.execute(self.graphql_client.clone()).await
9317    }
9318    /// Return an error from the function.
9319    ///
9320    /// # Arguments
9321    ///
9322    /// * `error` - The error to return.
9323    pub async fn return_error(&self, error: impl IntoID<ErrorId>) -> Result<Void, DaggerError> {
9324        let mut query = self.selection.select("returnError");
9325        query = query.arg_lazy(
9326            "error",
9327            Box::new(move || {
9328                let error = error.clone();
9329                Box::pin(async move { error.into_id().await.unwrap().quote() })
9330            }),
9331        );
9332        query.execute(self.graphql_client.clone()).await
9333    }
9334    /// Set the return value of the function call to the provided value.
9335    ///
9336    /// # Arguments
9337    ///
9338    /// * `value` - JSON serialization of the return value.
9339    pub async fn return_value(&self, value: Json) -> Result<Void, DaggerError> {
9340        let mut query = self.selection.select("returnValue");
9341        query = query.arg("value", value);
9342        query.execute(self.graphql_client.clone()).await
9343    }
9344}
9345#[derive(Clone)]
9346pub struct FunctionCallArgValue {
9347    pub proc: Option<Arc<DaggerSessionProc>>,
9348    pub selection: Selection,
9349    pub graphql_client: DynGraphQLClient,
9350}
9351impl FunctionCallArgValue {
9352    /// A unique identifier for this FunctionCallArgValue.
9353    pub async fn id(&self) -> Result<FunctionCallArgValueId, DaggerError> {
9354        let query = self.selection.select("id");
9355        query.execute(self.graphql_client.clone()).await
9356    }
9357    /// The name of the argument.
9358    pub async fn name(&self) -> Result<String, DaggerError> {
9359        let query = self.selection.select("name");
9360        query.execute(self.graphql_client.clone()).await
9361    }
9362    /// The value of the argument represented as a JSON serialized string.
9363    pub async fn value(&self) -> Result<Json, DaggerError> {
9364        let query = self.selection.select("value");
9365        query.execute(self.graphql_client.clone()).await
9366    }
9367}
9368#[derive(Clone)]
9369pub struct GeneratedCode {
9370    pub proc: Option<Arc<DaggerSessionProc>>,
9371    pub selection: Selection,
9372    pub graphql_client: DynGraphQLClient,
9373}
9374impl GeneratedCode {
9375    /// The directory containing the generated code.
9376    pub fn code(&self) -> Directory {
9377        let query = self.selection.select("code");
9378        Directory {
9379            proc: self.proc.clone(),
9380            selection: query,
9381            graphql_client: self.graphql_client.clone(),
9382        }
9383    }
9384    /// A unique identifier for this GeneratedCode.
9385    pub async fn id(&self) -> Result<GeneratedCodeId, DaggerError> {
9386        let query = self.selection.select("id");
9387        query.execute(self.graphql_client.clone()).await
9388    }
9389    /// List of paths to mark generated in version control (i.e. .gitattributes).
9390    pub async fn vcs_generated_paths(&self) -> Result<Vec<String>, DaggerError> {
9391        let query = self.selection.select("vcsGeneratedPaths");
9392        query.execute(self.graphql_client.clone()).await
9393    }
9394    /// List of paths to ignore in version control (i.e. .gitignore).
9395    pub async fn vcs_ignored_paths(&self) -> Result<Vec<String>, DaggerError> {
9396        let query = self.selection.select("vcsIgnoredPaths");
9397        query.execute(self.graphql_client.clone()).await
9398    }
9399    /// Set the list of paths to mark generated in version control.
9400    pub fn with_vcs_generated_paths(&self, paths: Vec<impl Into<String>>) -> GeneratedCode {
9401        let mut query = self.selection.select("withVCSGeneratedPaths");
9402        query = query.arg(
9403            "paths",
9404            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
9405        );
9406        GeneratedCode {
9407            proc: self.proc.clone(),
9408            selection: query,
9409            graphql_client: self.graphql_client.clone(),
9410        }
9411    }
9412    /// Set the list of paths to ignore in version control.
9413    pub fn with_vcs_ignored_paths(&self, paths: Vec<impl Into<String>>) -> GeneratedCode {
9414        let mut query = self.selection.select("withVCSIgnoredPaths");
9415        query = query.arg(
9416            "paths",
9417            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
9418        );
9419        GeneratedCode {
9420            proc: self.proc.clone(),
9421            selection: query,
9422            graphql_client: self.graphql_client.clone(),
9423        }
9424    }
9425}
9426#[derive(Clone)]
9427pub struct Generator {
9428    pub proc: Option<Arc<DaggerSessionProc>>,
9429    pub selection: Selection,
9430    pub graphql_client: DynGraphQLClient,
9431}
9432impl Generator {
9433    /// The generated changeset
9434    pub fn changes(&self) -> Changeset {
9435        let query = self.selection.select("changes");
9436        Changeset {
9437            proc: self.proc.clone(),
9438            selection: query,
9439            graphql_client: self.graphql_client.clone(),
9440        }
9441    }
9442    /// Whether the generator complete
9443    pub async fn completed(&self) -> Result<bool, DaggerError> {
9444        let query = self.selection.select("completed");
9445        query.execute(self.graphql_client.clone()).await
9446    }
9447    /// Return the description of the generator
9448    pub async fn description(&self) -> Result<String, DaggerError> {
9449        let query = self.selection.select("description");
9450        query.execute(self.graphql_client.clone()).await
9451    }
9452    /// A unique identifier for this Generator.
9453    pub async fn id(&self) -> Result<GeneratorId, DaggerError> {
9454        let query = self.selection.select("id");
9455        query.execute(self.graphql_client.clone()).await
9456    }
9457    /// Wether changeset from the generator execution is empty or not
9458    pub async fn is_empty(&self) -> Result<bool, DaggerError> {
9459        let query = self.selection.select("isEmpty");
9460        query.execute(self.graphql_client.clone()).await
9461    }
9462    /// Return the fully qualified name of the generator
9463    pub async fn name(&self) -> Result<String, DaggerError> {
9464        let query = self.selection.select("name");
9465        query.execute(self.graphql_client.clone()).await
9466    }
9467    /// Execute the generator
9468    pub fn run(&self) -> Generator {
9469        let query = self.selection.select("run");
9470        Generator {
9471            proc: self.proc.clone(),
9472            selection: query,
9473            graphql_client: self.graphql_client.clone(),
9474        }
9475    }
9476}
9477#[derive(Clone)]
9478pub struct GeneratorGroup {
9479    pub proc: Option<Arc<DaggerSessionProc>>,
9480    pub selection: Selection,
9481    pub graphql_client: DynGraphQLClient,
9482}
9483#[derive(Builder, Debug, PartialEq)]
9484pub struct GeneratorGroupChangesOpts {
9485    /// Strategy to apply on conflicts between generators
9486    #[builder(setter(into, strip_option), default)]
9487    pub on_conflict: Option<ChangesetsMergeConflict>,
9488}
9489impl GeneratorGroup {
9490    /// The combined changes from the generators execution
9491    /// If any conflict occurs, for instance if the same file is modified by multiple generators, or if a file is both modified and deleted, an error is raised and the merge of the changesets will failed.
9492    /// Set 'continueOnConflicts' flag to force to merge the changes in a 'last write wins' strategy.
9493    ///
9494    /// # Arguments
9495    ///
9496    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9497    pub fn changes(&self) -> Changeset {
9498        let query = self.selection.select("changes");
9499        Changeset {
9500            proc: self.proc.clone(),
9501            selection: query,
9502            graphql_client: self.graphql_client.clone(),
9503        }
9504    }
9505    /// The combined changes from the generators execution
9506    /// If any conflict occurs, for instance if the same file is modified by multiple generators, or if a file is both modified and deleted, an error is raised and the merge of the changesets will failed.
9507    /// Set 'continueOnConflicts' flag to force to merge the changes in a 'last write wins' strategy.
9508    ///
9509    /// # Arguments
9510    ///
9511    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9512    pub fn changes_opts(&self, opts: GeneratorGroupChangesOpts) -> Changeset {
9513        let mut query = self.selection.select("changes");
9514        if let Some(on_conflict) = opts.on_conflict {
9515            query = query.arg("onConflict", on_conflict);
9516        }
9517        Changeset {
9518            proc: self.proc.clone(),
9519            selection: query,
9520            graphql_client: self.graphql_client.clone(),
9521        }
9522    }
9523    /// A unique identifier for this GeneratorGroup.
9524    pub async fn id(&self) -> Result<GeneratorGroupId, DaggerError> {
9525        let query = self.selection.select("id");
9526        query.execute(self.graphql_client.clone()).await
9527    }
9528    /// Whether the generated changeset is empty or not
9529    pub async fn is_empty(&self) -> Result<bool, DaggerError> {
9530        let query = self.selection.select("isEmpty");
9531        query.execute(self.graphql_client.clone()).await
9532    }
9533    /// Return a list of individual generators and their details
9534    pub fn list(&self) -> Vec<Generator> {
9535        let query = self.selection.select("list");
9536        vec![Generator {
9537            proc: self.proc.clone(),
9538            selection: query,
9539            graphql_client: self.graphql_client.clone(),
9540        }]
9541    }
9542    /// Execute all selected generators
9543    pub fn run(&self) -> GeneratorGroup {
9544        let query = self.selection.select("run");
9545        GeneratorGroup {
9546            proc: self.proc.clone(),
9547            selection: query,
9548            graphql_client: self.graphql_client.clone(),
9549        }
9550    }
9551}
9552#[derive(Clone)]
9553pub struct GitRef {
9554    pub proc: Option<Arc<DaggerSessionProc>>,
9555    pub selection: Selection,
9556    pub graphql_client: DynGraphQLClient,
9557}
9558#[derive(Builder, Debug, PartialEq)]
9559pub struct GitRefTreeOpts {
9560    /// The depth of the tree to fetch.
9561    #[builder(setter(into, strip_option), default)]
9562    pub depth: Option<isize>,
9563    /// Set to true to discard .git directory.
9564    #[builder(setter(into, strip_option), default)]
9565    pub discard_git_dir: Option<bool>,
9566}
9567impl GitRef {
9568    /// The resolved commit id at this ref.
9569    pub async fn commit(&self) -> Result<String, DaggerError> {
9570        let query = self.selection.select("commit");
9571        query.execute(self.graphql_client.clone()).await
9572    }
9573    /// Find the best common ancestor between this ref and another ref.
9574    ///
9575    /// # Arguments
9576    ///
9577    /// * `other` - The other ref to compare against.
9578    pub fn common_ancestor(&self, other: impl IntoID<GitRefId>) -> GitRef {
9579        let mut query = self.selection.select("commonAncestor");
9580        query = query.arg_lazy(
9581            "other",
9582            Box::new(move || {
9583                let other = other.clone();
9584                Box::pin(async move { other.into_id().await.unwrap().quote() })
9585            }),
9586        );
9587        GitRef {
9588            proc: self.proc.clone(),
9589            selection: query,
9590            graphql_client: self.graphql_client.clone(),
9591        }
9592    }
9593    /// A unique identifier for this GitRef.
9594    pub async fn id(&self) -> Result<GitRefId, DaggerError> {
9595        let query = self.selection.select("id");
9596        query.execute(self.graphql_client.clone()).await
9597    }
9598    /// The resolved ref name at this ref.
9599    pub async fn r#ref(&self) -> Result<String, DaggerError> {
9600        let query = self.selection.select("ref");
9601        query.execute(self.graphql_client.clone()).await
9602    }
9603    /// The filesystem tree at this ref.
9604    ///
9605    /// # Arguments
9606    ///
9607    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9608    pub fn tree(&self) -> Directory {
9609        let query = self.selection.select("tree");
9610        Directory {
9611            proc: self.proc.clone(),
9612            selection: query,
9613            graphql_client: self.graphql_client.clone(),
9614        }
9615    }
9616    /// The filesystem tree at this ref.
9617    ///
9618    /// # Arguments
9619    ///
9620    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9621    pub fn tree_opts(&self, opts: GitRefTreeOpts) -> Directory {
9622        let mut query = self.selection.select("tree");
9623        if let Some(discard_git_dir) = opts.discard_git_dir {
9624            query = query.arg("discardGitDir", discard_git_dir);
9625        }
9626        if let Some(depth) = opts.depth {
9627            query = query.arg("depth", depth);
9628        }
9629        Directory {
9630            proc: self.proc.clone(),
9631            selection: query,
9632            graphql_client: self.graphql_client.clone(),
9633        }
9634    }
9635}
9636#[derive(Clone)]
9637pub struct GitRepository {
9638    pub proc: Option<Arc<DaggerSessionProc>>,
9639    pub selection: Selection,
9640    pub graphql_client: DynGraphQLClient,
9641}
9642#[derive(Builder, Debug, PartialEq)]
9643pub struct GitRepositoryBranchesOpts<'a> {
9644    /// Glob patterns (e.g., "refs/tags/v*").
9645    #[builder(setter(into, strip_option), default)]
9646    pub patterns: Option<Vec<&'a str>>,
9647}
9648#[derive(Builder, Debug, PartialEq)]
9649pub struct GitRepositoryTagsOpts<'a> {
9650    /// Glob patterns (e.g., "refs/tags/v*").
9651    #[builder(setter(into, strip_option), default)]
9652    pub patterns: Option<Vec<&'a str>>,
9653}
9654impl GitRepository {
9655    /// Returns details of a branch.
9656    ///
9657    /// # Arguments
9658    ///
9659    /// * `name` - Branch's name (e.g., "main").
9660    pub fn branch(&self, name: impl Into<String>) -> GitRef {
9661        let mut query = self.selection.select("branch");
9662        query = query.arg("name", name.into());
9663        GitRef {
9664            proc: self.proc.clone(),
9665            selection: query,
9666            graphql_client: self.graphql_client.clone(),
9667        }
9668    }
9669    /// branches that match any of the given glob patterns.
9670    ///
9671    /// # Arguments
9672    ///
9673    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9674    pub async fn branches(&self) -> Result<Vec<String>, DaggerError> {
9675        let query = self.selection.select("branches");
9676        query.execute(self.graphql_client.clone()).await
9677    }
9678    /// branches that match any of the given glob patterns.
9679    ///
9680    /// # Arguments
9681    ///
9682    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9683    pub async fn branches_opts<'a>(
9684        &self,
9685        opts: GitRepositoryBranchesOpts<'a>,
9686    ) -> Result<Vec<String>, DaggerError> {
9687        let mut query = self.selection.select("branches");
9688        if let Some(patterns) = opts.patterns {
9689            query = query.arg("patterns", patterns);
9690        }
9691        query.execute(self.graphql_client.clone()).await
9692    }
9693    /// Returns details of a commit.
9694    ///
9695    /// # Arguments
9696    ///
9697    /// * `id` - Identifier of the commit (e.g., "b6315d8f2810962c601af73f86831f6866ea798b").
9698    pub fn commit(&self, id: impl Into<String>) -> GitRef {
9699        let mut query = self.selection.select("commit");
9700        query = query.arg("id", id.into());
9701        GitRef {
9702            proc: self.proc.clone(),
9703            selection: query,
9704            graphql_client: self.graphql_client.clone(),
9705        }
9706    }
9707    /// Returns details for HEAD.
9708    pub fn head(&self) -> GitRef {
9709        let query = self.selection.select("head");
9710        GitRef {
9711            proc: self.proc.clone(),
9712            selection: query,
9713            graphql_client: self.graphql_client.clone(),
9714        }
9715    }
9716    /// A unique identifier for this GitRepository.
9717    pub async fn id(&self) -> Result<GitRepositoryId, DaggerError> {
9718        let query = self.selection.select("id");
9719        query.execute(self.graphql_client.clone()).await
9720    }
9721    /// Returns details for the latest semver tag.
9722    pub fn latest_version(&self) -> GitRef {
9723        let query = self.selection.select("latestVersion");
9724        GitRef {
9725            proc: self.proc.clone(),
9726            selection: query,
9727            graphql_client: self.graphql_client.clone(),
9728        }
9729    }
9730    /// Returns details of a ref.
9731    ///
9732    /// # Arguments
9733    ///
9734    /// * `name` - Ref's name (can be a commit identifier, a tag name, a branch name, or a fully-qualified ref).
9735    pub fn r#ref(&self, name: impl Into<String>) -> GitRef {
9736        let mut query = self.selection.select("ref");
9737        query = query.arg("name", name.into());
9738        GitRef {
9739            proc: self.proc.clone(),
9740            selection: query,
9741            graphql_client: self.graphql_client.clone(),
9742        }
9743    }
9744    /// Returns details of a tag.
9745    ///
9746    /// # Arguments
9747    ///
9748    /// * `name` - Tag's name (e.g., "v0.3.9").
9749    pub fn tag(&self, name: impl Into<String>) -> GitRef {
9750        let mut query = self.selection.select("tag");
9751        query = query.arg("name", name.into());
9752        GitRef {
9753            proc: self.proc.clone(),
9754            selection: query,
9755            graphql_client: self.graphql_client.clone(),
9756        }
9757    }
9758    /// tags that match any of the given glob patterns.
9759    ///
9760    /// # Arguments
9761    ///
9762    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9763    pub async fn tags(&self) -> Result<Vec<String>, DaggerError> {
9764        let query = self.selection.select("tags");
9765        query.execute(self.graphql_client.clone()).await
9766    }
9767    /// tags that match any of the given glob patterns.
9768    ///
9769    /// # Arguments
9770    ///
9771    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9772    pub async fn tags_opts<'a>(
9773        &self,
9774        opts: GitRepositoryTagsOpts<'a>,
9775    ) -> Result<Vec<String>, DaggerError> {
9776        let mut query = self.selection.select("tags");
9777        if let Some(patterns) = opts.patterns {
9778            query = query.arg("patterns", patterns);
9779        }
9780        query.execute(self.graphql_client.clone()).await
9781    }
9782    /// Returns the changeset of uncommitted changes in the git repository.
9783    pub fn uncommitted(&self) -> Changeset {
9784        let query = self.selection.select("uncommitted");
9785        Changeset {
9786            proc: self.proc.clone(),
9787            selection: query,
9788            graphql_client: self.graphql_client.clone(),
9789        }
9790    }
9791    /// The URL of the git repository.
9792    pub async fn url(&self) -> Result<String, DaggerError> {
9793        let query = self.selection.select("url");
9794        query.execute(self.graphql_client.clone()).await
9795    }
9796}
9797#[derive(Clone)]
9798pub struct Host {
9799    pub proc: Option<Arc<DaggerSessionProc>>,
9800    pub selection: Selection,
9801    pub graphql_client: DynGraphQLClient,
9802}
9803#[derive(Builder, Debug, PartialEq)]
9804pub struct HostDirectoryOpts<'a> {
9805    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
9806    #[builder(setter(into, strip_option), default)]
9807    pub exclude: Option<Vec<&'a str>>,
9808    /// Apply .gitignore filter rules inside the directory
9809    #[builder(setter(into, strip_option), default)]
9810    pub gitignore: Option<bool>,
9811    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
9812    #[builder(setter(into, strip_option), default)]
9813    pub include: Option<Vec<&'a str>>,
9814    /// If true, the directory will always be reloaded from the host.
9815    #[builder(setter(into, strip_option), default)]
9816    pub no_cache: Option<bool>,
9817}
9818#[derive(Builder, Debug, PartialEq)]
9819pub struct HostFileOpts {
9820    /// If true, the file will always be reloaded from the host.
9821    #[builder(setter(into, strip_option), default)]
9822    pub no_cache: Option<bool>,
9823}
9824#[derive(Builder, Debug, PartialEq)]
9825pub struct HostFindUpOpts {
9826    #[builder(setter(into, strip_option), default)]
9827    pub no_cache: Option<bool>,
9828}
9829#[derive(Builder, Debug, PartialEq)]
9830pub struct HostServiceOpts<'a> {
9831    /// Upstream host to forward traffic to.
9832    #[builder(setter(into, strip_option), default)]
9833    pub host: Option<&'a str>,
9834}
9835#[derive(Builder, Debug, PartialEq)]
9836pub struct HostTunnelOpts {
9837    /// Map each service port to the same port on the host, as if the service were running natively.
9838    /// Note: enabling may result in port conflicts.
9839    #[builder(setter(into, strip_option), default)]
9840    pub native: Option<bool>,
9841    /// Configure explicit port forwarding rules for the tunnel.
9842    /// If a port's frontend is unspecified or 0, a random port will be chosen by the host.
9843    /// 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.
9844    /// If ports are given and native is true, the ports are additive.
9845    #[builder(setter(into, strip_option), default)]
9846    pub ports: Option<Vec<PortForward>>,
9847}
9848impl Host {
9849    /// Accesses a container image on the host.
9850    ///
9851    /// # Arguments
9852    ///
9853    /// * `name` - Name of the image to access.
9854    pub fn container_image(&self, name: impl Into<String>) -> Container {
9855        let mut query = self.selection.select("containerImage");
9856        query = query.arg("name", name.into());
9857        Container {
9858            proc: self.proc.clone(),
9859            selection: query,
9860            graphql_client: self.graphql_client.clone(),
9861        }
9862    }
9863    /// Accesses a directory on the host.
9864    ///
9865    /// # Arguments
9866    ///
9867    /// * `path` - Location of the directory to access (e.g., ".").
9868    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9869    pub fn directory(&self, path: impl Into<String>) -> Directory {
9870        let mut query = self.selection.select("directory");
9871        query = query.arg("path", path.into());
9872        Directory {
9873            proc: self.proc.clone(),
9874            selection: query,
9875            graphql_client: self.graphql_client.clone(),
9876        }
9877    }
9878    /// Accesses a directory on the host.
9879    ///
9880    /// # Arguments
9881    ///
9882    /// * `path` - Location of the directory to access (e.g., ".").
9883    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9884    pub fn directory_opts<'a>(
9885        &self,
9886        path: impl Into<String>,
9887        opts: HostDirectoryOpts<'a>,
9888    ) -> Directory {
9889        let mut query = self.selection.select("directory");
9890        query = query.arg("path", path.into());
9891        if let Some(exclude) = opts.exclude {
9892            query = query.arg("exclude", exclude);
9893        }
9894        if let Some(include) = opts.include {
9895            query = query.arg("include", include);
9896        }
9897        if let Some(no_cache) = opts.no_cache {
9898            query = query.arg("noCache", no_cache);
9899        }
9900        if let Some(gitignore) = opts.gitignore {
9901            query = query.arg("gitignore", gitignore);
9902        }
9903        Directory {
9904            proc: self.proc.clone(),
9905            selection: query,
9906            graphql_client: self.graphql_client.clone(),
9907        }
9908    }
9909    /// Accesses a file on the host.
9910    ///
9911    /// # Arguments
9912    ///
9913    /// * `path` - Location of the file to retrieve (e.g., "README.md").
9914    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9915    pub fn file(&self, path: impl Into<String>) -> File {
9916        let mut query = self.selection.select("file");
9917        query = query.arg("path", path.into());
9918        File {
9919            proc: self.proc.clone(),
9920            selection: query,
9921            graphql_client: self.graphql_client.clone(),
9922        }
9923    }
9924    /// Accesses a file on the host.
9925    ///
9926    /// # Arguments
9927    ///
9928    /// * `path` - Location of the file to retrieve (e.g., "README.md").
9929    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9930    pub fn file_opts(&self, path: impl Into<String>, opts: HostFileOpts) -> File {
9931        let mut query = self.selection.select("file");
9932        query = query.arg("path", path.into());
9933        if let Some(no_cache) = opts.no_cache {
9934            query = query.arg("noCache", no_cache);
9935        }
9936        File {
9937            proc: self.proc.clone(),
9938            selection: query,
9939            graphql_client: self.graphql_client.clone(),
9940        }
9941    }
9942    /// Search for a file or directory by walking up the tree from system workdir. Return its relative path. If no match, return null
9943    ///
9944    /// # Arguments
9945    ///
9946    /// * `name` - name of the file or directory to search for
9947    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9948    pub async fn find_up(&self, name: impl Into<String>) -> Result<String, DaggerError> {
9949        let mut query = self.selection.select("findUp");
9950        query = query.arg("name", name.into());
9951        query.execute(self.graphql_client.clone()).await
9952    }
9953    /// Search for a file or directory by walking up the tree from system workdir. Return its relative path. If no match, return null
9954    ///
9955    /// # Arguments
9956    ///
9957    /// * `name` - name of the file or directory to search for
9958    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9959    pub async fn find_up_opts(
9960        &self,
9961        name: impl Into<String>,
9962        opts: HostFindUpOpts,
9963    ) -> Result<String, DaggerError> {
9964        let mut query = self.selection.select("findUp");
9965        query = query.arg("name", name.into());
9966        if let Some(no_cache) = opts.no_cache {
9967            query = query.arg("noCache", no_cache);
9968        }
9969        query.execute(self.graphql_client.clone()).await
9970    }
9971    /// A unique identifier for this Host.
9972    pub async fn id(&self) -> Result<HostId, DaggerError> {
9973        let query = self.selection.select("id");
9974        query.execute(self.graphql_client.clone()).await
9975    }
9976    /// Creates a service that forwards traffic to a specified address via the host.
9977    ///
9978    /// # Arguments
9979    ///
9980    /// * `ports` - Ports to expose via the service, forwarding through the host network.
9981    ///
9982    /// If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
9983    ///
9984    /// An empty set of ports is not valid; an error will be returned.
9985    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9986    pub fn service(&self, ports: Vec<PortForward>) -> Service {
9987        let mut query = self.selection.select("service");
9988        query = query.arg("ports", ports);
9989        Service {
9990            proc: self.proc.clone(),
9991            selection: query,
9992            graphql_client: self.graphql_client.clone(),
9993        }
9994    }
9995    /// Creates a service that forwards traffic to a specified address via the host.
9996    ///
9997    /// # Arguments
9998    ///
9999    /// * `ports` - Ports to expose via the service, forwarding through the host network.
10000    ///
10001    /// If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
10002    ///
10003    /// An empty set of ports is not valid; an error will be returned.
10004    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10005    pub fn service_opts<'a>(&self, ports: Vec<PortForward>, opts: HostServiceOpts<'a>) -> Service {
10006        let mut query = self.selection.select("service");
10007        query = query.arg("ports", ports);
10008        if let Some(host) = opts.host {
10009            query = query.arg("host", host);
10010        }
10011        Service {
10012            proc: self.proc.clone(),
10013            selection: query,
10014            graphql_client: self.graphql_client.clone(),
10015        }
10016    }
10017    /// Creates a tunnel that forwards traffic from the host to a service.
10018    ///
10019    /// # Arguments
10020    ///
10021    /// * `service` - Service to send traffic from the tunnel.
10022    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10023    pub fn tunnel(&self, service: impl IntoID<ServiceId>) -> Service {
10024        let mut query = self.selection.select("tunnel");
10025        query = query.arg_lazy(
10026            "service",
10027            Box::new(move || {
10028                let service = service.clone();
10029                Box::pin(async move { service.into_id().await.unwrap().quote() })
10030            }),
10031        );
10032        Service {
10033            proc: self.proc.clone(),
10034            selection: query,
10035            graphql_client: self.graphql_client.clone(),
10036        }
10037    }
10038    /// Creates a tunnel that forwards traffic from the host to a service.
10039    ///
10040    /// # Arguments
10041    ///
10042    /// * `service` - Service to send traffic from the tunnel.
10043    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10044    pub fn tunnel_opts(&self, service: impl IntoID<ServiceId>, opts: HostTunnelOpts) -> Service {
10045        let mut query = self.selection.select("tunnel");
10046        query = query.arg_lazy(
10047            "service",
10048            Box::new(move || {
10049                let service = service.clone();
10050                Box::pin(async move { service.into_id().await.unwrap().quote() })
10051            }),
10052        );
10053        if let Some(native) = opts.native {
10054            query = query.arg("native", native);
10055        }
10056        if let Some(ports) = opts.ports {
10057            query = query.arg("ports", ports);
10058        }
10059        Service {
10060            proc: self.proc.clone(),
10061            selection: query,
10062            graphql_client: self.graphql_client.clone(),
10063        }
10064    }
10065    /// Accesses a Unix socket on the host.
10066    ///
10067    /// # Arguments
10068    ///
10069    /// * `path` - Location of the Unix socket (e.g., "/var/run/docker.sock").
10070    pub fn unix_socket(&self, path: impl Into<String>) -> Socket {
10071        let mut query = self.selection.select("unixSocket");
10072        query = query.arg("path", path.into());
10073        Socket {
10074            proc: self.proc.clone(),
10075            selection: query,
10076            graphql_client: self.graphql_client.clone(),
10077        }
10078    }
10079}
10080#[derive(Clone)]
10081pub struct InputTypeDef {
10082    pub proc: Option<Arc<DaggerSessionProc>>,
10083    pub selection: Selection,
10084    pub graphql_client: DynGraphQLClient,
10085}
10086impl InputTypeDef {
10087    /// Static fields defined on this input object, if any.
10088    pub fn fields(&self) -> Vec<FieldTypeDef> {
10089        let query = self.selection.select("fields");
10090        vec![FieldTypeDef {
10091            proc: self.proc.clone(),
10092            selection: query,
10093            graphql_client: self.graphql_client.clone(),
10094        }]
10095    }
10096    /// A unique identifier for this InputTypeDef.
10097    pub async fn id(&self) -> Result<InputTypeDefId, DaggerError> {
10098        let query = self.selection.select("id");
10099        query.execute(self.graphql_client.clone()).await
10100    }
10101    /// The name of the input object.
10102    pub async fn name(&self) -> Result<String, DaggerError> {
10103        let query = self.selection.select("name");
10104        query.execute(self.graphql_client.clone()).await
10105    }
10106}
10107#[derive(Clone)]
10108pub struct InterfaceTypeDef {
10109    pub proc: Option<Arc<DaggerSessionProc>>,
10110    pub selection: Selection,
10111    pub graphql_client: DynGraphQLClient,
10112}
10113impl InterfaceTypeDef {
10114    /// The doc string for the interface, if any.
10115    pub async fn description(&self) -> Result<String, DaggerError> {
10116        let query = self.selection.select("description");
10117        query.execute(self.graphql_client.clone()).await
10118    }
10119    /// Functions defined on this interface, if any.
10120    pub fn functions(&self) -> Vec<Function> {
10121        let query = self.selection.select("functions");
10122        vec![Function {
10123            proc: self.proc.clone(),
10124            selection: query,
10125            graphql_client: self.graphql_client.clone(),
10126        }]
10127    }
10128    /// A unique identifier for this InterfaceTypeDef.
10129    pub async fn id(&self) -> Result<InterfaceTypeDefId, DaggerError> {
10130        let query = self.selection.select("id");
10131        query.execute(self.graphql_client.clone()).await
10132    }
10133    /// The name of the interface.
10134    pub async fn name(&self) -> Result<String, DaggerError> {
10135        let query = self.selection.select("name");
10136        query.execute(self.graphql_client.clone()).await
10137    }
10138    /// The location of this interface declaration.
10139    pub fn source_map(&self) -> SourceMap {
10140        let query = self.selection.select("sourceMap");
10141        SourceMap {
10142            proc: self.proc.clone(),
10143            selection: query,
10144            graphql_client: self.graphql_client.clone(),
10145        }
10146    }
10147    /// If this InterfaceTypeDef is associated with a Module, the name of the module. Unset otherwise.
10148    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
10149        let query = self.selection.select("sourceModuleName");
10150        query.execute(self.graphql_client.clone()).await
10151    }
10152}
10153#[derive(Clone)]
10154pub struct JsonValue {
10155    pub proc: Option<Arc<DaggerSessionProc>>,
10156    pub selection: Selection,
10157    pub graphql_client: DynGraphQLClient,
10158}
10159#[derive(Builder, Debug, PartialEq)]
10160pub struct JsonValueContentsOpts<'a> {
10161    /// Optional line prefix
10162    #[builder(setter(into, strip_option), default)]
10163    pub indent: Option<&'a str>,
10164    /// Pretty-print
10165    #[builder(setter(into, strip_option), default)]
10166    pub pretty: Option<bool>,
10167}
10168impl JsonValue {
10169    /// Decode an array from json
10170    pub fn as_array(&self) -> Vec<JsonValue> {
10171        let query = self.selection.select("asArray");
10172        vec![JsonValue {
10173            proc: self.proc.clone(),
10174            selection: query,
10175            graphql_client: self.graphql_client.clone(),
10176        }]
10177    }
10178    /// Decode a boolean from json
10179    pub async fn as_boolean(&self) -> Result<bool, DaggerError> {
10180        let query = self.selection.select("asBoolean");
10181        query.execute(self.graphql_client.clone()).await
10182    }
10183    /// Decode an integer from json
10184    pub async fn as_integer(&self) -> Result<isize, DaggerError> {
10185        let query = self.selection.select("asInteger");
10186        query.execute(self.graphql_client.clone()).await
10187    }
10188    /// Decode a string from json
10189    pub async fn as_string(&self) -> Result<String, DaggerError> {
10190        let query = self.selection.select("asString");
10191        query.execute(self.graphql_client.clone()).await
10192    }
10193    /// Return the value encoded as json
10194    ///
10195    /// # Arguments
10196    ///
10197    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10198    pub async fn contents(&self) -> Result<Json, DaggerError> {
10199        let query = self.selection.select("contents");
10200        query.execute(self.graphql_client.clone()).await
10201    }
10202    /// Return the value encoded as json
10203    ///
10204    /// # Arguments
10205    ///
10206    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10207    pub async fn contents_opts<'a>(
10208        &self,
10209        opts: JsonValueContentsOpts<'a>,
10210    ) -> Result<Json, DaggerError> {
10211        let mut query = self.selection.select("contents");
10212        if let Some(pretty) = opts.pretty {
10213            query = query.arg("pretty", pretty);
10214        }
10215        if let Some(indent) = opts.indent {
10216            query = query.arg("indent", indent);
10217        }
10218        query.execute(self.graphql_client.clone()).await
10219    }
10220    /// Lookup the field at the given path, and return its value.
10221    ///
10222    /// # Arguments
10223    ///
10224    /// * `path` - Path of the field to lookup, encoded as an array of field names
10225    pub fn field(&self, path: Vec<impl Into<String>>) -> JsonValue {
10226        let mut query = self.selection.select("field");
10227        query = query.arg(
10228            "path",
10229            path.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
10230        );
10231        JsonValue {
10232            proc: self.proc.clone(),
10233            selection: query,
10234            graphql_client: self.graphql_client.clone(),
10235        }
10236    }
10237    /// List fields of the encoded object
10238    pub async fn fields(&self) -> Result<Vec<String>, DaggerError> {
10239        let query = self.selection.select("fields");
10240        query.execute(self.graphql_client.clone()).await
10241    }
10242    /// A unique identifier for this JSONValue.
10243    pub async fn id(&self) -> Result<JsonValueId, DaggerError> {
10244        let query = self.selection.select("id");
10245        query.execute(self.graphql_client.clone()).await
10246    }
10247    /// Encode a boolean to json
10248    ///
10249    /// # Arguments
10250    ///
10251    /// * `value` - New boolean value
10252    pub fn new_boolean(&self, value: bool) -> JsonValue {
10253        let mut query = self.selection.select("newBoolean");
10254        query = query.arg("value", value);
10255        JsonValue {
10256            proc: self.proc.clone(),
10257            selection: query,
10258            graphql_client: self.graphql_client.clone(),
10259        }
10260    }
10261    /// Encode an integer to json
10262    ///
10263    /// # Arguments
10264    ///
10265    /// * `value` - New integer value
10266    pub fn new_integer(&self, value: isize) -> JsonValue {
10267        let mut query = self.selection.select("newInteger");
10268        query = query.arg("value", value);
10269        JsonValue {
10270            proc: self.proc.clone(),
10271            selection: query,
10272            graphql_client: self.graphql_client.clone(),
10273        }
10274    }
10275    /// Encode a string to json
10276    ///
10277    /// # Arguments
10278    ///
10279    /// * `value` - New string value
10280    pub fn new_string(&self, value: impl Into<String>) -> JsonValue {
10281        let mut query = self.selection.select("newString");
10282        query = query.arg("value", value.into());
10283        JsonValue {
10284            proc: self.proc.clone(),
10285            selection: query,
10286            graphql_client: self.graphql_client.clone(),
10287        }
10288    }
10289    /// Return a new json value, decoded from the given content
10290    ///
10291    /// # Arguments
10292    ///
10293    /// * `contents` - New JSON-encoded contents
10294    pub fn with_contents(&self, contents: Json) -> JsonValue {
10295        let mut query = self.selection.select("withContents");
10296        query = query.arg("contents", contents);
10297        JsonValue {
10298            proc: self.proc.clone(),
10299            selection: query,
10300            graphql_client: self.graphql_client.clone(),
10301        }
10302    }
10303    /// Set a new field at the given path
10304    ///
10305    /// # Arguments
10306    ///
10307    /// * `path` - Path of the field to set, encoded as an array of field names
10308    /// * `value` - The new value of the field
10309    pub fn with_field(
10310        &self,
10311        path: Vec<impl Into<String>>,
10312        value: impl IntoID<JsonValueId>,
10313    ) -> JsonValue {
10314        let mut query = self.selection.select("withField");
10315        query = query.arg(
10316            "path",
10317            path.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
10318        );
10319        query = query.arg_lazy(
10320            "value",
10321            Box::new(move || {
10322                let value = value.clone();
10323                Box::pin(async move { value.into_id().await.unwrap().quote() })
10324            }),
10325        );
10326        JsonValue {
10327            proc: self.proc.clone(),
10328            selection: query,
10329            graphql_client: self.graphql_client.clone(),
10330        }
10331    }
10332}
10333#[derive(Clone)]
10334pub struct Llm {
10335    pub proc: Option<Arc<DaggerSessionProc>>,
10336    pub selection: Selection,
10337    pub graphql_client: DynGraphQLClient,
10338}
10339impl Llm {
10340    /// create a branch in the LLM's history
10341    pub fn attempt(&self, number: isize) -> Llm {
10342        let mut query = self.selection.select("attempt");
10343        query = query.arg("number", number);
10344        Llm {
10345            proc: self.proc.clone(),
10346            selection: query,
10347            graphql_client: self.graphql_client.clone(),
10348        }
10349    }
10350    /// returns the type of the current state
10351    pub fn bind_result(&self, name: impl Into<String>) -> Binding {
10352        let mut query = self.selection.select("bindResult");
10353        query = query.arg("name", name.into());
10354        Binding {
10355            proc: self.proc.clone(),
10356            selection: query,
10357            graphql_client: self.graphql_client.clone(),
10358        }
10359    }
10360    /// return the LLM's current environment
10361    pub fn env(&self) -> Env {
10362        let query = self.selection.select("env");
10363        Env {
10364            proc: self.proc.clone(),
10365            selection: query,
10366            graphql_client: self.graphql_client.clone(),
10367        }
10368    }
10369    /// Indicates whether there are any queued prompts or tool results to send to the model
10370    pub async fn has_prompt(&self) -> Result<bool, DaggerError> {
10371        let query = self.selection.select("hasPrompt");
10372        query.execute(self.graphql_client.clone()).await
10373    }
10374    /// return the llm message history
10375    pub async fn history(&self) -> Result<Vec<String>, DaggerError> {
10376        let query = self.selection.select("history");
10377        query.execute(self.graphql_client.clone()).await
10378    }
10379    /// return the raw llm message history as json
10380    pub async fn history_json(&self) -> Result<Json, DaggerError> {
10381        let query = self.selection.select("historyJSON");
10382        query.execute(self.graphql_client.clone()).await
10383    }
10384    /// A unique identifier for this LLM.
10385    pub async fn id(&self) -> Result<Llmid, DaggerError> {
10386        let query = self.selection.select("id");
10387        query.execute(self.graphql_client.clone()).await
10388    }
10389    /// return the last llm reply from the history
10390    pub async fn last_reply(&self) -> Result<String, DaggerError> {
10391        let query = self.selection.select("lastReply");
10392        query.execute(self.graphql_client.clone()).await
10393    }
10394    /// Submit the queued prompt, evaluate any tool calls, queue their results, and keep going until the model ends its turn
10395    pub fn r#loop(&self) -> Llm {
10396        let query = self.selection.select("loop");
10397        Llm {
10398            proc: self.proc.clone(),
10399            selection: query,
10400            graphql_client: self.graphql_client.clone(),
10401        }
10402    }
10403    /// return the model used by the llm
10404    pub async fn model(&self) -> Result<String, DaggerError> {
10405        let query = self.selection.select("model");
10406        query.execute(self.graphql_client.clone()).await
10407    }
10408    /// return the provider used by the llm
10409    pub async fn provider(&self) -> Result<String, DaggerError> {
10410        let query = self.selection.select("provider");
10411        query.execute(self.graphql_client.clone()).await
10412    }
10413    /// Submit the queued prompt or tool call results, evaluate any tool calls, and queue their results
10414    pub async fn step(&self) -> Result<Llmid, DaggerError> {
10415        let query = self.selection.select("step");
10416        query.execute(self.graphql_client.clone()).await
10417    }
10418    /// synchronize LLM state
10419    pub async fn sync(&self) -> Result<Llmid, DaggerError> {
10420        let query = self.selection.select("sync");
10421        query.execute(self.graphql_client.clone()).await
10422    }
10423    /// returns the token usage of the current state
10424    pub fn token_usage(&self) -> LlmTokenUsage {
10425        let query = self.selection.select("tokenUsage");
10426        LlmTokenUsage {
10427            proc: self.proc.clone(),
10428            selection: query,
10429            graphql_client: self.graphql_client.clone(),
10430        }
10431    }
10432    /// print documentation for available tools
10433    pub async fn tools(&self) -> Result<String, DaggerError> {
10434        let query = self.selection.select("tools");
10435        query.execute(self.graphql_client.clone()).await
10436    }
10437    /// Return a new LLM with the specified function no longer exposed as a tool
10438    ///
10439    /// # Arguments
10440    ///
10441    /// * `type_name` - The type name whose function will be blocked
10442    /// * `function` - The function to block
10443    ///
10444    /// Will be converted to lowerCamelCase if necessary.
10445    pub fn with_blocked_function(
10446        &self,
10447        type_name: impl Into<String>,
10448        function: impl Into<String>,
10449    ) -> Llm {
10450        let mut query = self.selection.select("withBlockedFunction");
10451        query = query.arg("typeName", type_name.into());
10452        query = query.arg("function", function.into());
10453        Llm {
10454            proc: self.proc.clone(),
10455            selection: query,
10456            graphql_client: self.graphql_client.clone(),
10457        }
10458    }
10459    /// allow the LLM to interact with an environment via MCP
10460    pub fn with_env(&self, env: impl IntoID<EnvId>) -> Llm {
10461        let mut query = self.selection.select("withEnv");
10462        query = query.arg_lazy(
10463            "env",
10464            Box::new(move || {
10465                let env = env.clone();
10466                Box::pin(async move { env.into_id().await.unwrap().quote() })
10467            }),
10468        );
10469        Llm {
10470            proc: self.proc.clone(),
10471            selection: query,
10472            graphql_client: self.graphql_client.clone(),
10473        }
10474    }
10475    /// Add an external MCP server to the LLM
10476    ///
10477    /// # Arguments
10478    ///
10479    /// * `name` - The name of the MCP server
10480    /// * `service` - The MCP service to run and communicate with over stdio
10481    pub fn with_mcp_server(&self, name: impl Into<String>, service: impl IntoID<ServiceId>) -> Llm {
10482        let mut query = self.selection.select("withMCPServer");
10483        query = query.arg("name", name.into());
10484        query = query.arg_lazy(
10485            "service",
10486            Box::new(move || {
10487                let service = service.clone();
10488                Box::pin(async move { service.into_id().await.unwrap().quote() })
10489            }),
10490        );
10491        Llm {
10492            proc: self.proc.clone(),
10493            selection: query,
10494            graphql_client: self.graphql_client.clone(),
10495        }
10496    }
10497    /// swap out the llm model
10498    ///
10499    /// # Arguments
10500    ///
10501    /// * `model` - The model to use
10502    pub fn with_model(&self, model: impl Into<String>) -> Llm {
10503        let mut query = self.selection.select("withModel");
10504        query = query.arg("model", model.into());
10505        Llm {
10506            proc: self.proc.clone(),
10507            selection: query,
10508            graphql_client: self.graphql_client.clone(),
10509        }
10510    }
10511    /// append a prompt to the llm context
10512    ///
10513    /// # Arguments
10514    ///
10515    /// * `prompt` - The prompt to send
10516    pub fn with_prompt(&self, prompt: impl Into<String>) -> Llm {
10517        let mut query = self.selection.select("withPrompt");
10518        query = query.arg("prompt", prompt.into());
10519        Llm {
10520            proc: self.proc.clone(),
10521            selection: query,
10522            graphql_client: self.graphql_client.clone(),
10523        }
10524    }
10525    /// append the contents of a file to the llm context
10526    ///
10527    /// # Arguments
10528    ///
10529    /// * `file` - The file to read the prompt from
10530    pub fn with_prompt_file(&self, file: impl IntoID<FileId>) -> Llm {
10531        let mut query = self.selection.select("withPromptFile");
10532        query = query.arg_lazy(
10533            "file",
10534            Box::new(move || {
10535                let file = file.clone();
10536                Box::pin(async move { file.into_id().await.unwrap().quote() })
10537            }),
10538        );
10539        Llm {
10540            proc: self.proc.clone(),
10541            selection: query,
10542            graphql_client: self.graphql_client.clone(),
10543        }
10544    }
10545    /// Use a static set of tools for method calls, e.g. for MCP clients that do not support dynamic tool registration
10546    pub fn with_static_tools(&self) -> Llm {
10547        let query = self.selection.select("withStaticTools");
10548        Llm {
10549            proc: self.proc.clone(),
10550            selection: query,
10551            graphql_client: self.graphql_client.clone(),
10552        }
10553    }
10554    /// Add a system prompt to the LLM's environment
10555    ///
10556    /// # Arguments
10557    ///
10558    /// * `prompt` - The system prompt to send
10559    pub fn with_system_prompt(&self, prompt: impl Into<String>) -> Llm {
10560        let mut query = self.selection.select("withSystemPrompt");
10561        query = query.arg("prompt", prompt.into());
10562        Llm {
10563            proc: self.proc.clone(),
10564            selection: query,
10565            graphql_client: self.graphql_client.clone(),
10566        }
10567    }
10568    /// Disable the default system prompt
10569    pub fn without_default_system_prompt(&self) -> Llm {
10570        let query = self.selection.select("withoutDefaultSystemPrompt");
10571        Llm {
10572            proc: self.proc.clone(),
10573            selection: query,
10574            graphql_client: self.graphql_client.clone(),
10575        }
10576    }
10577    /// Clear the message history, leaving only the system prompts
10578    pub fn without_message_history(&self) -> Llm {
10579        let query = self.selection.select("withoutMessageHistory");
10580        Llm {
10581            proc: self.proc.clone(),
10582            selection: query,
10583            graphql_client: self.graphql_client.clone(),
10584        }
10585    }
10586    /// Clear the system prompts, leaving only the default system prompt
10587    pub fn without_system_prompts(&self) -> Llm {
10588        let query = self.selection.select("withoutSystemPrompts");
10589        Llm {
10590            proc: self.proc.clone(),
10591            selection: query,
10592            graphql_client: self.graphql_client.clone(),
10593        }
10594    }
10595}
10596#[derive(Clone)]
10597pub struct LlmTokenUsage {
10598    pub proc: Option<Arc<DaggerSessionProc>>,
10599    pub selection: Selection,
10600    pub graphql_client: DynGraphQLClient,
10601}
10602impl LlmTokenUsage {
10603    pub async fn cached_token_reads(&self) -> Result<isize, DaggerError> {
10604        let query = self.selection.select("cachedTokenReads");
10605        query.execute(self.graphql_client.clone()).await
10606    }
10607    pub async fn cached_token_writes(&self) -> Result<isize, DaggerError> {
10608        let query = self.selection.select("cachedTokenWrites");
10609        query.execute(self.graphql_client.clone()).await
10610    }
10611    /// A unique identifier for this LLMTokenUsage.
10612    pub async fn id(&self) -> Result<LlmTokenUsageId, DaggerError> {
10613        let query = self.selection.select("id");
10614        query.execute(self.graphql_client.clone()).await
10615    }
10616    pub async fn input_tokens(&self) -> Result<isize, DaggerError> {
10617        let query = self.selection.select("inputTokens");
10618        query.execute(self.graphql_client.clone()).await
10619    }
10620    pub async fn output_tokens(&self) -> Result<isize, DaggerError> {
10621        let query = self.selection.select("outputTokens");
10622        query.execute(self.graphql_client.clone()).await
10623    }
10624    pub async fn total_tokens(&self) -> Result<isize, DaggerError> {
10625        let query = self.selection.select("totalTokens");
10626        query.execute(self.graphql_client.clone()).await
10627    }
10628}
10629#[derive(Clone)]
10630pub struct Label {
10631    pub proc: Option<Arc<DaggerSessionProc>>,
10632    pub selection: Selection,
10633    pub graphql_client: DynGraphQLClient,
10634}
10635impl Label {
10636    /// A unique identifier for this Label.
10637    pub async fn id(&self) -> Result<LabelId, DaggerError> {
10638        let query = self.selection.select("id");
10639        query.execute(self.graphql_client.clone()).await
10640    }
10641    /// The label name.
10642    pub async fn name(&self) -> Result<String, DaggerError> {
10643        let query = self.selection.select("name");
10644        query.execute(self.graphql_client.clone()).await
10645    }
10646    /// The label value.
10647    pub async fn value(&self) -> Result<String, DaggerError> {
10648        let query = self.selection.select("value");
10649        query.execute(self.graphql_client.clone()).await
10650    }
10651}
10652#[derive(Clone)]
10653pub struct ListTypeDef {
10654    pub proc: Option<Arc<DaggerSessionProc>>,
10655    pub selection: Selection,
10656    pub graphql_client: DynGraphQLClient,
10657}
10658impl ListTypeDef {
10659    /// The type of the elements in the list.
10660    pub fn element_type_def(&self) -> TypeDef {
10661        let query = self.selection.select("elementTypeDef");
10662        TypeDef {
10663            proc: self.proc.clone(),
10664            selection: query,
10665            graphql_client: self.graphql_client.clone(),
10666        }
10667    }
10668    /// A unique identifier for this ListTypeDef.
10669    pub async fn id(&self) -> Result<ListTypeDefId, DaggerError> {
10670        let query = self.selection.select("id");
10671        query.execute(self.graphql_client.clone()).await
10672    }
10673}
10674#[derive(Clone)]
10675pub struct Module {
10676    pub proc: Option<Arc<DaggerSessionProc>>,
10677    pub selection: Selection,
10678    pub graphql_client: DynGraphQLClient,
10679}
10680#[derive(Builder, Debug, PartialEq)]
10681pub struct ModuleChecksOpts<'a> {
10682    /// Only include checks matching the specified patterns
10683    #[builder(setter(into, strip_option), default)]
10684    pub include: Option<Vec<&'a str>>,
10685}
10686#[derive(Builder, Debug, PartialEq)]
10687pub struct ModuleGeneratorsOpts<'a> {
10688    /// Only include generators matching the specified patterns
10689    #[builder(setter(into, strip_option), default)]
10690    pub include: Option<Vec<&'a str>>,
10691}
10692#[derive(Builder, Debug, PartialEq)]
10693pub struct ModuleServeOpts {
10694    /// Expose the dependencies of this module to the client
10695    #[builder(setter(into, strip_option), default)]
10696    pub include_dependencies: Option<bool>,
10697}
10698impl Module {
10699    /// Return the check defined by the module with the given name. Must match to exactly one check.
10700    ///
10701    /// # Arguments
10702    ///
10703    /// * `name` - The name of the check to retrieve
10704    pub fn check(&self, name: impl Into<String>) -> Check {
10705        let mut query = self.selection.select("check");
10706        query = query.arg("name", name.into());
10707        Check {
10708            proc: self.proc.clone(),
10709            selection: query,
10710            graphql_client: self.graphql_client.clone(),
10711        }
10712    }
10713    /// Return all checks defined by the module
10714    ///
10715    /// # Arguments
10716    ///
10717    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10718    pub fn checks(&self) -> CheckGroup {
10719        let query = self.selection.select("checks");
10720        CheckGroup {
10721            proc: self.proc.clone(),
10722            selection: query,
10723            graphql_client: self.graphql_client.clone(),
10724        }
10725    }
10726    /// Return all checks defined by the module
10727    ///
10728    /// # Arguments
10729    ///
10730    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10731    pub fn checks_opts<'a>(&self, opts: ModuleChecksOpts<'a>) -> CheckGroup {
10732        let mut query = self.selection.select("checks");
10733        if let Some(include) = opts.include {
10734            query = query.arg("include", include);
10735        }
10736        CheckGroup {
10737            proc: self.proc.clone(),
10738            selection: query,
10739            graphql_client: self.graphql_client.clone(),
10740        }
10741    }
10742    /// The dependencies of the module.
10743    pub fn dependencies(&self) -> Vec<Module> {
10744        let query = self.selection.select("dependencies");
10745        vec![Module {
10746            proc: self.proc.clone(),
10747            selection: query,
10748            graphql_client: self.graphql_client.clone(),
10749        }]
10750    }
10751    /// The doc string of the module, if any
10752    pub async fn description(&self) -> Result<String, DaggerError> {
10753        let query = self.selection.select("description");
10754        query.execute(self.graphql_client.clone()).await
10755    }
10756    /// Enumerations served by this module.
10757    pub fn enums(&self) -> Vec<TypeDef> {
10758        let query = self.selection.select("enums");
10759        vec![TypeDef {
10760            proc: self.proc.clone(),
10761            selection: query,
10762            graphql_client: self.graphql_client.clone(),
10763        }]
10764    }
10765    /// The generated files and directories made on top of the module source's context directory.
10766    pub fn generated_context_directory(&self) -> Directory {
10767        let query = self.selection.select("generatedContextDirectory");
10768        Directory {
10769            proc: self.proc.clone(),
10770            selection: query,
10771            graphql_client: self.graphql_client.clone(),
10772        }
10773    }
10774    /// Return the generator defined by the module with the given name. Must match to exactly one generator.
10775    ///
10776    /// # Arguments
10777    ///
10778    /// * `name` - The name of the generator to retrieve
10779    pub fn generator(&self, name: impl Into<String>) -> Generator {
10780        let mut query = self.selection.select("generator");
10781        query = query.arg("name", name.into());
10782        Generator {
10783            proc: self.proc.clone(),
10784            selection: query,
10785            graphql_client: self.graphql_client.clone(),
10786        }
10787    }
10788    /// Return all generators defined by the module
10789    ///
10790    /// # Arguments
10791    ///
10792    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10793    pub fn generators(&self) -> GeneratorGroup {
10794        let query = self.selection.select("generators");
10795        GeneratorGroup {
10796            proc: self.proc.clone(),
10797            selection: query,
10798            graphql_client: self.graphql_client.clone(),
10799        }
10800    }
10801    /// Return all generators defined by the module
10802    ///
10803    /// # Arguments
10804    ///
10805    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10806    pub fn generators_opts<'a>(&self, opts: ModuleGeneratorsOpts<'a>) -> GeneratorGroup {
10807        let mut query = self.selection.select("generators");
10808        if let Some(include) = opts.include {
10809            query = query.arg("include", include);
10810        }
10811        GeneratorGroup {
10812            proc: self.proc.clone(),
10813            selection: query,
10814            graphql_client: self.graphql_client.clone(),
10815        }
10816    }
10817    /// A unique identifier for this Module.
10818    pub async fn id(&self) -> Result<ModuleId, DaggerError> {
10819        let query = self.selection.select("id");
10820        query.execute(self.graphql_client.clone()).await
10821    }
10822    /// Interfaces served by this module.
10823    pub fn interfaces(&self) -> Vec<TypeDef> {
10824        let query = self.selection.select("interfaces");
10825        vec![TypeDef {
10826            proc: self.proc.clone(),
10827            selection: query,
10828            graphql_client: self.graphql_client.clone(),
10829        }]
10830    }
10831    /// The introspection schema JSON file for this module.
10832    /// This file represents the schema visible to the module's source code, including all core types and those from the dependencies.
10833    /// Note: this is in the context of a module, so some core types may be hidden.
10834    pub fn introspection_schema_json(&self) -> File {
10835        let query = self.selection.select("introspectionSchemaJSON");
10836        File {
10837            proc: self.proc.clone(),
10838            selection: query,
10839            graphql_client: self.graphql_client.clone(),
10840        }
10841    }
10842    /// The name of the module
10843    pub async fn name(&self) -> Result<String, DaggerError> {
10844        let query = self.selection.select("name");
10845        query.execute(self.graphql_client.clone()).await
10846    }
10847    /// Objects served by this module.
10848    pub fn objects(&self) -> Vec<TypeDef> {
10849        let query = self.selection.select("objects");
10850        vec![TypeDef {
10851            proc: self.proc.clone(),
10852            selection: query,
10853            graphql_client: self.graphql_client.clone(),
10854        }]
10855    }
10856    /// The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile.
10857    pub fn runtime(&self) -> Container {
10858        let query = self.selection.select("runtime");
10859        Container {
10860            proc: self.proc.clone(),
10861            selection: query,
10862            graphql_client: self.graphql_client.clone(),
10863        }
10864    }
10865    /// The SDK config used by this module.
10866    pub fn sdk(&self) -> SdkConfig {
10867        let query = self.selection.select("sdk");
10868        SdkConfig {
10869            proc: self.proc.clone(),
10870            selection: query,
10871            graphql_client: self.graphql_client.clone(),
10872        }
10873    }
10874    /// Serve a module's API in the current session.
10875    /// Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
10876    ///
10877    /// # Arguments
10878    ///
10879    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10880    pub async fn serve(&self) -> Result<Void, DaggerError> {
10881        let query = self.selection.select("serve");
10882        query.execute(self.graphql_client.clone()).await
10883    }
10884    /// Serve a module's API in the current session.
10885    /// Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
10886    ///
10887    /// # Arguments
10888    ///
10889    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10890    pub async fn serve_opts(&self, opts: ModuleServeOpts) -> Result<Void, DaggerError> {
10891        let mut query = self.selection.select("serve");
10892        if let Some(include_dependencies) = opts.include_dependencies {
10893            query = query.arg("includeDependencies", include_dependencies);
10894        }
10895        query.execute(self.graphql_client.clone()).await
10896    }
10897    /// The source for the module.
10898    pub fn source(&self) -> ModuleSource {
10899        let query = self.selection.select("source");
10900        ModuleSource {
10901            proc: self.proc.clone(),
10902            selection: query,
10903            graphql_client: self.graphql_client.clone(),
10904        }
10905    }
10906    /// Forces evaluation of the module, including any loading into the engine and associated validation.
10907    pub async fn sync(&self) -> Result<ModuleId, DaggerError> {
10908        let query = self.selection.select("sync");
10909        query.execute(self.graphql_client.clone()).await
10910    }
10911    /// User-defined default values, loaded from local .env files.
10912    pub fn user_defaults(&self) -> EnvFile {
10913        let query = self.selection.select("userDefaults");
10914        EnvFile {
10915            proc: self.proc.clone(),
10916            selection: query,
10917            graphql_client: self.graphql_client.clone(),
10918        }
10919    }
10920    /// Retrieves the module with the given description
10921    ///
10922    /// # Arguments
10923    ///
10924    /// * `description` - The description to set
10925    pub fn with_description(&self, description: impl Into<String>) -> Module {
10926        let mut query = self.selection.select("withDescription");
10927        query = query.arg("description", description.into());
10928        Module {
10929            proc: self.proc.clone(),
10930            selection: query,
10931            graphql_client: self.graphql_client.clone(),
10932        }
10933    }
10934    /// This module plus the given Enum type and associated values
10935    pub fn with_enum(&self, r#enum: impl IntoID<TypeDefId>) -> Module {
10936        let mut query = self.selection.select("withEnum");
10937        query = query.arg_lazy(
10938            "enum",
10939            Box::new(move || {
10940                let r#enum = r#enum.clone();
10941                Box::pin(async move { r#enum.into_id().await.unwrap().quote() })
10942            }),
10943        );
10944        Module {
10945            proc: self.proc.clone(),
10946            selection: query,
10947            graphql_client: self.graphql_client.clone(),
10948        }
10949    }
10950    /// This module plus the given Interface type and associated functions
10951    pub fn with_interface(&self, iface: impl IntoID<TypeDefId>) -> Module {
10952        let mut query = self.selection.select("withInterface");
10953        query = query.arg_lazy(
10954            "iface",
10955            Box::new(move || {
10956                let iface = iface.clone();
10957                Box::pin(async move { iface.into_id().await.unwrap().quote() })
10958            }),
10959        );
10960        Module {
10961            proc: self.proc.clone(),
10962            selection: query,
10963            graphql_client: self.graphql_client.clone(),
10964        }
10965    }
10966    /// This module plus the given Object type and associated functions.
10967    pub fn with_object(&self, object: impl IntoID<TypeDefId>) -> Module {
10968        let mut query = self.selection.select("withObject");
10969        query = query.arg_lazy(
10970            "object",
10971            Box::new(move || {
10972                let object = object.clone();
10973                Box::pin(async move { object.into_id().await.unwrap().quote() })
10974            }),
10975        );
10976        Module {
10977            proc: self.proc.clone(),
10978            selection: query,
10979            graphql_client: self.graphql_client.clone(),
10980        }
10981    }
10982}
10983#[derive(Clone)]
10984pub struct ModuleConfigClient {
10985    pub proc: Option<Arc<DaggerSessionProc>>,
10986    pub selection: Selection,
10987    pub graphql_client: DynGraphQLClient,
10988}
10989impl ModuleConfigClient {
10990    /// The directory the client is generated in.
10991    pub async fn directory(&self) -> Result<String, DaggerError> {
10992        let query = self.selection.select("directory");
10993        query.execute(self.graphql_client.clone()).await
10994    }
10995    /// The generator to use
10996    pub async fn generator(&self) -> Result<String, DaggerError> {
10997        let query = self.selection.select("generator");
10998        query.execute(self.graphql_client.clone()).await
10999    }
11000    /// A unique identifier for this ModuleConfigClient.
11001    pub async fn id(&self) -> Result<ModuleConfigClientId, DaggerError> {
11002        let query = self.selection.select("id");
11003        query.execute(self.graphql_client.clone()).await
11004    }
11005}
11006#[derive(Clone)]
11007pub struct ModuleSource {
11008    pub proc: Option<Arc<DaggerSessionProc>>,
11009    pub selection: Selection,
11010    pub graphql_client: DynGraphQLClient,
11011}
11012impl ModuleSource {
11013    /// Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation
11014    pub fn as_module(&self) -> Module {
11015        let query = self.selection.select("asModule");
11016        Module {
11017            proc: self.proc.clone(),
11018            selection: query,
11019            graphql_client: self.graphql_client.clone(),
11020        }
11021    }
11022    /// A human readable ref string representation of this module source.
11023    pub async fn as_string(&self) -> Result<String, DaggerError> {
11024        let query = self.selection.select("asString");
11025        query.execute(self.graphql_client.clone()).await
11026    }
11027    /// The blueprint referenced by the module source.
11028    pub fn blueprint(&self) -> ModuleSource {
11029        let query = self.selection.select("blueprint");
11030        ModuleSource {
11031            proc: self.proc.clone(),
11032            selection: query,
11033            graphql_client: self.graphql_client.clone(),
11034        }
11035    }
11036    /// The ref to clone the root of the git repo from. Only valid for git sources.
11037    pub async fn clone_ref(&self) -> Result<String, DaggerError> {
11038        let query = self.selection.select("cloneRef");
11039        query.execute(self.graphql_client.clone()).await
11040    }
11041    /// The resolved commit of the git repo this source points to.
11042    pub async fn commit(&self) -> Result<String, DaggerError> {
11043        let query = self.selection.select("commit");
11044        query.execute(self.graphql_client.clone()).await
11045    }
11046    /// The clients generated for the module.
11047    pub fn config_clients(&self) -> Vec<ModuleConfigClient> {
11048        let query = self.selection.select("configClients");
11049        vec![ModuleConfigClient {
11050            proc: self.proc.clone(),
11051            selection: query,
11052            graphql_client: self.graphql_client.clone(),
11053        }]
11054    }
11055    /// Whether an existing dagger.json for the module was found.
11056    pub async fn config_exists(&self) -> Result<bool, DaggerError> {
11057        let query = self.selection.select("configExists");
11058        query.execute(self.graphql_client.clone()).await
11059    }
11060    /// The full directory loaded for the module source, including the source code as a subdirectory.
11061    pub fn context_directory(&self) -> Directory {
11062        let query = self.selection.select("contextDirectory");
11063        Directory {
11064            proc: self.proc.clone(),
11065            selection: query,
11066            graphql_client: self.graphql_client.clone(),
11067        }
11068    }
11069    /// The dependencies of the module source.
11070    pub fn dependencies(&self) -> Vec<ModuleSource> {
11071        let query = self.selection.select("dependencies");
11072        vec![ModuleSource {
11073            proc: self.proc.clone(),
11074            selection: query,
11075            graphql_client: self.graphql_client.clone(),
11076        }]
11077    }
11078    /// 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.
11079    pub async fn digest(&self) -> Result<String, DaggerError> {
11080        let query = self.selection.select("digest");
11081        query.execute(self.graphql_client.clone()).await
11082    }
11083    /// The directory containing the module configuration and source code (source code may be in a subdir).
11084    ///
11085    /// # Arguments
11086    ///
11087    /// * `path` - A subpath from the source directory to select.
11088    pub fn directory(&self, path: impl Into<String>) -> Directory {
11089        let mut query = self.selection.select("directory");
11090        query = query.arg("path", path.into());
11091        Directory {
11092            proc: self.proc.clone(),
11093            selection: query,
11094            graphql_client: self.graphql_client.clone(),
11095        }
11096    }
11097    /// The engine version of the module.
11098    pub async fn engine_version(&self) -> Result<String, DaggerError> {
11099        let query = self.selection.select("engineVersion");
11100        query.execute(self.graphql_client.clone()).await
11101    }
11102    /// The generated files and directories made on top of the module source's context directory.
11103    pub fn generated_context_directory(&self) -> Directory {
11104        let query = self.selection.select("generatedContextDirectory");
11105        Directory {
11106            proc: self.proc.clone(),
11107            selection: query,
11108            graphql_client: self.graphql_client.clone(),
11109        }
11110    }
11111    /// The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket).
11112    pub async fn html_repo_url(&self) -> Result<String, DaggerError> {
11113        let query = self.selection.select("htmlRepoURL");
11114        query.execute(self.graphql_client.clone()).await
11115    }
11116    /// The URL to the source's git repo in a web browser. Only valid for git sources.
11117    pub async fn html_url(&self) -> Result<String, DaggerError> {
11118        let query = self.selection.select("htmlURL");
11119        query.execute(self.graphql_client.clone()).await
11120    }
11121    /// A unique identifier for this ModuleSource.
11122    pub async fn id(&self) -> Result<ModuleSourceId, DaggerError> {
11123        let query = self.selection.select("id");
11124        query.execute(self.graphql_client.clone()).await
11125    }
11126    /// The introspection schema JSON file for this module source.
11127    /// This file represents the schema visible to the module's source code, including all core types and those from the dependencies.
11128    /// Note: this is in the context of a module, so some core types may be hidden.
11129    pub fn introspection_schema_json(&self) -> File {
11130        let query = self.selection.select("introspectionSchemaJSON");
11131        File {
11132            proc: self.proc.clone(),
11133            selection: query,
11134            graphql_client: self.graphql_client.clone(),
11135        }
11136    }
11137    /// The kind of module source (currently local, git or dir).
11138    pub async fn kind(&self) -> Result<ModuleSourceKind, DaggerError> {
11139        let query = self.selection.select("kind");
11140        query.execute(self.graphql_client.clone()).await
11141    }
11142    /// 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.
11143    pub async fn local_context_directory_path(&self) -> Result<String, DaggerError> {
11144        let query = self.selection.select("localContextDirectoryPath");
11145        query.execute(self.graphql_client.clone()).await
11146    }
11147    /// The name of the module, including any setting via the withName API.
11148    pub async fn module_name(&self) -> Result<String, DaggerError> {
11149        let query = self.selection.select("moduleName");
11150        query.execute(self.graphql_client.clone()).await
11151    }
11152    /// The original name of the module as read from the module's dagger.json (or set for the first time with the withName API).
11153    pub async fn module_original_name(&self) -> Result<String, DaggerError> {
11154        let query = self.selection.select("moduleOriginalName");
11155        query.execute(self.graphql_client.clone()).await
11156    }
11157    /// The original subpath used when instantiating this module source, relative to the context directory.
11158    pub async fn original_subpath(&self) -> Result<String, DaggerError> {
11159        let query = self.selection.select("originalSubpath");
11160        query.execute(self.graphql_client.clone()).await
11161    }
11162    /// The pinned version of this module source.
11163    pub async fn pin(&self) -> Result<String, DaggerError> {
11164        let query = self.selection.select("pin");
11165        query.execute(self.graphql_client.clone()).await
11166    }
11167    /// The import path corresponding to the root of the git repo this source points to. Only valid for git sources.
11168    pub async fn repo_root_path(&self) -> Result<String, DaggerError> {
11169        let query = self.selection.select("repoRootPath");
11170        query.execute(self.graphql_client.clone()).await
11171    }
11172    /// The SDK configuration of the module.
11173    pub fn sdk(&self) -> SdkConfig {
11174        let query = self.selection.select("sdk");
11175        SdkConfig {
11176            proc: self.proc.clone(),
11177            selection: query,
11178            graphql_client: self.graphql_client.clone(),
11179        }
11180    }
11181    /// The path, relative to the context directory, that contains the module's dagger.json.
11182    pub async fn source_root_subpath(&self) -> Result<String, DaggerError> {
11183        let query = self.selection.select("sourceRootSubpath");
11184        query.execute(self.graphql_client.clone()).await
11185    }
11186    /// The path to the directory containing the module's source code, relative to the context directory.
11187    pub async fn source_subpath(&self) -> Result<String, DaggerError> {
11188        let query = self.selection.select("sourceSubpath");
11189        query.execute(self.graphql_client.clone()).await
11190    }
11191    /// Forces evaluation of the module source, including any loading into the engine and associated validation.
11192    pub async fn sync(&self) -> Result<ModuleSourceId, DaggerError> {
11193        let query = self.selection.select("sync");
11194        query.execute(self.graphql_client.clone()).await
11195    }
11196    /// The toolchains referenced by the module source.
11197    pub fn toolchains(&self) -> Vec<ModuleSource> {
11198        let query = self.selection.select("toolchains");
11199        vec![ModuleSource {
11200            proc: self.proc.clone(),
11201            selection: query,
11202            graphql_client: self.graphql_client.clone(),
11203        }]
11204    }
11205    /// User-defined defaults read from local .env files
11206    pub fn user_defaults(&self) -> EnvFile {
11207        let query = self.selection.select("userDefaults");
11208        EnvFile {
11209            proc: self.proc.clone(),
11210            selection: query,
11211            graphql_client: self.graphql_client.clone(),
11212        }
11213    }
11214    /// The specified version of the git repo this source points to.
11215    pub async fn version(&self) -> Result<String, DaggerError> {
11216        let query = self.selection.select("version");
11217        query.execute(self.graphql_client.clone()).await
11218    }
11219    /// Set a blueprint for the module source.
11220    ///
11221    /// # Arguments
11222    ///
11223    /// * `blueprint` - The blueprint module to set.
11224    pub fn with_blueprint(&self, blueprint: impl IntoID<ModuleSourceId>) -> ModuleSource {
11225        let mut query = self.selection.select("withBlueprint");
11226        query = query.arg_lazy(
11227            "blueprint",
11228            Box::new(move || {
11229                let blueprint = blueprint.clone();
11230                Box::pin(async move { blueprint.into_id().await.unwrap().quote() })
11231            }),
11232        );
11233        ModuleSource {
11234            proc: self.proc.clone(),
11235            selection: query,
11236            graphql_client: self.graphql_client.clone(),
11237        }
11238    }
11239    /// Update the module source with a new client to generate.
11240    ///
11241    /// # Arguments
11242    ///
11243    /// * `generator` - The generator to use
11244    /// * `output_dir` - The output directory for the generated client.
11245    pub fn with_client(
11246        &self,
11247        generator: impl Into<String>,
11248        output_dir: impl Into<String>,
11249    ) -> ModuleSource {
11250        let mut query = self.selection.select("withClient");
11251        query = query.arg("generator", generator.into());
11252        query = query.arg("outputDir", output_dir.into());
11253        ModuleSource {
11254            proc: self.proc.clone(),
11255            selection: query,
11256            graphql_client: self.graphql_client.clone(),
11257        }
11258    }
11259    /// Append the provided dependencies to the module source's dependency list.
11260    ///
11261    /// # Arguments
11262    ///
11263    /// * `dependencies` - The dependencies to append.
11264    pub fn with_dependencies(&self, dependencies: Vec<ModuleSourceId>) -> ModuleSource {
11265        let mut query = self.selection.select("withDependencies");
11266        query = query.arg("dependencies", dependencies);
11267        ModuleSource {
11268            proc: self.proc.clone(),
11269            selection: query,
11270            graphql_client: self.graphql_client.clone(),
11271        }
11272    }
11273    /// Upgrade the engine version of the module to the given value.
11274    ///
11275    /// # Arguments
11276    ///
11277    /// * `version` - The engine version to upgrade to.
11278    pub fn with_engine_version(&self, version: impl Into<String>) -> ModuleSource {
11279        let mut query = self.selection.select("withEngineVersion");
11280        query = query.arg("version", version.into());
11281        ModuleSource {
11282            proc: self.proc.clone(),
11283            selection: query,
11284            graphql_client: self.graphql_client.clone(),
11285        }
11286    }
11287    /// Enable the experimental features for the module source.
11288    ///
11289    /// # Arguments
11290    ///
11291    /// * `features` - The experimental features to enable.
11292    pub fn with_experimental_features(
11293        &self,
11294        features: Vec<ModuleSourceExperimentalFeature>,
11295    ) -> ModuleSource {
11296        let mut query = self.selection.select("withExperimentalFeatures");
11297        query = query.arg("features", features);
11298        ModuleSource {
11299            proc: self.proc.clone(),
11300            selection: query,
11301            graphql_client: self.graphql_client.clone(),
11302        }
11303    }
11304    /// Update the module source with additional include patterns for files+directories from its context that are required for building it
11305    ///
11306    /// # Arguments
11307    ///
11308    /// * `patterns` - The new additional include patterns.
11309    pub fn with_includes(&self, patterns: Vec<impl Into<String>>) -> ModuleSource {
11310        let mut query = self.selection.select("withIncludes");
11311        query = query.arg(
11312            "patterns",
11313            patterns
11314                .into_iter()
11315                .map(|i| i.into())
11316                .collect::<Vec<String>>(),
11317        );
11318        ModuleSource {
11319            proc: self.proc.clone(),
11320            selection: query,
11321            graphql_client: self.graphql_client.clone(),
11322        }
11323    }
11324    /// Update the module source with a new name.
11325    ///
11326    /// # Arguments
11327    ///
11328    /// * `name` - The name to set.
11329    pub fn with_name(&self, name: impl Into<String>) -> ModuleSource {
11330        let mut query = self.selection.select("withName");
11331        query = query.arg("name", name.into());
11332        ModuleSource {
11333            proc: self.proc.clone(),
11334            selection: query,
11335            graphql_client: self.graphql_client.clone(),
11336        }
11337    }
11338    /// Update the module source with a new SDK.
11339    ///
11340    /// # Arguments
11341    ///
11342    /// * `source` - The SDK source to set.
11343    pub fn with_sdk(&self, source: impl Into<String>) -> ModuleSource {
11344        let mut query = self.selection.select("withSDK");
11345        query = query.arg("source", source.into());
11346        ModuleSource {
11347            proc: self.proc.clone(),
11348            selection: query,
11349            graphql_client: self.graphql_client.clone(),
11350        }
11351    }
11352    /// Update the module source with a new source subpath.
11353    ///
11354    /// # Arguments
11355    ///
11356    /// * `path` - The path to set as the source subpath. Must be relative to the module source's source root directory.
11357    pub fn with_source_subpath(&self, path: impl Into<String>) -> ModuleSource {
11358        let mut query = self.selection.select("withSourceSubpath");
11359        query = query.arg("path", path.into());
11360        ModuleSource {
11361            proc: self.proc.clone(),
11362            selection: query,
11363            graphql_client: self.graphql_client.clone(),
11364        }
11365    }
11366    /// Add toolchains to the module source.
11367    ///
11368    /// # Arguments
11369    ///
11370    /// * `toolchains` - The toolchain modules to add.
11371    pub fn with_toolchains(&self, toolchains: Vec<ModuleSourceId>) -> ModuleSource {
11372        let mut query = self.selection.select("withToolchains");
11373        query = query.arg("toolchains", toolchains);
11374        ModuleSource {
11375            proc: self.proc.clone(),
11376            selection: query,
11377            graphql_client: self.graphql_client.clone(),
11378        }
11379    }
11380    /// Update the blueprint module to the latest version.
11381    pub fn with_update_blueprint(&self) -> ModuleSource {
11382        let query = self.selection.select("withUpdateBlueprint");
11383        ModuleSource {
11384            proc: self.proc.clone(),
11385            selection: query,
11386            graphql_client: self.graphql_client.clone(),
11387        }
11388    }
11389    /// Update one or more module dependencies.
11390    ///
11391    /// # Arguments
11392    ///
11393    /// * `dependencies` - The dependencies to update.
11394    pub fn with_update_dependencies(&self, dependencies: Vec<impl Into<String>>) -> ModuleSource {
11395        let mut query = self.selection.select("withUpdateDependencies");
11396        query = query.arg(
11397            "dependencies",
11398            dependencies
11399                .into_iter()
11400                .map(|i| i.into())
11401                .collect::<Vec<String>>(),
11402        );
11403        ModuleSource {
11404            proc: self.proc.clone(),
11405            selection: query,
11406            graphql_client: self.graphql_client.clone(),
11407        }
11408    }
11409    /// Update one or more toolchains.
11410    ///
11411    /// # Arguments
11412    ///
11413    /// * `toolchains` - The toolchains to update.
11414    pub fn with_update_toolchains(&self, toolchains: Vec<impl Into<String>>) -> ModuleSource {
11415        let mut query = self.selection.select("withUpdateToolchains");
11416        query = query.arg(
11417            "toolchains",
11418            toolchains
11419                .into_iter()
11420                .map(|i| i.into())
11421                .collect::<Vec<String>>(),
11422        );
11423        ModuleSource {
11424            proc: self.proc.clone(),
11425            selection: query,
11426            graphql_client: self.graphql_client.clone(),
11427        }
11428    }
11429    /// Update one or more clients.
11430    ///
11431    /// # Arguments
11432    ///
11433    /// * `clients` - The clients to update
11434    pub fn with_updated_clients(&self, clients: Vec<impl Into<String>>) -> ModuleSource {
11435        let mut query = self.selection.select("withUpdatedClients");
11436        query = query.arg(
11437            "clients",
11438            clients
11439                .into_iter()
11440                .map(|i| i.into())
11441                .collect::<Vec<String>>(),
11442        );
11443        ModuleSource {
11444            proc: self.proc.clone(),
11445            selection: query,
11446            graphql_client: self.graphql_client.clone(),
11447        }
11448    }
11449    /// Remove the current blueprint from the module source.
11450    pub fn without_blueprint(&self) -> ModuleSource {
11451        let query = self.selection.select("withoutBlueprint");
11452        ModuleSource {
11453            proc: self.proc.clone(),
11454            selection: query,
11455            graphql_client: self.graphql_client.clone(),
11456        }
11457    }
11458    /// Remove a client from the module source.
11459    ///
11460    /// # Arguments
11461    ///
11462    /// * `path` - The path of the client to remove.
11463    pub fn without_client(&self, path: impl Into<String>) -> ModuleSource {
11464        let mut query = self.selection.select("withoutClient");
11465        query = query.arg("path", path.into());
11466        ModuleSource {
11467            proc: self.proc.clone(),
11468            selection: query,
11469            graphql_client: self.graphql_client.clone(),
11470        }
11471    }
11472    /// Remove the provided dependencies from the module source's dependency list.
11473    ///
11474    /// # Arguments
11475    ///
11476    /// * `dependencies` - The dependencies to remove.
11477    pub fn without_dependencies(&self, dependencies: Vec<impl Into<String>>) -> ModuleSource {
11478        let mut query = self.selection.select("withoutDependencies");
11479        query = query.arg(
11480            "dependencies",
11481            dependencies
11482                .into_iter()
11483                .map(|i| i.into())
11484                .collect::<Vec<String>>(),
11485        );
11486        ModuleSource {
11487            proc: self.proc.clone(),
11488            selection: query,
11489            graphql_client: self.graphql_client.clone(),
11490        }
11491    }
11492    /// Disable experimental features for the module source.
11493    ///
11494    /// # Arguments
11495    ///
11496    /// * `features` - The experimental features to disable.
11497    pub fn without_experimental_features(
11498        &self,
11499        features: Vec<ModuleSourceExperimentalFeature>,
11500    ) -> ModuleSource {
11501        let mut query = self.selection.select("withoutExperimentalFeatures");
11502        query = query.arg("features", features);
11503        ModuleSource {
11504            proc: self.proc.clone(),
11505            selection: query,
11506            graphql_client: self.graphql_client.clone(),
11507        }
11508    }
11509    /// Remove the provided toolchains from the module source.
11510    ///
11511    /// # Arguments
11512    ///
11513    /// * `toolchains` - The toolchains to remove.
11514    pub fn without_toolchains(&self, toolchains: Vec<impl Into<String>>) -> ModuleSource {
11515        let mut query = self.selection.select("withoutToolchains");
11516        query = query.arg(
11517            "toolchains",
11518            toolchains
11519                .into_iter()
11520                .map(|i| i.into())
11521                .collect::<Vec<String>>(),
11522        );
11523        ModuleSource {
11524            proc: self.proc.clone(),
11525            selection: query,
11526            graphql_client: self.graphql_client.clone(),
11527        }
11528    }
11529}
11530#[derive(Clone)]
11531pub struct ObjectTypeDef {
11532    pub proc: Option<Arc<DaggerSessionProc>>,
11533    pub selection: Selection,
11534    pub graphql_client: DynGraphQLClient,
11535}
11536impl ObjectTypeDef {
11537    /// The function used to construct new instances of this object, if any
11538    pub fn constructor(&self) -> Function {
11539        let query = self.selection.select("constructor");
11540        Function {
11541            proc: self.proc.clone(),
11542            selection: query,
11543            graphql_client: self.graphql_client.clone(),
11544        }
11545    }
11546    /// The reason this enum member is deprecated, if any.
11547    pub async fn deprecated(&self) -> Result<String, DaggerError> {
11548        let query = self.selection.select("deprecated");
11549        query.execute(self.graphql_client.clone()).await
11550    }
11551    /// The doc string for the object, if any.
11552    pub async fn description(&self) -> Result<String, DaggerError> {
11553        let query = self.selection.select("description");
11554        query.execute(self.graphql_client.clone()).await
11555    }
11556    /// Static fields defined on this object, if any.
11557    pub fn fields(&self) -> Vec<FieldTypeDef> {
11558        let query = self.selection.select("fields");
11559        vec![FieldTypeDef {
11560            proc: self.proc.clone(),
11561            selection: query,
11562            graphql_client: self.graphql_client.clone(),
11563        }]
11564    }
11565    /// Functions defined on this object, if any.
11566    pub fn functions(&self) -> Vec<Function> {
11567        let query = self.selection.select("functions");
11568        vec![Function {
11569            proc: self.proc.clone(),
11570            selection: query,
11571            graphql_client: self.graphql_client.clone(),
11572        }]
11573    }
11574    /// A unique identifier for this ObjectTypeDef.
11575    pub async fn id(&self) -> Result<ObjectTypeDefId, DaggerError> {
11576        let query = self.selection.select("id");
11577        query.execute(self.graphql_client.clone()).await
11578    }
11579    /// The name of the object.
11580    pub async fn name(&self) -> Result<String, DaggerError> {
11581        let query = self.selection.select("name");
11582        query.execute(self.graphql_client.clone()).await
11583    }
11584    /// The location of this object declaration.
11585    pub fn source_map(&self) -> SourceMap {
11586        let query = self.selection.select("sourceMap");
11587        SourceMap {
11588            proc: self.proc.clone(),
11589            selection: query,
11590            graphql_client: self.graphql_client.clone(),
11591        }
11592    }
11593    /// If this ObjectTypeDef is associated with a Module, the name of the module. Unset otherwise.
11594    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
11595        let query = self.selection.select("sourceModuleName");
11596        query.execute(self.graphql_client.clone()).await
11597    }
11598}
11599#[derive(Clone)]
11600pub struct Port {
11601    pub proc: Option<Arc<DaggerSessionProc>>,
11602    pub selection: Selection,
11603    pub graphql_client: DynGraphQLClient,
11604}
11605impl Port {
11606    /// The port description.
11607    pub async fn description(&self) -> Result<String, DaggerError> {
11608        let query = self.selection.select("description");
11609        query.execute(self.graphql_client.clone()).await
11610    }
11611    /// Skip the health check when run as a service.
11612    pub async fn experimental_skip_healthcheck(&self) -> Result<bool, DaggerError> {
11613        let query = self.selection.select("experimentalSkipHealthcheck");
11614        query.execute(self.graphql_client.clone()).await
11615    }
11616    /// A unique identifier for this Port.
11617    pub async fn id(&self) -> Result<PortId, DaggerError> {
11618        let query = self.selection.select("id");
11619        query.execute(self.graphql_client.clone()).await
11620    }
11621    /// The port number.
11622    pub async fn port(&self) -> Result<isize, DaggerError> {
11623        let query = self.selection.select("port");
11624        query.execute(self.graphql_client.clone()).await
11625    }
11626    /// The transport layer protocol.
11627    pub async fn protocol(&self) -> Result<NetworkProtocol, DaggerError> {
11628        let query = self.selection.select("protocol");
11629        query.execute(self.graphql_client.clone()).await
11630    }
11631}
11632#[derive(Clone)]
11633pub struct Query {
11634    pub proc: Option<Arc<DaggerSessionProc>>,
11635    pub selection: Selection,
11636    pub graphql_client: DynGraphQLClient,
11637}
11638#[derive(Builder, Debug, PartialEq)]
11639pub struct QueryContainerOpts {
11640    /// Platform to initialize the container with. Defaults to the native platform of the current engine
11641    #[builder(setter(into, strip_option), default)]
11642    pub platform: Option<Platform>,
11643}
11644#[derive(Builder, Debug, PartialEq)]
11645pub struct QueryEnvOpts {
11646    /// Give the environment the same privileges as the caller: core API including host access, current module, and dependencies
11647    #[builder(setter(into, strip_option), default)]
11648    pub privileged: Option<bool>,
11649    /// Allow new outputs to be declared and saved in the environment
11650    #[builder(setter(into, strip_option), default)]
11651    pub writable: Option<bool>,
11652}
11653#[derive(Builder, Debug, PartialEq)]
11654pub struct QueryEnvFileOpts {
11655    /// Replace "${VAR}" or "$VAR" with the value of other vars
11656    #[builder(setter(into, strip_option), default)]
11657    pub expand: Option<bool>,
11658}
11659#[derive(Builder, Debug, PartialEq)]
11660pub struct QueryFileOpts {
11661    /// Permissions of the new file. Example: 0600
11662    #[builder(setter(into, strip_option), default)]
11663    pub permissions: Option<isize>,
11664}
11665#[derive(Builder, Debug, PartialEq)]
11666pub struct QueryGitOpts<'a> {
11667    /// A service which must be started before the repo is fetched.
11668    #[builder(setter(into, strip_option), default)]
11669    pub experimental_service_host: Option<ServiceId>,
11670    /// Secret used to populate the Authorization HTTP header
11671    #[builder(setter(into, strip_option), default)]
11672    pub http_auth_header: Option<SecretId>,
11673    /// Secret used to populate the password during basic HTTP Authorization
11674    #[builder(setter(into, strip_option), default)]
11675    pub http_auth_token: Option<SecretId>,
11676    /// Username used to populate the password during basic HTTP Authorization
11677    #[builder(setter(into, strip_option), default)]
11678    pub http_auth_username: Option<&'a str>,
11679    /// DEPRECATED: Set to true to keep .git directory.
11680    #[builder(setter(into, strip_option), default)]
11681    pub keep_git_dir: Option<bool>,
11682    /// Set SSH auth socket
11683    #[builder(setter(into, strip_option), default)]
11684    pub ssh_auth_socket: Option<SocketId>,
11685    /// Set SSH known hosts
11686    #[builder(setter(into, strip_option), default)]
11687    pub ssh_known_hosts: Option<&'a str>,
11688}
11689#[derive(Builder, Debug, PartialEq)]
11690pub struct QueryHttpOpts<'a> {
11691    /// Secret used to populate the Authorization HTTP header
11692    #[builder(setter(into, strip_option), default)]
11693    pub auth_header: Option<SecretId>,
11694    /// A service which must be started before the URL is fetched.
11695    #[builder(setter(into, strip_option), default)]
11696    pub experimental_service_host: Option<ServiceId>,
11697    /// File name to use for the file. Defaults to the last part of the URL.
11698    #[builder(setter(into, strip_option), default)]
11699    pub name: Option<&'a str>,
11700    /// Permissions to set on the file.
11701    #[builder(setter(into, strip_option), default)]
11702    pub permissions: Option<isize>,
11703}
11704#[derive(Builder, Debug, PartialEq)]
11705pub struct QueryLlmOpts<'a> {
11706    /// Cap the number of API calls for this LLM
11707    #[builder(setter(into, strip_option), default)]
11708    pub max_api_calls: Option<isize>,
11709    /// Model to use
11710    #[builder(setter(into, strip_option), default)]
11711    pub model: Option<&'a str>,
11712}
11713#[derive(Builder, Debug, PartialEq)]
11714pub struct QueryModuleSourceOpts<'a> {
11715    /// 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.
11716    #[builder(setter(into, strip_option), default)]
11717    pub allow_not_exists: Option<bool>,
11718    /// If true, do not attempt to find dagger.json in a parent directory of the provided path. Only relevant for local module sources.
11719    #[builder(setter(into, strip_option), default)]
11720    pub disable_find_up: Option<bool>,
11721    /// The pinned version of the module source
11722    #[builder(setter(into, strip_option), default)]
11723    pub ref_pin: Option<&'a str>,
11724    /// If set, error out if the ref string is not of the provided requireKind.
11725    #[builder(setter(into, strip_option), default)]
11726    pub require_kind: Option<ModuleSourceKind>,
11727}
11728#[derive(Builder, Debug, PartialEq)]
11729pub struct QuerySecretOpts<'a> {
11730    /// 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.
11731    /// 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.
11732    /// If not set, the cache key for the secret will be derived from its plaintext value as looked up when the secret is constructed.
11733    #[builder(setter(into, strip_option), default)]
11734    pub cache_key: Option<&'a str>,
11735}
11736impl Query {
11737    /// initialize an address to load directories, containers, secrets or other object types.
11738    pub fn address(&self, value: impl Into<String>) -> Address {
11739        let mut query = self.selection.select("address");
11740        query = query.arg("value", value.into());
11741        Address {
11742            proc: self.proc.clone(),
11743            selection: query,
11744            graphql_client: self.graphql_client.clone(),
11745        }
11746    }
11747    /// Constructs a cache volume for a given cache key.
11748    ///
11749    /// # Arguments
11750    ///
11751    /// * `key` - A string identifier to target this cache volume (e.g., "modules-cache").
11752    pub fn cache_volume(&self, key: impl Into<String>) -> CacheVolume {
11753        let mut query = self.selection.select("cacheVolume");
11754        query = query.arg("key", key.into());
11755        CacheVolume {
11756            proc: self.proc.clone(),
11757            selection: query,
11758            graphql_client: self.graphql_client.clone(),
11759        }
11760    }
11761    /// Dagger Cloud configuration and state
11762    pub fn cloud(&self) -> Cloud {
11763        let query = self.selection.select("cloud");
11764        Cloud {
11765            proc: self.proc.clone(),
11766            selection: query,
11767            graphql_client: self.graphql_client.clone(),
11768        }
11769    }
11770    /// Creates a scratch container, with no image or metadata.
11771    /// To pull an image, follow up with the "from" function.
11772    ///
11773    /// # Arguments
11774    ///
11775    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11776    pub fn container(&self) -> Container {
11777        let query = self.selection.select("container");
11778        Container {
11779            proc: self.proc.clone(),
11780            selection: query,
11781            graphql_client: self.graphql_client.clone(),
11782        }
11783    }
11784    /// Creates a scratch container, with no image or metadata.
11785    /// To pull an image, follow up with the "from" function.
11786    ///
11787    /// # Arguments
11788    ///
11789    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11790    pub fn container_opts(&self, opts: QueryContainerOpts) -> Container {
11791        let mut query = self.selection.select("container");
11792        if let Some(platform) = opts.platform {
11793            query = query.arg("platform", platform);
11794        }
11795        Container {
11796            proc: self.proc.clone(),
11797            selection: query,
11798            graphql_client: self.graphql_client.clone(),
11799        }
11800    }
11801    /// Returns the current environment
11802    /// 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.
11803    /// 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.
11804    pub fn current_env(&self) -> Env {
11805        let query = self.selection.select("currentEnv");
11806        Env {
11807            proc: self.proc.clone(),
11808            selection: query,
11809            graphql_client: self.graphql_client.clone(),
11810        }
11811    }
11812    /// The FunctionCall context that the SDK caller is currently executing in.
11813    /// If the caller is not currently executing in a function, this will return an error.
11814    pub fn current_function_call(&self) -> FunctionCall {
11815        let query = self.selection.select("currentFunctionCall");
11816        FunctionCall {
11817            proc: self.proc.clone(),
11818            selection: query,
11819            graphql_client: self.graphql_client.clone(),
11820        }
11821    }
11822    /// The module currently being served in the session, if any.
11823    pub fn current_module(&self) -> CurrentModule {
11824        let query = self.selection.select("currentModule");
11825        CurrentModule {
11826            proc: self.proc.clone(),
11827            selection: query,
11828            graphql_client: self.graphql_client.clone(),
11829        }
11830    }
11831    /// The TypeDef representations of the objects currently being served in the session.
11832    pub fn current_type_defs(&self) -> Vec<TypeDef> {
11833        let query = self.selection.select("currentTypeDefs");
11834        vec![TypeDef {
11835            proc: self.proc.clone(),
11836            selection: query,
11837            graphql_client: self.graphql_client.clone(),
11838        }]
11839    }
11840    /// The default platform of the engine.
11841    pub async fn default_platform(&self) -> Result<Platform, DaggerError> {
11842        let query = self.selection.select("defaultPlatform");
11843        query.execute(self.graphql_client.clone()).await
11844    }
11845    /// Creates an empty directory.
11846    pub fn directory(&self) -> Directory {
11847        let query = self.selection.select("directory");
11848        Directory {
11849            proc: self.proc.clone(),
11850            selection: query,
11851            graphql_client: self.graphql_client.clone(),
11852        }
11853    }
11854    /// The Dagger engine container configuration and state
11855    pub fn engine(&self) -> Engine {
11856        let query = self.selection.select("engine");
11857        Engine {
11858            proc: self.proc.clone(),
11859            selection: query,
11860            graphql_client: self.graphql_client.clone(),
11861        }
11862    }
11863    /// Initializes a new environment
11864    ///
11865    /// # Arguments
11866    ///
11867    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11868    pub fn env(&self) -> Env {
11869        let query = self.selection.select("env");
11870        Env {
11871            proc: self.proc.clone(),
11872            selection: query,
11873            graphql_client: self.graphql_client.clone(),
11874        }
11875    }
11876    /// Initializes a new environment
11877    ///
11878    /// # Arguments
11879    ///
11880    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11881    pub fn env_opts(&self, opts: QueryEnvOpts) -> Env {
11882        let mut query = self.selection.select("env");
11883        if let Some(privileged) = opts.privileged {
11884            query = query.arg("privileged", privileged);
11885        }
11886        if let Some(writable) = opts.writable {
11887            query = query.arg("writable", writable);
11888        }
11889        Env {
11890            proc: self.proc.clone(),
11891            selection: query,
11892            graphql_client: self.graphql_client.clone(),
11893        }
11894    }
11895    /// Initialize an environment file
11896    ///
11897    /// # Arguments
11898    ///
11899    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11900    pub fn env_file(&self) -> EnvFile {
11901        let query = self.selection.select("envFile");
11902        EnvFile {
11903            proc: self.proc.clone(),
11904            selection: query,
11905            graphql_client: self.graphql_client.clone(),
11906        }
11907    }
11908    /// Initialize an environment file
11909    ///
11910    /// # Arguments
11911    ///
11912    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11913    pub fn env_file_opts(&self, opts: QueryEnvFileOpts) -> EnvFile {
11914        let mut query = self.selection.select("envFile");
11915        if let Some(expand) = opts.expand {
11916            query = query.arg("expand", expand);
11917        }
11918        EnvFile {
11919            proc: self.proc.clone(),
11920            selection: query,
11921            graphql_client: self.graphql_client.clone(),
11922        }
11923    }
11924    /// Create a new error.
11925    ///
11926    /// # Arguments
11927    ///
11928    /// * `message` - A brief description of the error.
11929    pub fn error(&self, message: impl Into<String>) -> Error {
11930        let mut query = self.selection.select("error");
11931        query = query.arg("message", message.into());
11932        Error {
11933            proc: self.proc.clone(),
11934            selection: query,
11935            graphql_client: self.graphql_client.clone(),
11936        }
11937    }
11938    /// Creates a file with the specified contents.
11939    ///
11940    /// # Arguments
11941    ///
11942    /// * `name` - Name of the new file. Example: "foo.txt"
11943    /// * `contents` - Contents of the new file. Example: "Hello world!"
11944    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11945    pub fn file(&self, name: impl Into<String>, contents: impl Into<String>) -> File {
11946        let mut query = self.selection.select("file");
11947        query = query.arg("name", name.into());
11948        query = query.arg("contents", contents.into());
11949        File {
11950            proc: self.proc.clone(),
11951            selection: query,
11952            graphql_client: self.graphql_client.clone(),
11953        }
11954    }
11955    /// Creates a file with the specified contents.
11956    ///
11957    /// # Arguments
11958    ///
11959    /// * `name` - Name of the new file. Example: "foo.txt"
11960    /// * `contents` - Contents of the new file. Example: "Hello world!"
11961    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11962    pub fn file_opts(
11963        &self,
11964        name: impl Into<String>,
11965        contents: impl Into<String>,
11966        opts: QueryFileOpts,
11967    ) -> File {
11968        let mut query = self.selection.select("file");
11969        query = query.arg("name", name.into());
11970        query = query.arg("contents", contents.into());
11971        if let Some(permissions) = opts.permissions {
11972            query = query.arg("permissions", permissions);
11973        }
11974        File {
11975            proc: self.proc.clone(),
11976            selection: query,
11977            graphql_client: self.graphql_client.clone(),
11978        }
11979    }
11980    /// Creates a function.
11981    ///
11982    /// # Arguments
11983    ///
11984    /// * `name` - Name of the function, in its original format from the implementation language.
11985    /// * `return_type` - Return type of the function.
11986    pub fn function(
11987        &self,
11988        name: impl Into<String>,
11989        return_type: impl IntoID<TypeDefId>,
11990    ) -> Function {
11991        let mut query = self.selection.select("function");
11992        query = query.arg("name", name.into());
11993        query = query.arg_lazy(
11994            "returnType",
11995            Box::new(move || {
11996                let return_type = return_type.clone();
11997                Box::pin(async move { return_type.into_id().await.unwrap().quote() })
11998            }),
11999        );
12000        Function {
12001            proc: self.proc.clone(),
12002            selection: query,
12003            graphql_client: self.graphql_client.clone(),
12004        }
12005    }
12006    /// Create a code generation result, given a directory containing the generated code.
12007    pub fn generated_code(&self, code: impl IntoID<DirectoryId>) -> GeneratedCode {
12008        let mut query = self.selection.select("generatedCode");
12009        query = query.arg_lazy(
12010            "code",
12011            Box::new(move || {
12012                let code = code.clone();
12013                Box::pin(async move { code.into_id().await.unwrap().quote() })
12014            }),
12015        );
12016        GeneratedCode {
12017            proc: self.proc.clone(),
12018            selection: query,
12019            graphql_client: self.graphql_client.clone(),
12020        }
12021    }
12022    /// Queries a Git repository.
12023    ///
12024    /// # Arguments
12025    ///
12026    /// * `url` - URL of the git repository.
12027    ///
12028    /// Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.
12029    ///
12030    /// Suffix ".git" is optional.
12031    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12032    pub fn git(&self, url: impl Into<String>) -> GitRepository {
12033        let mut query = self.selection.select("git");
12034        query = query.arg("url", url.into());
12035        GitRepository {
12036            proc: self.proc.clone(),
12037            selection: query,
12038            graphql_client: self.graphql_client.clone(),
12039        }
12040    }
12041    /// Queries a Git repository.
12042    ///
12043    /// # Arguments
12044    ///
12045    /// * `url` - URL of the git repository.
12046    ///
12047    /// Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.
12048    ///
12049    /// Suffix ".git" is optional.
12050    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12051    pub fn git_opts<'a>(&self, url: impl Into<String>, opts: QueryGitOpts<'a>) -> GitRepository {
12052        let mut query = self.selection.select("git");
12053        query = query.arg("url", url.into());
12054        if let Some(keep_git_dir) = opts.keep_git_dir {
12055            query = query.arg("keepGitDir", keep_git_dir);
12056        }
12057        if let Some(ssh_known_hosts) = opts.ssh_known_hosts {
12058            query = query.arg("sshKnownHosts", ssh_known_hosts);
12059        }
12060        if let Some(ssh_auth_socket) = opts.ssh_auth_socket {
12061            query = query.arg("sshAuthSocket", ssh_auth_socket);
12062        }
12063        if let Some(http_auth_username) = opts.http_auth_username {
12064            query = query.arg("httpAuthUsername", http_auth_username);
12065        }
12066        if let Some(http_auth_token) = opts.http_auth_token {
12067            query = query.arg("httpAuthToken", http_auth_token);
12068        }
12069        if let Some(http_auth_header) = opts.http_auth_header {
12070            query = query.arg("httpAuthHeader", http_auth_header);
12071        }
12072        if let Some(experimental_service_host) = opts.experimental_service_host {
12073            query = query.arg("experimentalServiceHost", experimental_service_host);
12074        }
12075        GitRepository {
12076            proc: self.proc.clone(),
12077            selection: query,
12078            graphql_client: self.graphql_client.clone(),
12079        }
12080    }
12081    /// Queries the host environment.
12082    pub fn host(&self) -> Host {
12083        let query = self.selection.select("host");
12084        Host {
12085            proc: self.proc.clone(),
12086            selection: query,
12087            graphql_client: self.graphql_client.clone(),
12088        }
12089    }
12090    /// Returns a file containing an http remote url content.
12091    ///
12092    /// # Arguments
12093    ///
12094    /// * `url` - HTTP url to get the content from (e.g., "https://docs.dagger.io").
12095    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12096    pub fn http(&self, url: impl Into<String>) -> File {
12097        let mut query = self.selection.select("http");
12098        query = query.arg("url", url.into());
12099        File {
12100            proc: self.proc.clone(),
12101            selection: query,
12102            graphql_client: self.graphql_client.clone(),
12103        }
12104    }
12105    /// Returns a file containing an http remote url content.
12106    ///
12107    /// # Arguments
12108    ///
12109    /// * `url` - HTTP url to get the content from (e.g., "https://docs.dagger.io").
12110    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12111    pub fn http_opts<'a>(&self, url: impl Into<String>, opts: QueryHttpOpts<'a>) -> File {
12112        let mut query = self.selection.select("http");
12113        query = query.arg("url", url.into());
12114        if let Some(name) = opts.name {
12115            query = query.arg("name", name);
12116        }
12117        if let Some(permissions) = opts.permissions {
12118            query = query.arg("permissions", permissions);
12119        }
12120        if let Some(auth_header) = opts.auth_header {
12121            query = query.arg("authHeader", auth_header);
12122        }
12123        if let Some(experimental_service_host) = opts.experimental_service_host {
12124            query = query.arg("experimentalServiceHost", experimental_service_host);
12125        }
12126        File {
12127            proc: self.proc.clone(),
12128            selection: query,
12129            graphql_client: self.graphql_client.clone(),
12130        }
12131    }
12132    /// Initialize a JSON value
12133    pub fn json(&self) -> JsonValue {
12134        let query = self.selection.select("json");
12135        JsonValue {
12136            proc: self.proc.clone(),
12137            selection: query,
12138            graphql_client: self.graphql_client.clone(),
12139        }
12140    }
12141    /// Initialize a Large Language Model (LLM)
12142    ///
12143    /// # Arguments
12144    ///
12145    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12146    pub fn llm(&self) -> Llm {
12147        let query = self.selection.select("llm");
12148        Llm {
12149            proc: self.proc.clone(),
12150            selection: query,
12151            graphql_client: self.graphql_client.clone(),
12152        }
12153    }
12154    /// Initialize a Large Language Model (LLM)
12155    ///
12156    /// # Arguments
12157    ///
12158    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12159    pub fn llm_opts<'a>(&self, opts: QueryLlmOpts<'a>) -> Llm {
12160        let mut query = self.selection.select("llm");
12161        if let Some(model) = opts.model {
12162            query = query.arg("model", model);
12163        }
12164        if let Some(max_api_calls) = opts.max_api_calls {
12165            query = query.arg("maxAPICalls", max_api_calls);
12166        }
12167        Llm {
12168            proc: self.proc.clone(),
12169            selection: query,
12170            graphql_client: self.graphql_client.clone(),
12171        }
12172    }
12173    /// Load a Address from its ID.
12174    pub fn load_address_from_id(&self, id: impl IntoID<AddressId>) -> Address {
12175        let mut query = self.selection.select("loadAddressFromID");
12176        query = query.arg_lazy(
12177            "id",
12178            Box::new(move || {
12179                let id = id.clone();
12180                Box::pin(async move { id.into_id().await.unwrap().quote() })
12181            }),
12182        );
12183        Address {
12184            proc: self.proc.clone(),
12185            selection: query,
12186            graphql_client: self.graphql_client.clone(),
12187        }
12188    }
12189    /// Load a Binding from its ID.
12190    pub fn load_binding_from_id(&self, id: impl IntoID<BindingId>) -> Binding {
12191        let mut query = self.selection.select("loadBindingFromID");
12192        query = query.arg_lazy(
12193            "id",
12194            Box::new(move || {
12195                let id = id.clone();
12196                Box::pin(async move { id.into_id().await.unwrap().quote() })
12197            }),
12198        );
12199        Binding {
12200            proc: self.proc.clone(),
12201            selection: query,
12202            graphql_client: self.graphql_client.clone(),
12203        }
12204    }
12205    /// Load a CacheVolume from its ID.
12206    pub fn load_cache_volume_from_id(&self, id: impl IntoID<CacheVolumeId>) -> CacheVolume {
12207        let mut query = self.selection.select("loadCacheVolumeFromID");
12208        query = query.arg_lazy(
12209            "id",
12210            Box::new(move || {
12211                let id = id.clone();
12212                Box::pin(async move { id.into_id().await.unwrap().quote() })
12213            }),
12214        );
12215        CacheVolume {
12216            proc: self.proc.clone(),
12217            selection: query,
12218            graphql_client: self.graphql_client.clone(),
12219        }
12220    }
12221    /// Load a Changeset from its ID.
12222    pub fn load_changeset_from_id(&self, id: impl IntoID<ChangesetId>) -> Changeset {
12223        let mut query = self.selection.select("loadChangesetFromID");
12224        query = query.arg_lazy(
12225            "id",
12226            Box::new(move || {
12227                let id = id.clone();
12228                Box::pin(async move { id.into_id().await.unwrap().quote() })
12229            }),
12230        );
12231        Changeset {
12232            proc: self.proc.clone(),
12233            selection: query,
12234            graphql_client: self.graphql_client.clone(),
12235        }
12236    }
12237    /// Load a Check from its ID.
12238    pub fn load_check_from_id(&self, id: impl IntoID<CheckId>) -> Check {
12239        let mut query = self.selection.select("loadCheckFromID");
12240        query = query.arg_lazy(
12241            "id",
12242            Box::new(move || {
12243                let id = id.clone();
12244                Box::pin(async move { id.into_id().await.unwrap().quote() })
12245            }),
12246        );
12247        Check {
12248            proc: self.proc.clone(),
12249            selection: query,
12250            graphql_client: self.graphql_client.clone(),
12251        }
12252    }
12253    /// Load a CheckGroup from its ID.
12254    pub fn load_check_group_from_id(&self, id: impl IntoID<CheckGroupId>) -> CheckGroup {
12255        let mut query = self.selection.select("loadCheckGroupFromID");
12256        query = query.arg_lazy(
12257            "id",
12258            Box::new(move || {
12259                let id = id.clone();
12260                Box::pin(async move { id.into_id().await.unwrap().quote() })
12261            }),
12262        );
12263        CheckGroup {
12264            proc: self.proc.clone(),
12265            selection: query,
12266            graphql_client: self.graphql_client.clone(),
12267        }
12268    }
12269    /// Load a Cloud from its ID.
12270    pub fn load_cloud_from_id(&self, id: impl IntoID<CloudId>) -> Cloud {
12271        let mut query = self.selection.select("loadCloudFromID");
12272        query = query.arg_lazy(
12273            "id",
12274            Box::new(move || {
12275                let id = id.clone();
12276                Box::pin(async move { id.into_id().await.unwrap().quote() })
12277            }),
12278        );
12279        Cloud {
12280            proc: self.proc.clone(),
12281            selection: query,
12282            graphql_client: self.graphql_client.clone(),
12283        }
12284    }
12285    /// Load a Container from its ID.
12286    pub fn load_container_from_id(&self, id: impl IntoID<ContainerId>) -> Container {
12287        let mut query = self.selection.select("loadContainerFromID");
12288        query = query.arg_lazy(
12289            "id",
12290            Box::new(move || {
12291                let id = id.clone();
12292                Box::pin(async move { id.into_id().await.unwrap().quote() })
12293            }),
12294        );
12295        Container {
12296            proc: self.proc.clone(),
12297            selection: query,
12298            graphql_client: self.graphql_client.clone(),
12299        }
12300    }
12301    /// Load a CurrentModule from its ID.
12302    pub fn load_current_module_from_id(&self, id: impl IntoID<CurrentModuleId>) -> CurrentModule {
12303        let mut query = self.selection.select("loadCurrentModuleFromID");
12304        query = query.arg_lazy(
12305            "id",
12306            Box::new(move || {
12307                let id = id.clone();
12308                Box::pin(async move { id.into_id().await.unwrap().quote() })
12309            }),
12310        );
12311        CurrentModule {
12312            proc: self.proc.clone(),
12313            selection: query,
12314            graphql_client: self.graphql_client.clone(),
12315        }
12316    }
12317    /// Load a Directory from its ID.
12318    pub fn load_directory_from_id(&self, id: impl IntoID<DirectoryId>) -> Directory {
12319        let mut query = self.selection.select("loadDirectoryFromID");
12320        query = query.arg_lazy(
12321            "id",
12322            Box::new(move || {
12323                let id = id.clone();
12324                Box::pin(async move { id.into_id().await.unwrap().quote() })
12325            }),
12326        );
12327        Directory {
12328            proc: self.proc.clone(),
12329            selection: query,
12330            graphql_client: self.graphql_client.clone(),
12331        }
12332    }
12333    /// Load a EngineCacheEntry from its ID.
12334    pub fn load_engine_cache_entry_from_id(
12335        &self,
12336        id: impl IntoID<EngineCacheEntryId>,
12337    ) -> EngineCacheEntry {
12338        let mut query = self.selection.select("loadEngineCacheEntryFromID");
12339        query = query.arg_lazy(
12340            "id",
12341            Box::new(move || {
12342                let id = id.clone();
12343                Box::pin(async move { id.into_id().await.unwrap().quote() })
12344            }),
12345        );
12346        EngineCacheEntry {
12347            proc: self.proc.clone(),
12348            selection: query,
12349            graphql_client: self.graphql_client.clone(),
12350        }
12351    }
12352    /// Load a EngineCacheEntrySet from its ID.
12353    pub fn load_engine_cache_entry_set_from_id(
12354        &self,
12355        id: impl IntoID<EngineCacheEntrySetId>,
12356    ) -> EngineCacheEntrySet {
12357        let mut query = self.selection.select("loadEngineCacheEntrySetFromID");
12358        query = query.arg_lazy(
12359            "id",
12360            Box::new(move || {
12361                let id = id.clone();
12362                Box::pin(async move { id.into_id().await.unwrap().quote() })
12363            }),
12364        );
12365        EngineCacheEntrySet {
12366            proc: self.proc.clone(),
12367            selection: query,
12368            graphql_client: self.graphql_client.clone(),
12369        }
12370    }
12371    /// Load a EngineCache from its ID.
12372    pub fn load_engine_cache_from_id(&self, id: impl IntoID<EngineCacheId>) -> EngineCache {
12373        let mut query = self.selection.select("loadEngineCacheFromID");
12374        query = query.arg_lazy(
12375            "id",
12376            Box::new(move || {
12377                let id = id.clone();
12378                Box::pin(async move { id.into_id().await.unwrap().quote() })
12379            }),
12380        );
12381        EngineCache {
12382            proc: self.proc.clone(),
12383            selection: query,
12384            graphql_client: self.graphql_client.clone(),
12385        }
12386    }
12387    /// Load a Engine from its ID.
12388    pub fn load_engine_from_id(&self, id: impl IntoID<EngineId>) -> Engine {
12389        let mut query = self.selection.select("loadEngineFromID");
12390        query = query.arg_lazy(
12391            "id",
12392            Box::new(move || {
12393                let id = id.clone();
12394                Box::pin(async move { id.into_id().await.unwrap().quote() })
12395            }),
12396        );
12397        Engine {
12398            proc: self.proc.clone(),
12399            selection: query,
12400            graphql_client: self.graphql_client.clone(),
12401        }
12402    }
12403    /// Load a EnumTypeDef from its ID.
12404    pub fn load_enum_type_def_from_id(&self, id: impl IntoID<EnumTypeDefId>) -> EnumTypeDef {
12405        let mut query = self.selection.select("loadEnumTypeDefFromID");
12406        query = query.arg_lazy(
12407            "id",
12408            Box::new(move || {
12409                let id = id.clone();
12410                Box::pin(async move { id.into_id().await.unwrap().quote() })
12411            }),
12412        );
12413        EnumTypeDef {
12414            proc: self.proc.clone(),
12415            selection: query,
12416            graphql_client: self.graphql_client.clone(),
12417        }
12418    }
12419    /// Load a EnumValueTypeDef from its ID.
12420    pub fn load_enum_value_type_def_from_id(
12421        &self,
12422        id: impl IntoID<EnumValueTypeDefId>,
12423    ) -> EnumValueTypeDef {
12424        let mut query = self.selection.select("loadEnumValueTypeDefFromID");
12425        query = query.arg_lazy(
12426            "id",
12427            Box::new(move || {
12428                let id = id.clone();
12429                Box::pin(async move { id.into_id().await.unwrap().quote() })
12430            }),
12431        );
12432        EnumValueTypeDef {
12433            proc: self.proc.clone(),
12434            selection: query,
12435            graphql_client: self.graphql_client.clone(),
12436        }
12437    }
12438    /// Load a EnvFile from its ID.
12439    pub fn load_env_file_from_id(&self, id: impl IntoID<EnvFileId>) -> EnvFile {
12440        let mut query = self.selection.select("loadEnvFileFromID");
12441        query = query.arg_lazy(
12442            "id",
12443            Box::new(move || {
12444                let id = id.clone();
12445                Box::pin(async move { id.into_id().await.unwrap().quote() })
12446            }),
12447        );
12448        EnvFile {
12449            proc: self.proc.clone(),
12450            selection: query,
12451            graphql_client: self.graphql_client.clone(),
12452        }
12453    }
12454    /// Load a Env from its ID.
12455    pub fn load_env_from_id(&self, id: impl IntoID<EnvId>) -> Env {
12456        let mut query = self.selection.select("loadEnvFromID");
12457        query = query.arg_lazy(
12458            "id",
12459            Box::new(move || {
12460                let id = id.clone();
12461                Box::pin(async move { id.into_id().await.unwrap().quote() })
12462            }),
12463        );
12464        Env {
12465            proc: self.proc.clone(),
12466            selection: query,
12467            graphql_client: self.graphql_client.clone(),
12468        }
12469    }
12470    /// Load a EnvVariable from its ID.
12471    pub fn load_env_variable_from_id(&self, id: impl IntoID<EnvVariableId>) -> EnvVariable {
12472        let mut query = self.selection.select("loadEnvVariableFromID");
12473        query = query.arg_lazy(
12474            "id",
12475            Box::new(move || {
12476                let id = id.clone();
12477                Box::pin(async move { id.into_id().await.unwrap().quote() })
12478            }),
12479        );
12480        EnvVariable {
12481            proc: self.proc.clone(),
12482            selection: query,
12483            graphql_client: self.graphql_client.clone(),
12484        }
12485    }
12486    /// Load a Error from its ID.
12487    pub fn load_error_from_id(&self, id: impl IntoID<ErrorId>) -> Error {
12488        let mut query = self.selection.select("loadErrorFromID");
12489        query = query.arg_lazy(
12490            "id",
12491            Box::new(move || {
12492                let id = id.clone();
12493                Box::pin(async move { id.into_id().await.unwrap().quote() })
12494            }),
12495        );
12496        Error {
12497            proc: self.proc.clone(),
12498            selection: query,
12499            graphql_client: self.graphql_client.clone(),
12500        }
12501    }
12502    /// Load a ErrorValue from its ID.
12503    pub fn load_error_value_from_id(&self, id: impl IntoID<ErrorValueId>) -> ErrorValue {
12504        let mut query = self.selection.select("loadErrorValueFromID");
12505        query = query.arg_lazy(
12506            "id",
12507            Box::new(move || {
12508                let id = id.clone();
12509                Box::pin(async move { id.into_id().await.unwrap().quote() })
12510            }),
12511        );
12512        ErrorValue {
12513            proc: self.proc.clone(),
12514            selection: query,
12515            graphql_client: self.graphql_client.clone(),
12516        }
12517    }
12518    /// Load a FieldTypeDef from its ID.
12519    pub fn load_field_type_def_from_id(&self, id: impl IntoID<FieldTypeDefId>) -> FieldTypeDef {
12520        let mut query = self.selection.select("loadFieldTypeDefFromID");
12521        query = query.arg_lazy(
12522            "id",
12523            Box::new(move || {
12524                let id = id.clone();
12525                Box::pin(async move { id.into_id().await.unwrap().quote() })
12526            }),
12527        );
12528        FieldTypeDef {
12529            proc: self.proc.clone(),
12530            selection: query,
12531            graphql_client: self.graphql_client.clone(),
12532        }
12533    }
12534    /// Load a File from its ID.
12535    pub fn load_file_from_id(&self, id: impl IntoID<FileId>) -> File {
12536        let mut query = self.selection.select("loadFileFromID");
12537        query = query.arg_lazy(
12538            "id",
12539            Box::new(move || {
12540                let id = id.clone();
12541                Box::pin(async move { id.into_id().await.unwrap().quote() })
12542            }),
12543        );
12544        File {
12545            proc: self.proc.clone(),
12546            selection: query,
12547            graphql_client: self.graphql_client.clone(),
12548        }
12549    }
12550    /// Load a FunctionArg from its ID.
12551    pub fn load_function_arg_from_id(&self, id: impl IntoID<FunctionArgId>) -> FunctionArg {
12552        let mut query = self.selection.select("loadFunctionArgFromID");
12553        query = query.arg_lazy(
12554            "id",
12555            Box::new(move || {
12556                let id = id.clone();
12557                Box::pin(async move { id.into_id().await.unwrap().quote() })
12558            }),
12559        );
12560        FunctionArg {
12561            proc: self.proc.clone(),
12562            selection: query,
12563            graphql_client: self.graphql_client.clone(),
12564        }
12565    }
12566    /// Load a FunctionCallArgValue from its ID.
12567    pub fn load_function_call_arg_value_from_id(
12568        &self,
12569        id: impl IntoID<FunctionCallArgValueId>,
12570    ) -> FunctionCallArgValue {
12571        let mut query = self.selection.select("loadFunctionCallArgValueFromID");
12572        query = query.arg_lazy(
12573            "id",
12574            Box::new(move || {
12575                let id = id.clone();
12576                Box::pin(async move { id.into_id().await.unwrap().quote() })
12577            }),
12578        );
12579        FunctionCallArgValue {
12580            proc: self.proc.clone(),
12581            selection: query,
12582            graphql_client: self.graphql_client.clone(),
12583        }
12584    }
12585    /// Load a FunctionCall from its ID.
12586    pub fn load_function_call_from_id(&self, id: impl IntoID<FunctionCallId>) -> FunctionCall {
12587        let mut query = self.selection.select("loadFunctionCallFromID");
12588        query = query.arg_lazy(
12589            "id",
12590            Box::new(move || {
12591                let id = id.clone();
12592                Box::pin(async move { id.into_id().await.unwrap().quote() })
12593            }),
12594        );
12595        FunctionCall {
12596            proc: self.proc.clone(),
12597            selection: query,
12598            graphql_client: self.graphql_client.clone(),
12599        }
12600    }
12601    /// Load a Function from its ID.
12602    pub fn load_function_from_id(&self, id: impl IntoID<FunctionId>) -> Function {
12603        let mut query = self.selection.select("loadFunctionFromID");
12604        query = query.arg_lazy(
12605            "id",
12606            Box::new(move || {
12607                let id = id.clone();
12608                Box::pin(async move { id.into_id().await.unwrap().quote() })
12609            }),
12610        );
12611        Function {
12612            proc: self.proc.clone(),
12613            selection: query,
12614            graphql_client: self.graphql_client.clone(),
12615        }
12616    }
12617    /// Load a GeneratedCode from its ID.
12618    pub fn load_generated_code_from_id(&self, id: impl IntoID<GeneratedCodeId>) -> GeneratedCode {
12619        let mut query = self.selection.select("loadGeneratedCodeFromID");
12620        query = query.arg_lazy(
12621            "id",
12622            Box::new(move || {
12623                let id = id.clone();
12624                Box::pin(async move { id.into_id().await.unwrap().quote() })
12625            }),
12626        );
12627        GeneratedCode {
12628            proc: self.proc.clone(),
12629            selection: query,
12630            graphql_client: self.graphql_client.clone(),
12631        }
12632    }
12633    /// Load a Generator from its ID.
12634    pub fn load_generator_from_id(&self, id: impl IntoID<GeneratorId>) -> Generator {
12635        let mut query = self.selection.select("loadGeneratorFromID");
12636        query = query.arg_lazy(
12637            "id",
12638            Box::new(move || {
12639                let id = id.clone();
12640                Box::pin(async move { id.into_id().await.unwrap().quote() })
12641            }),
12642        );
12643        Generator {
12644            proc: self.proc.clone(),
12645            selection: query,
12646            graphql_client: self.graphql_client.clone(),
12647        }
12648    }
12649    /// Load a GeneratorGroup from its ID.
12650    pub fn load_generator_group_from_id(
12651        &self,
12652        id: impl IntoID<GeneratorGroupId>,
12653    ) -> GeneratorGroup {
12654        let mut query = self.selection.select("loadGeneratorGroupFromID");
12655        query = query.arg_lazy(
12656            "id",
12657            Box::new(move || {
12658                let id = id.clone();
12659                Box::pin(async move { id.into_id().await.unwrap().quote() })
12660            }),
12661        );
12662        GeneratorGroup {
12663            proc: self.proc.clone(),
12664            selection: query,
12665            graphql_client: self.graphql_client.clone(),
12666        }
12667    }
12668    /// Load a GitRef from its ID.
12669    pub fn load_git_ref_from_id(&self, id: impl IntoID<GitRefId>) -> GitRef {
12670        let mut query = self.selection.select("loadGitRefFromID");
12671        query = query.arg_lazy(
12672            "id",
12673            Box::new(move || {
12674                let id = id.clone();
12675                Box::pin(async move { id.into_id().await.unwrap().quote() })
12676            }),
12677        );
12678        GitRef {
12679            proc: self.proc.clone(),
12680            selection: query,
12681            graphql_client: self.graphql_client.clone(),
12682        }
12683    }
12684    /// Load a GitRepository from its ID.
12685    pub fn load_git_repository_from_id(&self, id: impl IntoID<GitRepositoryId>) -> GitRepository {
12686        let mut query = self.selection.select("loadGitRepositoryFromID");
12687        query = query.arg_lazy(
12688            "id",
12689            Box::new(move || {
12690                let id = id.clone();
12691                Box::pin(async move { id.into_id().await.unwrap().quote() })
12692            }),
12693        );
12694        GitRepository {
12695            proc: self.proc.clone(),
12696            selection: query,
12697            graphql_client: self.graphql_client.clone(),
12698        }
12699    }
12700    /// Load a Host from its ID.
12701    pub fn load_host_from_id(&self, id: impl IntoID<HostId>) -> Host {
12702        let mut query = self.selection.select("loadHostFromID");
12703        query = query.arg_lazy(
12704            "id",
12705            Box::new(move || {
12706                let id = id.clone();
12707                Box::pin(async move { id.into_id().await.unwrap().quote() })
12708            }),
12709        );
12710        Host {
12711            proc: self.proc.clone(),
12712            selection: query,
12713            graphql_client: self.graphql_client.clone(),
12714        }
12715    }
12716    /// Load a InputTypeDef from its ID.
12717    pub fn load_input_type_def_from_id(&self, id: impl IntoID<InputTypeDefId>) -> InputTypeDef {
12718        let mut query = self.selection.select("loadInputTypeDefFromID");
12719        query = query.arg_lazy(
12720            "id",
12721            Box::new(move || {
12722                let id = id.clone();
12723                Box::pin(async move { id.into_id().await.unwrap().quote() })
12724            }),
12725        );
12726        InputTypeDef {
12727            proc: self.proc.clone(),
12728            selection: query,
12729            graphql_client: self.graphql_client.clone(),
12730        }
12731    }
12732    /// Load a InterfaceTypeDef from its ID.
12733    pub fn load_interface_type_def_from_id(
12734        &self,
12735        id: impl IntoID<InterfaceTypeDefId>,
12736    ) -> InterfaceTypeDef {
12737        let mut query = self.selection.select("loadInterfaceTypeDefFromID");
12738        query = query.arg_lazy(
12739            "id",
12740            Box::new(move || {
12741                let id = id.clone();
12742                Box::pin(async move { id.into_id().await.unwrap().quote() })
12743            }),
12744        );
12745        InterfaceTypeDef {
12746            proc: self.proc.clone(),
12747            selection: query,
12748            graphql_client: self.graphql_client.clone(),
12749        }
12750    }
12751    /// Load a JSONValue from its ID.
12752    pub fn load_json_value_from_id(&self, id: impl IntoID<JsonValueId>) -> JsonValue {
12753        let mut query = self.selection.select("loadJSONValueFromID");
12754        query = query.arg_lazy(
12755            "id",
12756            Box::new(move || {
12757                let id = id.clone();
12758                Box::pin(async move { id.into_id().await.unwrap().quote() })
12759            }),
12760        );
12761        JsonValue {
12762            proc: self.proc.clone(),
12763            selection: query,
12764            graphql_client: self.graphql_client.clone(),
12765        }
12766    }
12767    /// Load a LLM from its ID.
12768    pub fn load_llm_from_id(&self, id: impl IntoID<Llmid>) -> Llm {
12769        let mut query = self.selection.select("loadLLMFromID");
12770        query = query.arg_lazy(
12771            "id",
12772            Box::new(move || {
12773                let id = id.clone();
12774                Box::pin(async move { id.into_id().await.unwrap().quote() })
12775            }),
12776        );
12777        Llm {
12778            proc: self.proc.clone(),
12779            selection: query,
12780            graphql_client: self.graphql_client.clone(),
12781        }
12782    }
12783    /// Load a LLMTokenUsage from its ID.
12784    pub fn load_llm_token_usage_from_id(&self, id: impl IntoID<LlmTokenUsageId>) -> LlmTokenUsage {
12785        let mut query = self.selection.select("loadLLMTokenUsageFromID");
12786        query = query.arg_lazy(
12787            "id",
12788            Box::new(move || {
12789                let id = id.clone();
12790                Box::pin(async move { id.into_id().await.unwrap().quote() })
12791            }),
12792        );
12793        LlmTokenUsage {
12794            proc: self.proc.clone(),
12795            selection: query,
12796            graphql_client: self.graphql_client.clone(),
12797        }
12798    }
12799    /// Load a Label from its ID.
12800    pub fn load_label_from_id(&self, id: impl IntoID<LabelId>) -> Label {
12801        let mut query = self.selection.select("loadLabelFromID");
12802        query = query.arg_lazy(
12803            "id",
12804            Box::new(move || {
12805                let id = id.clone();
12806                Box::pin(async move { id.into_id().await.unwrap().quote() })
12807            }),
12808        );
12809        Label {
12810            proc: self.proc.clone(),
12811            selection: query,
12812            graphql_client: self.graphql_client.clone(),
12813        }
12814    }
12815    /// Load a ListTypeDef from its ID.
12816    pub fn load_list_type_def_from_id(&self, id: impl IntoID<ListTypeDefId>) -> ListTypeDef {
12817        let mut query = self.selection.select("loadListTypeDefFromID");
12818        query = query.arg_lazy(
12819            "id",
12820            Box::new(move || {
12821                let id = id.clone();
12822                Box::pin(async move { id.into_id().await.unwrap().quote() })
12823            }),
12824        );
12825        ListTypeDef {
12826            proc: self.proc.clone(),
12827            selection: query,
12828            graphql_client: self.graphql_client.clone(),
12829        }
12830    }
12831    /// Load a ModuleConfigClient from its ID.
12832    pub fn load_module_config_client_from_id(
12833        &self,
12834        id: impl IntoID<ModuleConfigClientId>,
12835    ) -> ModuleConfigClient {
12836        let mut query = self.selection.select("loadModuleConfigClientFromID");
12837        query = query.arg_lazy(
12838            "id",
12839            Box::new(move || {
12840                let id = id.clone();
12841                Box::pin(async move { id.into_id().await.unwrap().quote() })
12842            }),
12843        );
12844        ModuleConfigClient {
12845            proc: self.proc.clone(),
12846            selection: query,
12847            graphql_client: self.graphql_client.clone(),
12848        }
12849    }
12850    /// Load a Module from its ID.
12851    pub fn load_module_from_id(&self, id: impl IntoID<ModuleId>) -> Module {
12852        let mut query = self.selection.select("loadModuleFromID");
12853        query = query.arg_lazy(
12854            "id",
12855            Box::new(move || {
12856                let id = id.clone();
12857                Box::pin(async move { id.into_id().await.unwrap().quote() })
12858            }),
12859        );
12860        Module {
12861            proc: self.proc.clone(),
12862            selection: query,
12863            graphql_client: self.graphql_client.clone(),
12864        }
12865    }
12866    /// Load a ModuleSource from its ID.
12867    pub fn load_module_source_from_id(&self, id: impl IntoID<ModuleSourceId>) -> ModuleSource {
12868        let mut query = self.selection.select("loadModuleSourceFromID");
12869        query = query.arg_lazy(
12870            "id",
12871            Box::new(move || {
12872                let id = id.clone();
12873                Box::pin(async move { id.into_id().await.unwrap().quote() })
12874            }),
12875        );
12876        ModuleSource {
12877            proc: self.proc.clone(),
12878            selection: query,
12879            graphql_client: self.graphql_client.clone(),
12880        }
12881    }
12882    /// Load a ObjectTypeDef from its ID.
12883    pub fn load_object_type_def_from_id(&self, id: impl IntoID<ObjectTypeDefId>) -> ObjectTypeDef {
12884        let mut query = self.selection.select("loadObjectTypeDefFromID");
12885        query = query.arg_lazy(
12886            "id",
12887            Box::new(move || {
12888                let id = id.clone();
12889                Box::pin(async move { id.into_id().await.unwrap().quote() })
12890            }),
12891        );
12892        ObjectTypeDef {
12893            proc: self.proc.clone(),
12894            selection: query,
12895            graphql_client: self.graphql_client.clone(),
12896        }
12897    }
12898    /// Load a Port from its ID.
12899    pub fn load_port_from_id(&self, id: impl IntoID<PortId>) -> Port {
12900        let mut query = self.selection.select("loadPortFromID");
12901        query = query.arg_lazy(
12902            "id",
12903            Box::new(move || {
12904                let id = id.clone();
12905                Box::pin(async move { id.into_id().await.unwrap().quote() })
12906            }),
12907        );
12908        Port {
12909            proc: self.proc.clone(),
12910            selection: query,
12911            graphql_client: self.graphql_client.clone(),
12912        }
12913    }
12914    /// Load a SDKConfig from its ID.
12915    pub fn load_sdk_config_from_id(&self, id: impl IntoID<SdkConfigId>) -> SdkConfig {
12916        let mut query = self.selection.select("loadSDKConfigFromID");
12917        query = query.arg_lazy(
12918            "id",
12919            Box::new(move || {
12920                let id = id.clone();
12921                Box::pin(async move { id.into_id().await.unwrap().quote() })
12922            }),
12923        );
12924        SdkConfig {
12925            proc: self.proc.clone(),
12926            selection: query,
12927            graphql_client: self.graphql_client.clone(),
12928        }
12929    }
12930    /// Load a ScalarTypeDef from its ID.
12931    pub fn load_scalar_type_def_from_id(&self, id: impl IntoID<ScalarTypeDefId>) -> ScalarTypeDef {
12932        let mut query = self.selection.select("loadScalarTypeDefFromID");
12933        query = query.arg_lazy(
12934            "id",
12935            Box::new(move || {
12936                let id = id.clone();
12937                Box::pin(async move { id.into_id().await.unwrap().quote() })
12938            }),
12939        );
12940        ScalarTypeDef {
12941            proc: self.proc.clone(),
12942            selection: query,
12943            graphql_client: self.graphql_client.clone(),
12944        }
12945    }
12946    /// Load a SearchResult from its ID.
12947    pub fn load_search_result_from_id(&self, id: impl IntoID<SearchResultId>) -> SearchResult {
12948        let mut query = self.selection.select("loadSearchResultFromID");
12949        query = query.arg_lazy(
12950            "id",
12951            Box::new(move || {
12952                let id = id.clone();
12953                Box::pin(async move { id.into_id().await.unwrap().quote() })
12954            }),
12955        );
12956        SearchResult {
12957            proc: self.proc.clone(),
12958            selection: query,
12959            graphql_client: self.graphql_client.clone(),
12960        }
12961    }
12962    /// Load a SearchSubmatch from its ID.
12963    pub fn load_search_submatch_from_id(
12964        &self,
12965        id: impl IntoID<SearchSubmatchId>,
12966    ) -> SearchSubmatch {
12967        let mut query = self.selection.select("loadSearchSubmatchFromID");
12968        query = query.arg_lazy(
12969            "id",
12970            Box::new(move || {
12971                let id = id.clone();
12972                Box::pin(async move { id.into_id().await.unwrap().quote() })
12973            }),
12974        );
12975        SearchSubmatch {
12976            proc: self.proc.clone(),
12977            selection: query,
12978            graphql_client: self.graphql_client.clone(),
12979        }
12980    }
12981    /// Load a Secret from its ID.
12982    pub fn load_secret_from_id(&self, id: impl IntoID<SecretId>) -> Secret {
12983        let mut query = self.selection.select("loadSecretFromID");
12984        query = query.arg_lazy(
12985            "id",
12986            Box::new(move || {
12987                let id = id.clone();
12988                Box::pin(async move { id.into_id().await.unwrap().quote() })
12989            }),
12990        );
12991        Secret {
12992            proc: self.proc.clone(),
12993            selection: query,
12994            graphql_client: self.graphql_client.clone(),
12995        }
12996    }
12997    /// Load a Service from its ID.
12998    pub fn load_service_from_id(&self, id: impl IntoID<ServiceId>) -> Service {
12999        let mut query = self.selection.select("loadServiceFromID");
13000        query = query.arg_lazy(
13001            "id",
13002            Box::new(move || {
13003                let id = id.clone();
13004                Box::pin(async move { id.into_id().await.unwrap().quote() })
13005            }),
13006        );
13007        Service {
13008            proc: self.proc.clone(),
13009            selection: query,
13010            graphql_client: self.graphql_client.clone(),
13011        }
13012    }
13013    /// Load a Socket from its ID.
13014    pub fn load_socket_from_id(&self, id: impl IntoID<SocketId>) -> Socket {
13015        let mut query = self.selection.select("loadSocketFromID");
13016        query = query.arg_lazy(
13017            "id",
13018            Box::new(move || {
13019                let id = id.clone();
13020                Box::pin(async move { id.into_id().await.unwrap().quote() })
13021            }),
13022        );
13023        Socket {
13024            proc: self.proc.clone(),
13025            selection: query,
13026            graphql_client: self.graphql_client.clone(),
13027        }
13028    }
13029    /// Load a SourceMap from its ID.
13030    pub fn load_source_map_from_id(&self, id: impl IntoID<SourceMapId>) -> SourceMap {
13031        let mut query = self.selection.select("loadSourceMapFromID");
13032        query = query.arg_lazy(
13033            "id",
13034            Box::new(move || {
13035                let id = id.clone();
13036                Box::pin(async move { id.into_id().await.unwrap().quote() })
13037            }),
13038        );
13039        SourceMap {
13040            proc: self.proc.clone(),
13041            selection: query,
13042            graphql_client: self.graphql_client.clone(),
13043        }
13044    }
13045    /// Load a Stat from its ID.
13046    pub fn load_stat_from_id(&self, id: impl IntoID<StatId>) -> Stat {
13047        let mut query = self.selection.select("loadStatFromID");
13048        query = query.arg_lazy(
13049            "id",
13050            Box::new(move || {
13051                let id = id.clone();
13052                Box::pin(async move { id.into_id().await.unwrap().quote() })
13053            }),
13054        );
13055        Stat {
13056            proc: self.proc.clone(),
13057            selection: query,
13058            graphql_client: self.graphql_client.clone(),
13059        }
13060    }
13061    /// Load a Terminal from its ID.
13062    pub fn load_terminal_from_id(&self, id: impl IntoID<TerminalId>) -> Terminal {
13063        let mut query = self.selection.select("loadTerminalFromID");
13064        query = query.arg_lazy(
13065            "id",
13066            Box::new(move || {
13067                let id = id.clone();
13068                Box::pin(async move { id.into_id().await.unwrap().quote() })
13069            }),
13070        );
13071        Terminal {
13072            proc: self.proc.clone(),
13073            selection: query,
13074            graphql_client: self.graphql_client.clone(),
13075        }
13076    }
13077    /// Load a TypeDef from its ID.
13078    pub fn load_type_def_from_id(&self, id: impl IntoID<TypeDefId>) -> TypeDef {
13079        let mut query = self.selection.select("loadTypeDefFromID");
13080        query = query.arg_lazy(
13081            "id",
13082            Box::new(move || {
13083                let id = id.clone();
13084                Box::pin(async move { id.into_id().await.unwrap().quote() })
13085            }),
13086        );
13087        TypeDef {
13088            proc: self.proc.clone(),
13089            selection: query,
13090            graphql_client: self.graphql_client.clone(),
13091        }
13092    }
13093    /// Create a new module.
13094    pub fn module(&self) -> Module {
13095        let query = self.selection.select("module");
13096        Module {
13097            proc: self.proc.clone(),
13098            selection: query,
13099            graphql_client: self.graphql_client.clone(),
13100        }
13101    }
13102    /// Create a new module source instance from a source ref string
13103    ///
13104    /// # Arguments
13105    ///
13106    /// * `ref_string` - The string ref representation of the module source
13107    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13108    pub fn module_source(&self, ref_string: impl Into<String>) -> ModuleSource {
13109        let mut query = self.selection.select("moduleSource");
13110        query = query.arg("refString", ref_string.into());
13111        ModuleSource {
13112            proc: self.proc.clone(),
13113            selection: query,
13114            graphql_client: self.graphql_client.clone(),
13115        }
13116    }
13117    /// Create a new module source instance from a source ref string
13118    ///
13119    /// # Arguments
13120    ///
13121    /// * `ref_string` - The string ref representation of the module source
13122    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13123    pub fn module_source_opts<'a>(
13124        &self,
13125        ref_string: impl Into<String>,
13126        opts: QueryModuleSourceOpts<'a>,
13127    ) -> ModuleSource {
13128        let mut query = self.selection.select("moduleSource");
13129        query = query.arg("refString", ref_string.into());
13130        if let Some(ref_pin) = opts.ref_pin {
13131            query = query.arg("refPin", ref_pin);
13132        }
13133        if let Some(disable_find_up) = opts.disable_find_up {
13134            query = query.arg("disableFindUp", disable_find_up);
13135        }
13136        if let Some(allow_not_exists) = opts.allow_not_exists {
13137            query = query.arg("allowNotExists", allow_not_exists);
13138        }
13139        if let Some(require_kind) = opts.require_kind {
13140            query = query.arg("requireKind", require_kind);
13141        }
13142        ModuleSource {
13143            proc: self.proc.clone(),
13144            selection: query,
13145            graphql_client: self.graphql_client.clone(),
13146        }
13147    }
13148    /// Creates a new secret.
13149    ///
13150    /// # Arguments
13151    ///
13152    /// * `uri` - The URI of the secret store
13153    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13154    pub fn secret(&self, uri: impl Into<String>) -> Secret {
13155        let mut query = self.selection.select("secret");
13156        query = query.arg("uri", uri.into());
13157        Secret {
13158            proc: self.proc.clone(),
13159            selection: query,
13160            graphql_client: self.graphql_client.clone(),
13161        }
13162    }
13163    /// Creates a new secret.
13164    ///
13165    /// # Arguments
13166    ///
13167    /// * `uri` - The URI of the secret store
13168    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13169    pub fn secret_opts<'a>(&self, uri: impl Into<String>, opts: QuerySecretOpts<'a>) -> Secret {
13170        let mut query = self.selection.select("secret");
13171        query = query.arg("uri", uri.into());
13172        if let Some(cache_key) = opts.cache_key {
13173            query = query.arg("cacheKey", cache_key);
13174        }
13175        Secret {
13176            proc: self.proc.clone(),
13177            selection: query,
13178            graphql_client: self.graphql_client.clone(),
13179        }
13180    }
13181    /// Sets a secret given a user defined name to its plaintext and returns the secret.
13182    /// The plaintext value is limited to a size of 128000 bytes.
13183    ///
13184    /// # Arguments
13185    ///
13186    /// * `name` - The user defined name for this secret
13187    /// * `plaintext` - The plaintext of the secret
13188    pub fn set_secret(&self, name: impl Into<String>, plaintext: impl Into<String>) -> Secret {
13189        let mut query = self.selection.select("setSecret");
13190        query = query.arg("name", name.into());
13191        query = query.arg("plaintext", plaintext.into());
13192        Secret {
13193            proc: self.proc.clone(),
13194            selection: query,
13195            graphql_client: self.graphql_client.clone(),
13196        }
13197    }
13198    /// Creates source map metadata.
13199    ///
13200    /// # Arguments
13201    ///
13202    /// * `filename` - The filename from the module source.
13203    /// * `line` - The line number within the filename.
13204    /// * `column` - The column number within the line.
13205    pub fn source_map(&self, filename: impl Into<String>, line: isize, column: isize) -> SourceMap {
13206        let mut query = self.selection.select("sourceMap");
13207        query = query.arg("filename", filename.into());
13208        query = query.arg("line", line);
13209        query = query.arg("column", column);
13210        SourceMap {
13211            proc: self.proc.clone(),
13212            selection: query,
13213            graphql_client: self.graphql_client.clone(),
13214        }
13215    }
13216    /// Create a new TypeDef.
13217    pub fn type_def(&self) -> TypeDef {
13218        let query = self.selection.select("typeDef");
13219        TypeDef {
13220            proc: self.proc.clone(),
13221            selection: query,
13222            graphql_client: self.graphql_client.clone(),
13223        }
13224    }
13225    /// Get the current Dagger Engine version.
13226    pub async fn version(&self) -> Result<String, DaggerError> {
13227        let query = self.selection.select("version");
13228        query.execute(self.graphql_client.clone()).await
13229    }
13230}
13231#[derive(Clone)]
13232pub struct SdkConfig {
13233    pub proc: Option<Arc<DaggerSessionProc>>,
13234    pub selection: Selection,
13235    pub graphql_client: DynGraphQLClient,
13236}
13237impl SdkConfig {
13238    /// Whether to start the SDK runtime in debug mode with an interactive terminal.
13239    pub async fn debug(&self) -> Result<bool, DaggerError> {
13240        let query = self.selection.select("debug");
13241        query.execute(self.graphql_client.clone()).await
13242    }
13243    /// A unique identifier for this SDKConfig.
13244    pub async fn id(&self) -> Result<SdkConfigId, DaggerError> {
13245        let query = self.selection.select("id");
13246        query.execute(self.graphql_client.clone()).await
13247    }
13248    /// Source of the SDK. Either a name of a builtin SDK or a module source ref string pointing to the SDK's implementation.
13249    pub async fn source(&self) -> Result<String, DaggerError> {
13250        let query = self.selection.select("source");
13251        query.execute(self.graphql_client.clone()).await
13252    }
13253}
13254#[derive(Clone)]
13255pub struct ScalarTypeDef {
13256    pub proc: Option<Arc<DaggerSessionProc>>,
13257    pub selection: Selection,
13258    pub graphql_client: DynGraphQLClient,
13259}
13260impl ScalarTypeDef {
13261    /// A doc string for the scalar, if any.
13262    pub async fn description(&self) -> Result<String, DaggerError> {
13263        let query = self.selection.select("description");
13264        query.execute(self.graphql_client.clone()).await
13265    }
13266    /// A unique identifier for this ScalarTypeDef.
13267    pub async fn id(&self) -> Result<ScalarTypeDefId, DaggerError> {
13268        let query = self.selection.select("id");
13269        query.execute(self.graphql_client.clone()).await
13270    }
13271    /// The name of the scalar.
13272    pub async fn name(&self) -> Result<String, DaggerError> {
13273        let query = self.selection.select("name");
13274        query.execute(self.graphql_client.clone()).await
13275    }
13276    /// If this ScalarTypeDef is associated with a Module, the name of the module. Unset otherwise.
13277    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
13278        let query = self.selection.select("sourceModuleName");
13279        query.execute(self.graphql_client.clone()).await
13280    }
13281}
13282#[derive(Clone)]
13283pub struct SearchResult {
13284    pub proc: Option<Arc<DaggerSessionProc>>,
13285    pub selection: Selection,
13286    pub graphql_client: DynGraphQLClient,
13287}
13288impl SearchResult {
13289    /// The byte offset of this line within the file.
13290    pub async fn absolute_offset(&self) -> Result<isize, DaggerError> {
13291        let query = self.selection.select("absoluteOffset");
13292        query.execute(self.graphql_client.clone()).await
13293    }
13294    /// The path to the file that matched.
13295    pub async fn file_path(&self) -> Result<String, DaggerError> {
13296        let query = self.selection.select("filePath");
13297        query.execute(self.graphql_client.clone()).await
13298    }
13299    /// A unique identifier for this SearchResult.
13300    pub async fn id(&self) -> Result<SearchResultId, DaggerError> {
13301        let query = self.selection.select("id");
13302        query.execute(self.graphql_client.clone()).await
13303    }
13304    /// The first line that matched.
13305    pub async fn line_number(&self) -> Result<isize, DaggerError> {
13306        let query = self.selection.select("lineNumber");
13307        query.execute(self.graphql_client.clone()).await
13308    }
13309    /// The line content that matched.
13310    pub async fn matched_lines(&self) -> Result<String, DaggerError> {
13311        let query = self.selection.select("matchedLines");
13312        query.execute(self.graphql_client.clone()).await
13313    }
13314    /// Sub-match positions and content within the matched lines.
13315    pub fn submatches(&self) -> Vec<SearchSubmatch> {
13316        let query = self.selection.select("submatches");
13317        vec![SearchSubmatch {
13318            proc: self.proc.clone(),
13319            selection: query,
13320            graphql_client: self.graphql_client.clone(),
13321        }]
13322    }
13323}
13324#[derive(Clone)]
13325pub struct SearchSubmatch {
13326    pub proc: Option<Arc<DaggerSessionProc>>,
13327    pub selection: Selection,
13328    pub graphql_client: DynGraphQLClient,
13329}
13330impl SearchSubmatch {
13331    /// The match's end offset within the matched lines.
13332    pub async fn end(&self) -> Result<isize, DaggerError> {
13333        let query = self.selection.select("end");
13334        query.execute(self.graphql_client.clone()).await
13335    }
13336    /// A unique identifier for this SearchSubmatch.
13337    pub async fn id(&self) -> Result<SearchSubmatchId, DaggerError> {
13338        let query = self.selection.select("id");
13339        query.execute(self.graphql_client.clone()).await
13340    }
13341    /// The match's start offset within the matched lines.
13342    pub async fn start(&self) -> Result<isize, DaggerError> {
13343        let query = self.selection.select("start");
13344        query.execute(self.graphql_client.clone()).await
13345    }
13346    /// The matched text.
13347    pub async fn text(&self) -> Result<String, DaggerError> {
13348        let query = self.selection.select("text");
13349        query.execute(self.graphql_client.clone()).await
13350    }
13351}
13352#[derive(Clone)]
13353pub struct Secret {
13354    pub proc: Option<Arc<DaggerSessionProc>>,
13355    pub selection: Selection,
13356    pub graphql_client: DynGraphQLClient,
13357}
13358impl Secret {
13359    /// A unique identifier for this Secret.
13360    pub async fn id(&self) -> Result<SecretId, DaggerError> {
13361        let query = self.selection.select("id");
13362        query.execute(self.graphql_client.clone()).await
13363    }
13364    /// The name of this secret.
13365    pub async fn name(&self) -> Result<String, DaggerError> {
13366        let query = self.selection.select("name");
13367        query.execute(self.graphql_client.clone()).await
13368    }
13369    /// The value of this secret.
13370    pub async fn plaintext(&self) -> Result<String, DaggerError> {
13371        let query = self.selection.select("plaintext");
13372        query.execute(self.graphql_client.clone()).await
13373    }
13374    /// The URI of this secret.
13375    pub async fn uri(&self) -> Result<String, DaggerError> {
13376        let query = self.selection.select("uri");
13377        query.execute(self.graphql_client.clone()).await
13378    }
13379}
13380#[derive(Clone)]
13381pub struct Service {
13382    pub proc: Option<Arc<DaggerSessionProc>>,
13383    pub selection: Selection,
13384    pub graphql_client: DynGraphQLClient,
13385}
13386#[derive(Builder, Debug, PartialEq)]
13387pub struct ServiceEndpointOpts<'a> {
13388    /// The exposed port number for the endpoint
13389    #[builder(setter(into, strip_option), default)]
13390    pub port: Option<isize>,
13391    /// Return a URL with the given scheme, eg. http for http://
13392    #[builder(setter(into, strip_option), default)]
13393    pub scheme: Option<&'a str>,
13394}
13395#[derive(Builder, Debug, PartialEq)]
13396pub struct ServiceStopOpts {
13397    /// Immediately kill the service without waiting for a graceful exit
13398    #[builder(setter(into, strip_option), default)]
13399    pub kill: Option<bool>,
13400}
13401#[derive(Builder, Debug, PartialEq)]
13402pub struct ServiceTerminalOpts<'a> {
13403    #[builder(setter(into, strip_option), default)]
13404    pub cmd: Option<Vec<&'a str>>,
13405}
13406#[derive(Builder, Debug, PartialEq)]
13407pub struct ServiceUpOpts {
13408    /// List of frontend/backend port mappings to forward.
13409    /// Frontend is the port accepting traffic on the host, backend is the service port.
13410    #[builder(setter(into, strip_option), default)]
13411    pub ports: Option<Vec<PortForward>>,
13412    /// Bind each tunnel port to a random port on the host.
13413    #[builder(setter(into, strip_option), default)]
13414    pub random: Option<bool>,
13415}
13416impl Service {
13417    /// Retrieves an endpoint that clients can use to reach this container.
13418    /// If no port is specified, the first exposed port is used. If none exist an error is returned.
13419    /// If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.
13420    ///
13421    /// # Arguments
13422    ///
13423    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13424    pub async fn endpoint(&self) -> Result<String, DaggerError> {
13425        let query = self.selection.select("endpoint");
13426        query.execute(self.graphql_client.clone()).await
13427    }
13428    /// Retrieves an endpoint that clients can use to reach this container.
13429    /// If no port is specified, the first exposed port is used. If none exist an error is returned.
13430    /// If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.
13431    ///
13432    /// # Arguments
13433    ///
13434    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13435    pub async fn endpoint_opts<'a>(
13436        &self,
13437        opts: ServiceEndpointOpts<'a>,
13438    ) -> Result<String, DaggerError> {
13439        let mut query = self.selection.select("endpoint");
13440        if let Some(port) = opts.port {
13441            query = query.arg("port", port);
13442        }
13443        if let Some(scheme) = opts.scheme {
13444            query = query.arg("scheme", scheme);
13445        }
13446        query.execute(self.graphql_client.clone()).await
13447    }
13448    /// Retrieves a hostname which can be used by clients to reach this container.
13449    pub async fn hostname(&self) -> Result<String, DaggerError> {
13450        let query = self.selection.select("hostname");
13451        query.execute(self.graphql_client.clone()).await
13452    }
13453    /// A unique identifier for this Service.
13454    pub async fn id(&self) -> Result<ServiceId, DaggerError> {
13455        let query = self.selection.select("id");
13456        query.execute(self.graphql_client.clone()).await
13457    }
13458    /// Retrieves the list of ports provided by the service.
13459    pub fn ports(&self) -> Vec<Port> {
13460        let query = self.selection.select("ports");
13461        vec![Port {
13462            proc: self.proc.clone(),
13463            selection: query,
13464            graphql_client: self.graphql_client.clone(),
13465        }]
13466    }
13467    /// Start the service and wait for its health checks to succeed.
13468    /// Services bound to a Container do not need to be manually started.
13469    pub async fn start(&self) -> Result<ServiceId, DaggerError> {
13470        let query = self.selection.select("start");
13471        query.execute(self.graphql_client.clone()).await
13472    }
13473    /// Stop the service.
13474    ///
13475    /// # Arguments
13476    ///
13477    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13478    pub async fn stop(&self) -> Result<ServiceId, DaggerError> {
13479        let query = self.selection.select("stop");
13480        query.execute(self.graphql_client.clone()).await
13481    }
13482    /// Stop the service.
13483    ///
13484    /// # Arguments
13485    ///
13486    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13487    pub async fn stop_opts(&self, opts: ServiceStopOpts) -> Result<ServiceId, DaggerError> {
13488        let mut query = self.selection.select("stop");
13489        if let Some(kill) = opts.kill {
13490            query = query.arg("kill", kill);
13491        }
13492        query.execute(self.graphql_client.clone()).await
13493    }
13494    /// Forces evaluation of the pipeline in the engine.
13495    pub async fn sync(&self) -> Result<ServiceId, DaggerError> {
13496        let query = self.selection.select("sync");
13497        query.execute(self.graphql_client.clone()).await
13498    }
13499    ///
13500    /// # Arguments
13501    ///
13502    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13503    pub fn terminal(&self) -> Service {
13504        let query = self.selection.select("terminal");
13505        Service {
13506            proc: self.proc.clone(),
13507            selection: query,
13508            graphql_client: self.graphql_client.clone(),
13509        }
13510    }
13511    ///
13512    /// # Arguments
13513    ///
13514    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13515    pub fn terminal_opts<'a>(&self, opts: ServiceTerminalOpts<'a>) -> Service {
13516        let mut query = self.selection.select("terminal");
13517        if let Some(cmd) = opts.cmd {
13518            query = query.arg("cmd", cmd);
13519        }
13520        Service {
13521            proc: self.proc.clone(),
13522            selection: query,
13523            graphql_client: self.graphql_client.clone(),
13524        }
13525    }
13526    /// Creates a tunnel that forwards traffic from the caller's network to this service.
13527    ///
13528    /// # Arguments
13529    ///
13530    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13531    pub async fn up(&self) -> Result<Void, DaggerError> {
13532        let query = self.selection.select("up");
13533        query.execute(self.graphql_client.clone()).await
13534    }
13535    /// Creates a tunnel that forwards traffic from the caller's network to this service.
13536    ///
13537    /// # Arguments
13538    ///
13539    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13540    pub async fn up_opts(&self, opts: ServiceUpOpts) -> Result<Void, DaggerError> {
13541        let mut query = self.selection.select("up");
13542        if let Some(ports) = opts.ports {
13543            query = query.arg("ports", ports);
13544        }
13545        if let Some(random) = opts.random {
13546            query = query.arg("random", random);
13547        }
13548        query.execute(self.graphql_client.clone()).await
13549    }
13550    /// Configures a hostname which can be used by clients within the session to reach this container.
13551    ///
13552    /// # Arguments
13553    ///
13554    /// * `hostname` - The hostname to use.
13555    pub fn with_hostname(&self, hostname: impl Into<String>) -> Service {
13556        let mut query = self.selection.select("withHostname");
13557        query = query.arg("hostname", hostname.into());
13558        Service {
13559            proc: self.proc.clone(),
13560            selection: query,
13561            graphql_client: self.graphql_client.clone(),
13562        }
13563    }
13564}
13565#[derive(Clone)]
13566pub struct Socket {
13567    pub proc: Option<Arc<DaggerSessionProc>>,
13568    pub selection: Selection,
13569    pub graphql_client: DynGraphQLClient,
13570}
13571impl Socket {
13572    /// A unique identifier for this Socket.
13573    pub async fn id(&self) -> Result<SocketId, DaggerError> {
13574        let query = self.selection.select("id");
13575        query.execute(self.graphql_client.clone()).await
13576    }
13577}
13578#[derive(Clone)]
13579pub struct SourceMap {
13580    pub proc: Option<Arc<DaggerSessionProc>>,
13581    pub selection: Selection,
13582    pub graphql_client: DynGraphQLClient,
13583}
13584impl SourceMap {
13585    /// The column number within the line.
13586    pub async fn column(&self) -> Result<isize, DaggerError> {
13587        let query = self.selection.select("column");
13588        query.execute(self.graphql_client.clone()).await
13589    }
13590    /// The filename from the module source.
13591    pub async fn filename(&self) -> Result<String, DaggerError> {
13592        let query = self.selection.select("filename");
13593        query.execute(self.graphql_client.clone()).await
13594    }
13595    /// A unique identifier for this SourceMap.
13596    pub async fn id(&self) -> Result<SourceMapId, DaggerError> {
13597        let query = self.selection.select("id");
13598        query.execute(self.graphql_client.clone()).await
13599    }
13600    /// The line number within the filename.
13601    pub async fn line(&self) -> Result<isize, DaggerError> {
13602        let query = self.selection.select("line");
13603        query.execute(self.graphql_client.clone()).await
13604    }
13605    /// The module dependency this was declared in.
13606    pub async fn module(&self) -> Result<String, DaggerError> {
13607        let query = self.selection.select("module");
13608        query.execute(self.graphql_client.clone()).await
13609    }
13610    /// The URL to the file, if any. This can be used to link to the source map in the browser.
13611    pub async fn url(&self) -> Result<String, DaggerError> {
13612        let query = self.selection.select("url");
13613        query.execute(self.graphql_client.clone()).await
13614    }
13615}
13616#[derive(Clone)]
13617pub struct Stat {
13618    pub proc: Option<Arc<DaggerSessionProc>>,
13619    pub selection: Selection,
13620    pub graphql_client: DynGraphQLClient,
13621}
13622impl Stat {
13623    /// file type
13624    pub async fn file_type(&self) -> Result<FileType, DaggerError> {
13625        let query = self.selection.select("fileType");
13626        query.execute(self.graphql_client.clone()).await
13627    }
13628    /// A unique identifier for this Stat.
13629    pub async fn id(&self) -> Result<StatId, DaggerError> {
13630        let query = self.selection.select("id");
13631        query.execute(self.graphql_client.clone()).await
13632    }
13633    /// file name
13634    pub async fn name(&self) -> Result<String, DaggerError> {
13635        let query = self.selection.select("name");
13636        query.execute(self.graphql_client.clone()).await
13637    }
13638    /// permission bits
13639    pub async fn permissions(&self) -> Result<isize, DaggerError> {
13640        let query = self.selection.select("permissions");
13641        query.execute(self.graphql_client.clone()).await
13642    }
13643    /// file size
13644    pub async fn size(&self) -> Result<isize, DaggerError> {
13645        let query = self.selection.select("size");
13646        query.execute(self.graphql_client.clone()).await
13647    }
13648}
13649#[derive(Clone)]
13650pub struct Terminal {
13651    pub proc: Option<Arc<DaggerSessionProc>>,
13652    pub selection: Selection,
13653    pub graphql_client: DynGraphQLClient,
13654}
13655impl Terminal {
13656    /// A unique identifier for this Terminal.
13657    pub async fn id(&self) -> Result<TerminalId, DaggerError> {
13658        let query = self.selection.select("id");
13659        query.execute(self.graphql_client.clone()).await
13660    }
13661    /// Forces evaluation of the pipeline in the engine.
13662    /// It doesn't run the default command if no exec has been set.
13663    pub async fn sync(&self) -> Result<TerminalId, DaggerError> {
13664        let query = self.selection.select("sync");
13665        query.execute(self.graphql_client.clone()).await
13666    }
13667}
13668#[derive(Clone)]
13669pub struct TypeDef {
13670    pub proc: Option<Arc<DaggerSessionProc>>,
13671    pub selection: Selection,
13672    pub graphql_client: DynGraphQLClient,
13673}
13674#[derive(Builder, Debug, PartialEq)]
13675pub struct TypeDefWithEnumOpts<'a> {
13676    /// A doc string for the enum, if any
13677    #[builder(setter(into, strip_option), default)]
13678    pub description: Option<&'a str>,
13679    /// The source map for the enum definition.
13680    #[builder(setter(into, strip_option), default)]
13681    pub source_map: Option<SourceMapId>,
13682}
13683#[derive(Builder, Debug, PartialEq)]
13684pub struct TypeDefWithEnumMemberOpts<'a> {
13685    /// If deprecated, the reason or migration path.
13686    #[builder(setter(into, strip_option), default)]
13687    pub deprecated: Option<&'a str>,
13688    /// A doc string for the member, if any
13689    #[builder(setter(into, strip_option), default)]
13690    pub description: Option<&'a str>,
13691    /// The source map for the enum member definition.
13692    #[builder(setter(into, strip_option), default)]
13693    pub source_map: Option<SourceMapId>,
13694    /// The value of the member in the enum
13695    #[builder(setter(into, strip_option), default)]
13696    pub value: Option<&'a str>,
13697}
13698#[derive(Builder, Debug, PartialEq)]
13699pub struct TypeDefWithEnumValueOpts<'a> {
13700    /// If deprecated, the reason or migration path.
13701    #[builder(setter(into, strip_option), default)]
13702    pub deprecated: Option<&'a str>,
13703    /// A doc string for the value, if any
13704    #[builder(setter(into, strip_option), default)]
13705    pub description: Option<&'a str>,
13706    /// The source map for the enum value definition.
13707    #[builder(setter(into, strip_option), default)]
13708    pub source_map: Option<SourceMapId>,
13709}
13710#[derive(Builder, Debug, PartialEq)]
13711pub struct TypeDefWithFieldOpts<'a> {
13712    /// If deprecated, the reason or migration path.
13713    #[builder(setter(into, strip_option), default)]
13714    pub deprecated: Option<&'a str>,
13715    /// A doc string for the field, if any
13716    #[builder(setter(into, strip_option), default)]
13717    pub description: Option<&'a str>,
13718    /// The source map for the field definition.
13719    #[builder(setter(into, strip_option), default)]
13720    pub source_map: Option<SourceMapId>,
13721}
13722#[derive(Builder, Debug, PartialEq)]
13723pub struct TypeDefWithInterfaceOpts<'a> {
13724    #[builder(setter(into, strip_option), default)]
13725    pub description: Option<&'a str>,
13726    #[builder(setter(into, strip_option), default)]
13727    pub source_map: Option<SourceMapId>,
13728}
13729#[derive(Builder, Debug, PartialEq)]
13730pub struct TypeDefWithObjectOpts<'a> {
13731    #[builder(setter(into, strip_option), default)]
13732    pub deprecated: Option<&'a str>,
13733    #[builder(setter(into, strip_option), default)]
13734    pub description: Option<&'a str>,
13735    #[builder(setter(into, strip_option), default)]
13736    pub source_map: Option<SourceMapId>,
13737}
13738#[derive(Builder, Debug, PartialEq)]
13739pub struct TypeDefWithScalarOpts<'a> {
13740    #[builder(setter(into, strip_option), default)]
13741    pub description: Option<&'a str>,
13742}
13743impl TypeDef {
13744    /// If kind is ENUM, the enum-specific type definition. If kind is not ENUM, this will be null.
13745    pub fn as_enum(&self) -> EnumTypeDef {
13746        let query = self.selection.select("asEnum");
13747        EnumTypeDef {
13748            proc: self.proc.clone(),
13749            selection: query,
13750            graphql_client: self.graphql_client.clone(),
13751        }
13752    }
13753    /// If kind is INPUT, the input-specific type definition. If kind is not INPUT, this will be null.
13754    pub fn as_input(&self) -> InputTypeDef {
13755        let query = self.selection.select("asInput");
13756        InputTypeDef {
13757            proc: self.proc.clone(),
13758            selection: query,
13759            graphql_client: self.graphql_client.clone(),
13760        }
13761    }
13762    /// If kind is INTERFACE, the interface-specific type definition. If kind is not INTERFACE, this will be null.
13763    pub fn as_interface(&self) -> InterfaceTypeDef {
13764        let query = self.selection.select("asInterface");
13765        InterfaceTypeDef {
13766            proc: self.proc.clone(),
13767            selection: query,
13768            graphql_client: self.graphql_client.clone(),
13769        }
13770    }
13771    /// If kind is LIST, the list-specific type definition. If kind is not LIST, this will be null.
13772    pub fn as_list(&self) -> ListTypeDef {
13773        let query = self.selection.select("asList");
13774        ListTypeDef {
13775            proc: self.proc.clone(),
13776            selection: query,
13777            graphql_client: self.graphql_client.clone(),
13778        }
13779    }
13780    /// If kind is OBJECT, the object-specific type definition. If kind is not OBJECT, this will be null.
13781    pub fn as_object(&self) -> ObjectTypeDef {
13782        let query = self.selection.select("asObject");
13783        ObjectTypeDef {
13784            proc: self.proc.clone(),
13785            selection: query,
13786            graphql_client: self.graphql_client.clone(),
13787        }
13788    }
13789    /// If kind is SCALAR, the scalar-specific type definition. If kind is not SCALAR, this will be null.
13790    pub fn as_scalar(&self) -> ScalarTypeDef {
13791        let query = self.selection.select("asScalar");
13792        ScalarTypeDef {
13793            proc: self.proc.clone(),
13794            selection: query,
13795            graphql_client: self.graphql_client.clone(),
13796        }
13797    }
13798    /// A unique identifier for this TypeDef.
13799    pub async fn id(&self) -> Result<TypeDefId, DaggerError> {
13800        let query = self.selection.select("id");
13801        query.execute(self.graphql_client.clone()).await
13802    }
13803    /// The kind of type this is (e.g. primitive, list, object).
13804    pub async fn kind(&self) -> Result<TypeDefKind, DaggerError> {
13805        let query = self.selection.select("kind");
13806        query.execute(self.graphql_client.clone()).await
13807    }
13808    /// Whether this type can be set to null. Defaults to false.
13809    pub async fn optional(&self) -> Result<bool, DaggerError> {
13810        let query = self.selection.select("optional");
13811        query.execute(self.graphql_client.clone()).await
13812    }
13813    /// Adds a function for constructing a new instance of an Object TypeDef, failing if the type is not an object.
13814    pub fn with_constructor(&self, function: impl IntoID<FunctionId>) -> TypeDef {
13815        let mut query = self.selection.select("withConstructor");
13816        query = query.arg_lazy(
13817            "function",
13818            Box::new(move || {
13819                let function = function.clone();
13820                Box::pin(async move { function.into_id().await.unwrap().quote() })
13821            }),
13822        );
13823        TypeDef {
13824            proc: self.proc.clone(),
13825            selection: query,
13826            graphql_client: self.graphql_client.clone(),
13827        }
13828    }
13829    /// Returns a TypeDef of kind Enum with the provided name.
13830    /// 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.
13831    ///
13832    /// # Arguments
13833    ///
13834    /// * `name` - The name of the enum
13835    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13836    pub fn with_enum(&self, name: impl Into<String>) -> TypeDef {
13837        let mut query = self.selection.select("withEnum");
13838        query = query.arg("name", name.into());
13839        TypeDef {
13840            proc: self.proc.clone(),
13841            selection: query,
13842            graphql_client: self.graphql_client.clone(),
13843        }
13844    }
13845    /// Returns a TypeDef of kind Enum with the provided name.
13846    /// 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.
13847    ///
13848    /// # Arguments
13849    ///
13850    /// * `name` - The name of the enum
13851    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13852    pub fn with_enum_opts<'a>(
13853        &self,
13854        name: impl Into<String>,
13855        opts: TypeDefWithEnumOpts<'a>,
13856    ) -> TypeDef {
13857        let mut query = self.selection.select("withEnum");
13858        query = query.arg("name", name.into());
13859        if let Some(description) = opts.description {
13860            query = query.arg("description", description);
13861        }
13862        if let Some(source_map) = opts.source_map {
13863            query = query.arg("sourceMap", source_map);
13864        }
13865        TypeDef {
13866            proc: self.proc.clone(),
13867            selection: query,
13868            graphql_client: self.graphql_client.clone(),
13869        }
13870    }
13871    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
13872    ///
13873    /// # Arguments
13874    ///
13875    /// * `name` - The name of the member in the enum
13876    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13877    pub fn with_enum_member(&self, name: impl Into<String>) -> TypeDef {
13878        let mut query = self.selection.select("withEnumMember");
13879        query = query.arg("name", name.into());
13880        TypeDef {
13881            proc: self.proc.clone(),
13882            selection: query,
13883            graphql_client: self.graphql_client.clone(),
13884        }
13885    }
13886    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
13887    ///
13888    /// # Arguments
13889    ///
13890    /// * `name` - The name of the member in the enum
13891    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13892    pub fn with_enum_member_opts<'a>(
13893        &self,
13894        name: impl Into<String>,
13895        opts: TypeDefWithEnumMemberOpts<'a>,
13896    ) -> TypeDef {
13897        let mut query = self.selection.select("withEnumMember");
13898        query = query.arg("name", name.into());
13899        if let Some(value) = opts.value {
13900            query = query.arg("value", value);
13901        }
13902        if let Some(description) = opts.description {
13903            query = query.arg("description", description);
13904        }
13905        if let Some(source_map) = opts.source_map {
13906            query = query.arg("sourceMap", source_map);
13907        }
13908        if let Some(deprecated) = opts.deprecated {
13909            query = query.arg("deprecated", deprecated);
13910        }
13911        TypeDef {
13912            proc: self.proc.clone(),
13913            selection: query,
13914            graphql_client: self.graphql_client.clone(),
13915        }
13916    }
13917    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
13918    ///
13919    /// # Arguments
13920    ///
13921    /// * `value` - The name of the value in the enum
13922    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13923    pub fn with_enum_value(&self, value: impl Into<String>) -> TypeDef {
13924        let mut query = self.selection.select("withEnumValue");
13925        query = query.arg("value", value.into());
13926        TypeDef {
13927            proc: self.proc.clone(),
13928            selection: query,
13929            graphql_client: self.graphql_client.clone(),
13930        }
13931    }
13932    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
13933    ///
13934    /// # Arguments
13935    ///
13936    /// * `value` - The name of the value in the enum
13937    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13938    pub fn with_enum_value_opts<'a>(
13939        &self,
13940        value: impl Into<String>,
13941        opts: TypeDefWithEnumValueOpts<'a>,
13942    ) -> TypeDef {
13943        let mut query = self.selection.select("withEnumValue");
13944        query = query.arg("value", value.into());
13945        if let Some(description) = opts.description {
13946            query = query.arg("description", description);
13947        }
13948        if let Some(source_map) = opts.source_map {
13949            query = query.arg("sourceMap", source_map);
13950        }
13951        if let Some(deprecated) = opts.deprecated {
13952            query = query.arg("deprecated", deprecated);
13953        }
13954        TypeDef {
13955            proc: self.proc.clone(),
13956            selection: query,
13957            graphql_client: self.graphql_client.clone(),
13958        }
13959    }
13960    /// Adds a static field for an Object TypeDef, failing if the type is not an object.
13961    ///
13962    /// # Arguments
13963    ///
13964    /// * `name` - The name of the field in the object
13965    /// * `type_def` - The type of the field
13966    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13967    pub fn with_field(&self, name: impl Into<String>, type_def: impl IntoID<TypeDefId>) -> TypeDef {
13968        let mut query = self.selection.select("withField");
13969        query = query.arg("name", name.into());
13970        query = query.arg_lazy(
13971            "typeDef",
13972            Box::new(move || {
13973                let type_def = type_def.clone();
13974                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
13975            }),
13976        );
13977        TypeDef {
13978            proc: self.proc.clone(),
13979            selection: query,
13980            graphql_client: self.graphql_client.clone(),
13981        }
13982    }
13983    /// Adds a static field for an Object TypeDef, failing if the type is not an object.
13984    ///
13985    /// # Arguments
13986    ///
13987    /// * `name` - The name of the field in the object
13988    /// * `type_def` - The type of the field
13989    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
13990    pub fn with_field_opts<'a>(
13991        &self,
13992        name: impl Into<String>,
13993        type_def: impl IntoID<TypeDefId>,
13994        opts: TypeDefWithFieldOpts<'a>,
13995    ) -> TypeDef {
13996        let mut query = self.selection.select("withField");
13997        query = query.arg("name", name.into());
13998        query = query.arg_lazy(
13999            "typeDef",
14000            Box::new(move || {
14001                let type_def = type_def.clone();
14002                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
14003            }),
14004        );
14005        if let Some(description) = opts.description {
14006            query = query.arg("description", description);
14007        }
14008        if let Some(source_map) = opts.source_map {
14009            query = query.arg("sourceMap", source_map);
14010        }
14011        if let Some(deprecated) = opts.deprecated {
14012            query = query.arg("deprecated", deprecated);
14013        }
14014        TypeDef {
14015            proc: self.proc.clone(),
14016            selection: query,
14017            graphql_client: self.graphql_client.clone(),
14018        }
14019    }
14020    /// Adds a function for an Object or Interface TypeDef, failing if the type is not one of those kinds.
14021    pub fn with_function(&self, function: impl IntoID<FunctionId>) -> TypeDef {
14022        let mut query = self.selection.select("withFunction");
14023        query = query.arg_lazy(
14024            "function",
14025            Box::new(move || {
14026                let function = function.clone();
14027                Box::pin(async move { function.into_id().await.unwrap().quote() })
14028            }),
14029        );
14030        TypeDef {
14031            proc: self.proc.clone(),
14032            selection: query,
14033            graphql_client: self.graphql_client.clone(),
14034        }
14035    }
14036    /// Returns a TypeDef of kind Interface with the provided name.
14037    ///
14038    /// # Arguments
14039    ///
14040    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
14041    pub fn with_interface(&self, name: impl Into<String>) -> TypeDef {
14042        let mut query = self.selection.select("withInterface");
14043        query = query.arg("name", name.into());
14044        TypeDef {
14045            proc: self.proc.clone(),
14046            selection: query,
14047            graphql_client: self.graphql_client.clone(),
14048        }
14049    }
14050    /// Returns a TypeDef of kind Interface with the provided name.
14051    ///
14052    /// # Arguments
14053    ///
14054    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
14055    pub fn with_interface_opts<'a>(
14056        &self,
14057        name: impl Into<String>,
14058        opts: TypeDefWithInterfaceOpts<'a>,
14059    ) -> TypeDef {
14060        let mut query = self.selection.select("withInterface");
14061        query = query.arg("name", name.into());
14062        if let Some(description) = opts.description {
14063            query = query.arg("description", description);
14064        }
14065        if let Some(source_map) = opts.source_map {
14066            query = query.arg("sourceMap", source_map);
14067        }
14068        TypeDef {
14069            proc: self.proc.clone(),
14070            selection: query,
14071            graphql_client: self.graphql_client.clone(),
14072        }
14073    }
14074    /// Sets the kind of the type.
14075    pub fn with_kind(&self, kind: TypeDefKind) -> TypeDef {
14076        let mut query = self.selection.select("withKind");
14077        query = query.arg("kind", kind);
14078        TypeDef {
14079            proc: self.proc.clone(),
14080            selection: query,
14081            graphql_client: self.graphql_client.clone(),
14082        }
14083    }
14084    /// Returns a TypeDef of kind List with the provided type for its elements.
14085    pub fn with_list_of(&self, element_type: impl IntoID<TypeDefId>) -> TypeDef {
14086        let mut query = self.selection.select("withListOf");
14087        query = query.arg_lazy(
14088            "elementType",
14089            Box::new(move || {
14090                let element_type = element_type.clone();
14091                Box::pin(async move { element_type.into_id().await.unwrap().quote() })
14092            }),
14093        );
14094        TypeDef {
14095            proc: self.proc.clone(),
14096            selection: query,
14097            graphql_client: self.graphql_client.clone(),
14098        }
14099    }
14100    /// Returns a TypeDef of kind Object with the provided name.
14101    /// 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.
14102    ///
14103    /// # Arguments
14104    ///
14105    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
14106    pub fn with_object(&self, name: impl Into<String>) -> TypeDef {
14107        let mut query = self.selection.select("withObject");
14108        query = query.arg("name", name.into());
14109        TypeDef {
14110            proc: self.proc.clone(),
14111            selection: query,
14112            graphql_client: self.graphql_client.clone(),
14113        }
14114    }
14115    /// Returns a TypeDef of kind Object with the provided name.
14116    /// 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.
14117    ///
14118    /// # Arguments
14119    ///
14120    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
14121    pub fn with_object_opts<'a>(
14122        &self,
14123        name: impl Into<String>,
14124        opts: TypeDefWithObjectOpts<'a>,
14125    ) -> TypeDef {
14126        let mut query = self.selection.select("withObject");
14127        query = query.arg("name", name.into());
14128        if let Some(description) = opts.description {
14129            query = query.arg("description", description);
14130        }
14131        if let Some(source_map) = opts.source_map {
14132            query = query.arg("sourceMap", source_map);
14133        }
14134        if let Some(deprecated) = opts.deprecated {
14135            query = query.arg("deprecated", deprecated);
14136        }
14137        TypeDef {
14138            proc: self.proc.clone(),
14139            selection: query,
14140            graphql_client: self.graphql_client.clone(),
14141        }
14142    }
14143    /// Sets whether this type can be set to null.
14144    pub fn with_optional(&self, optional: bool) -> TypeDef {
14145        let mut query = self.selection.select("withOptional");
14146        query = query.arg("optional", optional);
14147        TypeDef {
14148            proc: self.proc.clone(),
14149            selection: query,
14150            graphql_client: self.graphql_client.clone(),
14151        }
14152    }
14153    /// Returns a TypeDef of kind Scalar with the provided name.
14154    ///
14155    /// # Arguments
14156    ///
14157    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
14158    pub fn with_scalar(&self, name: impl Into<String>) -> TypeDef {
14159        let mut query = self.selection.select("withScalar");
14160        query = query.arg("name", name.into());
14161        TypeDef {
14162            proc: self.proc.clone(),
14163            selection: query,
14164            graphql_client: self.graphql_client.clone(),
14165        }
14166    }
14167    /// Returns a TypeDef of kind Scalar with the provided name.
14168    ///
14169    /// # Arguments
14170    ///
14171    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
14172    pub fn with_scalar_opts<'a>(
14173        &self,
14174        name: impl Into<String>,
14175        opts: TypeDefWithScalarOpts<'a>,
14176    ) -> TypeDef {
14177        let mut query = self.selection.select("withScalar");
14178        query = query.arg("name", name.into());
14179        if let Some(description) = opts.description {
14180            query = query.arg("description", description);
14181        }
14182        TypeDef {
14183            proc: self.proc.clone(),
14184            selection: query,
14185            graphql_client: self.graphql_client.clone(),
14186        }
14187    }
14188}
14189#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14190pub enum CacheSharingMode {
14191    #[serde(rename = "LOCKED")]
14192    Locked,
14193    #[serde(rename = "PRIVATE")]
14194    Private,
14195    #[serde(rename = "SHARED")]
14196    Shared,
14197}
14198#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14199pub enum ChangesetMergeConflict {
14200    #[serde(rename = "FAIL")]
14201    Fail,
14202    #[serde(rename = "FAIL_EARLY")]
14203    FailEarly,
14204    #[serde(rename = "LEAVE_CONFLICT_MARKERS")]
14205    LeaveConflictMarkers,
14206    #[serde(rename = "PREFER_OURS")]
14207    PreferOurs,
14208    #[serde(rename = "PREFER_THEIRS")]
14209    PreferTheirs,
14210}
14211#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14212pub enum ChangesetsMergeConflict {
14213    #[serde(rename = "FAIL")]
14214    Fail,
14215    #[serde(rename = "FAIL_EARLY")]
14216    FailEarly,
14217}
14218#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14219pub enum ExistsType {
14220    #[serde(rename = "DIRECTORY_TYPE")]
14221    DirectoryType,
14222    #[serde(rename = "REGULAR_TYPE")]
14223    RegularType,
14224    #[serde(rename = "SYMLINK_TYPE")]
14225    SymlinkType,
14226}
14227#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14228pub enum FileType {
14229    #[serde(rename = "DIRECTORY")]
14230    Directory,
14231    #[serde(rename = "DIRECTORY_TYPE")]
14232    DirectoryType,
14233    #[serde(rename = "REGULAR")]
14234    Regular,
14235    #[serde(rename = "REGULAR_TYPE")]
14236    RegularType,
14237    #[serde(rename = "SYMLINK")]
14238    Symlink,
14239    #[serde(rename = "SYMLINK_TYPE")]
14240    SymlinkType,
14241    #[serde(rename = "UNKNOWN")]
14242    Unknown,
14243}
14244#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14245pub enum FunctionCachePolicy {
14246    #[serde(rename = "Default")]
14247    Default,
14248    #[serde(rename = "Never")]
14249    Never,
14250    #[serde(rename = "PerSession")]
14251    PerSession,
14252}
14253#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14254pub enum ImageLayerCompression {
14255    #[serde(rename = "EStarGZ")]
14256    EStarGz,
14257    #[serde(rename = "ESTARGZ")]
14258    Estargz,
14259    #[serde(rename = "Gzip")]
14260    Gzip,
14261    #[serde(rename = "Uncompressed")]
14262    Uncompressed,
14263    #[serde(rename = "Zstd")]
14264    Zstd,
14265}
14266#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14267pub enum ImageMediaTypes {
14268    #[serde(rename = "DOCKER")]
14269    Docker,
14270    #[serde(rename = "DockerMediaTypes")]
14271    DockerMediaTypes,
14272    #[serde(rename = "OCI")]
14273    Oci,
14274    #[serde(rename = "OCIMediaTypes")]
14275    OciMediaTypes,
14276}
14277#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14278pub enum ModuleSourceExperimentalFeature {
14279    #[serde(rename = "SELF_CALLS")]
14280    SelfCalls,
14281}
14282#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14283pub enum ModuleSourceKind {
14284    #[serde(rename = "DIR")]
14285    Dir,
14286    #[serde(rename = "DIR_SOURCE")]
14287    DirSource,
14288    #[serde(rename = "GIT")]
14289    Git,
14290    #[serde(rename = "GIT_SOURCE")]
14291    GitSource,
14292    #[serde(rename = "LOCAL")]
14293    Local,
14294    #[serde(rename = "LOCAL_SOURCE")]
14295    LocalSource,
14296}
14297#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14298pub enum NetworkProtocol {
14299    #[serde(rename = "TCP")]
14300    Tcp,
14301    #[serde(rename = "UDP")]
14302    Udp,
14303}
14304#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14305pub enum ReturnType {
14306    #[serde(rename = "ANY")]
14307    Any,
14308    #[serde(rename = "FAILURE")]
14309    Failure,
14310    #[serde(rename = "SUCCESS")]
14311    Success,
14312}
14313#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14314pub enum TypeDefKind {
14315    #[serde(rename = "BOOLEAN")]
14316    Boolean,
14317    #[serde(rename = "BOOLEAN_KIND")]
14318    BooleanKind,
14319    #[serde(rename = "ENUM")]
14320    Enum,
14321    #[serde(rename = "ENUM_KIND")]
14322    EnumKind,
14323    #[serde(rename = "FLOAT")]
14324    Float,
14325    #[serde(rename = "FLOAT_KIND")]
14326    FloatKind,
14327    #[serde(rename = "INPUT")]
14328    Input,
14329    #[serde(rename = "INPUT_KIND")]
14330    InputKind,
14331    #[serde(rename = "INTEGER")]
14332    Integer,
14333    #[serde(rename = "INTEGER_KIND")]
14334    IntegerKind,
14335    #[serde(rename = "INTERFACE")]
14336    Interface,
14337    #[serde(rename = "INTERFACE_KIND")]
14338    InterfaceKind,
14339    #[serde(rename = "LIST")]
14340    List,
14341    #[serde(rename = "LIST_KIND")]
14342    ListKind,
14343    #[serde(rename = "OBJECT")]
14344    Object,
14345    #[serde(rename = "OBJECT_KIND")]
14346    ObjectKind,
14347    #[serde(rename = "SCALAR")]
14348    Scalar,
14349    #[serde(rename = "SCALAR_KIND")]
14350    ScalarKind,
14351    #[serde(rename = "STRING")]
14352    String,
14353    #[serde(rename = "STRING_KIND")]
14354    StringKind,
14355    #[serde(rename = "VOID")]
14356    Void,
14357    #[serde(rename = "VOID_KIND")]
14358    VoidKind,
14359}