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 CloudId(pub String);
150impl From<&str> for CloudId {
151    fn from(value: &str) -> Self {
152        Self(value.to_string())
153    }
154}
155impl From<String> for CloudId {
156    fn from(value: String) -> Self {
157        Self(value)
158    }
159}
160impl IntoID<CloudId> for Cloud {
161    fn into_id(
162        self,
163    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<CloudId, DaggerError>> + Send>>
164    {
165        Box::pin(async move { self.id().await })
166    }
167}
168impl IntoID<CloudId> for CloudId {
169    fn into_id(
170        self,
171    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<CloudId, DaggerError>> + Send>>
172    {
173        Box::pin(async move { Ok::<CloudId, DaggerError>(self) })
174    }
175}
176impl CloudId {
177    fn quote(&self) -> String {
178        format!("\"{}\"", self.0.clone())
179    }
180}
181#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
182pub struct ContainerId(pub String);
183impl From<&str> for ContainerId {
184    fn from(value: &str) -> Self {
185        Self(value.to_string())
186    }
187}
188impl From<String> for ContainerId {
189    fn from(value: String) -> Self {
190        Self(value)
191    }
192}
193impl IntoID<ContainerId> for Container {
194    fn into_id(
195        self,
196    ) -> std::pin::Pin<
197        Box<dyn core::future::Future<Output = Result<ContainerId, DaggerError>> + Send>,
198    > {
199        Box::pin(async move { self.id().await })
200    }
201}
202impl IntoID<ContainerId> for ContainerId {
203    fn into_id(
204        self,
205    ) -> std::pin::Pin<
206        Box<dyn core::future::Future<Output = Result<ContainerId, DaggerError>> + Send>,
207    > {
208        Box::pin(async move { Ok::<ContainerId, DaggerError>(self) })
209    }
210}
211impl ContainerId {
212    fn quote(&self) -> String {
213        format!("\"{}\"", self.0.clone())
214    }
215}
216#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
217pub struct CurrentModuleId(pub String);
218impl From<&str> for CurrentModuleId {
219    fn from(value: &str) -> Self {
220        Self(value.to_string())
221    }
222}
223impl From<String> for CurrentModuleId {
224    fn from(value: String) -> Self {
225        Self(value)
226    }
227}
228impl IntoID<CurrentModuleId> for CurrentModule {
229    fn into_id(
230        self,
231    ) -> std::pin::Pin<
232        Box<dyn core::future::Future<Output = Result<CurrentModuleId, DaggerError>> + Send>,
233    > {
234        Box::pin(async move { self.id().await })
235    }
236}
237impl IntoID<CurrentModuleId> for CurrentModuleId {
238    fn into_id(
239        self,
240    ) -> std::pin::Pin<
241        Box<dyn core::future::Future<Output = Result<CurrentModuleId, DaggerError>> + Send>,
242    > {
243        Box::pin(async move { Ok::<CurrentModuleId, DaggerError>(self) })
244    }
245}
246impl CurrentModuleId {
247    fn quote(&self) -> String {
248        format!("\"{}\"", self.0.clone())
249    }
250}
251#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
252pub struct DirectoryId(pub String);
253impl From<&str> for DirectoryId {
254    fn from(value: &str) -> Self {
255        Self(value.to_string())
256    }
257}
258impl From<String> for DirectoryId {
259    fn from(value: String) -> Self {
260        Self(value)
261    }
262}
263impl IntoID<DirectoryId> for Directory {
264    fn into_id(
265        self,
266    ) -> std::pin::Pin<
267        Box<dyn core::future::Future<Output = Result<DirectoryId, DaggerError>> + Send>,
268    > {
269        Box::pin(async move { self.id().await })
270    }
271}
272impl IntoID<DirectoryId> for DirectoryId {
273    fn into_id(
274        self,
275    ) -> std::pin::Pin<
276        Box<dyn core::future::Future<Output = Result<DirectoryId, DaggerError>> + Send>,
277    > {
278        Box::pin(async move { Ok::<DirectoryId, DaggerError>(self) })
279    }
280}
281impl DirectoryId {
282    fn quote(&self) -> String {
283        format!("\"{}\"", self.0.clone())
284    }
285}
286#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
287pub struct EngineCacheEntryId(pub String);
288impl From<&str> for EngineCacheEntryId {
289    fn from(value: &str) -> Self {
290        Self(value.to_string())
291    }
292}
293impl From<String> for EngineCacheEntryId {
294    fn from(value: String) -> Self {
295        Self(value)
296    }
297}
298impl IntoID<EngineCacheEntryId> for EngineCacheEntry {
299    fn into_id(
300        self,
301    ) -> std::pin::Pin<
302        Box<dyn core::future::Future<Output = Result<EngineCacheEntryId, DaggerError>> + Send>,
303    > {
304        Box::pin(async move { self.id().await })
305    }
306}
307impl IntoID<EngineCacheEntryId> for EngineCacheEntryId {
308    fn into_id(
309        self,
310    ) -> std::pin::Pin<
311        Box<dyn core::future::Future<Output = Result<EngineCacheEntryId, DaggerError>> + Send>,
312    > {
313        Box::pin(async move { Ok::<EngineCacheEntryId, DaggerError>(self) })
314    }
315}
316impl EngineCacheEntryId {
317    fn quote(&self) -> String {
318        format!("\"{}\"", self.0.clone())
319    }
320}
321#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
322pub struct EngineCacheEntrySetId(pub String);
323impl From<&str> for EngineCacheEntrySetId {
324    fn from(value: &str) -> Self {
325        Self(value.to_string())
326    }
327}
328impl From<String> for EngineCacheEntrySetId {
329    fn from(value: String) -> Self {
330        Self(value)
331    }
332}
333impl IntoID<EngineCacheEntrySetId> for EngineCacheEntrySet {
334    fn into_id(
335        self,
336    ) -> std::pin::Pin<
337        Box<dyn core::future::Future<Output = Result<EngineCacheEntrySetId, DaggerError>> + Send>,
338    > {
339        Box::pin(async move { self.id().await })
340    }
341}
342impl IntoID<EngineCacheEntrySetId> for EngineCacheEntrySetId {
343    fn into_id(
344        self,
345    ) -> std::pin::Pin<
346        Box<dyn core::future::Future<Output = Result<EngineCacheEntrySetId, DaggerError>> + Send>,
347    > {
348        Box::pin(async move { Ok::<EngineCacheEntrySetId, DaggerError>(self) })
349    }
350}
351impl EngineCacheEntrySetId {
352    fn quote(&self) -> String {
353        format!("\"{}\"", self.0.clone())
354    }
355}
356#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
357pub struct EngineCacheId(pub String);
358impl From<&str> for EngineCacheId {
359    fn from(value: &str) -> Self {
360        Self(value.to_string())
361    }
362}
363impl From<String> for EngineCacheId {
364    fn from(value: String) -> Self {
365        Self(value)
366    }
367}
368impl IntoID<EngineCacheId> for EngineCache {
369    fn into_id(
370        self,
371    ) -> std::pin::Pin<
372        Box<dyn core::future::Future<Output = Result<EngineCacheId, DaggerError>> + Send>,
373    > {
374        Box::pin(async move { self.id().await })
375    }
376}
377impl IntoID<EngineCacheId> for EngineCacheId {
378    fn into_id(
379        self,
380    ) -> std::pin::Pin<
381        Box<dyn core::future::Future<Output = Result<EngineCacheId, DaggerError>> + Send>,
382    > {
383        Box::pin(async move { Ok::<EngineCacheId, DaggerError>(self) })
384    }
385}
386impl EngineCacheId {
387    fn quote(&self) -> String {
388        format!("\"{}\"", self.0.clone())
389    }
390}
391#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
392pub struct EngineId(pub String);
393impl From<&str> for EngineId {
394    fn from(value: &str) -> Self {
395        Self(value.to_string())
396    }
397}
398impl From<String> for EngineId {
399    fn from(value: String) -> Self {
400        Self(value)
401    }
402}
403impl IntoID<EngineId> for Engine {
404    fn into_id(
405        self,
406    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<EngineId, DaggerError>> + Send>>
407    {
408        Box::pin(async move { self.id().await })
409    }
410}
411impl IntoID<EngineId> for EngineId {
412    fn into_id(
413        self,
414    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<EngineId, DaggerError>> + Send>>
415    {
416        Box::pin(async move { Ok::<EngineId, DaggerError>(self) })
417    }
418}
419impl EngineId {
420    fn quote(&self) -> String {
421        format!("\"{}\"", self.0.clone())
422    }
423}
424#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
425pub struct EnumTypeDefId(pub String);
426impl From<&str> for EnumTypeDefId {
427    fn from(value: &str) -> Self {
428        Self(value.to_string())
429    }
430}
431impl From<String> for EnumTypeDefId {
432    fn from(value: String) -> Self {
433        Self(value)
434    }
435}
436impl IntoID<EnumTypeDefId> for EnumTypeDef {
437    fn into_id(
438        self,
439    ) -> std::pin::Pin<
440        Box<dyn core::future::Future<Output = Result<EnumTypeDefId, DaggerError>> + Send>,
441    > {
442        Box::pin(async move { self.id().await })
443    }
444}
445impl IntoID<EnumTypeDefId> for EnumTypeDefId {
446    fn into_id(
447        self,
448    ) -> std::pin::Pin<
449        Box<dyn core::future::Future<Output = Result<EnumTypeDefId, DaggerError>> + Send>,
450    > {
451        Box::pin(async move { Ok::<EnumTypeDefId, DaggerError>(self) })
452    }
453}
454impl EnumTypeDefId {
455    fn quote(&self) -> String {
456        format!("\"{}\"", self.0.clone())
457    }
458}
459#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
460pub struct EnumValueTypeDefId(pub String);
461impl From<&str> for EnumValueTypeDefId {
462    fn from(value: &str) -> Self {
463        Self(value.to_string())
464    }
465}
466impl From<String> for EnumValueTypeDefId {
467    fn from(value: String) -> Self {
468        Self(value)
469    }
470}
471impl IntoID<EnumValueTypeDefId> for EnumValueTypeDef {
472    fn into_id(
473        self,
474    ) -> std::pin::Pin<
475        Box<dyn core::future::Future<Output = Result<EnumValueTypeDefId, DaggerError>> + Send>,
476    > {
477        Box::pin(async move { self.id().await })
478    }
479}
480impl IntoID<EnumValueTypeDefId> for EnumValueTypeDefId {
481    fn into_id(
482        self,
483    ) -> std::pin::Pin<
484        Box<dyn core::future::Future<Output = Result<EnumValueTypeDefId, DaggerError>> + Send>,
485    > {
486        Box::pin(async move { Ok::<EnumValueTypeDefId, DaggerError>(self) })
487    }
488}
489impl EnumValueTypeDefId {
490    fn quote(&self) -> String {
491        format!("\"{}\"", self.0.clone())
492    }
493}
494#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
495pub struct EnvFileId(pub String);
496impl From<&str> for EnvFileId {
497    fn from(value: &str) -> Self {
498        Self(value.to_string())
499    }
500}
501impl From<String> for EnvFileId {
502    fn from(value: String) -> Self {
503        Self(value)
504    }
505}
506impl IntoID<EnvFileId> for EnvFile {
507    fn into_id(
508        self,
509    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<EnvFileId, DaggerError>> + Send>>
510    {
511        Box::pin(async move { self.id().await })
512    }
513}
514impl IntoID<EnvFileId> for EnvFileId {
515    fn into_id(
516        self,
517    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<EnvFileId, DaggerError>> + Send>>
518    {
519        Box::pin(async move { Ok::<EnvFileId, DaggerError>(self) })
520    }
521}
522impl EnvFileId {
523    fn quote(&self) -> String {
524        format!("\"{}\"", self.0.clone())
525    }
526}
527#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
528pub struct EnvId(pub String);
529impl From<&str> for EnvId {
530    fn from(value: &str) -> Self {
531        Self(value.to_string())
532    }
533}
534impl From<String> for EnvId {
535    fn from(value: String) -> Self {
536        Self(value)
537    }
538}
539impl IntoID<EnvId> for Env {
540    fn into_id(
541        self,
542    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<EnvId, DaggerError>> + Send>>
543    {
544        Box::pin(async move { self.id().await })
545    }
546}
547impl IntoID<EnvId> for EnvId {
548    fn into_id(
549        self,
550    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<EnvId, DaggerError>> + Send>>
551    {
552        Box::pin(async move { Ok::<EnvId, DaggerError>(self) })
553    }
554}
555impl EnvId {
556    fn quote(&self) -> String {
557        format!("\"{}\"", self.0.clone())
558    }
559}
560#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
561pub struct EnvVariableId(pub String);
562impl From<&str> for EnvVariableId {
563    fn from(value: &str) -> Self {
564        Self(value.to_string())
565    }
566}
567impl From<String> for EnvVariableId {
568    fn from(value: String) -> Self {
569        Self(value)
570    }
571}
572impl IntoID<EnvVariableId> for EnvVariable {
573    fn into_id(
574        self,
575    ) -> std::pin::Pin<
576        Box<dyn core::future::Future<Output = Result<EnvVariableId, DaggerError>> + Send>,
577    > {
578        Box::pin(async move { self.id().await })
579    }
580}
581impl IntoID<EnvVariableId> for EnvVariableId {
582    fn into_id(
583        self,
584    ) -> std::pin::Pin<
585        Box<dyn core::future::Future<Output = Result<EnvVariableId, DaggerError>> + Send>,
586    > {
587        Box::pin(async move { Ok::<EnvVariableId, DaggerError>(self) })
588    }
589}
590impl EnvVariableId {
591    fn quote(&self) -> String {
592        format!("\"{}\"", self.0.clone())
593    }
594}
595#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
596pub struct ErrorId(pub String);
597impl From<&str> for ErrorId {
598    fn from(value: &str) -> Self {
599        Self(value.to_string())
600    }
601}
602impl From<String> for ErrorId {
603    fn from(value: String) -> Self {
604        Self(value)
605    }
606}
607impl IntoID<ErrorId> for Error {
608    fn into_id(
609        self,
610    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ErrorId, DaggerError>> + Send>>
611    {
612        Box::pin(async move { self.id().await })
613    }
614}
615impl IntoID<ErrorId> for ErrorId {
616    fn into_id(
617        self,
618    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ErrorId, DaggerError>> + Send>>
619    {
620        Box::pin(async move { Ok::<ErrorId, DaggerError>(self) })
621    }
622}
623impl ErrorId {
624    fn quote(&self) -> String {
625        format!("\"{}\"", self.0.clone())
626    }
627}
628#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
629pub struct ErrorValueId(pub String);
630impl From<&str> for ErrorValueId {
631    fn from(value: &str) -> Self {
632        Self(value.to_string())
633    }
634}
635impl From<String> for ErrorValueId {
636    fn from(value: String) -> Self {
637        Self(value)
638    }
639}
640impl IntoID<ErrorValueId> for ErrorValue {
641    fn into_id(
642        self,
643    ) -> std::pin::Pin<
644        Box<dyn core::future::Future<Output = Result<ErrorValueId, DaggerError>> + Send>,
645    > {
646        Box::pin(async move { self.id().await })
647    }
648}
649impl IntoID<ErrorValueId> for ErrorValueId {
650    fn into_id(
651        self,
652    ) -> std::pin::Pin<
653        Box<dyn core::future::Future<Output = Result<ErrorValueId, DaggerError>> + Send>,
654    > {
655        Box::pin(async move { Ok::<ErrorValueId, DaggerError>(self) })
656    }
657}
658impl ErrorValueId {
659    fn quote(&self) -> String {
660        format!("\"{}\"", self.0.clone())
661    }
662}
663#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
664pub struct FieldTypeDefId(pub String);
665impl From<&str> for FieldTypeDefId {
666    fn from(value: &str) -> Self {
667        Self(value.to_string())
668    }
669}
670impl From<String> for FieldTypeDefId {
671    fn from(value: String) -> Self {
672        Self(value)
673    }
674}
675impl IntoID<FieldTypeDefId> for FieldTypeDef {
676    fn into_id(
677        self,
678    ) -> std::pin::Pin<
679        Box<dyn core::future::Future<Output = Result<FieldTypeDefId, DaggerError>> + Send>,
680    > {
681        Box::pin(async move { self.id().await })
682    }
683}
684impl IntoID<FieldTypeDefId> for FieldTypeDefId {
685    fn into_id(
686        self,
687    ) -> std::pin::Pin<
688        Box<dyn core::future::Future<Output = Result<FieldTypeDefId, DaggerError>> + Send>,
689    > {
690        Box::pin(async move { Ok::<FieldTypeDefId, DaggerError>(self) })
691    }
692}
693impl FieldTypeDefId {
694    fn quote(&self) -> String {
695        format!("\"{}\"", self.0.clone())
696    }
697}
698#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
699pub struct FileId(pub String);
700impl From<&str> for FileId {
701    fn from(value: &str) -> Self {
702        Self(value.to_string())
703    }
704}
705impl From<String> for FileId {
706    fn from(value: String) -> Self {
707        Self(value)
708    }
709}
710impl IntoID<FileId> for File {
711    fn into_id(
712        self,
713    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<FileId, DaggerError>> + Send>>
714    {
715        Box::pin(async move { self.id().await })
716    }
717}
718impl IntoID<FileId> for FileId {
719    fn into_id(
720        self,
721    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<FileId, DaggerError>> + Send>>
722    {
723        Box::pin(async move { Ok::<FileId, DaggerError>(self) })
724    }
725}
726impl FileId {
727    fn quote(&self) -> String {
728        format!("\"{}\"", self.0.clone())
729    }
730}
731#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
732pub struct FunctionArgId(pub String);
733impl From<&str> for FunctionArgId {
734    fn from(value: &str) -> Self {
735        Self(value.to_string())
736    }
737}
738impl From<String> for FunctionArgId {
739    fn from(value: String) -> Self {
740        Self(value)
741    }
742}
743impl IntoID<FunctionArgId> for FunctionArg {
744    fn into_id(
745        self,
746    ) -> std::pin::Pin<
747        Box<dyn core::future::Future<Output = Result<FunctionArgId, DaggerError>> + Send>,
748    > {
749        Box::pin(async move { self.id().await })
750    }
751}
752impl IntoID<FunctionArgId> for FunctionArgId {
753    fn into_id(
754        self,
755    ) -> std::pin::Pin<
756        Box<dyn core::future::Future<Output = Result<FunctionArgId, DaggerError>> + Send>,
757    > {
758        Box::pin(async move { Ok::<FunctionArgId, DaggerError>(self) })
759    }
760}
761impl FunctionArgId {
762    fn quote(&self) -> String {
763        format!("\"{}\"", self.0.clone())
764    }
765}
766#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
767pub struct FunctionCallArgValueId(pub String);
768impl From<&str> for FunctionCallArgValueId {
769    fn from(value: &str) -> Self {
770        Self(value.to_string())
771    }
772}
773impl From<String> for FunctionCallArgValueId {
774    fn from(value: String) -> Self {
775        Self(value)
776    }
777}
778impl IntoID<FunctionCallArgValueId> for FunctionCallArgValue {
779    fn into_id(
780        self,
781    ) -> std::pin::Pin<
782        Box<dyn core::future::Future<Output = Result<FunctionCallArgValueId, DaggerError>> + Send>,
783    > {
784        Box::pin(async move { self.id().await })
785    }
786}
787impl IntoID<FunctionCallArgValueId> for FunctionCallArgValueId {
788    fn into_id(
789        self,
790    ) -> std::pin::Pin<
791        Box<dyn core::future::Future<Output = Result<FunctionCallArgValueId, DaggerError>> + Send>,
792    > {
793        Box::pin(async move { Ok::<FunctionCallArgValueId, DaggerError>(self) })
794    }
795}
796impl FunctionCallArgValueId {
797    fn quote(&self) -> String {
798        format!("\"{}\"", self.0.clone())
799    }
800}
801#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
802pub struct FunctionCallId(pub String);
803impl From<&str> for FunctionCallId {
804    fn from(value: &str) -> Self {
805        Self(value.to_string())
806    }
807}
808impl From<String> for FunctionCallId {
809    fn from(value: String) -> Self {
810        Self(value)
811    }
812}
813impl IntoID<FunctionCallId> for FunctionCall {
814    fn into_id(
815        self,
816    ) -> std::pin::Pin<
817        Box<dyn core::future::Future<Output = Result<FunctionCallId, DaggerError>> + Send>,
818    > {
819        Box::pin(async move { self.id().await })
820    }
821}
822impl IntoID<FunctionCallId> for FunctionCallId {
823    fn into_id(
824        self,
825    ) -> std::pin::Pin<
826        Box<dyn core::future::Future<Output = Result<FunctionCallId, DaggerError>> + Send>,
827    > {
828        Box::pin(async move { Ok::<FunctionCallId, DaggerError>(self) })
829    }
830}
831impl FunctionCallId {
832    fn quote(&self) -> String {
833        format!("\"{}\"", self.0.clone())
834    }
835}
836#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
837pub struct FunctionId(pub String);
838impl From<&str> for FunctionId {
839    fn from(value: &str) -> Self {
840        Self(value.to_string())
841    }
842}
843impl From<String> for FunctionId {
844    fn from(value: String) -> Self {
845        Self(value)
846    }
847}
848impl IntoID<FunctionId> for Function {
849    fn into_id(
850        self,
851    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<FunctionId, DaggerError>> + Send>>
852    {
853        Box::pin(async move { self.id().await })
854    }
855}
856impl IntoID<FunctionId> for FunctionId {
857    fn into_id(
858        self,
859    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<FunctionId, DaggerError>> + Send>>
860    {
861        Box::pin(async move { Ok::<FunctionId, DaggerError>(self) })
862    }
863}
864impl FunctionId {
865    fn quote(&self) -> String {
866        format!("\"{}\"", self.0.clone())
867    }
868}
869#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
870pub struct GeneratedCodeId(pub String);
871impl From<&str> for GeneratedCodeId {
872    fn from(value: &str) -> Self {
873        Self(value.to_string())
874    }
875}
876impl From<String> for GeneratedCodeId {
877    fn from(value: String) -> Self {
878        Self(value)
879    }
880}
881impl IntoID<GeneratedCodeId> for GeneratedCode {
882    fn into_id(
883        self,
884    ) -> std::pin::Pin<
885        Box<dyn core::future::Future<Output = Result<GeneratedCodeId, DaggerError>> + Send>,
886    > {
887        Box::pin(async move { self.id().await })
888    }
889}
890impl IntoID<GeneratedCodeId> for GeneratedCodeId {
891    fn into_id(
892        self,
893    ) -> std::pin::Pin<
894        Box<dyn core::future::Future<Output = Result<GeneratedCodeId, DaggerError>> + Send>,
895    > {
896        Box::pin(async move { Ok::<GeneratedCodeId, DaggerError>(self) })
897    }
898}
899impl GeneratedCodeId {
900    fn quote(&self) -> String {
901        format!("\"{}\"", self.0.clone())
902    }
903}
904#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
905pub struct GitRefId(pub String);
906impl From<&str> for GitRefId {
907    fn from(value: &str) -> Self {
908        Self(value.to_string())
909    }
910}
911impl From<String> for GitRefId {
912    fn from(value: String) -> Self {
913        Self(value)
914    }
915}
916impl IntoID<GitRefId> for GitRef {
917    fn into_id(
918        self,
919    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<GitRefId, DaggerError>> + Send>>
920    {
921        Box::pin(async move { self.id().await })
922    }
923}
924impl IntoID<GitRefId> for GitRefId {
925    fn into_id(
926        self,
927    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<GitRefId, DaggerError>> + Send>>
928    {
929        Box::pin(async move { Ok::<GitRefId, DaggerError>(self) })
930    }
931}
932impl GitRefId {
933    fn quote(&self) -> String {
934        format!("\"{}\"", self.0.clone())
935    }
936}
937#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
938pub struct GitRepositoryId(pub String);
939impl From<&str> for GitRepositoryId {
940    fn from(value: &str) -> Self {
941        Self(value.to_string())
942    }
943}
944impl From<String> for GitRepositoryId {
945    fn from(value: String) -> Self {
946        Self(value)
947    }
948}
949impl IntoID<GitRepositoryId> for GitRepository {
950    fn into_id(
951        self,
952    ) -> std::pin::Pin<
953        Box<dyn core::future::Future<Output = Result<GitRepositoryId, DaggerError>> + Send>,
954    > {
955        Box::pin(async move { self.id().await })
956    }
957}
958impl IntoID<GitRepositoryId> for GitRepositoryId {
959    fn into_id(
960        self,
961    ) -> std::pin::Pin<
962        Box<dyn core::future::Future<Output = Result<GitRepositoryId, DaggerError>> + Send>,
963    > {
964        Box::pin(async move { Ok::<GitRepositoryId, DaggerError>(self) })
965    }
966}
967impl GitRepositoryId {
968    fn quote(&self) -> String {
969        format!("\"{}\"", self.0.clone())
970    }
971}
972#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
973pub struct HostId(pub String);
974impl From<&str> for HostId {
975    fn from(value: &str) -> Self {
976        Self(value.to_string())
977    }
978}
979impl From<String> for HostId {
980    fn from(value: String) -> Self {
981        Self(value)
982    }
983}
984impl IntoID<HostId> for Host {
985    fn into_id(
986        self,
987    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<HostId, DaggerError>> + Send>>
988    {
989        Box::pin(async move { self.id().await })
990    }
991}
992impl IntoID<HostId> for HostId {
993    fn into_id(
994        self,
995    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<HostId, DaggerError>> + Send>>
996    {
997        Box::pin(async move { Ok::<HostId, DaggerError>(self) })
998    }
999}
1000impl HostId {
1001    fn quote(&self) -> String {
1002        format!("\"{}\"", self.0.clone())
1003    }
1004}
1005#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1006pub struct InputTypeDefId(pub String);
1007impl From<&str> for InputTypeDefId {
1008    fn from(value: &str) -> Self {
1009        Self(value.to_string())
1010    }
1011}
1012impl From<String> for InputTypeDefId {
1013    fn from(value: String) -> Self {
1014        Self(value)
1015    }
1016}
1017impl IntoID<InputTypeDefId> for InputTypeDef {
1018    fn into_id(
1019        self,
1020    ) -> std::pin::Pin<
1021        Box<dyn core::future::Future<Output = Result<InputTypeDefId, DaggerError>> + Send>,
1022    > {
1023        Box::pin(async move { self.id().await })
1024    }
1025}
1026impl IntoID<InputTypeDefId> for InputTypeDefId {
1027    fn into_id(
1028        self,
1029    ) -> std::pin::Pin<
1030        Box<dyn core::future::Future<Output = Result<InputTypeDefId, DaggerError>> + Send>,
1031    > {
1032        Box::pin(async move { Ok::<InputTypeDefId, DaggerError>(self) })
1033    }
1034}
1035impl InputTypeDefId {
1036    fn quote(&self) -> String {
1037        format!("\"{}\"", self.0.clone())
1038    }
1039}
1040#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1041pub struct InterfaceTypeDefId(pub String);
1042impl From<&str> for InterfaceTypeDefId {
1043    fn from(value: &str) -> Self {
1044        Self(value.to_string())
1045    }
1046}
1047impl From<String> for InterfaceTypeDefId {
1048    fn from(value: String) -> Self {
1049        Self(value)
1050    }
1051}
1052impl IntoID<InterfaceTypeDefId> for InterfaceTypeDef {
1053    fn into_id(
1054        self,
1055    ) -> std::pin::Pin<
1056        Box<dyn core::future::Future<Output = Result<InterfaceTypeDefId, DaggerError>> + Send>,
1057    > {
1058        Box::pin(async move { self.id().await })
1059    }
1060}
1061impl IntoID<InterfaceTypeDefId> for InterfaceTypeDefId {
1062    fn into_id(
1063        self,
1064    ) -> std::pin::Pin<
1065        Box<dyn core::future::Future<Output = Result<InterfaceTypeDefId, DaggerError>> + Send>,
1066    > {
1067        Box::pin(async move { Ok::<InterfaceTypeDefId, DaggerError>(self) })
1068    }
1069}
1070impl InterfaceTypeDefId {
1071    fn quote(&self) -> String {
1072        format!("\"{}\"", self.0.clone())
1073    }
1074}
1075#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1076pub struct Json(pub String);
1077impl From<&str> for Json {
1078    fn from(value: &str) -> Self {
1079        Self(value.to_string())
1080    }
1081}
1082impl From<String> for Json {
1083    fn from(value: String) -> Self {
1084        Self(value)
1085    }
1086}
1087impl Json {
1088    fn quote(&self) -> String {
1089        format!("\"{}\"", self.0.clone())
1090    }
1091}
1092#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1093pub struct JsonValueId(pub String);
1094impl From<&str> for JsonValueId {
1095    fn from(value: &str) -> Self {
1096        Self(value.to_string())
1097    }
1098}
1099impl From<String> for JsonValueId {
1100    fn from(value: String) -> Self {
1101        Self(value)
1102    }
1103}
1104impl IntoID<JsonValueId> for JsonValue {
1105    fn into_id(
1106        self,
1107    ) -> std::pin::Pin<
1108        Box<dyn core::future::Future<Output = Result<JsonValueId, DaggerError>> + Send>,
1109    > {
1110        Box::pin(async move { self.id().await })
1111    }
1112}
1113impl IntoID<JsonValueId> for JsonValueId {
1114    fn into_id(
1115        self,
1116    ) -> std::pin::Pin<
1117        Box<dyn core::future::Future<Output = Result<JsonValueId, DaggerError>> + Send>,
1118    > {
1119        Box::pin(async move { Ok::<JsonValueId, DaggerError>(self) })
1120    }
1121}
1122impl JsonValueId {
1123    fn quote(&self) -> String {
1124        format!("\"{}\"", self.0.clone())
1125    }
1126}
1127#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1128pub struct Llmid(pub String);
1129impl From<&str> for Llmid {
1130    fn from(value: &str) -> Self {
1131        Self(value.to_string())
1132    }
1133}
1134impl From<String> for Llmid {
1135    fn from(value: String) -> Self {
1136        Self(value)
1137    }
1138}
1139impl IntoID<Llmid> for Llm {
1140    fn into_id(
1141        self,
1142    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Llmid, DaggerError>> + Send>>
1143    {
1144        Box::pin(async move { self.id().await })
1145    }
1146}
1147impl IntoID<Llmid> for Llmid {
1148    fn into_id(
1149        self,
1150    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Llmid, DaggerError>> + Send>>
1151    {
1152        Box::pin(async move { Ok::<Llmid, DaggerError>(self) })
1153    }
1154}
1155impl Llmid {
1156    fn quote(&self) -> String {
1157        format!("\"{}\"", self.0.clone())
1158    }
1159}
1160#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1161pub struct LlmTokenUsageId(pub String);
1162impl From<&str> for LlmTokenUsageId {
1163    fn from(value: &str) -> Self {
1164        Self(value.to_string())
1165    }
1166}
1167impl From<String> for LlmTokenUsageId {
1168    fn from(value: String) -> Self {
1169        Self(value)
1170    }
1171}
1172impl IntoID<LlmTokenUsageId> for LlmTokenUsage {
1173    fn into_id(
1174        self,
1175    ) -> std::pin::Pin<
1176        Box<dyn core::future::Future<Output = Result<LlmTokenUsageId, DaggerError>> + Send>,
1177    > {
1178        Box::pin(async move { self.id().await })
1179    }
1180}
1181impl IntoID<LlmTokenUsageId> for LlmTokenUsageId {
1182    fn into_id(
1183        self,
1184    ) -> std::pin::Pin<
1185        Box<dyn core::future::Future<Output = Result<LlmTokenUsageId, DaggerError>> + Send>,
1186    > {
1187        Box::pin(async move { Ok::<LlmTokenUsageId, DaggerError>(self) })
1188    }
1189}
1190impl LlmTokenUsageId {
1191    fn quote(&self) -> String {
1192        format!("\"{}\"", self.0.clone())
1193    }
1194}
1195#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1196pub struct LabelId(pub String);
1197impl From<&str> for LabelId {
1198    fn from(value: &str) -> Self {
1199        Self(value.to_string())
1200    }
1201}
1202impl From<String> for LabelId {
1203    fn from(value: String) -> Self {
1204        Self(value)
1205    }
1206}
1207impl IntoID<LabelId> for Label {
1208    fn into_id(
1209        self,
1210    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<LabelId, DaggerError>> + Send>>
1211    {
1212        Box::pin(async move { self.id().await })
1213    }
1214}
1215impl IntoID<LabelId> for LabelId {
1216    fn into_id(
1217        self,
1218    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<LabelId, DaggerError>> + Send>>
1219    {
1220        Box::pin(async move { Ok::<LabelId, DaggerError>(self) })
1221    }
1222}
1223impl LabelId {
1224    fn quote(&self) -> String {
1225        format!("\"{}\"", self.0.clone())
1226    }
1227}
1228#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1229pub struct ListTypeDefId(pub String);
1230impl From<&str> for ListTypeDefId {
1231    fn from(value: &str) -> Self {
1232        Self(value.to_string())
1233    }
1234}
1235impl From<String> for ListTypeDefId {
1236    fn from(value: String) -> Self {
1237        Self(value)
1238    }
1239}
1240impl IntoID<ListTypeDefId> for ListTypeDef {
1241    fn into_id(
1242        self,
1243    ) -> std::pin::Pin<
1244        Box<dyn core::future::Future<Output = Result<ListTypeDefId, DaggerError>> + Send>,
1245    > {
1246        Box::pin(async move { self.id().await })
1247    }
1248}
1249impl IntoID<ListTypeDefId> for ListTypeDefId {
1250    fn into_id(
1251        self,
1252    ) -> std::pin::Pin<
1253        Box<dyn core::future::Future<Output = Result<ListTypeDefId, DaggerError>> + Send>,
1254    > {
1255        Box::pin(async move { Ok::<ListTypeDefId, DaggerError>(self) })
1256    }
1257}
1258impl ListTypeDefId {
1259    fn quote(&self) -> String {
1260        format!("\"{}\"", self.0.clone())
1261    }
1262}
1263#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1264pub struct ModuleConfigClientId(pub String);
1265impl From<&str> for ModuleConfigClientId {
1266    fn from(value: &str) -> Self {
1267        Self(value.to_string())
1268    }
1269}
1270impl From<String> for ModuleConfigClientId {
1271    fn from(value: String) -> Self {
1272        Self(value)
1273    }
1274}
1275impl IntoID<ModuleConfigClientId> for ModuleConfigClient {
1276    fn into_id(
1277        self,
1278    ) -> std::pin::Pin<
1279        Box<dyn core::future::Future<Output = Result<ModuleConfigClientId, DaggerError>> + Send>,
1280    > {
1281        Box::pin(async move { self.id().await })
1282    }
1283}
1284impl IntoID<ModuleConfigClientId> for ModuleConfigClientId {
1285    fn into_id(
1286        self,
1287    ) -> std::pin::Pin<
1288        Box<dyn core::future::Future<Output = Result<ModuleConfigClientId, DaggerError>> + Send>,
1289    > {
1290        Box::pin(async move { Ok::<ModuleConfigClientId, DaggerError>(self) })
1291    }
1292}
1293impl ModuleConfigClientId {
1294    fn quote(&self) -> String {
1295        format!("\"{}\"", self.0.clone())
1296    }
1297}
1298#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1299pub struct ModuleId(pub String);
1300impl From<&str> for ModuleId {
1301    fn from(value: &str) -> Self {
1302        Self(value.to_string())
1303    }
1304}
1305impl From<String> for ModuleId {
1306    fn from(value: String) -> Self {
1307        Self(value)
1308    }
1309}
1310impl IntoID<ModuleId> for Module {
1311    fn into_id(
1312        self,
1313    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ModuleId, DaggerError>> + Send>>
1314    {
1315        Box::pin(async move { self.id().await })
1316    }
1317}
1318impl IntoID<ModuleId> for ModuleId {
1319    fn into_id(
1320        self,
1321    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ModuleId, DaggerError>> + Send>>
1322    {
1323        Box::pin(async move { Ok::<ModuleId, DaggerError>(self) })
1324    }
1325}
1326impl ModuleId {
1327    fn quote(&self) -> String {
1328        format!("\"{}\"", self.0.clone())
1329    }
1330}
1331#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1332pub struct ModuleSourceId(pub String);
1333impl From<&str> for ModuleSourceId {
1334    fn from(value: &str) -> Self {
1335        Self(value.to_string())
1336    }
1337}
1338impl From<String> for ModuleSourceId {
1339    fn from(value: String) -> Self {
1340        Self(value)
1341    }
1342}
1343impl IntoID<ModuleSourceId> for ModuleSource {
1344    fn into_id(
1345        self,
1346    ) -> std::pin::Pin<
1347        Box<dyn core::future::Future<Output = Result<ModuleSourceId, DaggerError>> + Send>,
1348    > {
1349        Box::pin(async move { self.id().await })
1350    }
1351}
1352impl IntoID<ModuleSourceId> for ModuleSourceId {
1353    fn into_id(
1354        self,
1355    ) -> std::pin::Pin<
1356        Box<dyn core::future::Future<Output = Result<ModuleSourceId, DaggerError>> + Send>,
1357    > {
1358        Box::pin(async move { Ok::<ModuleSourceId, DaggerError>(self) })
1359    }
1360}
1361impl ModuleSourceId {
1362    fn quote(&self) -> String {
1363        format!("\"{}\"", self.0.clone())
1364    }
1365}
1366#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1367pub struct ObjectTypeDefId(pub String);
1368impl From<&str> for ObjectTypeDefId {
1369    fn from(value: &str) -> Self {
1370        Self(value.to_string())
1371    }
1372}
1373impl From<String> for ObjectTypeDefId {
1374    fn from(value: String) -> Self {
1375        Self(value)
1376    }
1377}
1378impl IntoID<ObjectTypeDefId> for ObjectTypeDef {
1379    fn into_id(
1380        self,
1381    ) -> std::pin::Pin<
1382        Box<dyn core::future::Future<Output = Result<ObjectTypeDefId, DaggerError>> + Send>,
1383    > {
1384        Box::pin(async move { self.id().await })
1385    }
1386}
1387impl IntoID<ObjectTypeDefId> for ObjectTypeDefId {
1388    fn into_id(
1389        self,
1390    ) -> std::pin::Pin<
1391        Box<dyn core::future::Future<Output = Result<ObjectTypeDefId, DaggerError>> + Send>,
1392    > {
1393        Box::pin(async move { Ok::<ObjectTypeDefId, DaggerError>(self) })
1394    }
1395}
1396impl ObjectTypeDefId {
1397    fn quote(&self) -> String {
1398        format!("\"{}\"", self.0.clone())
1399    }
1400}
1401#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1402pub struct Platform(pub String);
1403impl From<&str> for Platform {
1404    fn from(value: &str) -> Self {
1405        Self(value.to_string())
1406    }
1407}
1408impl From<String> for Platform {
1409    fn from(value: String) -> Self {
1410        Self(value)
1411    }
1412}
1413impl Platform {
1414    fn quote(&self) -> String {
1415        format!("\"{}\"", self.0.clone())
1416    }
1417}
1418#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1419pub struct PortId(pub String);
1420impl From<&str> for PortId {
1421    fn from(value: &str) -> Self {
1422        Self(value.to_string())
1423    }
1424}
1425impl From<String> for PortId {
1426    fn from(value: String) -> Self {
1427        Self(value)
1428    }
1429}
1430impl IntoID<PortId> for Port {
1431    fn into_id(
1432        self,
1433    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<PortId, DaggerError>> + Send>>
1434    {
1435        Box::pin(async move { self.id().await })
1436    }
1437}
1438impl IntoID<PortId> for PortId {
1439    fn into_id(
1440        self,
1441    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<PortId, DaggerError>> + Send>>
1442    {
1443        Box::pin(async move { Ok::<PortId, DaggerError>(self) })
1444    }
1445}
1446impl PortId {
1447    fn quote(&self) -> String {
1448        format!("\"{}\"", self.0.clone())
1449    }
1450}
1451#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1452pub struct SdkConfigId(pub String);
1453impl From<&str> for SdkConfigId {
1454    fn from(value: &str) -> Self {
1455        Self(value.to_string())
1456    }
1457}
1458impl From<String> for SdkConfigId {
1459    fn from(value: String) -> Self {
1460        Self(value)
1461    }
1462}
1463impl IntoID<SdkConfigId> for SdkConfig {
1464    fn into_id(
1465        self,
1466    ) -> std::pin::Pin<
1467        Box<dyn core::future::Future<Output = Result<SdkConfigId, DaggerError>> + Send>,
1468    > {
1469        Box::pin(async move { self.id().await })
1470    }
1471}
1472impl IntoID<SdkConfigId> for SdkConfigId {
1473    fn into_id(
1474        self,
1475    ) -> std::pin::Pin<
1476        Box<dyn core::future::Future<Output = Result<SdkConfigId, DaggerError>> + Send>,
1477    > {
1478        Box::pin(async move { Ok::<SdkConfigId, DaggerError>(self) })
1479    }
1480}
1481impl SdkConfigId {
1482    fn quote(&self) -> String {
1483        format!("\"{}\"", self.0.clone())
1484    }
1485}
1486#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1487pub struct ScalarTypeDefId(pub String);
1488impl From<&str> for ScalarTypeDefId {
1489    fn from(value: &str) -> Self {
1490        Self(value.to_string())
1491    }
1492}
1493impl From<String> for ScalarTypeDefId {
1494    fn from(value: String) -> Self {
1495        Self(value)
1496    }
1497}
1498impl IntoID<ScalarTypeDefId> for ScalarTypeDef {
1499    fn into_id(
1500        self,
1501    ) -> std::pin::Pin<
1502        Box<dyn core::future::Future<Output = Result<ScalarTypeDefId, DaggerError>> + Send>,
1503    > {
1504        Box::pin(async move { self.id().await })
1505    }
1506}
1507impl IntoID<ScalarTypeDefId> for ScalarTypeDefId {
1508    fn into_id(
1509        self,
1510    ) -> std::pin::Pin<
1511        Box<dyn core::future::Future<Output = Result<ScalarTypeDefId, DaggerError>> + Send>,
1512    > {
1513        Box::pin(async move { Ok::<ScalarTypeDefId, DaggerError>(self) })
1514    }
1515}
1516impl ScalarTypeDefId {
1517    fn quote(&self) -> String {
1518        format!("\"{}\"", self.0.clone())
1519    }
1520}
1521#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1522pub struct SearchResultId(pub String);
1523impl From<&str> for SearchResultId {
1524    fn from(value: &str) -> Self {
1525        Self(value.to_string())
1526    }
1527}
1528impl From<String> for SearchResultId {
1529    fn from(value: String) -> Self {
1530        Self(value)
1531    }
1532}
1533impl IntoID<SearchResultId> for SearchResult {
1534    fn into_id(
1535        self,
1536    ) -> std::pin::Pin<
1537        Box<dyn core::future::Future<Output = Result<SearchResultId, DaggerError>> + Send>,
1538    > {
1539        Box::pin(async move { self.id().await })
1540    }
1541}
1542impl IntoID<SearchResultId> for SearchResultId {
1543    fn into_id(
1544        self,
1545    ) -> std::pin::Pin<
1546        Box<dyn core::future::Future<Output = Result<SearchResultId, DaggerError>> + Send>,
1547    > {
1548        Box::pin(async move { Ok::<SearchResultId, DaggerError>(self) })
1549    }
1550}
1551impl SearchResultId {
1552    fn quote(&self) -> String {
1553        format!("\"{}\"", self.0.clone())
1554    }
1555}
1556#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1557pub struct SearchSubmatchId(pub String);
1558impl From<&str> for SearchSubmatchId {
1559    fn from(value: &str) -> Self {
1560        Self(value.to_string())
1561    }
1562}
1563impl From<String> for SearchSubmatchId {
1564    fn from(value: String) -> Self {
1565        Self(value)
1566    }
1567}
1568impl IntoID<SearchSubmatchId> for SearchSubmatch {
1569    fn into_id(
1570        self,
1571    ) -> std::pin::Pin<
1572        Box<dyn core::future::Future<Output = Result<SearchSubmatchId, DaggerError>> + Send>,
1573    > {
1574        Box::pin(async move { self.id().await })
1575    }
1576}
1577impl IntoID<SearchSubmatchId> for SearchSubmatchId {
1578    fn into_id(
1579        self,
1580    ) -> std::pin::Pin<
1581        Box<dyn core::future::Future<Output = Result<SearchSubmatchId, DaggerError>> + Send>,
1582    > {
1583        Box::pin(async move { Ok::<SearchSubmatchId, DaggerError>(self) })
1584    }
1585}
1586impl SearchSubmatchId {
1587    fn quote(&self) -> String {
1588        format!("\"{}\"", self.0.clone())
1589    }
1590}
1591#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1592pub struct SecretId(pub String);
1593impl From<&str> for SecretId {
1594    fn from(value: &str) -> Self {
1595        Self(value.to_string())
1596    }
1597}
1598impl From<String> for SecretId {
1599    fn from(value: String) -> Self {
1600        Self(value)
1601    }
1602}
1603impl IntoID<SecretId> for Secret {
1604    fn into_id(
1605        self,
1606    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SecretId, DaggerError>> + Send>>
1607    {
1608        Box::pin(async move { self.id().await })
1609    }
1610}
1611impl IntoID<SecretId> for SecretId {
1612    fn into_id(
1613        self,
1614    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SecretId, DaggerError>> + Send>>
1615    {
1616        Box::pin(async move { Ok::<SecretId, DaggerError>(self) })
1617    }
1618}
1619impl SecretId {
1620    fn quote(&self) -> String {
1621        format!("\"{}\"", self.0.clone())
1622    }
1623}
1624#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1625pub struct ServiceId(pub String);
1626impl From<&str> for ServiceId {
1627    fn from(value: &str) -> Self {
1628        Self(value.to_string())
1629    }
1630}
1631impl From<String> for ServiceId {
1632    fn from(value: String) -> Self {
1633        Self(value)
1634    }
1635}
1636impl IntoID<ServiceId> for Service {
1637    fn into_id(
1638        self,
1639    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ServiceId, DaggerError>> + Send>>
1640    {
1641        Box::pin(async move { self.id().await })
1642    }
1643}
1644impl IntoID<ServiceId> for ServiceId {
1645    fn into_id(
1646        self,
1647    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ServiceId, DaggerError>> + Send>>
1648    {
1649        Box::pin(async move { Ok::<ServiceId, DaggerError>(self) })
1650    }
1651}
1652impl ServiceId {
1653    fn quote(&self) -> String {
1654        format!("\"{}\"", self.0.clone())
1655    }
1656}
1657#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1658pub struct SocketId(pub String);
1659impl From<&str> for SocketId {
1660    fn from(value: &str) -> Self {
1661        Self(value.to_string())
1662    }
1663}
1664impl From<String> for SocketId {
1665    fn from(value: String) -> Self {
1666        Self(value)
1667    }
1668}
1669impl IntoID<SocketId> for Socket {
1670    fn into_id(
1671        self,
1672    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SocketId, DaggerError>> + Send>>
1673    {
1674        Box::pin(async move { self.id().await })
1675    }
1676}
1677impl IntoID<SocketId> for SocketId {
1678    fn into_id(
1679        self,
1680    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SocketId, DaggerError>> + Send>>
1681    {
1682        Box::pin(async move { Ok::<SocketId, DaggerError>(self) })
1683    }
1684}
1685impl SocketId {
1686    fn quote(&self) -> String {
1687        format!("\"{}\"", self.0.clone())
1688    }
1689}
1690#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1691pub struct SourceMapId(pub String);
1692impl From<&str> for SourceMapId {
1693    fn from(value: &str) -> Self {
1694        Self(value.to_string())
1695    }
1696}
1697impl From<String> for SourceMapId {
1698    fn from(value: String) -> Self {
1699        Self(value)
1700    }
1701}
1702impl IntoID<SourceMapId> for SourceMap {
1703    fn into_id(
1704        self,
1705    ) -> std::pin::Pin<
1706        Box<dyn core::future::Future<Output = Result<SourceMapId, DaggerError>> + Send>,
1707    > {
1708        Box::pin(async move { self.id().await })
1709    }
1710}
1711impl IntoID<SourceMapId> for SourceMapId {
1712    fn into_id(
1713        self,
1714    ) -> std::pin::Pin<
1715        Box<dyn core::future::Future<Output = Result<SourceMapId, DaggerError>> + Send>,
1716    > {
1717        Box::pin(async move { Ok::<SourceMapId, DaggerError>(self) })
1718    }
1719}
1720impl SourceMapId {
1721    fn quote(&self) -> String {
1722        format!("\"{}\"", self.0.clone())
1723    }
1724}
1725#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1726pub struct TerminalId(pub String);
1727impl From<&str> for TerminalId {
1728    fn from(value: &str) -> Self {
1729        Self(value.to_string())
1730    }
1731}
1732impl From<String> for TerminalId {
1733    fn from(value: String) -> Self {
1734        Self(value)
1735    }
1736}
1737impl IntoID<TerminalId> for Terminal {
1738    fn into_id(
1739        self,
1740    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TerminalId, DaggerError>> + Send>>
1741    {
1742        Box::pin(async move { self.id().await })
1743    }
1744}
1745impl IntoID<TerminalId> for TerminalId {
1746    fn into_id(
1747        self,
1748    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TerminalId, DaggerError>> + Send>>
1749    {
1750        Box::pin(async move { Ok::<TerminalId, DaggerError>(self) })
1751    }
1752}
1753impl TerminalId {
1754    fn quote(&self) -> String {
1755        format!("\"{}\"", self.0.clone())
1756    }
1757}
1758#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1759pub struct TypeDefId(pub String);
1760impl From<&str> for TypeDefId {
1761    fn from(value: &str) -> Self {
1762        Self(value.to_string())
1763    }
1764}
1765impl From<String> for TypeDefId {
1766    fn from(value: String) -> Self {
1767        Self(value)
1768    }
1769}
1770impl IntoID<TypeDefId> for TypeDef {
1771    fn into_id(
1772        self,
1773    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TypeDefId, DaggerError>> + Send>>
1774    {
1775        Box::pin(async move { self.id().await })
1776    }
1777}
1778impl IntoID<TypeDefId> for TypeDefId {
1779    fn into_id(
1780        self,
1781    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TypeDefId, DaggerError>> + Send>>
1782    {
1783        Box::pin(async move { Ok::<TypeDefId, DaggerError>(self) })
1784    }
1785}
1786impl TypeDefId {
1787    fn quote(&self) -> String {
1788        format!("\"{}\"", self.0.clone())
1789    }
1790}
1791#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1792pub struct Void(pub String);
1793impl From<&str> for Void {
1794    fn from(value: &str) -> Self {
1795        Self(value.to_string())
1796    }
1797}
1798impl From<String> for Void {
1799    fn from(value: String) -> Self {
1800        Self(value)
1801    }
1802}
1803impl Void {
1804    fn quote(&self) -> String {
1805        format!("\"{}\"", self.0.clone())
1806    }
1807}
1808#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
1809pub struct BuildArg {
1810    pub name: String,
1811    pub value: String,
1812}
1813#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
1814pub struct PipelineLabel {
1815    pub name: String,
1816    pub value: String,
1817}
1818#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
1819pub struct PortForward {
1820    pub backend: isize,
1821    pub frontend: isize,
1822    pub protocol: NetworkProtocol,
1823}
1824#[derive(Clone)]
1825pub struct Address {
1826    pub proc: Option<Arc<DaggerSessionProc>>,
1827    pub selection: Selection,
1828    pub graphql_client: DynGraphQLClient,
1829}
1830#[derive(Builder, Debug, PartialEq)]
1831pub struct AddressDirectoryOpts<'a> {
1832    #[builder(setter(into, strip_option), default)]
1833    pub exclude: Option<Vec<&'a str>>,
1834    #[builder(setter(into, strip_option), default)]
1835    pub include: Option<Vec<&'a str>>,
1836    #[builder(setter(into, strip_option), default)]
1837    pub no_cache: Option<bool>,
1838}
1839#[derive(Builder, Debug, PartialEq)]
1840pub struct AddressFileOpts<'a> {
1841    #[builder(setter(into, strip_option), default)]
1842    pub exclude: Option<Vec<&'a str>>,
1843    #[builder(setter(into, strip_option), default)]
1844    pub include: Option<Vec<&'a str>>,
1845    #[builder(setter(into, strip_option), default)]
1846    pub no_cache: Option<bool>,
1847}
1848impl Address {
1849    /// Load a container from the address.
1850    pub fn container(&self) -> Container {
1851        let query = self.selection.select("container");
1852        Container {
1853            proc: self.proc.clone(),
1854            selection: query,
1855            graphql_client: self.graphql_client.clone(),
1856        }
1857    }
1858    /// Load a directory from the address.
1859    ///
1860    /// # Arguments
1861    ///
1862    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
1863    pub fn directory(&self) -> Directory {
1864        let query = self.selection.select("directory");
1865        Directory {
1866            proc: self.proc.clone(),
1867            selection: query,
1868            graphql_client: self.graphql_client.clone(),
1869        }
1870    }
1871    /// Load a directory from the address.
1872    ///
1873    /// # Arguments
1874    ///
1875    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
1876    pub fn directory_opts<'a>(&self, opts: AddressDirectoryOpts<'a>) -> Directory {
1877        let mut query = self.selection.select("directory");
1878        if let Some(exclude) = opts.exclude {
1879            query = query.arg("exclude", exclude);
1880        }
1881        if let Some(include) = opts.include {
1882            query = query.arg("include", include);
1883        }
1884        if let Some(no_cache) = opts.no_cache {
1885            query = query.arg("noCache", no_cache);
1886        }
1887        Directory {
1888            proc: self.proc.clone(),
1889            selection: query,
1890            graphql_client: self.graphql_client.clone(),
1891        }
1892    }
1893    /// Load a file from the address.
1894    ///
1895    /// # Arguments
1896    ///
1897    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
1898    pub fn file(&self) -> File {
1899        let query = self.selection.select("file");
1900        File {
1901            proc: self.proc.clone(),
1902            selection: query,
1903            graphql_client: self.graphql_client.clone(),
1904        }
1905    }
1906    /// Load a file from the address.
1907    ///
1908    /// # Arguments
1909    ///
1910    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
1911    pub fn file_opts<'a>(&self, opts: AddressFileOpts<'a>) -> File {
1912        let mut query = self.selection.select("file");
1913        if let Some(exclude) = opts.exclude {
1914            query = query.arg("exclude", exclude);
1915        }
1916        if let Some(include) = opts.include {
1917            query = query.arg("include", include);
1918        }
1919        if let Some(no_cache) = opts.no_cache {
1920            query = query.arg("noCache", no_cache);
1921        }
1922        File {
1923            proc: self.proc.clone(),
1924            selection: query,
1925            graphql_client: self.graphql_client.clone(),
1926        }
1927    }
1928    /// Load a git ref (branch, tag or commit) from the address.
1929    pub fn git_ref(&self) -> GitRef {
1930        let query = self.selection.select("gitRef");
1931        GitRef {
1932            proc: self.proc.clone(),
1933            selection: query,
1934            graphql_client: self.graphql_client.clone(),
1935        }
1936    }
1937    /// Load a git repository from the address.
1938    pub fn git_repository(&self) -> GitRepository {
1939        let query = self.selection.select("gitRepository");
1940        GitRepository {
1941            proc: self.proc.clone(),
1942            selection: query,
1943            graphql_client: self.graphql_client.clone(),
1944        }
1945    }
1946    /// A unique identifier for this Address.
1947    pub async fn id(&self) -> Result<AddressId, DaggerError> {
1948        let query = self.selection.select("id");
1949        query.execute(self.graphql_client.clone()).await
1950    }
1951    /// Load a secret from the address.
1952    pub fn secret(&self) -> Secret {
1953        let query = self.selection.select("secret");
1954        Secret {
1955            proc: self.proc.clone(),
1956            selection: query,
1957            graphql_client: self.graphql_client.clone(),
1958        }
1959    }
1960    /// Load a service from the address.
1961    pub fn service(&self) -> Service {
1962        let query = self.selection.select("service");
1963        Service {
1964            proc: self.proc.clone(),
1965            selection: query,
1966            graphql_client: self.graphql_client.clone(),
1967        }
1968    }
1969    /// Load a local socket from the address.
1970    pub fn socket(&self) -> Socket {
1971        let query = self.selection.select("socket");
1972        Socket {
1973            proc: self.proc.clone(),
1974            selection: query,
1975            graphql_client: self.graphql_client.clone(),
1976        }
1977    }
1978    /// The address value
1979    pub async fn value(&self) -> Result<String, DaggerError> {
1980        let query = self.selection.select("value");
1981        query.execute(self.graphql_client.clone()).await
1982    }
1983}
1984#[derive(Clone)]
1985pub struct Binding {
1986    pub proc: Option<Arc<DaggerSessionProc>>,
1987    pub selection: Selection,
1988    pub graphql_client: DynGraphQLClient,
1989}
1990impl Binding {
1991    /// Retrieve the binding value, as type Address
1992    pub fn as_address(&self) -> Address {
1993        let query = self.selection.select("asAddress");
1994        Address {
1995            proc: self.proc.clone(),
1996            selection: query,
1997            graphql_client: self.graphql_client.clone(),
1998        }
1999    }
2000    /// Retrieve the binding value, as type CacheVolume
2001    pub fn as_cache_volume(&self) -> CacheVolume {
2002        let query = self.selection.select("asCacheVolume");
2003        CacheVolume {
2004            proc: self.proc.clone(),
2005            selection: query,
2006            graphql_client: self.graphql_client.clone(),
2007        }
2008    }
2009    /// Retrieve the binding value, as type Changeset
2010    pub fn as_changeset(&self) -> Changeset {
2011        let query = self.selection.select("asChangeset");
2012        Changeset {
2013            proc: self.proc.clone(),
2014            selection: query,
2015            graphql_client: self.graphql_client.clone(),
2016        }
2017    }
2018    /// Retrieve the binding value, as type Cloud
2019    pub fn as_cloud(&self) -> Cloud {
2020        let query = self.selection.select("asCloud");
2021        Cloud {
2022            proc: self.proc.clone(),
2023            selection: query,
2024            graphql_client: self.graphql_client.clone(),
2025        }
2026    }
2027    /// Retrieve the binding value, as type Container
2028    pub fn as_container(&self) -> Container {
2029        let query = self.selection.select("asContainer");
2030        Container {
2031            proc: self.proc.clone(),
2032            selection: query,
2033            graphql_client: self.graphql_client.clone(),
2034        }
2035    }
2036    /// Retrieve the binding value, as type Directory
2037    pub fn as_directory(&self) -> Directory {
2038        let query = self.selection.select("asDirectory");
2039        Directory {
2040            proc: self.proc.clone(),
2041            selection: query,
2042            graphql_client: self.graphql_client.clone(),
2043        }
2044    }
2045    /// Retrieve the binding value, as type Env
2046    pub fn as_env(&self) -> Env {
2047        let query = self.selection.select("asEnv");
2048        Env {
2049            proc: self.proc.clone(),
2050            selection: query,
2051            graphql_client: self.graphql_client.clone(),
2052        }
2053    }
2054    /// Retrieve the binding value, as type EnvFile
2055    pub fn as_env_file(&self) -> EnvFile {
2056        let query = self.selection.select("asEnvFile");
2057        EnvFile {
2058            proc: self.proc.clone(),
2059            selection: query,
2060            graphql_client: self.graphql_client.clone(),
2061        }
2062    }
2063    /// Retrieve the binding value, as type File
2064    pub fn as_file(&self) -> File {
2065        let query = self.selection.select("asFile");
2066        File {
2067            proc: self.proc.clone(),
2068            selection: query,
2069            graphql_client: self.graphql_client.clone(),
2070        }
2071    }
2072    /// Retrieve the binding value, as type GitRef
2073    pub fn as_git_ref(&self) -> GitRef {
2074        let query = self.selection.select("asGitRef");
2075        GitRef {
2076            proc: self.proc.clone(),
2077            selection: query,
2078            graphql_client: self.graphql_client.clone(),
2079        }
2080    }
2081    /// Retrieve the binding value, as type GitRepository
2082    pub fn as_git_repository(&self) -> GitRepository {
2083        let query = self.selection.select("asGitRepository");
2084        GitRepository {
2085            proc: self.proc.clone(),
2086            selection: query,
2087            graphql_client: self.graphql_client.clone(),
2088        }
2089    }
2090    /// Retrieve the binding value, as type JSONValue
2091    pub fn as_json_value(&self) -> JsonValue {
2092        let query = self.selection.select("asJSONValue");
2093        JsonValue {
2094            proc: self.proc.clone(),
2095            selection: query,
2096            graphql_client: self.graphql_client.clone(),
2097        }
2098    }
2099    /// Retrieve the binding value, as type LLM
2100    pub fn as_llm(&self) -> Llm {
2101        let query = self.selection.select("asLLM");
2102        Llm {
2103            proc: self.proc.clone(),
2104            selection: query,
2105            graphql_client: self.graphql_client.clone(),
2106        }
2107    }
2108    /// Retrieve the binding value, as type Module
2109    pub fn as_module(&self) -> Module {
2110        let query = self.selection.select("asModule");
2111        Module {
2112            proc: self.proc.clone(),
2113            selection: query,
2114            graphql_client: self.graphql_client.clone(),
2115        }
2116    }
2117    /// Retrieve the binding value, as type ModuleConfigClient
2118    pub fn as_module_config_client(&self) -> ModuleConfigClient {
2119        let query = self.selection.select("asModuleConfigClient");
2120        ModuleConfigClient {
2121            proc: self.proc.clone(),
2122            selection: query,
2123            graphql_client: self.graphql_client.clone(),
2124        }
2125    }
2126    /// Retrieve the binding value, as type ModuleSource
2127    pub fn as_module_source(&self) -> ModuleSource {
2128        let query = self.selection.select("asModuleSource");
2129        ModuleSource {
2130            proc: self.proc.clone(),
2131            selection: query,
2132            graphql_client: self.graphql_client.clone(),
2133        }
2134    }
2135    /// Retrieve the binding value, as type SearchResult
2136    pub fn as_search_result(&self) -> SearchResult {
2137        let query = self.selection.select("asSearchResult");
2138        SearchResult {
2139            proc: self.proc.clone(),
2140            selection: query,
2141            graphql_client: self.graphql_client.clone(),
2142        }
2143    }
2144    /// Retrieve the binding value, as type SearchSubmatch
2145    pub fn as_search_submatch(&self) -> SearchSubmatch {
2146        let query = self.selection.select("asSearchSubmatch");
2147        SearchSubmatch {
2148            proc: self.proc.clone(),
2149            selection: query,
2150            graphql_client: self.graphql_client.clone(),
2151        }
2152    }
2153    /// Retrieve the binding value, as type Secret
2154    pub fn as_secret(&self) -> Secret {
2155        let query = self.selection.select("asSecret");
2156        Secret {
2157            proc: self.proc.clone(),
2158            selection: query,
2159            graphql_client: self.graphql_client.clone(),
2160        }
2161    }
2162    /// Retrieve the binding value, as type Service
2163    pub fn as_service(&self) -> Service {
2164        let query = self.selection.select("asService");
2165        Service {
2166            proc: self.proc.clone(),
2167            selection: query,
2168            graphql_client: self.graphql_client.clone(),
2169        }
2170    }
2171    /// Retrieve the binding value, as type Socket
2172    pub fn as_socket(&self) -> Socket {
2173        let query = self.selection.select("asSocket");
2174        Socket {
2175            proc: self.proc.clone(),
2176            selection: query,
2177            graphql_client: self.graphql_client.clone(),
2178        }
2179    }
2180    /// The binding's string value
2181    pub async fn as_string(&self) -> Result<String, DaggerError> {
2182        let query = self.selection.select("asString");
2183        query.execute(self.graphql_client.clone()).await
2184    }
2185    /// The digest of the binding value
2186    pub async fn digest(&self) -> Result<String, DaggerError> {
2187        let query = self.selection.select("digest");
2188        query.execute(self.graphql_client.clone()).await
2189    }
2190    /// A unique identifier for this Binding.
2191    pub async fn id(&self) -> Result<BindingId, DaggerError> {
2192        let query = self.selection.select("id");
2193        query.execute(self.graphql_client.clone()).await
2194    }
2195    /// Returns true if the binding is null
2196    pub async fn is_null(&self) -> Result<bool, DaggerError> {
2197        let query = self.selection.select("isNull");
2198        query.execute(self.graphql_client.clone()).await
2199    }
2200    /// The binding name
2201    pub async fn name(&self) -> Result<String, DaggerError> {
2202        let query = self.selection.select("name");
2203        query.execute(self.graphql_client.clone()).await
2204    }
2205    /// The binding type
2206    pub async fn type_name(&self) -> Result<String, DaggerError> {
2207        let query = self.selection.select("typeName");
2208        query.execute(self.graphql_client.clone()).await
2209    }
2210}
2211#[derive(Clone)]
2212pub struct CacheVolume {
2213    pub proc: Option<Arc<DaggerSessionProc>>,
2214    pub selection: Selection,
2215    pub graphql_client: DynGraphQLClient,
2216}
2217impl CacheVolume {
2218    /// A unique identifier for this CacheVolume.
2219    pub async fn id(&self) -> Result<CacheVolumeId, DaggerError> {
2220        let query = self.selection.select("id");
2221        query.execute(self.graphql_client.clone()).await
2222    }
2223}
2224#[derive(Clone)]
2225pub struct Changeset {
2226    pub proc: Option<Arc<DaggerSessionProc>>,
2227    pub selection: Selection,
2228    pub graphql_client: DynGraphQLClient,
2229}
2230impl Changeset {
2231    /// Files and directories that were added in the newer directory.
2232    pub async fn added_paths(&self) -> Result<Vec<String>, DaggerError> {
2233        let query = self.selection.select("addedPaths");
2234        query.execute(self.graphql_client.clone()).await
2235    }
2236    /// The newer/upper snapshot.
2237    pub fn after(&self) -> Directory {
2238        let query = self.selection.select("after");
2239        Directory {
2240            proc: self.proc.clone(),
2241            selection: query,
2242            graphql_client: self.graphql_client.clone(),
2243        }
2244    }
2245    /// Return a Git-compatible patch of the changes
2246    pub fn as_patch(&self) -> File {
2247        let query = self.selection.select("asPatch");
2248        File {
2249            proc: self.proc.clone(),
2250            selection: query,
2251            graphql_client: self.graphql_client.clone(),
2252        }
2253    }
2254    /// The older/lower snapshot to compare against.
2255    pub fn before(&self) -> Directory {
2256        let query = self.selection.select("before");
2257        Directory {
2258            proc: self.proc.clone(),
2259            selection: query,
2260            graphql_client: self.graphql_client.clone(),
2261        }
2262    }
2263    /// Applies the diff represented by this changeset to a path on the host.
2264    ///
2265    /// # Arguments
2266    ///
2267    /// * `path` - Location of the copied directory (e.g., "logs/").
2268    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
2269        let mut query = self.selection.select("export");
2270        query = query.arg("path", path.into());
2271        query.execute(self.graphql_client.clone()).await
2272    }
2273    /// A unique identifier for this Changeset.
2274    pub async fn id(&self) -> Result<ChangesetId, DaggerError> {
2275        let query = self.selection.select("id");
2276        query.execute(self.graphql_client.clone()).await
2277    }
2278    /// Return a snapshot containing only the created and modified files
2279    pub fn layer(&self) -> Directory {
2280        let query = self.selection.select("layer");
2281        Directory {
2282            proc: self.proc.clone(),
2283            selection: query,
2284            graphql_client: self.graphql_client.clone(),
2285        }
2286    }
2287    /// Files and directories that existed before and were updated in the newer directory.
2288    pub async fn modified_paths(&self) -> Result<Vec<String>, DaggerError> {
2289        let query = self.selection.select("modifiedPaths");
2290        query.execute(self.graphql_client.clone()).await
2291    }
2292    /// Files and directories that were removed. Directories are indicated by a trailing slash, and their child paths are not included.
2293    pub async fn removed_paths(&self) -> Result<Vec<String>, DaggerError> {
2294        let query = self.selection.select("removedPaths");
2295        query.execute(self.graphql_client.clone()).await
2296    }
2297    /// Force evaluation in the engine.
2298    pub async fn sync(&self) -> Result<ChangesetId, DaggerError> {
2299        let query = self.selection.select("sync");
2300        query.execute(self.graphql_client.clone()).await
2301    }
2302}
2303#[derive(Clone)]
2304pub struct Cloud {
2305    pub proc: Option<Arc<DaggerSessionProc>>,
2306    pub selection: Selection,
2307    pub graphql_client: DynGraphQLClient,
2308}
2309impl Cloud {
2310    /// A unique identifier for this Cloud.
2311    pub async fn id(&self) -> Result<CloudId, DaggerError> {
2312        let query = self.selection.select("id");
2313        query.execute(self.graphql_client.clone()).await
2314    }
2315    /// The trace URL for the current session
2316    pub async fn trace_url(&self) -> Result<String, DaggerError> {
2317        let query = self.selection.select("traceURL");
2318        query.execute(self.graphql_client.clone()).await
2319    }
2320}
2321#[derive(Clone)]
2322pub struct Container {
2323    pub proc: Option<Arc<DaggerSessionProc>>,
2324    pub selection: Selection,
2325    pub graphql_client: DynGraphQLClient,
2326}
2327#[derive(Builder, Debug, PartialEq)]
2328pub struct ContainerAsServiceOpts<'a> {
2329    /// Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).
2330    /// If empty, the container's default command is used.
2331    #[builder(setter(into, strip_option), default)]
2332    pub args: Option<Vec<&'a str>>,
2333    /// Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2334    #[builder(setter(into, strip_option), default)]
2335    pub expand: Option<bool>,
2336    /// Provides Dagger access to the executed command.
2337    #[builder(setter(into, strip_option), default)]
2338    pub experimental_privileged_nesting: Option<bool>,
2339    /// 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.
2340    #[builder(setter(into, strip_option), default)]
2341    pub insecure_root_capabilities: Option<bool>,
2342    /// If set, skip the automatic init process injected into containers by default.
2343    /// 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.
2344    #[builder(setter(into, strip_option), default)]
2345    pub no_init: Option<bool>,
2346    /// If the container has an entrypoint, prepend it to the args.
2347    #[builder(setter(into, strip_option), default)]
2348    pub use_entrypoint: Option<bool>,
2349}
2350#[derive(Builder, Debug, PartialEq)]
2351pub struct ContainerAsTarballOpts {
2352    /// Force each layer of the image to use the specified compression algorithm.
2353    /// 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.
2354    #[builder(setter(into, strip_option), default)]
2355    pub forced_compression: Option<ImageLayerCompression>,
2356    /// Use the specified media types for the image's layers.
2357    /// Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
2358    #[builder(setter(into, strip_option), default)]
2359    pub media_types: Option<ImageMediaTypes>,
2360    /// Identifiers for other platform specific containers.
2361    /// Used for multi-platform images.
2362    #[builder(setter(into, strip_option), default)]
2363    pub platform_variants: Option<Vec<ContainerId>>,
2364}
2365#[derive(Builder, Debug, PartialEq)]
2366pub struct ContainerBuildOpts<'a> {
2367    /// Additional build arguments.
2368    #[builder(setter(into, strip_option), default)]
2369    pub build_args: Option<Vec<BuildArg>>,
2370    /// Path to the Dockerfile to use.
2371    #[builder(setter(into, strip_option), default)]
2372    pub dockerfile: Option<&'a str>,
2373    /// If set, skip the automatic init process injected into containers created by RUN statements.
2374    /// 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.
2375    #[builder(setter(into, strip_option), default)]
2376    pub no_init: Option<bool>,
2377    /// Secrets to pass to the build.
2378    /// They will be mounted at /run/secrets/[secret-name] in the build container
2379    /// They can be accessed in the Dockerfile using the "secret" mount type and mount path /run/secrets/[secret-name], e.g. RUN --mount=type=secret,id=my-secret curl [http://example.com?token=$(cat /run/secrets/my-secret)](http://example.com?token=$(cat /run/secrets/my-secret))
2380    #[builder(setter(into, strip_option), default)]
2381    pub secrets: Option<Vec<SecretId>>,
2382    /// Target build stage to build.
2383    #[builder(setter(into, strip_option), default)]
2384    pub target: Option<&'a str>,
2385}
2386#[derive(Builder, Debug, PartialEq)]
2387pub struct ContainerDirectoryOpts {
2388    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2389    #[builder(setter(into, strip_option), default)]
2390    pub expand: Option<bool>,
2391}
2392#[derive(Builder, Debug, PartialEq)]
2393pub struct ContainerExistsOpts {
2394    /// If specified, do not follow symlinks.
2395    #[builder(setter(into, strip_option), default)]
2396    pub do_not_follow_symlinks: Option<bool>,
2397    /// If specified, also validate the type of file (e.g. "REGULAR_TYPE", "DIRECTORY_TYPE", or "SYMLINK_TYPE").
2398    #[builder(setter(into, strip_option), default)]
2399    pub expected_type: Option<ExistsType>,
2400}
2401#[derive(Builder, Debug, PartialEq)]
2402pub struct ContainerExportOpts {
2403    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2404    #[builder(setter(into, strip_option), default)]
2405    pub expand: Option<bool>,
2406    /// Force each layer of the exported image to use the specified compression algorithm.
2407    /// 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.
2408    #[builder(setter(into, strip_option), default)]
2409    pub forced_compression: Option<ImageLayerCompression>,
2410    /// Use the specified media types for the exported image's layers.
2411    /// Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
2412    #[builder(setter(into, strip_option), default)]
2413    pub media_types: Option<ImageMediaTypes>,
2414    /// Identifiers for other platform specific containers.
2415    /// Used for multi-platform image.
2416    #[builder(setter(into, strip_option), default)]
2417    pub platform_variants: Option<Vec<ContainerId>>,
2418}
2419#[derive(Builder, Debug, PartialEq)]
2420pub struct ContainerExportImageOpts {
2421    /// Force each layer of the exported image to use the specified compression algorithm.
2422    /// 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.
2423    #[builder(setter(into, strip_option), default)]
2424    pub forced_compression: Option<ImageLayerCompression>,
2425    /// Use the specified media types for the exported image's layers.
2426    /// Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
2427    #[builder(setter(into, strip_option), default)]
2428    pub media_types: Option<ImageMediaTypes>,
2429    /// Identifiers for other platform specific containers.
2430    /// Used for multi-platform image.
2431    #[builder(setter(into, strip_option), default)]
2432    pub platform_variants: Option<Vec<ContainerId>>,
2433}
2434#[derive(Builder, Debug, PartialEq)]
2435pub struct ContainerFileOpts {
2436    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2437    #[builder(setter(into, strip_option), default)]
2438    pub expand: Option<bool>,
2439}
2440#[derive(Builder, Debug, PartialEq)]
2441pub struct ContainerImportOpts<'a> {
2442    /// Identifies the tag to import from the archive, if the archive bundles multiple tags.
2443    #[builder(setter(into, strip_option), default)]
2444    pub tag: Option<&'a str>,
2445}
2446#[derive(Builder, Debug, PartialEq)]
2447pub struct ContainerPublishOpts {
2448    /// Force each layer of the published image to use the specified compression algorithm.
2449    /// 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.
2450    #[builder(setter(into, strip_option), default)]
2451    pub forced_compression: Option<ImageLayerCompression>,
2452    /// Use the specified media types for the published image's layers.
2453    /// Defaults to "OCI", which is compatible with most recent registries, but "Docker" may be needed for older registries without OCI support.
2454    #[builder(setter(into, strip_option), default)]
2455    pub media_types: Option<ImageMediaTypes>,
2456    /// Identifiers for other platform specific containers.
2457    /// Used for multi-platform image.
2458    #[builder(setter(into, strip_option), default)]
2459    pub platform_variants: Option<Vec<ContainerId>>,
2460}
2461#[derive(Builder, Debug, PartialEq)]
2462pub struct ContainerTerminalOpts<'a> {
2463    /// If set, override the container's default terminal command and invoke these command arguments instead.
2464    #[builder(setter(into, strip_option), default)]
2465    pub cmd: Option<Vec<&'a str>>,
2466    /// Provides Dagger access to the executed command.
2467    #[builder(setter(into, strip_option), default)]
2468    pub experimental_privileged_nesting: Option<bool>,
2469    /// 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.
2470    #[builder(setter(into, strip_option), default)]
2471    pub insecure_root_capabilities: Option<bool>,
2472}
2473#[derive(Builder, Debug, PartialEq)]
2474pub struct ContainerUpOpts<'a> {
2475    /// Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).
2476    /// If empty, the container's default command is used.
2477    #[builder(setter(into, strip_option), default)]
2478    pub args: Option<Vec<&'a str>>,
2479    /// Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2480    #[builder(setter(into, strip_option), default)]
2481    pub expand: Option<bool>,
2482    /// Provides Dagger access to the executed command.
2483    #[builder(setter(into, strip_option), default)]
2484    pub experimental_privileged_nesting: Option<bool>,
2485    /// 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.
2486    #[builder(setter(into, strip_option), default)]
2487    pub insecure_root_capabilities: Option<bool>,
2488    /// If set, skip the automatic init process injected into containers by default.
2489    /// 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.
2490    #[builder(setter(into, strip_option), default)]
2491    pub no_init: Option<bool>,
2492    /// List of frontend/backend port mappings to forward.
2493    /// Frontend is the port accepting traffic on the host, backend is the service port.
2494    #[builder(setter(into, strip_option), default)]
2495    pub ports: Option<Vec<PortForward>>,
2496    /// Bind each tunnel port to a random port on the host.
2497    #[builder(setter(into, strip_option), default)]
2498    pub random: Option<bool>,
2499    /// If the container has an entrypoint, prepend it to the args.
2500    #[builder(setter(into, strip_option), default)]
2501    pub use_entrypoint: Option<bool>,
2502}
2503#[derive(Builder, Debug, PartialEq)]
2504pub struct ContainerWithDefaultTerminalCmdOpts {
2505    /// Provides Dagger access to the executed command.
2506    #[builder(setter(into, strip_option), default)]
2507    pub experimental_privileged_nesting: Option<bool>,
2508    /// 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.
2509    #[builder(setter(into, strip_option), default)]
2510    pub insecure_root_capabilities: Option<bool>,
2511}
2512#[derive(Builder, Debug, PartialEq)]
2513pub struct ContainerWithDirectoryOpts<'a> {
2514    /// Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]).
2515    #[builder(setter(into, strip_option), default)]
2516    pub exclude: Option<Vec<&'a str>>,
2517    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2518    #[builder(setter(into, strip_option), default)]
2519    pub expand: Option<bool>,
2520    /// Patterns to include in the written directory (e.g. ["*.go", "go.mod", "go.sum"]).
2521    #[builder(setter(into, strip_option), default)]
2522    pub include: Option<Vec<&'a str>>,
2523    /// A user:group to set for the directory and its contents.
2524    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2525    /// If the group is omitted, it defaults to the same as the user.
2526    #[builder(setter(into, strip_option), default)]
2527    pub owner: Option<&'a str>,
2528}
2529#[derive(Builder, Debug, PartialEq)]
2530pub struct ContainerWithEntrypointOpts {
2531    /// Don't reset the default arguments when setting the entrypoint. By default it is reset, since entrypoint and default args are often tightly coupled.
2532    #[builder(setter(into, strip_option), default)]
2533    pub keep_default_args: Option<bool>,
2534}
2535#[derive(Builder, Debug, PartialEq)]
2536pub struct ContainerWithEnvVariableOpts {
2537    /// Replace "${VAR}" or "$VAR" in the value according to the current environment variables defined in the container (e.g. "/opt/bin:$PATH").
2538    #[builder(setter(into, strip_option), default)]
2539    pub expand: Option<bool>,
2540}
2541#[derive(Builder, Debug, PartialEq)]
2542pub struct ContainerWithExecOpts<'a> {
2543    /// Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2544    #[builder(setter(into, strip_option), default)]
2545    pub expand: Option<bool>,
2546    /// Exit codes this command is allowed to exit with without error
2547    #[builder(setter(into, strip_option), default)]
2548    pub expect: Option<ReturnType>,
2549    /// Provides Dagger access to the executed command.
2550    #[builder(setter(into, strip_option), default)]
2551    pub experimental_privileged_nesting: Option<bool>,
2552    /// Execute the command with all root capabilities. Like --privileged in Docker
2553    /// 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.
2554    #[builder(setter(into, strip_option), default)]
2555    pub insecure_root_capabilities: Option<bool>,
2556    /// Skip the automatic init process injected into containers by default.
2557    /// 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.
2558    #[builder(setter(into, strip_option), default)]
2559    pub no_init: Option<bool>,
2560    /// Redirect the command's standard error to a file in the container. Example: "./stderr.txt"
2561    #[builder(setter(into, strip_option), default)]
2562    pub redirect_stderr: Option<&'a str>,
2563    /// Redirect the command's standard input from a file in the container. Example: "./stdin.txt"
2564    #[builder(setter(into, strip_option), default)]
2565    pub redirect_stdin: Option<&'a str>,
2566    /// Redirect the command's standard output to a file in the container. Example: "./stdout.txt"
2567    #[builder(setter(into, strip_option), default)]
2568    pub redirect_stdout: Option<&'a str>,
2569    /// Content to write to the command's standard input. Example: "Hello world")
2570    #[builder(setter(into, strip_option), default)]
2571    pub stdin: Option<&'a str>,
2572    /// Apply the OCI entrypoint, if present, by prepending it to the args. Ignored by default.
2573    #[builder(setter(into, strip_option), default)]
2574    pub use_entrypoint: Option<bool>,
2575}
2576#[derive(Builder, Debug, PartialEq)]
2577pub struct ContainerWithExposedPortOpts<'a> {
2578    /// Port description. Example: "payment API endpoint"
2579    #[builder(setter(into, strip_option), default)]
2580    pub description: Option<&'a str>,
2581    /// Skip the health check when run as a service.
2582    #[builder(setter(into, strip_option), default)]
2583    pub experimental_skip_healthcheck: Option<bool>,
2584    /// Network protocol. Example: "tcp"
2585    #[builder(setter(into, strip_option), default)]
2586    pub protocol: Option<NetworkProtocol>,
2587}
2588#[derive(Builder, Debug, PartialEq)]
2589pub struct ContainerWithFileOpts<'a> {
2590    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2591    #[builder(setter(into, strip_option), default)]
2592    pub expand: Option<bool>,
2593    /// A user:group to set for the file.
2594    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2595    /// If the group is omitted, it defaults to the same as the user.
2596    #[builder(setter(into, strip_option), default)]
2597    pub owner: Option<&'a str>,
2598    /// Permissions of the new file. Example: 0600
2599    #[builder(setter(into, strip_option), default)]
2600    pub permissions: Option<isize>,
2601}
2602#[derive(Builder, Debug, PartialEq)]
2603pub struct ContainerWithFilesOpts<'a> {
2604    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2605    #[builder(setter(into, strip_option), default)]
2606    pub expand: Option<bool>,
2607    /// A user:group to set for the files.
2608    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2609    /// If the group is omitted, it defaults to the same as the user.
2610    #[builder(setter(into, strip_option), default)]
2611    pub owner: Option<&'a str>,
2612    /// Permission given to the copied files (e.g., 0600).
2613    #[builder(setter(into, strip_option), default)]
2614    pub permissions: Option<isize>,
2615}
2616#[derive(Builder, Debug, PartialEq)]
2617pub struct ContainerWithMountedCacheOpts<'a> {
2618    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2619    #[builder(setter(into, strip_option), default)]
2620    pub expand: Option<bool>,
2621    /// A user:group to set for the mounted cache directory.
2622    /// 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.
2623    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2624    /// If the group is omitted, it defaults to the same as the user.
2625    #[builder(setter(into, strip_option), default)]
2626    pub owner: Option<&'a str>,
2627    /// Sharing mode of the cache volume.
2628    #[builder(setter(into, strip_option), default)]
2629    pub sharing: Option<CacheSharingMode>,
2630    /// Identifier of the directory to use as the cache volume's root.
2631    #[builder(setter(into, strip_option), default)]
2632    pub source: Option<DirectoryId>,
2633}
2634#[derive(Builder, Debug, PartialEq)]
2635pub struct ContainerWithMountedDirectoryOpts<'a> {
2636    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2637    #[builder(setter(into, strip_option), default)]
2638    pub expand: Option<bool>,
2639    /// A user:group to set for the mounted directory and its contents.
2640    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2641    /// If the group is omitted, it defaults to the same as the user.
2642    #[builder(setter(into, strip_option), default)]
2643    pub owner: Option<&'a str>,
2644}
2645#[derive(Builder, Debug, PartialEq)]
2646pub struct ContainerWithMountedFileOpts<'a> {
2647    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2648    #[builder(setter(into, strip_option), default)]
2649    pub expand: Option<bool>,
2650    /// A user or user:group to set for the mounted file.
2651    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2652    /// If the group is omitted, it defaults to the same as the user.
2653    #[builder(setter(into, strip_option), default)]
2654    pub owner: Option<&'a str>,
2655}
2656#[derive(Builder, Debug, PartialEq)]
2657pub struct ContainerWithMountedSecretOpts<'a> {
2658    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2659    #[builder(setter(into, strip_option), default)]
2660    pub expand: Option<bool>,
2661    /// Permission given to the mounted secret (e.g., 0600).
2662    /// This option requires an owner to be set to be active.
2663    #[builder(setter(into, strip_option), default)]
2664    pub mode: Option<isize>,
2665    /// A user:group to set for the mounted secret.
2666    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2667    /// If the group is omitted, it defaults to the same as the user.
2668    #[builder(setter(into, strip_option), default)]
2669    pub owner: Option<&'a str>,
2670}
2671#[derive(Builder, Debug, PartialEq)]
2672pub struct ContainerWithMountedTempOpts {
2673    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2674    #[builder(setter(into, strip_option), default)]
2675    pub expand: Option<bool>,
2676    /// Size of the temporary directory in bytes.
2677    #[builder(setter(into, strip_option), default)]
2678    pub size: Option<isize>,
2679}
2680#[derive(Builder, Debug, PartialEq)]
2681pub struct ContainerWithNewFileOpts<'a> {
2682    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2683    #[builder(setter(into, strip_option), default)]
2684    pub expand: Option<bool>,
2685    /// A user:group to set for the file.
2686    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2687    /// If the group is omitted, it defaults to the same as the user.
2688    #[builder(setter(into, strip_option), default)]
2689    pub owner: Option<&'a str>,
2690    /// Permissions of the new file. Example: 0600
2691    #[builder(setter(into, strip_option), default)]
2692    pub permissions: Option<isize>,
2693}
2694#[derive(Builder, Debug, PartialEq)]
2695pub struct ContainerWithSymlinkOpts {
2696    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2697    #[builder(setter(into, strip_option), default)]
2698    pub expand: Option<bool>,
2699}
2700#[derive(Builder, Debug, PartialEq)]
2701pub struct ContainerWithUnixSocketOpts<'a> {
2702    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2703    #[builder(setter(into, strip_option), default)]
2704    pub expand: Option<bool>,
2705    /// A user:group to set for the mounted socket.
2706    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2707    /// If the group is omitted, it defaults to the same as the user.
2708    #[builder(setter(into, strip_option), default)]
2709    pub owner: Option<&'a str>,
2710}
2711#[derive(Builder, Debug, PartialEq)]
2712pub struct ContainerWithWorkdirOpts {
2713    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2714    #[builder(setter(into, strip_option), default)]
2715    pub expand: Option<bool>,
2716}
2717#[derive(Builder, Debug, PartialEq)]
2718pub struct ContainerWithoutDirectoryOpts {
2719    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2720    #[builder(setter(into, strip_option), default)]
2721    pub expand: Option<bool>,
2722}
2723#[derive(Builder, Debug, PartialEq)]
2724pub struct ContainerWithoutEntrypointOpts {
2725    /// Don't remove the default arguments when unsetting the entrypoint.
2726    #[builder(setter(into, strip_option), default)]
2727    pub keep_default_args: Option<bool>,
2728}
2729#[derive(Builder, Debug, PartialEq)]
2730pub struct ContainerWithoutExposedPortOpts {
2731    /// Port protocol to unexpose
2732    #[builder(setter(into, strip_option), default)]
2733    pub protocol: Option<NetworkProtocol>,
2734}
2735#[derive(Builder, Debug, PartialEq)]
2736pub struct ContainerWithoutFileOpts {
2737    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2738    #[builder(setter(into, strip_option), default)]
2739    pub expand: Option<bool>,
2740}
2741#[derive(Builder, Debug, PartialEq)]
2742pub struct ContainerWithoutFilesOpts {
2743    /// Replace "${VAR}" or "$VAR" in the value of paths according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2744    #[builder(setter(into, strip_option), default)]
2745    pub expand: Option<bool>,
2746}
2747#[derive(Builder, Debug, PartialEq)]
2748pub struct ContainerWithoutMountOpts {
2749    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2750    #[builder(setter(into, strip_option), default)]
2751    pub expand: Option<bool>,
2752}
2753#[derive(Builder, Debug, PartialEq)]
2754pub struct ContainerWithoutUnixSocketOpts {
2755    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2756    #[builder(setter(into, strip_option), default)]
2757    pub expand: Option<bool>,
2758}
2759impl Container {
2760    /// Turn the container into a Service.
2761    /// Be sure to set any exposed ports before this conversion.
2762    ///
2763    /// # Arguments
2764    ///
2765    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2766    pub fn as_service(&self) -> Service {
2767        let query = self.selection.select("asService");
2768        Service {
2769            proc: self.proc.clone(),
2770            selection: query,
2771            graphql_client: self.graphql_client.clone(),
2772        }
2773    }
2774    /// Turn the container into a Service.
2775    /// Be sure to set any exposed ports before this conversion.
2776    ///
2777    /// # Arguments
2778    ///
2779    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2780    pub fn as_service_opts<'a>(&self, opts: ContainerAsServiceOpts<'a>) -> Service {
2781        let mut query = self.selection.select("asService");
2782        if let Some(args) = opts.args {
2783            query = query.arg("args", args);
2784        }
2785        if let Some(use_entrypoint) = opts.use_entrypoint {
2786            query = query.arg("useEntrypoint", use_entrypoint);
2787        }
2788        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
2789            query = query.arg(
2790                "experimentalPrivilegedNesting",
2791                experimental_privileged_nesting,
2792            );
2793        }
2794        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
2795            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
2796        }
2797        if let Some(expand) = opts.expand {
2798            query = query.arg("expand", expand);
2799        }
2800        if let Some(no_init) = opts.no_init {
2801            query = query.arg("noInit", no_init);
2802        }
2803        Service {
2804            proc: self.proc.clone(),
2805            selection: query,
2806            graphql_client: self.graphql_client.clone(),
2807        }
2808    }
2809    /// Package the container state as an OCI image, and return it as a tar archive
2810    ///
2811    /// # Arguments
2812    ///
2813    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2814    pub fn as_tarball(&self) -> File {
2815        let query = self.selection.select("asTarball");
2816        File {
2817            proc: self.proc.clone(),
2818            selection: query,
2819            graphql_client: self.graphql_client.clone(),
2820        }
2821    }
2822    /// Package the container state as an OCI image, and return it as a tar archive
2823    ///
2824    /// # Arguments
2825    ///
2826    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2827    pub fn as_tarball_opts(&self, opts: ContainerAsTarballOpts) -> File {
2828        let mut query = self.selection.select("asTarball");
2829        if let Some(platform_variants) = opts.platform_variants {
2830            query = query.arg("platformVariants", platform_variants);
2831        }
2832        if let Some(forced_compression) = opts.forced_compression {
2833            query = query.arg("forcedCompression", forced_compression);
2834        }
2835        if let Some(media_types) = opts.media_types {
2836            query = query.arg("mediaTypes", media_types);
2837        }
2838        File {
2839            proc: self.proc.clone(),
2840            selection: query,
2841            graphql_client: self.graphql_client.clone(),
2842        }
2843    }
2844    /// Initializes this container from a Dockerfile build.
2845    ///
2846    /// # Arguments
2847    ///
2848    /// * `context` - Directory context used by the Dockerfile.
2849    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2850    pub fn build(&self, context: impl IntoID<DirectoryId>) -> Container {
2851        let mut query = self.selection.select("build");
2852        query = query.arg_lazy(
2853            "context",
2854            Box::new(move || {
2855                let context = context.clone();
2856                Box::pin(async move { context.into_id().await.unwrap().quote() })
2857            }),
2858        );
2859        Container {
2860            proc: self.proc.clone(),
2861            selection: query,
2862            graphql_client: self.graphql_client.clone(),
2863        }
2864    }
2865    /// Initializes this container from a Dockerfile build.
2866    ///
2867    /// # Arguments
2868    ///
2869    /// * `context` - Directory context used by the Dockerfile.
2870    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2871    pub fn build_opts<'a>(
2872        &self,
2873        context: impl IntoID<DirectoryId>,
2874        opts: ContainerBuildOpts<'a>,
2875    ) -> Container {
2876        let mut query = self.selection.select("build");
2877        query = query.arg_lazy(
2878            "context",
2879            Box::new(move || {
2880                let context = context.clone();
2881                Box::pin(async move { context.into_id().await.unwrap().quote() })
2882            }),
2883        );
2884        if let Some(dockerfile) = opts.dockerfile {
2885            query = query.arg("dockerfile", dockerfile);
2886        }
2887        if let Some(target) = opts.target {
2888            query = query.arg("target", target);
2889        }
2890        if let Some(build_args) = opts.build_args {
2891            query = query.arg("buildArgs", build_args);
2892        }
2893        if let Some(secrets) = opts.secrets {
2894            query = query.arg("secrets", secrets);
2895        }
2896        if let Some(no_init) = opts.no_init {
2897            query = query.arg("noInit", no_init);
2898        }
2899        Container {
2900            proc: self.proc.clone(),
2901            selection: query,
2902            graphql_client: self.graphql_client.clone(),
2903        }
2904    }
2905    /// The combined buffered standard output and standard error stream of the last executed command
2906    /// Returns an error if no command was executed
2907    pub async fn combined_output(&self) -> Result<String, DaggerError> {
2908        let query = self.selection.select("combinedOutput");
2909        query.execute(self.graphql_client.clone()).await
2910    }
2911    /// Return the container's default arguments.
2912    pub async fn default_args(&self) -> Result<Vec<String>, DaggerError> {
2913        let query = self.selection.select("defaultArgs");
2914        query.execute(self.graphql_client.clone()).await
2915    }
2916    /// Retrieve a directory from the container's root filesystem
2917    /// Mounts are included.
2918    ///
2919    /// # Arguments
2920    ///
2921    /// * `path` - The path of the directory to retrieve (e.g., "./src").
2922    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2923    pub fn directory(&self, path: impl Into<String>) -> Directory {
2924        let mut query = self.selection.select("directory");
2925        query = query.arg("path", path.into());
2926        Directory {
2927            proc: self.proc.clone(),
2928            selection: query,
2929            graphql_client: self.graphql_client.clone(),
2930        }
2931    }
2932    /// Retrieve a directory from the container's root filesystem
2933    /// Mounts are included.
2934    ///
2935    /// # Arguments
2936    ///
2937    /// * `path` - The path of the directory to retrieve (e.g., "./src").
2938    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2939    pub fn directory_opts(
2940        &self,
2941        path: impl Into<String>,
2942        opts: ContainerDirectoryOpts,
2943    ) -> Directory {
2944        let mut query = self.selection.select("directory");
2945        query = query.arg("path", path.into());
2946        if let Some(expand) = opts.expand {
2947            query = query.arg("expand", expand);
2948        }
2949        Directory {
2950            proc: self.proc.clone(),
2951            selection: query,
2952            graphql_client: self.graphql_client.clone(),
2953        }
2954    }
2955    /// Return the container's OCI entrypoint.
2956    pub async fn entrypoint(&self) -> Result<Vec<String>, DaggerError> {
2957        let query = self.selection.select("entrypoint");
2958        query.execute(self.graphql_client.clone()).await
2959    }
2960    /// Retrieves the value of the specified environment variable.
2961    ///
2962    /// # Arguments
2963    ///
2964    /// * `name` - The name of the environment variable to retrieve (e.g., "PATH").
2965    pub async fn env_variable(&self, name: impl Into<String>) -> Result<String, DaggerError> {
2966        let mut query = self.selection.select("envVariable");
2967        query = query.arg("name", name.into());
2968        query.execute(self.graphql_client.clone()).await
2969    }
2970    /// Retrieves the list of environment variables passed to commands.
2971    pub fn env_variables(&self) -> Vec<EnvVariable> {
2972        let query = self.selection.select("envVariables");
2973        vec![EnvVariable {
2974            proc: self.proc.clone(),
2975            selection: query,
2976            graphql_client: self.graphql_client.clone(),
2977        }]
2978    }
2979    /// check if a file or directory exists
2980    ///
2981    /// # Arguments
2982    ///
2983    /// * `path` - Path to check (e.g., "/file.txt").
2984    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2985    pub async fn exists(&self, path: impl Into<String>) -> Result<bool, DaggerError> {
2986        let mut query = self.selection.select("exists");
2987        query = query.arg("path", path.into());
2988        query.execute(self.graphql_client.clone()).await
2989    }
2990    /// check if a file or directory exists
2991    ///
2992    /// # Arguments
2993    ///
2994    /// * `path` - Path to check (e.g., "/file.txt").
2995    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2996    pub async fn exists_opts(
2997        &self,
2998        path: impl Into<String>,
2999        opts: ContainerExistsOpts,
3000    ) -> Result<bool, DaggerError> {
3001        let mut query = self.selection.select("exists");
3002        query = query.arg("path", path.into());
3003        if let Some(expected_type) = opts.expected_type {
3004            query = query.arg("expectedType", expected_type);
3005        }
3006        if let Some(do_not_follow_symlinks) = opts.do_not_follow_symlinks {
3007            query = query.arg("doNotFollowSymlinks", do_not_follow_symlinks);
3008        }
3009        query.execute(self.graphql_client.clone()).await
3010    }
3011    /// The exit code of the last executed command
3012    /// Returns an error if no command was executed
3013    pub async fn exit_code(&self) -> Result<isize, DaggerError> {
3014        let query = self.selection.select("exitCode");
3015        query.execute(self.graphql_client.clone()).await
3016    }
3017    /// EXPERIMENTAL API! Subject to change/removal at any time.
3018    /// Configures all available GPUs on the host to be accessible to this container.
3019    /// This currently works for Nvidia devices only.
3020    pub fn experimental_with_all_gp_us(&self) -> Container {
3021        let query = self.selection.select("experimentalWithAllGPUs");
3022        Container {
3023            proc: self.proc.clone(),
3024            selection: query,
3025            graphql_client: self.graphql_client.clone(),
3026        }
3027    }
3028    /// EXPERIMENTAL API! Subject to change/removal at any time.
3029    /// Configures the provided list of devices to be accessible to this container.
3030    /// This currently works for Nvidia devices only.
3031    ///
3032    /// # Arguments
3033    ///
3034    /// * `devices` - List of devices to be accessible to this container.
3035    pub fn experimental_with_gpu(&self, devices: Vec<impl Into<String>>) -> Container {
3036        let mut query = self.selection.select("experimentalWithGPU");
3037        query = query.arg(
3038            "devices",
3039            devices
3040                .into_iter()
3041                .map(|i| i.into())
3042                .collect::<Vec<String>>(),
3043        );
3044        Container {
3045            proc: self.proc.clone(),
3046            selection: query,
3047            graphql_client: self.graphql_client.clone(),
3048        }
3049    }
3050    /// Writes the container as an OCI tarball to the destination file path on the host.
3051    /// It can also export platform variants.
3052    ///
3053    /// # Arguments
3054    ///
3055    /// * `path` - Host's destination path (e.g., "./tarball").
3056    ///
3057    /// Path can be relative to the engine's workdir or absolute.
3058    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3059    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
3060        let mut query = self.selection.select("export");
3061        query = query.arg("path", path.into());
3062        query.execute(self.graphql_client.clone()).await
3063    }
3064    /// Writes the container as an OCI tarball to the destination file path on the host.
3065    /// It can also export platform variants.
3066    ///
3067    /// # Arguments
3068    ///
3069    /// * `path` - Host's destination path (e.g., "./tarball").
3070    ///
3071    /// Path can be relative to the engine's workdir or absolute.
3072    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3073    pub async fn export_opts(
3074        &self,
3075        path: impl Into<String>,
3076        opts: ContainerExportOpts,
3077    ) -> Result<String, DaggerError> {
3078        let mut query = self.selection.select("export");
3079        query = query.arg("path", path.into());
3080        if let Some(platform_variants) = opts.platform_variants {
3081            query = query.arg("platformVariants", platform_variants);
3082        }
3083        if let Some(forced_compression) = opts.forced_compression {
3084            query = query.arg("forcedCompression", forced_compression);
3085        }
3086        if let Some(media_types) = opts.media_types {
3087            query = query.arg("mediaTypes", media_types);
3088        }
3089        if let Some(expand) = opts.expand {
3090            query = query.arg("expand", expand);
3091        }
3092        query.execute(self.graphql_client.clone()).await
3093    }
3094    /// Exports the container as an image to the host's container image store.
3095    ///
3096    /// # Arguments
3097    ///
3098    /// * `name` - Name of image to export to in the host's store
3099    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3100    pub async fn export_image(&self, name: impl Into<String>) -> Result<Void, DaggerError> {
3101        let mut query = self.selection.select("exportImage");
3102        query = query.arg("name", name.into());
3103        query.execute(self.graphql_client.clone()).await
3104    }
3105    /// Exports the container as an image to the host's container image store.
3106    ///
3107    /// # Arguments
3108    ///
3109    /// * `name` - Name of image to export to in the host's store
3110    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3111    pub async fn export_image_opts(
3112        &self,
3113        name: impl Into<String>,
3114        opts: ContainerExportImageOpts,
3115    ) -> Result<Void, DaggerError> {
3116        let mut query = self.selection.select("exportImage");
3117        query = query.arg("name", name.into());
3118        if let Some(platform_variants) = opts.platform_variants {
3119            query = query.arg("platformVariants", platform_variants);
3120        }
3121        if let Some(forced_compression) = opts.forced_compression {
3122            query = query.arg("forcedCompression", forced_compression);
3123        }
3124        if let Some(media_types) = opts.media_types {
3125            query = query.arg("mediaTypes", media_types);
3126        }
3127        query.execute(self.graphql_client.clone()).await
3128    }
3129    /// Retrieves the list of exposed ports.
3130    /// This includes ports already exposed by the image, even if not explicitly added with dagger.
3131    pub fn exposed_ports(&self) -> Vec<Port> {
3132        let query = self.selection.select("exposedPorts");
3133        vec![Port {
3134            proc: self.proc.clone(),
3135            selection: query,
3136            graphql_client: self.graphql_client.clone(),
3137        }]
3138    }
3139    /// Retrieves a file at the given path.
3140    /// Mounts are included.
3141    ///
3142    /// # Arguments
3143    ///
3144    /// * `path` - The path of the file to retrieve (e.g., "./README.md").
3145    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3146    pub fn file(&self, path: impl Into<String>) -> File {
3147        let mut query = self.selection.select("file");
3148        query = query.arg("path", path.into());
3149        File {
3150            proc: self.proc.clone(),
3151            selection: query,
3152            graphql_client: self.graphql_client.clone(),
3153        }
3154    }
3155    /// Retrieves a file at the given path.
3156    /// Mounts are included.
3157    ///
3158    /// # Arguments
3159    ///
3160    /// * `path` - The path of the file to retrieve (e.g., "./README.md").
3161    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3162    pub fn file_opts(&self, path: impl Into<String>, opts: ContainerFileOpts) -> File {
3163        let mut query = self.selection.select("file");
3164        query = query.arg("path", path.into());
3165        if let Some(expand) = opts.expand {
3166            query = query.arg("expand", expand);
3167        }
3168        File {
3169            proc: self.proc.clone(),
3170            selection: query,
3171            graphql_client: self.graphql_client.clone(),
3172        }
3173    }
3174    /// Download a container image, and apply it to the container state. All previous state will be lost.
3175    ///
3176    /// # Arguments
3177    ///
3178    /// * `address` - Address of the container image to download, in standard OCI ref format. Example:"registry.dagger.io/engine:latest"
3179    pub fn from(&self, address: impl Into<String>) -> Container {
3180        let mut query = self.selection.select("from");
3181        query = query.arg("address", address.into());
3182        Container {
3183            proc: self.proc.clone(),
3184            selection: query,
3185            graphql_client: self.graphql_client.clone(),
3186        }
3187    }
3188    /// A unique identifier for this Container.
3189    pub async fn id(&self) -> Result<ContainerId, DaggerError> {
3190        let query = self.selection.select("id");
3191        query.execute(self.graphql_client.clone()).await
3192    }
3193    /// The unique image reference which can only be retrieved immediately after the 'Container.From' call.
3194    pub async fn image_ref(&self) -> Result<String, DaggerError> {
3195        let query = self.selection.select("imageRef");
3196        query.execute(self.graphql_client.clone()).await
3197    }
3198    /// Reads the container from an OCI tarball.
3199    ///
3200    /// # Arguments
3201    ///
3202    /// * `source` - File to read the container from.
3203    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3204    pub fn import(&self, source: impl IntoID<FileId>) -> Container {
3205        let mut query = self.selection.select("import");
3206        query = query.arg_lazy(
3207            "source",
3208            Box::new(move || {
3209                let source = source.clone();
3210                Box::pin(async move { source.into_id().await.unwrap().quote() })
3211            }),
3212        );
3213        Container {
3214            proc: self.proc.clone(),
3215            selection: query,
3216            graphql_client: self.graphql_client.clone(),
3217        }
3218    }
3219    /// Reads the container from an OCI tarball.
3220    ///
3221    /// # Arguments
3222    ///
3223    /// * `source` - File to read the container from.
3224    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3225    pub fn import_opts<'a>(
3226        &self,
3227        source: impl IntoID<FileId>,
3228        opts: ContainerImportOpts<'a>,
3229    ) -> Container {
3230        let mut query = self.selection.select("import");
3231        query = query.arg_lazy(
3232            "source",
3233            Box::new(move || {
3234                let source = source.clone();
3235                Box::pin(async move { source.into_id().await.unwrap().quote() })
3236            }),
3237        );
3238        if let Some(tag) = opts.tag {
3239            query = query.arg("tag", tag);
3240        }
3241        Container {
3242            proc: self.proc.clone(),
3243            selection: query,
3244            graphql_client: self.graphql_client.clone(),
3245        }
3246    }
3247    /// Retrieves the value of the specified label.
3248    ///
3249    /// # Arguments
3250    ///
3251    /// * `name` - The name of the label (e.g., "org.opencontainers.artifact.created").
3252    pub async fn label(&self, name: impl Into<String>) -> Result<String, DaggerError> {
3253        let mut query = self.selection.select("label");
3254        query = query.arg("name", name.into());
3255        query.execute(self.graphql_client.clone()).await
3256    }
3257    /// Retrieves the list of labels passed to container.
3258    pub fn labels(&self) -> Vec<Label> {
3259        let query = self.selection.select("labels");
3260        vec![Label {
3261            proc: self.proc.clone(),
3262            selection: query,
3263            graphql_client: self.graphql_client.clone(),
3264        }]
3265    }
3266    /// Retrieves the list of paths where a directory is mounted.
3267    pub async fn mounts(&self) -> Result<Vec<String>, DaggerError> {
3268        let query = self.selection.select("mounts");
3269        query.execute(self.graphql_client.clone()).await
3270    }
3271    /// The platform this container executes and publishes as.
3272    pub async fn platform(&self) -> Result<Platform, DaggerError> {
3273        let query = self.selection.select("platform");
3274        query.execute(self.graphql_client.clone()).await
3275    }
3276    /// Package the container state as an OCI image, and publish it to a registry
3277    /// Returns the fully qualified address of the published image, with digest
3278    ///
3279    /// # Arguments
3280    ///
3281    /// * `address` - The OCI address to publish to
3282    ///
3283    /// Same format as "docker push". Example: "registry.example.com/user/repo:tag"
3284    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3285    pub async fn publish(&self, address: impl Into<String>) -> Result<String, DaggerError> {
3286        let mut query = self.selection.select("publish");
3287        query = query.arg("address", address.into());
3288        query.execute(self.graphql_client.clone()).await
3289    }
3290    /// Package the container state as an OCI image, and publish it to a registry
3291    /// Returns the fully qualified address of the published image, with digest
3292    ///
3293    /// # Arguments
3294    ///
3295    /// * `address` - The OCI address to publish to
3296    ///
3297    /// Same format as "docker push". Example: "registry.example.com/user/repo:tag"
3298    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3299    pub async fn publish_opts(
3300        &self,
3301        address: impl Into<String>,
3302        opts: ContainerPublishOpts,
3303    ) -> Result<String, DaggerError> {
3304        let mut query = self.selection.select("publish");
3305        query = query.arg("address", address.into());
3306        if let Some(platform_variants) = opts.platform_variants {
3307            query = query.arg("platformVariants", platform_variants);
3308        }
3309        if let Some(forced_compression) = opts.forced_compression {
3310            query = query.arg("forcedCompression", forced_compression);
3311        }
3312        if let Some(media_types) = opts.media_types {
3313            query = query.arg("mediaTypes", media_types);
3314        }
3315        query.execute(self.graphql_client.clone()).await
3316    }
3317    /// 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.
3318    pub fn rootfs(&self) -> Directory {
3319        let query = self.selection.select("rootfs");
3320        Directory {
3321            proc: self.proc.clone(),
3322            selection: query,
3323            graphql_client: self.graphql_client.clone(),
3324        }
3325    }
3326    /// The buffered standard error stream of the last executed command
3327    /// Returns an error if no command was executed
3328    pub async fn stderr(&self) -> Result<String, DaggerError> {
3329        let query = self.selection.select("stderr");
3330        query.execute(self.graphql_client.clone()).await
3331    }
3332    /// The buffered standard output stream of the last executed command
3333    /// Returns an error if no command was executed
3334    pub async fn stdout(&self) -> Result<String, DaggerError> {
3335        let query = self.selection.select("stdout");
3336        query.execute(self.graphql_client.clone()).await
3337    }
3338    /// Forces evaluation of the pipeline in the engine.
3339    /// It doesn't run the default command if no exec has been set.
3340    pub async fn sync(&self) -> Result<ContainerId, DaggerError> {
3341        let query = self.selection.select("sync");
3342        query.execute(self.graphql_client.clone()).await
3343    }
3344    /// Opens an interactive terminal for this container using its configured default terminal command if not overridden by args (or sh as a fallback default).
3345    ///
3346    /// # Arguments
3347    ///
3348    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3349    pub fn terminal(&self) -> Container {
3350        let query = self.selection.select("terminal");
3351        Container {
3352            proc: self.proc.clone(),
3353            selection: query,
3354            graphql_client: self.graphql_client.clone(),
3355        }
3356    }
3357    /// Opens an interactive terminal for this container using its configured default terminal command if not overridden by args (or sh as a fallback default).
3358    ///
3359    /// # Arguments
3360    ///
3361    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3362    pub fn terminal_opts<'a>(&self, opts: ContainerTerminalOpts<'a>) -> Container {
3363        let mut query = self.selection.select("terminal");
3364        if let Some(cmd) = opts.cmd {
3365            query = query.arg("cmd", cmd);
3366        }
3367        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
3368            query = query.arg(
3369                "experimentalPrivilegedNesting",
3370                experimental_privileged_nesting,
3371            );
3372        }
3373        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
3374            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
3375        }
3376        Container {
3377            proc: self.proc.clone(),
3378            selection: query,
3379            graphql_client: self.graphql_client.clone(),
3380        }
3381    }
3382    /// Starts a Service and creates a tunnel that forwards traffic from the caller's network to that service.
3383    /// Be sure to set any exposed ports before calling this api.
3384    ///
3385    /// # Arguments
3386    ///
3387    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3388    pub async fn up(&self) -> Result<Void, DaggerError> {
3389        let query = self.selection.select("up");
3390        query.execute(self.graphql_client.clone()).await
3391    }
3392    /// Starts a Service and creates a tunnel that forwards traffic from the caller's network to that service.
3393    /// Be sure to set any exposed ports before calling this api.
3394    ///
3395    /// # Arguments
3396    ///
3397    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3398    pub async fn up_opts<'a>(&self, opts: ContainerUpOpts<'a>) -> Result<Void, DaggerError> {
3399        let mut query = self.selection.select("up");
3400        if let Some(random) = opts.random {
3401            query = query.arg("random", random);
3402        }
3403        if let Some(ports) = opts.ports {
3404            query = query.arg("ports", ports);
3405        }
3406        if let Some(args) = opts.args {
3407            query = query.arg("args", args);
3408        }
3409        if let Some(use_entrypoint) = opts.use_entrypoint {
3410            query = query.arg("useEntrypoint", use_entrypoint);
3411        }
3412        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
3413            query = query.arg(
3414                "experimentalPrivilegedNesting",
3415                experimental_privileged_nesting,
3416            );
3417        }
3418        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
3419            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
3420        }
3421        if let Some(expand) = opts.expand {
3422            query = query.arg("expand", expand);
3423        }
3424        if let Some(no_init) = opts.no_init {
3425            query = query.arg("noInit", no_init);
3426        }
3427        query.execute(self.graphql_client.clone()).await
3428    }
3429    /// Retrieves the user to be set for all commands.
3430    pub async fn user(&self) -> Result<String, DaggerError> {
3431        let query = self.selection.select("user");
3432        query.execute(self.graphql_client.clone()).await
3433    }
3434    /// Retrieves this container plus the given OCI anotation.
3435    ///
3436    /// # Arguments
3437    ///
3438    /// * `name` - The name of the annotation.
3439    /// * `value` - The value of the annotation.
3440    pub fn with_annotation(&self, name: impl Into<String>, value: impl Into<String>) -> Container {
3441        let mut query = self.selection.select("withAnnotation");
3442        query = query.arg("name", name.into());
3443        query = query.arg("value", value.into());
3444        Container {
3445            proc: self.proc.clone(),
3446            selection: query,
3447            graphql_client: self.graphql_client.clone(),
3448        }
3449    }
3450    /// Configures default arguments for future commands. Like CMD in Dockerfile.
3451    ///
3452    /// # Arguments
3453    ///
3454    /// * `args` - Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]).
3455    pub fn with_default_args(&self, args: Vec<impl Into<String>>) -> Container {
3456        let mut query = self.selection.select("withDefaultArgs");
3457        query = query.arg(
3458            "args",
3459            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3460        );
3461        Container {
3462            proc: self.proc.clone(),
3463            selection: query,
3464            graphql_client: self.graphql_client.clone(),
3465        }
3466    }
3467    /// Set the default command to invoke for the container's terminal API.
3468    ///
3469    /// # Arguments
3470    ///
3471    /// * `args` - The args of the command.
3472    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3473    pub fn with_default_terminal_cmd(&self, args: Vec<impl Into<String>>) -> Container {
3474        let mut query = self.selection.select("withDefaultTerminalCmd");
3475        query = query.arg(
3476            "args",
3477            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3478        );
3479        Container {
3480            proc: self.proc.clone(),
3481            selection: query,
3482            graphql_client: self.graphql_client.clone(),
3483        }
3484    }
3485    /// Set the default command to invoke for the container's terminal API.
3486    ///
3487    /// # Arguments
3488    ///
3489    /// * `args` - The args of the command.
3490    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3491    pub fn with_default_terminal_cmd_opts(
3492        &self,
3493        args: Vec<impl Into<String>>,
3494        opts: ContainerWithDefaultTerminalCmdOpts,
3495    ) -> Container {
3496        let mut query = self.selection.select("withDefaultTerminalCmd");
3497        query = query.arg(
3498            "args",
3499            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3500        );
3501        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
3502            query = query.arg(
3503                "experimentalPrivilegedNesting",
3504                experimental_privileged_nesting,
3505            );
3506        }
3507        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
3508            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
3509        }
3510        Container {
3511            proc: self.proc.clone(),
3512            selection: query,
3513            graphql_client: self.graphql_client.clone(),
3514        }
3515    }
3516    /// Return a new container snapshot, with a directory added to its filesystem
3517    ///
3518    /// # Arguments
3519    ///
3520    /// * `path` - Location of the written directory (e.g., "/tmp/directory").
3521    /// * `directory` - Identifier of the directory to write
3522    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3523    pub fn with_directory(
3524        &self,
3525        path: impl Into<String>,
3526        directory: impl IntoID<DirectoryId>,
3527    ) -> Container {
3528        let mut query = self.selection.select("withDirectory");
3529        query = query.arg("path", path.into());
3530        query = query.arg_lazy(
3531            "directory",
3532            Box::new(move || {
3533                let directory = directory.clone();
3534                Box::pin(async move { directory.into_id().await.unwrap().quote() })
3535            }),
3536        );
3537        Container {
3538            proc: self.proc.clone(),
3539            selection: query,
3540            graphql_client: self.graphql_client.clone(),
3541        }
3542    }
3543    /// Return a new container snapshot, with a directory added to its filesystem
3544    ///
3545    /// # Arguments
3546    ///
3547    /// * `path` - Location of the written directory (e.g., "/tmp/directory").
3548    /// * `directory` - Identifier of the directory to write
3549    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3550    pub fn with_directory_opts<'a>(
3551        &self,
3552        path: impl Into<String>,
3553        directory: impl IntoID<DirectoryId>,
3554        opts: ContainerWithDirectoryOpts<'a>,
3555    ) -> Container {
3556        let mut query = self.selection.select("withDirectory");
3557        query = query.arg("path", path.into());
3558        query = query.arg_lazy(
3559            "directory",
3560            Box::new(move || {
3561                let directory = directory.clone();
3562                Box::pin(async move { directory.into_id().await.unwrap().quote() })
3563            }),
3564        );
3565        if let Some(exclude) = opts.exclude {
3566            query = query.arg("exclude", exclude);
3567        }
3568        if let Some(include) = opts.include {
3569            query = query.arg("include", include);
3570        }
3571        if let Some(owner) = opts.owner {
3572            query = query.arg("owner", owner);
3573        }
3574        if let Some(expand) = opts.expand {
3575            query = query.arg("expand", expand);
3576        }
3577        Container {
3578            proc: self.proc.clone(),
3579            selection: query,
3580            graphql_client: self.graphql_client.clone(),
3581        }
3582    }
3583    /// Set an OCI-style entrypoint. It will be included in the container's OCI configuration. Note, withExec ignores the entrypoint by default.
3584    ///
3585    /// # Arguments
3586    ///
3587    /// * `args` - Arguments of the entrypoint. Example: ["go", "run"].
3588    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3589    pub fn with_entrypoint(&self, args: Vec<impl Into<String>>) -> Container {
3590        let mut query = self.selection.select("withEntrypoint");
3591        query = query.arg(
3592            "args",
3593            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3594        );
3595        Container {
3596            proc: self.proc.clone(),
3597            selection: query,
3598            graphql_client: self.graphql_client.clone(),
3599        }
3600    }
3601    /// Set an OCI-style entrypoint. It will be included in the container's OCI configuration. Note, withExec ignores the entrypoint by default.
3602    ///
3603    /// # Arguments
3604    ///
3605    /// * `args` - Arguments of the entrypoint. Example: ["go", "run"].
3606    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3607    pub fn with_entrypoint_opts(
3608        &self,
3609        args: Vec<impl Into<String>>,
3610        opts: ContainerWithEntrypointOpts,
3611    ) -> Container {
3612        let mut query = self.selection.select("withEntrypoint");
3613        query = query.arg(
3614            "args",
3615            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3616        );
3617        if let Some(keep_default_args) = opts.keep_default_args {
3618            query = query.arg("keepDefaultArgs", keep_default_args);
3619        }
3620        Container {
3621            proc: self.proc.clone(),
3622            selection: query,
3623            graphql_client: self.graphql_client.clone(),
3624        }
3625    }
3626    /// Set a new environment variable in the container.
3627    ///
3628    /// # Arguments
3629    ///
3630    /// * `name` - Name of the environment variable (e.g., "HOST").
3631    /// * `value` - Value of the environment variable. (e.g., "localhost").
3632    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3633    pub fn with_env_variable(
3634        &self,
3635        name: impl Into<String>,
3636        value: impl Into<String>,
3637    ) -> Container {
3638        let mut query = self.selection.select("withEnvVariable");
3639        query = query.arg("name", name.into());
3640        query = query.arg("value", value.into());
3641        Container {
3642            proc: self.proc.clone(),
3643            selection: query,
3644            graphql_client: self.graphql_client.clone(),
3645        }
3646    }
3647    /// Set a new environment variable in the container.
3648    ///
3649    /// # Arguments
3650    ///
3651    /// * `name` - Name of the environment variable (e.g., "HOST").
3652    /// * `value` - Value of the environment variable. (e.g., "localhost").
3653    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3654    pub fn with_env_variable_opts(
3655        &self,
3656        name: impl Into<String>,
3657        value: impl Into<String>,
3658        opts: ContainerWithEnvVariableOpts,
3659    ) -> Container {
3660        let mut query = self.selection.select("withEnvVariable");
3661        query = query.arg("name", name.into());
3662        query = query.arg("value", value.into());
3663        if let Some(expand) = opts.expand {
3664            query = query.arg("expand", expand);
3665        }
3666        Container {
3667            proc: self.proc.clone(),
3668            selection: query,
3669            graphql_client: self.graphql_client.clone(),
3670        }
3671    }
3672    /// Execute a command in the container, and return a new snapshot of the container state after execution.
3673    ///
3674    /// # Arguments
3675    ///
3676    /// * `args` - Command to execute. Must be valid exec() arguments, not a shell command. Example: ["go", "run", "main.go"].
3677    ///
3678    /// To run a shell command, execute the shell and pass the shell command as argument. Example: ["sh", "-c", "ls -l | grep foo"]
3679    ///
3680    /// Defaults to the container's default arguments (see "defaultArgs" and "withDefaultArgs").
3681    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3682    pub fn with_exec(&self, args: Vec<impl Into<String>>) -> Container {
3683        let mut query = self.selection.select("withExec");
3684        query = query.arg(
3685            "args",
3686            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3687        );
3688        Container {
3689            proc: self.proc.clone(),
3690            selection: query,
3691            graphql_client: self.graphql_client.clone(),
3692        }
3693    }
3694    /// Execute a command in the container, and return a new snapshot of the container state after execution.
3695    ///
3696    /// # Arguments
3697    ///
3698    /// * `args` - Command to execute. Must be valid exec() arguments, not a shell command. Example: ["go", "run", "main.go"].
3699    ///
3700    /// To run a shell command, execute the shell and pass the shell command as argument. Example: ["sh", "-c", "ls -l | grep foo"]
3701    ///
3702    /// Defaults to the container's default arguments (see "defaultArgs" and "withDefaultArgs").
3703    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3704    pub fn with_exec_opts<'a>(
3705        &self,
3706        args: Vec<impl Into<String>>,
3707        opts: ContainerWithExecOpts<'a>,
3708    ) -> Container {
3709        let mut query = self.selection.select("withExec");
3710        query = query.arg(
3711            "args",
3712            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3713        );
3714        if let Some(use_entrypoint) = opts.use_entrypoint {
3715            query = query.arg("useEntrypoint", use_entrypoint);
3716        }
3717        if let Some(stdin) = opts.stdin {
3718            query = query.arg("stdin", stdin);
3719        }
3720        if let Some(redirect_stdin) = opts.redirect_stdin {
3721            query = query.arg("redirectStdin", redirect_stdin);
3722        }
3723        if let Some(redirect_stdout) = opts.redirect_stdout {
3724            query = query.arg("redirectStdout", redirect_stdout);
3725        }
3726        if let Some(redirect_stderr) = opts.redirect_stderr {
3727            query = query.arg("redirectStderr", redirect_stderr);
3728        }
3729        if let Some(expect) = opts.expect {
3730            query = query.arg("expect", expect);
3731        }
3732        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
3733            query = query.arg(
3734                "experimentalPrivilegedNesting",
3735                experimental_privileged_nesting,
3736            );
3737        }
3738        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
3739            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
3740        }
3741        if let Some(expand) = opts.expand {
3742            query = query.arg("expand", expand);
3743        }
3744        if let Some(no_init) = opts.no_init {
3745            query = query.arg("noInit", no_init);
3746        }
3747        Container {
3748            proc: self.proc.clone(),
3749            selection: query,
3750            graphql_client: self.graphql_client.clone(),
3751        }
3752    }
3753    /// Expose a network port. Like EXPOSE in Dockerfile (but with healthcheck support)
3754    /// Exposed ports serve two purposes:
3755    /// - For health checks and introspection, when running services
3756    /// - For setting the EXPOSE OCI field when publishing the container
3757    ///
3758    /// # Arguments
3759    ///
3760    /// * `port` - Port number to expose. Example: 8080
3761    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3762    pub fn with_exposed_port(&self, port: isize) -> Container {
3763        let mut query = self.selection.select("withExposedPort");
3764        query = query.arg("port", port);
3765        Container {
3766            proc: self.proc.clone(),
3767            selection: query,
3768            graphql_client: self.graphql_client.clone(),
3769        }
3770    }
3771    /// Expose a network port. Like EXPOSE in Dockerfile (but with healthcheck support)
3772    /// Exposed ports serve two purposes:
3773    /// - For health checks and introspection, when running services
3774    /// - For setting the EXPOSE OCI field when publishing the container
3775    ///
3776    /// # Arguments
3777    ///
3778    /// * `port` - Port number to expose. Example: 8080
3779    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3780    pub fn with_exposed_port_opts<'a>(
3781        &self,
3782        port: isize,
3783        opts: ContainerWithExposedPortOpts<'a>,
3784    ) -> Container {
3785        let mut query = self.selection.select("withExposedPort");
3786        query = query.arg("port", port);
3787        if let Some(protocol) = opts.protocol {
3788            query = query.arg("protocol", protocol);
3789        }
3790        if let Some(description) = opts.description {
3791            query = query.arg("description", description);
3792        }
3793        if let Some(experimental_skip_healthcheck) = opts.experimental_skip_healthcheck {
3794            query = query.arg("experimentalSkipHealthcheck", experimental_skip_healthcheck);
3795        }
3796        Container {
3797            proc: self.proc.clone(),
3798            selection: query,
3799            graphql_client: self.graphql_client.clone(),
3800        }
3801    }
3802    /// Return a container snapshot with a file added
3803    ///
3804    /// # Arguments
3805    ///
3806    /// * `path` - Path of the new file. Example: "/path/to/new-file.txt"
3807    /// * `source` - File to add
3808    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3809    pub fn with_file(&self, path: impl Into<String>, source: impl IntoID<FileId>) -> Container {
3810        let mut query = self.selection.select("withFile");
3811        query = query.arg("path", path.into());
3812        query = query.arg_lazy(
3813            "source",
3814            Box::new(move || {
3815                let source = source.clone();
3816                Box::pin(async move { source.into_id().await.unwrap().quote() })
3817            }),
3818        );
3819        Container {
3820            proc: self.proc.clone(),
3821            selection: query,
3822            graphql_client: self.graphql_client.clone(),
3823        }
3824    }
3825    /// Return a container snapshot with a file added
3826    ///
3827    /// # Arguments
3828    ///
3829    /// * `path` - Path of the new file. Example: "/path/to/new-file.txt"
3830    /// * `source` - File to add
3831    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3832    pub fn with_file_opts<'a>(
3833        &self,
3834        path: impl Into<String>,
3835        source: impl IntoID<FileId>,
3836        opts: ContainerWithFileOpts<'a>,
3837    ) -> Container {
3838        let mut query = self.selection.select("withFile");
3839        query = query.arg("path", path.into());
3840        query = query.arg_lazy(
3841            "source",
3842            Box::new(move || {
3843                let source = source.clone();
3844                Box::pin(async move { source.into_id().await.unwrap().quote() })
3845            }),
3846        );
3847        if let Some(permissions) = opts.permissions {
3848            query = query.arg("permissions", permissions);
3849        }
3850        if let Some(owner) = opts.owner {
3851            query = query.arg("owner", owner);
3852        }
3853        if let Some(expand) = opts.expand {
3854            query = query.arg("expand", expand);
3855        }
3856        Container {
3857            proc: self.proc.clone(),
3858            selection: query,
3859            graphql_client: self.graphql_client.clone(),
3860        }
3861    }
3862    /// Retrieves this container plus the contents of the given files copied to the given path.
3863    ///
3864    /// # Arguments
3865    ///
3866    /// * `path` - Location where copied files should be placed (e.g., "/src").
3867    /// * `sources` - Identifiers of the files to copy.
3868    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3869    pub fn with_files(&self, path: impl Into<String>, sources: Vec<FileId>) -> Container {
3870        let mut query = self.selection.select("withFiles");
3871        query = query.arg("path", path.into());
3872        query = query.arg("sources", sources);
3873        Container {
3874            proc: self.proc.clone(),
3875            selection: query,
3876            graphql_client: self.graphql_client.clone(),
3877        }
3878    }
3879    /// Retrieves this container plus the contents of the given files copied to the given path.
3880    ///
3881    /// # Arguments
3882    ///
3883    /// * `path` - Location where copied files should be placed (e.g., "/src").
3884    /// * `sources` - Identifiers of the files to copy.
3885    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3886    pub fn with_files_opts<'a>(
3887        &self,
3888        path: impl Into<String>,
3889        sources: Vec<FileId>,
3890        opts: ContainerWithFilesOpts<'a>,
3891    ) -> Container {
3892        let mut query = self.selection.select("withFiles");
3893        query = query.arg("path", path.into());
3894        query = query.arg("sources", sources);
3895        if let Some(permissions) = opts.permissions {
3896            query = query.arg("permissions", permissions);
3897        }
3898        if let Some(owner) = opts.owner {
3899            query = query.arg("owner", owner);
3900        }
3901        if let Some(expand) = opts.expand {
3902            query = query.arg("expand", expand);
3903        }
3904        Container {
3905            proc: self.proc.clone(),
3906            selection: query,
3907            graphql_client: self.graphql_client.clone(),
3908        }
3909    }
3910    /// Retrieves this container plus the given label.
3911    ///
3912    /// # Arguments
3913    ///
3914    /// * `name` - The name of the label (e.g., "org.opencontainers.artifact.created").
3915    /// * `value` - The value of the label (e.g., "2023-01-01T00:00:00Z").
3916    pub fn with_label(&self, name: impl Into<String>, value: impl Into<String>) -> Container {
3917        let mut query = self.selection.select("withLabel");
3918        query = query.arg("name", name.into());
3919        query = query.arg("value", value.into());
3920        Container {
3921            proc: self.proc.clone(),
3922            selection: query,
3923            graphql_client: self.graphql_client.clone(),
3924        }
3925    }
3926    /// Retrieves this container plus a cache volume mounted at the given path.
3927    ///
3928    /// # Arguments
3929    ///
3930    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
3931    /// * `cache` - Identifier of the cache volume to mount.
3932    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3933    pub fn with_mounted_cache(
3934        &self,
3935        path: impl Into<String>,
3936        cache: impl IntoID<CacheVolumeId>,
3937    ) -> Container {
3938        let mut query = self.selection.select("withMountedCache");
3939        query = query.arg("path", path.into());
3940        query = query.arg_lazy(
3941            "cache",
3942            Box::new(move || {
3943                let cache = cache.clone();
3944                Box::pin(async move { cache.into_id().await.unwrap().quote() })
3945            }),
3946        );
3947        Container {
3948            proc: self.proc.clone(),
3949            selection: query,
3950            graphql_client: self.graphql_client.clone(),
3951        }
3952    }
3953    /// Retrieves this container plus a cache volume mounted at the given path.
3954    ///
3955    /// # Arguments
3956    ///
3957    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
3958    /// * `cache` - Identifier of the cache volume to mount.
3959    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3960    pub fn with_mounted_cache_opts<'a>(
3961        &self,
3962        path: impl Into<String>,
3963        cache: impl IntoID<CacheVolumeId>,
3964        opts: ContainerWithMountedCacheOpts<'a>,
3965    ) -> Container {
3966        let mut query = self.selection.select("withMountedCache");
3967        query = query.arg("path", path.into());
3968        query = query.arg_lazy(
3969            "cache",
3970            Box::new(move || {
3971                let cache = cache.clone();
3972                Box::pin(async move { cache.into_id().await.unwrap().quote() })
3973            }),
3974        );
3975        if let Some(source) = opts.source {
3976            query = query.arg("source", source);
3977        }
3978        if let Some(sharing) = opts.sharing {
3979            query = query.arg("sharing", sharing);
3980        }
3981        if let Some(owner) = opts.owner {
3982            query = query.arg("owner", owner);
3983        }
3984        if let Some(expand) = opts.expand {
3985            query = query.arg("expand", expand);
3986        }
3987        Container {
3988            proc: self.proc.clone(),
3989            selection: query,
3990            graphql_client: self.graphql_client.clone(),
3991        }
3992    }
3993    /// Retrieves this container plus a directory mounted at the given path.
3994    ///
3995    /// # Arguments
3996    ///
3997    /// * `path` - Location of the mounted directory (e.g., "/mnt/directory").
3998    /// * `source` - Identifier of the mounted directory.
3999    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4000    pub fn with_mounted_directory(
4001        &self,
4002        path: impl Into<String>,
4003        source: impl IntoID<DirectoryId>,
4004    ) -> Container {
4005        let mut query = self.selection.select("withMountedDirectory");
4006        query = query.arg("path", path.into());
4007        query = query.arg_lazy(
4008            "source",
4009            Box::new(move || {
4010                let source = source.clone();
4011                Box::pin(async move { source.into_id().await.unwrap().quote() })
4012            }),
4013        );
4014        Container {
4015            proc: self.proc.clone(),
4016            selection: query,
4017            graphql_client: self.graphql_client.clone(),
4018        }
4019    }
4020    /// Retrieves this container plus a directory mounted at the given path.
4021    ///
4022    /// # Arguments
4023    ///
4024    /// * `path` - Location of the mounted directory (e.g., "/mnt/directory").
4025    /// * `source` - Identifier of the mounted directory.
4026    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4027    pub fn with_mounted_directory_opts<'a>(
4028        &self,
4029        path: impl Into<String>,
4030        source: impl IntoID<DirectoryId>,
4031        opts: ContainerWithMountedDirectoryOpts<'a>,
4032    ) -> Container {
4033        let mut query = self.selection.select("withMountedDirectory");
4034        query = query.arg("path", path.into());
4035        query = query.arg_lazy(
4036            "source",
4037            Box::new(move || {
4038                let source = source.clone();
4039                Box::pin(async move { source.into_id().await.unwrap().quote() })
4040            }),
4041        );
4042        if let Some(owner) = opts.owner {
4043            query = query.arg("owner", owner);
4044        }
4045        if let Some(expand) = opts.expand {
4046            query = query.arg("expand", expand);
4047        }
4048        Container {
4049            proc: self.proc.clone(),
4050            selection: query,
4051            graphql_client: self.graphql_client.clone(),
4052        }
4053    }
4054    /// Retrieves this container plus a file mounted at the given path.
4055    ///
4056    /// # Arguments
4057    ///
4058    /// * `path` - Location of the mounted file (e.g., "/tmp/file.txt").
4059    /// * `source` - Identifier of the mounted file.
4060    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4061    pub fn with_mounted_file(
4062        &self,
4063        path: impl Into<String>,
4064        source: impl IntoID<FileId>,
4065    ) -> Container {
4066        let mut query = self.selection.select("withMountedFile");
4067        query = query.arg("path", path.into());
4068        query = query.arg_lazy(
4069            "source",
4070            Box::new(move || {
4071                let source = source.clone();
4072                Box::pin(async move { source.into_id().await.unwrap().quote() })
4073            }),
4074        );
4075        Container {
4076            proc: self.proc.clone(),
4077            selection: query,
4078            graphql_client: self.graphql_client.clone(),
4079        }
4080    }
4081    /// Retrieves this container plus a file mounted at the given path.
4082    ///
4083    /// # Arguments
4084    ///
4085    /// * `path` - Location of the mounted file (e.g., "/tmp/file.txt").
4086    /// * `source` - Identifier of the mounted file.
4087    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4088    pub fn with_mounted_file_opts<'a>(
4089        &self,
4090        path: impl Into<String>,
4091        source: impl IntoID<FileId>,
4092        opts: ContainerWithMountedFileOpts<'a>,
4093    ) -> Container {
4094        let mut query = self.selection.select("withMountedFile");
4095        query = query.arg("path", path.into());
4096        query = query.arg_lazy(
4097            "source",
4098            Box::new(move || {
4099                let source = source.clone();
4100                Box::pin(async move { source.into_id().await.unwrap().quote() })
4101            }),
4102        );
4103        if let Some(owner) = opts.owner {
4104            query = query.arg("owner", owner);
4105        }
4106        if let Some(expand) = opts.expand {
4107            query = query.arg("expand", expand);
4108        }
4109        Container {
4110            proc: self.proc.clone(),
4111            selection: query,
4112            graphql_client: self.graphql_client.clone(),
4113        }
4114    }
4115    /// Retrieves this container plus a secret mounted into a file at the given path.
4116    ///
4117    /// # Arguments
4118    ///
4119    /// * `path` - Location of the secret file (e.g., "/tmp/secret.txt").
4120    /// * `source` - Identifier of the secret to mount.
4121    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4122    pub fn with_mounted_secret(
4123        &self,
4124        path: impl Into<String>,
4125        source: impl IntoID<SecretId>,
4126    ) -> Container {
4127        let mut query = self.selection.select("withMountedSecret");
4128        query = query.arg("path", path.into());
4129        query = query.arg_lazy(
4130            "source",
4131            Box::new(move || {
4132                let source = source.clone();
4133                Box::pin(async move { source.into_id().await.unwrap().quote() })
4134            }),
4135        );
4136        Container {
4137            proc: self.proc.clone(),
4138            selection: query,
4139            graphql_client: self.graphql_client.clone(),
4140        }
4141    }
4142    /// Retrieves this container plus a secret mounted into a file at the given path.
4143    ///
4144    /// # Arguments
4145    ///
4146    /// * `path` - Location of the secret file (e.g., "/tmp/secret.txt").
4147    /// * `source` - Identifier of the secret to mount.
4148    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4149    pub fn with_mounted_secret_opts<'a>(
4150        &self,
4151        path: impl Into<String>,
4152        source: impl IntoID<SecretId>,
4153        opts: ContainerWithMountedSecretOpts<'a>,
4154    ) -> Container {
4155        let mut query = self.selection.select("withMountedSecret");
4156        query = query.arg("path", path.into());
4157        query = query.arg_lazy(
4158            "source",
4159            Box::new(move || {
4160                let source = source.clone();
4161                Box::pin(async move { source.into_id().await.unwrap().quote() })
4162            }),
4163        );
4164        if let Some(owner) = opts.owner {
4165            query = query.arg("owner", owner);
4166        }
4167        if let Some(mode) = opts.mode {
4168            query = query.arg("mode", mode);
4169        }
4170        if let Some(expand) = opts.expand {
4171            query = query.arg("expand", expand);
4172        }
4173        Container {
4174            proc: self.proc.clone(),
4175            selection: query,
4176            graphql_client: self.graphql_client.clone(),
4177        }
4178    }
4179    /// 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.
4180    ///
4181    /// # Arguments
4182    ///
4183    /// * `path` - Location of the temporary directory (e.g., "/tmp/temp_dir").
4184    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4185    pub fn with_mounted_temp(&self, path: impl Into<String>) -> Container {
4186        let mut query = self.selection.select("withMountedTemp");
4187        query = query.arg("path", path.into());
4188        Container {
4189            proc: self.proc.clone(),
4190            selection: query,
4191            graphql_client: self.graphql_client.clone(),
4192        }
4193    }
4194    /// 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.
4195    ///
4196    /// # Arguments
4197    ///
4198    /// * `path` - Location of the temporary directory (e.g., "/tmp/temp_dir").
4199    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4200    pub fn with_mounted_temp_opts(
4201        &self,
4202        path: impl Into<String>,
4203        opts: ContainerWithMountedTempOpts,
4204    ) -> Container {
4205        let mut query = self.selection.select("withMountedTemp");
4206        query = query.arg("path", path.into());
4207        if let Some(size) = opts.size {
4208            query = query.arg("size", size);
4209        }
4210        if let Some(expand) = opts.expand {
4211            query = query.arg("expand", expand);
4212        }
4213        Container {
4214            proc: self.proc.clone(),
4215            selection: query,
4216            graphql_client: self.graphql_client.clone(),
4217        }
4218    }
4219    /// Return a new container snapshot, with a file added to its filesystem with text content
4220    ///
4221    /// # Arguments
4222    ///
4223    /// * `path` - Path of the new file. May be relative or absolute. Example: "README.md" or "/etc/profile"
4224    /// * `contents` - Contents of the new file. Example: "Hello world!"
4225    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4226    pub fn with_new_file(&self, path: impl Into<String>, contents: impl Into<String>) -> Container {
4227        let mut query = self.selection.select("withNewFile");
4228        query = query.arg("path", path.into());
4229        query = query.arg("contents", contents.into());
4230        Container {
4231            proc: self.proc.clone(),
4232            selection: query,
4233            graphql_client: self.graphql_client.clone(),
4234        }
4235    }
4236    /// Return a new container snapshot, with a file added to its filesystem with text content
4237    ///
4238    /// # Arguments
4239    ///
4240    /// * `path` - Path of the new file. May be relative or absolute. Example: "README.md" or "/etc/profile"
4241    /// * `contents` - Contents of the new file. Example: "Hello world!"
4242    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4243    pub fn with_new_file_opts<'a>(
4244        &self,
4245        path: impl Into<String>,
4246        contents: impl Into<String>,
4247        opts: ContainerWithNewFileOpts<'a>,
4248    ) -> Container {
4249        let mut query = self.selection.select("withNewFile");
4250        query = query.arg("path", path.into());
4251        query = query.arg("contents", contents.into());
4252        if let Some(permissions) = opts.permissions {
4253            query = query.arg("permissions", permissions);
4254        }
4255        if let Some(owner) = opts.owner {
4256            query = query.arg("owner", owner);
4257        }
4258        if let Some(expand) = opts.expand {
4259            query = query.arg("expand", expand);
4260        }
4261        Container {
4262            proc: self.proc.clone(),
4263            selection: query,
4264            graphql_client: self.graphql_client.clone(),
4265        }
4266    }
4267    /// Attach credentials for future publishing to a registry. Use in combination with publish
4268    ///
4269    /// # Arguments
4270    ///
4271    /// * `address` - The image address that needs authentication. Same format as "docker push". Example: "registry.dagger.io/dagger:latest"
4272    /// * `username` - The username to authenticate with. Example: "alice"
4273    /// * `secret` - The API key, password or token to authenticate to this registry
4274    pub fn with_registry_auth(
4275        &self,
4276        address: impl Into<String>,
4277        username: impl Into<String>,
4278        secret: impl IntoID<SecretId>,
4279    ) -> Container {
4280        let mut query = self.selection.select("withRegistryAuth");
4281        query = query.arg("address", address.into());
4282        query = query.arg("username", username.into());
4283        query = query.arg_lazy(
4284            "secret",
4285            Box::new(move || {
4286                let secret = secret.clone();
4287                Box::pin(async move { secret.into_id().await.unwrap().quote() })
4288            }),
4289        );
4290        Container {
4291            proc: self.proc.clone(),
4292            selection: query,
4293            graphql_client: self.graphql_client.clone(),
4294        }
4295    }
4296    /// Change the container's root filesystem. The previous root filesystem will be lost.
4297    ///
4298    /// # Arguments
4299    ///
4300    /// * `directory` - The new root filesystem.
4301    pub fn with_rootfs(&self, directory: impl IntoID<DirectoryId>) -> Container {
4302        let mut query = self.selection.select("withRootfs");
4303        query = query.arg_lazy(
4304            "directory",
4305            Box::new(move || {
4306                let directory = directory.clone();
4307                Box::pin(async move { directory.into_id().await.unwrap().quote() })
4308            }),
4309        );
4310        Container {
4311            proc: self.proc.clone(),
4312            selection: query,
4313            graphql_client: self.graphql_client.clone(),
4314        }
4315    }
4316    /// Set a new environment variable, using a secret value
4317    ///
4318    /// # Arguments
4319    ///
4320    /// * `name` - Name of the secret variable (e.g., "API_SECRET").
4321    /// * `secret` - Identifier of the secret value.
4322    pub fn with_secret_variable(
4323        &self,
4324        name: impl Into<String>,
4325        secret: impl IntoID<SecretId>,
4326    ) -> Container {
4327        let mut query = self.selection.select("withSecretVariable");
4328        query = query.arg("name", name.into());
4329        query = query.arg_lazy(
4330            "secret",
4331            Box::new(move || {
4332                let secret = secret.clone();
4333                Box::pin(async move { secret.into_id().await.unwrap().quote() })
4334            }),
4335        );
4336        Container {
4337            proc: self.proc.clone(),
4338            selection: query,
4339            graphql_client: self.graphql_client.clone(),
4340        }
4341    }
4342    /// Establish a runtime dependency from a container to a network service.
4343    /// The service will be started automatically when needed and detached when it is no longer needed, executing the default command if none is set.
4344    /// The service will be reachable from the container via the provided hostname alias.
4345    /// The service dependency will also convey to any files or directories produced by the container.
4346    ///
4347    /// # Arguments
4348    ///
4349    /// * `alias` - Hostname that will resolve to the target service (only accessible from within this container)
4350    /// * `service` - The target service
4351    pub fn with_service_binding(
4352        &self,
4353        alias: impl Into<String>,
4354        service: impl IntoID<ServiceId>,
4355    ) -> Container {
4356        let mut query = self.selection.select("withServiceBinding");
4357        query = query.arg("alias", alias.into());
4358        query = query.arg_lazy(
4359            "service",
4360            Box::new(move || {
4361                let service = service.clone();
4362                Box::pin(async move { service.into_id().await.unwrap().quote() })
4363            }),
4364        );
4365        Container {
4366            proc: self.proc.clone(),
4367            selection: query,
4368            graphql_client: self.graphql_client.clone(),
4369        }
4370    }
4371    /// Return a snapshot with a symlink
4372    ///
4373    /// # Arguments
4374    ///
4375    /// * `target` - Location of the file or directory to link to (e.g., "/existing/file").
4376    /// * `link_name` - Location where the symbolic link will be created (e.g., "/new-file-link").
4377    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4378    pub fn with_symlink(
4379        &self,
4380        target: impl Into<String>,
4381        link_name: impl Into<String>,
4382    ) -> Container {
4383        let mut query = self.selection.select("withSymlink");
4384        query = query.arg("target", target.into());
4385        query = query.arg("linkName", link_name.into());
4386        Container {
4387            proc: self.proc.clone(),
4388            selection: query,
4389            graphql_client: self.graphql_client.clone(),
4390        }
4391    }
4392    /// Return a snapshot with a symlink
4393    ///
4394    /// # Arguments
4395    ///
4396    /// * `target` - Location of the file or directory to link to (e.g., "/existing/file").
4397    /// * `link_name` - Location where the symbolic link will be created (e.g., "/new-file-link").
4398    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4399    pub fn with_symlink_opts(
4400        &self,
4401        target: impl Into<String>,
4402        link_name: impl Into<String>,
4403        opts: ContainerWithSymlinkOpts,
4404    ) -> Container {
4405        let mut query = self.selection.select("withSymlink");
4406        query = query.arg("target", target.into());
4407        query = query.arg("linkName", link_name.into());
4408        if let Some(expand) = opts.expand {
4409            query = query.arg("expand", expand);
4410        }
4411        Container {
4412            proc: self.proc.clone(),
4413            selection: query,
4414            graphql_client: self.graphql_client.clone(),
4415        }
4416    }
4417    /// Retrieves this container plus a socket forwarded to the given Unix socket path.
4418    ///
4419    /// # Arguments
4420    ///
4421    /// * `path` - Location of the forwarded Unix socket (e.g., "/tmp/socket").
4422    /// * `source` - Identifier of the socket to forward.
4423    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4424    pub fn with_unix_socket(
4425        &self,
4426        path: impl Into<String>,
4427        source: impl IntoID<SocketId>,
4428    ) -> Container {
4429        let mut query = self.selection.select("withUnixSocket");
4430        query = query.arg("path", path.into());
4431        query = query.arg_lazy(
4432            "source",
4433            Box::new(move || {
4434                let source = source.clone();
4435                Box::pin(async move { source.into_id().await.unwrap().quote() })
4436            }),
4437        );
4438        Container {
4439            proc: self.proc.clone(),
4440            selection: query,
4441            graphql_client: self.graphql_client.clone(),
4442        }
4443    }
4444    /// Retrieves this container plus a socket forwarded to the given Unix socket path.
4445    ///
4446    /// # Arguments
4447    ///
4448    /// * `path` - Location of the forwarded Unix socket (e.g., "/tmp/socket").
4449    /// * `source` - Identifier of the socket to forward.
4450    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4451    pub fn with_unix_socket_opts<'a>(
4452        &self,
4453        path: impl Into<String>,
4454        source: impl IntoID<SocketId>,
4455        opts: ContainerWithUnixSocketOpts<'a>,
4456    ) -> Container {
4457        let mut query = self.selection.select("withUnixSocket");
4458        query = query.arg("path", path.into());
4459        query = query.arg_lazy(
4460            "source",
4461            Box::new(move || {
4462                let source = source.clone();
4463                Box::pin(async move { source.into_id().await.unwrap().quote() })
4464            }),
4465        );
4466        if let Some(owner) = opts.owner {
4467            query = query.arg("owner", owner);
4468        }
4469        if let Some(expand) = opts.expand {
4470            query = query.arg("expand", expand);
4471        }
4472        Container {
4473            proc: self.proc.clone(),
4474            selection: query,
4475            graphql_client: self.graphql_client.clone(),
4476        }
4477    }
4478    /// Retrieves this container with a different command user.
4479    ///
4480    /// # Arguments
4481    ///
4482    /// * `name` - The user to set (e.g., "root").
4483    pub fn with_user(&self, name: impl Into<String>) -> Container {
4484        let mut query = self.selection.select("withUser");
4485        query = query.arg("name", name.into());
4486        Container {
4487            proc: self.proc.clone(),
4488            selection: query,
4489            graphql_client: self.graphql_client.clone(),
4490        }
4491    }
4492    /// Change the container's working directory. Like WORKDIR in Dockerfile.
4493    ///
4494    /// # Arguments
4495    ///
4496    /// * `path` - The path to set as the working directory (e.g., "/app").
4497    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4498    pub fn with_workdir(&self, path: impl Into<String>) -> Container {
4499        let mut query = self.selection.select("withWorkdir");
4500        query = query.arg("path", path.into());
4501        Container {
4502            proc: self.proc.clone(),
4503            selection: query,
4504            graphql_client: self.graphql_client.clone(),
4505        }
4506    }
4507    /// Change the container's working directory. Like WORKDIR in Dockerfile.
4508    ///
4509    /// # Arguments
4510    ///
4511    /// * `path` - The path to set as the working directory (e.g., "/app").
4512    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4513    pub fn with_workdir_opts(
4514        &self,
4515        path: impl Into<String>,
4516        opts: ContainerWithWorkdirOpts,
4517    ) -> Container {
4518        let mut query = self.selection.select("withWorkdir");
4519        query = query.arg("path", path.into());
4520        if let Some(expand) = opts.expand {
4521            query = query.arg("expand", expand);
4522        }
4523        Container {
4524            proc: self.proc.clone(),
4525            selection: query,
4526            graphql_client: self.graphql_client.clone(),
4527        }
4528    }
4529    /// Retrieves this container minus the given OCI annotation.
4530    ///
4531    /// # Arguments
4532    ///
4533    /// * `name` - The name of the annotation.
4534    pub fn without_annotation(&self, name: impl Into<String>) -> Container {
4535        let mut query = self.selection.select("withoutAnnotation");
4536        query = query.arg("name", name.into());
4537        Container {
4538            proc: self.proc.clone(),
4539            selection: query,
4540            graphql_client: self.graphql_client.clone(),
4541        }
4542    }
4543    /// Remove the container's default arguments.
4544    pub fn without_default_args(&self) -> Container {
4545        let query = self.selection.select("withoutDefaultArgs");
4546        Container {
4547            proc: self.proc.clone(),
4548            selection: query,
4549            graphql_client: self.graphql_client.clone(),
4550        }
4551    }
4552    /// Return a new container snapshot, with a directory removed from its filesystem
4553    ///
4554    /// # Arguments
4555    ///
4556    /// * `path` - Location of the directory to remove (e.g., ".github/").
4557    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4558    pub fn without_directory(&self, path: impl Into<String>) -> Container {
4559        let mut query = self.selection.select("withoutDirectory");
4560        query = query.arg("path", path.into());
4561        Container {
4562            proc: self.proc.clone(),
4563            selection: query,
4564            graphql_client: self.graphql_client.clone(),
4565        }
4566    }
4567    /// Return a new container snapshot, with a directory removed from its filesystem
4568    ///
4569    /// # Arguments
4570    ///
4571    /// * `path` - Location of the directory to remove (e.g., ".github/").
4572    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4573    pub fn without_directory_opts(
4574        &self,
4575        path: impl Into<String>,
4576        opts: ContainerWithoutDirectoryOpts,
4577    ) -> Container {
4578        let mut query = self.selection.select("withoutDirectory");
4579        query = query.arg("path", path.into());
4580        if let Some(expand) = opts.expand {
4581            query = query.arg("expand", expand);
4582        }
4583        Container {
4584            proc: self.proc.clone(),
4585            selection: query,
4586            graphql_client: self.graphql_client.clone(),
4587        }
4588    }
4589    /// Reset the container's OCI entrypoint.
4590    ///
4591    /// # Arguments
4592    ///
4593    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4594    pub fn without_entrypoint(&self) -> Container {
4595        let query = self.selection.select("withoutEntrypoint");
4596        Container {
4597            proc: self.proc.clone(),
4598            selection: query,
4599            graphql_client: self.graphql_client.clone(),
4600        }
4601    }
4602    /// Reset the container's OCI entrypoint.
4603    ///
4604    /// # Arguments
4605    ///
4606    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4607    pub fn without_entrypoint_opts(&self, opts: ContainerWithoutEntrypointOpts) -> Container {
4608        let mut query = self.selection.select("withoutEntrypoint");
4609        if let Some(keep_default_args) = opts.keep_default_args {
4610            query = query.arg("keepDefaultArgs", keep_default_args);
4611        }
4612        Container {
4613            proc: self.proc.clone(),
4614            selection: query,
4615            graphql_client: self.graphql_client.clone(),
4616        }
4617    }
4618    /// Retrieves this container minus the given environment variable.
4619    ///
4620    /// # Arguments
4621    ///
4622    /// * `name` - The name of the environment variable (e.g., "HOST").
4623    pub fn without_env_variable(&self, name: impl Into<String>) -> Container {
4624        let mut query = self.selection.select("withoutEnvVariable");
4625        query = query.arg("name", name.into());
4626        Container {
4627            proc: self.proc.clone(),
4628            selection: query,
4629            graphql_client: self.graphql_client.clone(),
4630        }
4631    }
4632    /// Unexpose a previously exposed port.
4633    ///
4634    /// # Arguments
4635    ///
4636    /// * `port` - Port number to unexpose
4637    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4638    pub fn without_exposed_port(&self, port: isize) -> Container {
4639        let mut query = self.selection.select("withoutExposedPort");
4640        query = query.arg("port", port);
4641        Container {
4642            proc: self.proc.clone(),
4643            selection: query,
4644            graphql_client: self.graphql_client.clone(),
4645        }
4646    }
4647    /// Unexpose a previously exposed port.
4648    ///
4649    /// # Arguments
4650    ///
4651    /// * `port` - Port number to unexpose
4652    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4653    pub fn without_exposed_port_opts(
4654        &self,
4655        port: isize,
4656        opts: ContainerWithoutExposedPortOpts,
4657    ) -> Container {
4658        let mut query = self.selection.select("withoutExposedPort");
4659        query = query.arg("port", port);
4660        if let Some(protocol) = opts.protocol {
4661            query = query.arg("protocol", protocol);
4662        }
4663        Container {
4664            proc: self.proc.clone(),
4665            selection: query,
4666            graphql_client: self.graphql_client.clone(),
4667        }
4668    }
4669    /// Retrieves this container with the file at the given path removed.
4670    ///
4671    /// # Arguments
4672    ///
4673    /// * `path` - Location of the file to remove (e.g., "/file.txt").
4674    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4675    pub fn without_file(&self, path: impl Into<String>) -> Container {
4676        let mut query = self.selection.select("withoutFile");
4677        query = query.arg("path", path.into());
4678        Container {
4679            proc: self.proc.clone(),
4680            selection: query,
4681            graphql_client: self.graphql_client.clone(),
4682        }
4683    }
4684    /// Retrieves this container with the file at the given path removed.
4685    ///
4686    /// # Arguments
4687    ///
4688    /// * `path` - Location of the file to remove (e.g., "/file.txt").
4689    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4690    pub fn without_file_opts(
4691        &self,
4692        path: impl Into<String>,
4693        opts: ContainerWithoutFileOpts,
4694    ) -> Container {
4695        let mut query = self.selection.select("withoutFile");
4696        query = query.arg("path", path.into());
4697        if let Some(expand) = opts.expand {
4698            query = query.arg("expand", expand);
4699        }
4700        Container {
4701            proc: self.proc.clone(),
4702            selection: query,
4703            graphql_client: self.graphql_client.clone(),
4704        }
4705    }
4706    /// Return a new container spanshot with specified files removed
4707    ///
4708    /// # Arguments
4709    ///
4710    /// * `paths` - Paths of the files to remove. Example: ["foo.txt, "/root/.ssh/config"
4711    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4712    pub fn without_files(&self, paths: Vec<impl Into<String>>) -> Container {
4713        let mut query = self.selection.select("withoutFiles");
4714        query = query.arg(
4715            "paths",
4716            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
4717        );
4718        Container {
4719            proc: self.proc.clone(),
4720            selection: query,
4721            graphql_client: self.graphql_client.clone(),
4722        }
4723    }
4724    /// Return a new container spanshot with specified files removed
4725    ///
4726    /// # Arguments
4727    ///
4728    /// * `paths` - Paths of the files to remove. Example: ["foo.txt, "/root/.ssh/config"
4729    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4730    pub fn without_files_opts(
4731        &self,
4732        paths: Vec<impl Into<String>>,
4733        opts: ContainerWithoutFilesOpts,
4734    ) -> Container {
4735        let mut query = self.selection.select("withoutFiles");
4736        query = query.arg(
4737            "paths",
4738            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
4739        );
4740        if let Some(expand) = opts.expand {
4741            query = query.arg("expand", expand);
4742        }
4743        Container {
4744            proc: self.proc.clone(),
4745            selection: query,
4746            graphql_client: self.graphql_client.clone(),
4747        }
4748    }
4749    /// Retrieves this container minus the given environment label.
4750    ///
4751    /// # Arguments
4752    ///
4753    /// * `name` - The name of the label to remove (e.g., "org.opencontainers.artifact.created").
4754    pub fn without_label(&self, name: impl Into<String>) -> Container {
4755        let mut query = self.selection.select("withoutLabel");
4756        query = query.arg("name", name.into());
4757        Container {
4758            proc: self.proc.clone(),
4759            selection: query,
4760            graphql_client: self.graphql_client.clone(),
4761        }
4762    }
4763    /// Retrieves this container after unmounting everything at the given path.
4764    ///
4765    /// # Arguments
4766    ///
4767    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
4768    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4769    pub fn without_mount(&self, path: impl Into<String>) -> Container {
4770        let mut query = self.selection.select("withoutMount");
4771        query = query.arg("path", path.into());
4772        Container {
4773            proc: self.proc.clone(),
4774            selection: query,
4775            graphql_client: self.graphql_client.clone(),
4776        }
4777    }
4778    /// Retrieves this container after unmounting everything at the given path.
4779    ///
4780    /// # Arguments
4781    ///
4782    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
4783    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4784    pub fn without_mount_opts(
4785        &self,
4786        path: impl Into<String>,
4787        opts: ContainerWithoutMountOpts,
4788    ) -> Container {
4789        let mut query = self.selection.select("withoutMount");
4790        query = query.arg("path", path.into());
4791        if let Some(expand) = opts.expand {
4792            query = query.arg("expand", expand);
4793        }
4794        Container {
4795            proc: self.proc.clone(),
4796            selection: query,
4797            graphql_client: self.graphql_client.clone(),
4798        }
4799    }
4800    /// Retrieves this container without the registry authentication of a given address.
4801    ///
4802    /// # Arguments
4803    ///
4804    /// * `address` - Registry's address to remove the authentication from.
4805    ///
4806    /// Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
4807    pub fn without_registry_auth(&self, address: impl Into<String>) -> Container {
4808        let mut query = self.selection.select("withoutRegistryAuth");
4809        query = query.arg("address", address.into());
4810        Container {
4811            proc: self.proc.clone(),
4812            selection: query,
4813            graphql_client: self.graphql_client.clone(),
4814        }
4815    }
4816    /// Retrieves this container minus the given environment variable containing the secret.
4817    ///
4818    /// # Arguments
4819    ///
4820    /// * `name` - The name of the environment variable (e.g., "HOST").
4821    pub fn without_secret_variable(&self, name: impl Into<String>) -> Container {
4822        let mut query = self.selection.select("withoutSecretVariable");
4823        query = query.arg("name", name.into());
4824        Container {
4825            proc: self.proc.clone(),
4826            selection: query,
4827            graphql_client: self.graphql_client.clone(),
4828        }
4829    }
4830    /// Retrieves this container with a previously added Unix socket removed.
4831    ///
4832    /// # Arguments
4833    ///
4834    /// * `path` - Location of the socket to remove (e.g., "/tmp/socket").
4835    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4836    pub fn without_unix_socket(&self, path: impl Into<String>) -> Container {
4837        let mut query = self.selection.select("withoutUnixSocket");
4838        query = query.arg("path", path.into());
4839        Container {
4840            proc: self.proc.clone(),
4841            selection: query,
4842            graphql_client: self.graphql_client.clone(),
4843        }
4844    }
4845    /// Retrieves this container with a previously added Unix socket removed.
4846    ///
4847    /// # Arguments
4848    ///
4849    /// * `path` - Location of the socket to remove (e.g., "/tmp/socket").
4850    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4851    pub fn without_unix_socket_opts(
4852        &self,
4853        path: impl Into<String>,
4854        opts: ContainerWithoutUnixSocketOpts,
4855    ) -> Container {
4856        let mut query = self.selection.select("withoutUnixSocket");
4857        query = query.arg("path", path.into());
4858        if let Some(expand) = opts.expand {
4859            query = query.arg("expand", expand);
4860        }
4861        Container {
4862            proc: self.proc.clone(),
4863            selection: query,
4864            graphql_client: self.graphql_client.clone(),
4865        }
4866    }
4867    /// Retrieves this container with an unset command user.
4868    /// Should default to root.
4869    pub fn without_user(&self) -> Container {
4870        let query = self.selection.select("withoutUser");
4871        Container {
4872            proc: self.proc.clone(),
4873            selection: query,
4874            graphql_client: self.graphql_client.clone(),
4875        }
4876    }
4877    /// Unset the container's working directory.
4878    /// Should default to "/".
4879    pub fn without_workdir(&self) -> Container {
4880        let query = self.selection.select("withoutWorkdir");
4881        Container {
4882            proc: self.proc.clone(),
4883            selection: query,
4884            graphql_client: self.graphql_client.clone(),
4885        }
4886    }
4887    /// Retrieves the working directory for all commands.
4888    pub async fn workdir(&self) -> Result<String, DaggerError> {
4889        let query = self.selection.select("workdir");
4890        query.execute(self.graphql_client.clone()).await
4891    }
4892}
4893#[derive(Clone)]
4894pub struct CurrentModule {
4895    pub proc: Option<Arc<DaggerSessionProc>>,
4896    pub selection: Selection,
4897    pub graphql_client: DynGraphQLClient,
4898}
4899#[derive(Builder, Debug, PartialEq)]
4900pub struct CurrentModuleWorkdirOpts<'a> {
4901    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
4902    #[builder(setter(into, strip_option), default)]
4903    pub exclude: Option<Vec<&'a str>>,
4904    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
4905    #[builder(setter(into, strip_option), default)]
4906    pub include: Option<Vec<&'a str>>,
4907}
4908impl CurrentModule {
4909    /// A unique identifier for this CurrentModule.
4910    pub async fn id(&self) -> Result<CurrentModuleId, DaggerError> {
4911        let query = self.selection.select("id");
4912        query.execute(self.graphql_client.clone()).await
4913    }
4914    /// The name of the module being executed in
4915    pub async fn name(&self) -> Result<String, DaggerError> {
4916        let query = self.selection.select("name");
4917        query.execute(self.graphql_client.clone()).await
4918    }
4919    /// The directory containing the module's source code loaded into the engine (plus any generated code that may have been created).
4920    pub fn source(&self) -> Directory {
4921        let query = self.selection.select("source");
4922        Directory {
4923            proc: self.proc.clone(),
4924            selection: query,
4925            graphql_client: self.graphql_client.clone(),
4926        }
4927    }
4928    /// Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.
4929    ///
4930    /// # Arguments
4931    ///
4932    /// * `path` - Location of the directory to access (e.g., ".").
4933    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4934    pub fn workdir(&self, path: impl Into<String>) -> Directory {
4935        let mut query = self.selection.select("workdir");
4936        query = query.arg("path", path.into());
4937        Directory {
4938            proc: self.proc.clone(),
4939            selection: query,
4940            graphql_client: self.graphql_client.clone(),
4941        }
4942    }
4943    /// Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.
4944    ///
4945    /// # Arguments
4946    ///
4947    /// * `path` - Location of the directory to access (e.g., ".").
4948    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4949    pub fn workdir_opts<'a>(
4950        &self,
4951        path: impl Into<String>,
4952        opts: CurrentModuleWorkdirOpts<'a>,
4953    ) -> Directory {
4954        let mut query = self.selection.select("workdir");
4955        query = query.arg("path", path.into());
4956        if let Some(exclude) = opts.exclude {
4957            query = query.arg("exclude", exclude);
4958        }
4959        if let Some(include) = opts.include {
4960            query = query.arg("include", include);
4961        }
4962        Directory {
4963            proc: self.proc.clone(),
4964            selection: query,
4965            graphql_client: self.graphql_client.clone(),
4966        }
4967    }
4968    /// 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.
4969    ///
4970    /// # Arguments
4971    ///
4972    /// * `path` - Location of the file to retrieve (e.g., "README.md").
4973    pub fn workdir_file(&self, path: impl Into<String>) -> File {
4974        let mut query = self.selection.select("workdirFile");
4975        query = query.arg("path", path.into());
4976        File {
4977            proc: self.proc.clone(),
4978            selection: query,
4979            graphql_client: self.graphql_client.clone(),
4980        }
4981    }
4982}
4983#[derive(Clone)]
4984pub struct Directory {
4985    pub proc: Option<Arc<DaggerSessionProc>>,
4986    pub selection: Selection,
4987    pub graphql_client: DynGraphQLClient,
4988}
4989#[derive(Builder, Debug, PartialEq)]
4990pub struct DirectoryAsModuleOpts<'a> {
4991    /// An optional subpath of the directory which contains the module's configuration file.
4992    /// If not set, the module source code is loaded from the root of the directory.
4993    #[builder(setter(into, strip_option), default)]
4994    pub source_root_path: Option<&'a str>,
4995}
4996#[derive(Builder, Debug, PartialEq)]
4997pub struct DirectoryAsModuleSourceOpts<'a> {
4998    /// An optional subpath of the directory which contains the module's configuration file.
4999    /// If not set, the module source code is loaded from the root of the directory.
5000    #[builder(setter(into, strip_option), default)]
5001    pub source_root_path: Option<&'a str>,
5002}
5003#[derive(Builder, Debug, PartialEq)]
5004pub struct DirectoryDockerBuildOpts<'a> {
5005    /// Build arguments to use in the build.
5006    #[builder(setter(into, strip_option), default)]
5007    pub build_args: Option<Vec<BuildArg>>,
5008    /// Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
5009    #[builder(setter(into, strip_option), default)]
5010    pub dockerfile: Option<&'a str>,
5011    /// If set, skip the automatic init process injected into containers created by RUN statements.
5012    /// 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.
5013    #[builder(setter(into, strip_option), default)]
5014    pub no_init: Option<bool>,
5015    /// The platform to build.
5016    #[builder(setter(into, strip_option), default)]
5017    pub platform: Option<Platform>,
5018    /// Secrets to pass to the build.
5019    /// They will be mounted at /run/secrets/[secret-name].
5020    #[builder(setter(into, strip_option), default)]
5021    pub secrets: Option<Vec<SecretId>>,
5022    /// Target build stage to build.
5023    #[builder(setter(into, strip_option), default)]
5024    pub target: Option<&'a str>,
5025}
5026#[derive(Builder, Debug, PartialEq)]
5027pub struct DirectoryEntriesOpts<'a> {
5028    /// Location of the directory to look at (e.g., "/src").
5029    #[builder(setter(into, strip_option), default)]
5030    pub path: Option<&'a str>,
5031}
5032#[derive(Builder, Debug, PartialEq)]
5033pub struct DirectoryExistsOpts {
5034    /// If specified, do not follow symlinks.
5035    #[builder(setter(into, strip_option), default)]
5036    pub do_not_follow_symlinks: Option<bool>,
5037    /// If specified, also validate the type of file (e.g. "REGULAR_TYPE", "DIRECTORY_TYPE", or "SYMLINK_TYPE").
5038    #[builder(setter(into, strip_option), default)]
5039    pub expected_type: Option<ExistsType>,
5040}
5041#[derive(Builder, Debug, PartialEq)]
5042pub struct DirectoryExportOpts {
5043    /// 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.
5044    #[builder(setter(into, strip_option), default)]
5045    pub wipe: Option<bool>,
5046}
5047#[derive(Builder, Debug, PartialEq)]
5048pub struct DirectoryFilterOpts<'a> {
5049    /// If set, paths matching one of these glob patterns is excluded from the new snapshot. Example: ["node_modules/", ".git*", ".env"]
5050    #[builder(setter(into, strip_option), default)]
5051    pub exclude: Option<Vec<&'a str>>,
5052    /// If set, only paths matching one of these glob patterns is included in the new snapshot. Example: (e.g., ["app/", "package.*"]).
5053    #[builder(setter(into, strip_option), default)]
5054    pub include: Option<Vec<&'a str>>,
5055}
5056#[derive(Builder, Debug, PartialEq)]
5057pub struct DirectorySearchOpts<'a> {
5058    /// Allow the . pattern to match newlines in multiline mode.
5059    #[builder(setter(into, strip_option), default)]
5060    pub dotall: Option<bool>,
5061    /// Only return matching files, not lines and content
5062    #[builder(setter(into, strip_option), default)]
5063    pub files_only: Option<bool>,
5064    /// Glob patterns to match (e.g., "*.md")
5065    #[builder(setter(into, strip_option), default)]
5066    pub globs: Option<Vec<&'a str>>,
5067    /// Enable case-insensitive matching.
5068    #[builder(setter(into, strip_option), default)]
5069    pub insensitive: Option<bool>,
5070    /// Limit the number of results to return
5071    #[builder(setter(into, strip_option), default)]
5072    pub limit: Option<isize>,
5073    /// Interpret the pattern as a literal string instead of a regular expression.
5074    #[builder(setter(into, strip_option), default)]
5075    pub literal: Option<bool>,
5076    /// Enable searching across multiple lines.
5077    #[builder(setter(into, strip_option), default)]
5078    pub multiline: Option<bool>,
5079    /// Directory or file paths to search
5080    #[builder(setter(into, strip_option), default)]
5081    pub paths: Option<Vec<&'a str>>,
5082    /// Skip hidden files (files starting with .).
5083    #[builder(setter(into, strip_option), default)]
5084    pub skip_hidden: Option<bool>,
5085    /// Honor .gitignore, .ignore, and .rgignore files.
5086    #[builder(setter(into, strip_option), default)]
5087    pub skip_ignored: Option<bool>,
5088}
5089#[derive(Builder, Debug, PartialEq)]
5090pub struct DirectoryTerminalOpts<'a> {
5091    /// If set, override the container's default terminal command and invoke these command arguments instead.
5092    #[builder(setter(into, strip_option), default)]
5093    pub cmd: Option<Vec<&'a str>>,
5094    /// If set, override the default container used for the terminal.
5095    #[builder(setter(into, strip_option), default)]
5096    pub container: Option<ContainerId>,
5097    /// Provides Dagger access to the executed command.
5098    #[builder(setter(into, strip_option), default)]
5099    pub experimental_privileged_nesting: Option<bool>,
5100    /// 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.
5101    #[builder(setter(into, strip_option), default)]
5102    pub insecure_root_capabilities: Option<bool>,
5103}
5104#[derive(Builder, Debug, PartialEq)]
5105pub struct DirectoryWithDirectoryOpts<'a> {
5106    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
5107    #[builder(setter(into, strip_option), default)]
5108    pub exclude: Option<Vec<&'a str>>,
5109    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
5110    #[builder(setter(into, strip_option), default)]
5111    pub include: Option<Vec<&'a str>>,
5112    /// A user:group to set for the copied directory and its contents.
5113    /// The user and group must be an ID (1000:1000), not a name (foo:bar).
5114    /// If the group is omitted, it defaults to the same as the user.
5115    #[builder(setter(into, strip_option), default)]
5116    pub owner: Option<&'a str>,
5117}
5118#[derive(Builder, Debug, PartialEq)]
5119pub struct DirectoryWithFileOpts<'a> {
5120    /// A user:group to set for the copied directory and its contents.
5121    /// The user and group must be an ID (1000:1000), not a name (foo:bar).
5122    /// If the group is omitted, it defaults to the same as the user.
5123    #[builder(setter(into, strip_option), default)]
5124    pub owner: Option<&'a str>,
5125    /// Permission given to the copied file (e.g., 0600).
5126    #[builder(setter(into, strip_option), default)]
5127    pub permissions: Option<isize>,
5128}
5129#[derive(Builder, Debug, PartialEq)]
5130pub struct DirectoryWithFilesOpts {
5131    /// Permission given to the copied files (e.g., 0600).
5132    #[builder(setter(into, strip_option), default)]
5133    pub permissions: Option<isize>,
5134}
5135#[derive(Builder, Debug, PartialEq)]
5136pub struct DirectoryWithNewDirectoryOpts {
5137    /// Permission granted to the created directory (e.g., 0777).
5138    #[builder(setter(into, strip_option), default)]
5139    pub permissions: Option<isize>,
5140}
5141#[derive(Builder, Debug, PartialEq)]
5142pub struct DirectoryWithNewFileOpts {
5143    /// Permissions of the new file. Example: 0600
5144    #[builder(setter(into, strip_option), default)]
5145    pub permissions: Option<isize>,
5146}
5147impl Directory {
5148    /// Converts this directory to a local git repository
5149    pub fn as_git(&self) -> GitRepository {
5150        let query = self.selection.select("asGit");
5151        GitRepository {
5152            proc: self.proc.clone(),
5153            selection: query,
5154            graphql_client: self.graphql_client.clone(),
5155        }
5156    }
5157    /// Load the directory as a Dagger module source
5158    ///
5159    /// # Arguments
5160    ///
5161    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5162    pub fn as_module(&self) -> Module {
5163        let query = self.selection.select("asModule");
5164        Module {
5165            proc: self.proc.clone(),
5166            selection: query,
5167            graphql_client: self.graphql_client.clone(),
5168        }
5169    }
5170    /// Load the directory as a Dagger module source
5171    ///
5172    /// # Arguments
5173    ///
5174    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5175    pub fn as_module_opts<'a>(&self, opts: DirectoryAsModuleOpts<'a>) -> Module {
5176        let mut query = self.selection.select("asModule");
5177        if let Some(source_root_path) = opts.source_root_path {
5178            query = query.arg("sourceRootPath", source_root_path);
5179        }
5180        Module {
5181            proc: self.proc.clone(),
5182            selection: query,
5183            graphql_client: self.graphql_client.clone(),
5184        }
5185    }
5186    /// Load the directory as a Dagger module source
5187    ///
5188    /// # Arguments
5189    ///
5190    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5191    pub fn as_module_source(&self) -> ModuleSource {
5192        let query = self.selection.select("asModuleSource");
5193        ModuleSource {
5194            proc: self.proc.clone(),
5195            selection: query,
5196            graphql_client: self.graphql_client.clone(),
5197        }
5198    }
5199    /// Load the directory as a Dagger module source
5200    ///
5201    /// # Arguments
5202    ///
5203    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5204    pub fn as_module_source_opts<'a>(&self, opts: DirectoryAsModuleSourceOpts<'a>) -> ModuleSource {
5205        let mut query = self.selection.select("asModuleSource");
5206        if let Some(source_root_path) = opts.source_root_path {
5207            query = query.arg("sourceRootPath", source_root_path);
5208        }
5209        ModuleSource {
5210            proc: self.proc.clone(),
5211            selection: query,
5212            graphql_client: self.graphql_client.clone(),
5213        }
5214    }
5215    /// Return the difference between this directory and another directory, typically an older snapshot.
5216    /// The difference is encoded as a changeset, which also tracks removed files, and can be applied to other directories.
5217    ///
5218    /// # Arguments
5219    ///
5220    /// * `from` - The base directory snapshot to compare against
5221    pub fn changes(&self, from: impl IntoID<DirectoryId>) -> Changeset {
5222        let mut query = self.selection.select("changes");
5223        query = query.arg_lazy(
5224            "from",
5225            Box::new(move || {
5226                let from = from.clone();
5227                Box::pin(async move { from.into_id().await.unwrap().quote() })
5228            }),
5229        );
5230        Changeset {
5231            proc: self.proc.clone(),
5232            selection: query,
5233            graphql_client: self.graphql_client.clone(),
5234        }
5235    }
5236    /// Change the owner of the directory contents recursively.
5237    ///
5238    /// # Arguments
5239    ///
5240    /// * `path` - Path of the directory to change ownership of (e.g., "/").
5241    /// * `owner` - A user:group to set for the mounted directory and its contents.
5242    ///
5243    /// The user and group must be an ID (1000:1000), not a name (foo:bar).
5244    ///
5245    /// If the group is omitted, it defaults to the same as the user.
5246    pub fn chown(&self, path: impl Into<String>, owner: impl Into<String>) -> Directory {
5247        let mut query = self.selection.select("chown");
5248        query = query.arg("path", path.into());
5249        query = query.arg("owner", owner.into());
5250        Directory {
5251            proc: self.proc.clone(),
5252            selection: query,
5253            graphql_client: self.graphql_client.clone(),
5254        }
5255    }
5256    /// Return the difference between this directory and an another directory. The difference is encoded as a directory.
5257    ///
5258    /// # Arguments
5259    ///
5260    /// * `other` - The directory to compare against
5261    pub fn diff(&self, other: impl IntoID<DirectoryId>) -> Directory {
5262        let mut query = self.selection.select("diff");
5263        query = query.arg_lazy(
5264            "other",
5265            Box::new(move || {
5266                let other = other.clone();
5267                Box::pin(async move { other.into_id().await.unwrap().quote() })
5268            }),
5269        );
5270        Directory {
5271            proc: self.proc.clone(),
5272            selection: query,
5273            graphql_client: self.graphql_client.clone(),
5274        }
5275    }
5276    /// 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.
5277    pub async fn digest(&self) -> Result<String, DaggerError> {
5278        let query = self.selection.select("digest");
5279        query.execute(self.graphql_client.clone()).await
5280    }
5281    /// Retrieves a directory at the given path.
5282    ///
5283    /// # Arguments
5284    ///
5285    /// * `path` - Location of the directory to retrieve. Example: "/src"
5286    pub fn directory(&self, path: impl Into<String>) -> Directory {
5287        let mut query = self.selection.select("directory");
5288        query = query.arg("path", path.into());
5289        Directory {
5290            proc: self.proc.clone(),
5291            selection: query,
5292            graphql_client: self.graphql_client.clone(),
5293        }
5294    }
5295    /// 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.
5296    ///
5297    /// # Arguments
5298    ///
5299    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5300    pub fn docker_build(&self) -> Container {
5301        let query = self.selection.select("dockerBuild");
5302        Container {
5303            proc: self.proc.clone(),
5304            selection: query,
5305            graphql_client: self.graphql_client.clone(),
5306        }
5307    }
5308    /// 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.
5309    ///
5310    /// # Arguments
5311    ///
5312    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5313    pub fn docker_build_opts<'a>(&self, opts: DirectoryDockerBuildOpts<'a>) -> Container {
5314        let mut query = self.selection.select("dockerBuild");
5315        if let Some(dockerfile) = opts.dockerfile {
5316            query = query.arg("dockerfile", dockerfile);
5317        }
5318        if let Some(platform) = opts.platform {
5319            query = query.arg("platform", platform);
5320        }
5321        if let Some(build_args) = opts.build_args {
5322            query = query.arg("buildArgs", build_args);
5323        }
5324        if let Some(target) = opts.target {
5325            query = query.arg("target", target);
5326        }
5327        if let Some(secrets) = opts.secrets {
5328            query = query.arg("secrets", secrets);
5329        }
5330        if let Some(no_init) = opts.no_init {
5331            query = query.arg("noInit", no_init);
5332        }
5333        Container {
5334            proc: self.proc.clone(),
5335            selection: query,
5336            graphql_client: self.graphql_client.clone(),
5337        }
5338    }
5339    /// Returns a list of files and directories at the given path.
5340    ///
5341    /// # Arguments
5342    ///
5343    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5344    pub async fn entries(&self) -> Result<Vec<String>, DaggerError> {
5345        let query = self.selection.select("entries");
5346        query.execute(self.graphql_client.clone()).await
5347    }
5348    /// Returns a list of files and directories at the given path.
5349    ///
5350    /// # Arguments
5351    ///
5352    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5353    pub async fn entries_opts<'a>(
5354        &self,
5355        opts: DirectoryEntriesOpts<'a>,
5356    ) -> Result<Vec<String>, DaggerError> {
5357        let mut query = self.selection.select("entries");
5358        if let Some(path) = opts.path {
5359            query = query.arg("path", path);
5360        }
5361        query.execute(self.graphql_client.clone()).await
5362    }
5363    /// check if a file or directory exists
5364    ///
5365    /// # Arguments
5366    ///
5367    /// * `path` - Path to check (e.g., "/file.txt").
5368    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5369    pub async fn exists(&self, path: impl Into<String>) -> Result<bool, DaggerError> {
5370        let mut query = self.selection.select("exists");
5371        query = query.arg("path", path.into());
5372        query.execute(self.graphql_client.clone()).await
5373    }
5374    /// check if a file or directory exists
5375    ///
5376    /// # Arguments
5377    ///
5378    /// * `path` - Path to check (e.g., "/file.txt").
5379    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5380    pub async fn exists_opts(
5381        &self,
5382        path: impl Into<String>,
5383        opts: DirectoryExistsOpts,
5384    ) -> Result<bool, DaggerError> {
5385        let mut query = self.selection.select("exists");
5386        query = query.arg("path", path.into());
5387        if let Some(expected_type) = opts.expected_type {
5388            query = query.arg("expectedType", expected_type);
5389        }
5390        if let Some(do_not_follow_symlinks) = opts.do_not_follow_symlinks {
5391            query = query.arg("doNotFollowSymlinks", do_not_follow_symlinks);
5392        }
5393        query.execute(self.graphql_client.clone()).await
5394    }
5395    /// Writes the contents of the directory to a path on the host.
5396    ///
5397    /// # Arguments
5398    ///
5399    /// * `path` - Location of the copied directory (e.g., "logs/").
5400    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5401    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
5402        let mut query = self.selection.select("export");
5403        query = query.arg("path", path.into());
5404        query.execute(self.graphql_client.clone()).await
5405    }
5406    /// Writes the contents of the directory to a path on the host.
5407    ///
5408    /// # Arguments
5409    ///
5410    /// * `path` - Location of the copied directory (e.g., "logs/").
5411    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5412    pub async fn export_opts(
5413        &self,
5414        path: impl Into<String>,
5415        opts: DirectoryExportOpts,
5416    ) -> Result<String, DaggerError> {
5417        let mut query = self.selection.select("export");
5418        query = query.arg("path", path.into());
5419        if let Some(wipe) = opts.wipe {
5420            query = query.arg("wipe", wipe);
5421        }
5422        query.execute(self.graphql_client.clone()).await
5423    }
5424    /// Retrieve a file at the given path.
5425    ///
5426    /// # Arguments
5427    ///
5428    /// * `path` - Location of the file to retrieve (e.g., "README.md").
5429    pub fn file(&self, path: impl Into<String>) -> File {
5430        let mut query = self.selection.select("file");
5431        query = query.arg("path", path.into());
5432        File {
5433            proc: self.proc.clone(),
5434            selection: query,
5435            graphql_client: self.graphql_client.clone(),
5436        }
5437    }
5438    /// Return a snapshot with some paths included or excluded
5439    ///
5440    /// # Arguments
5441    ///
5442    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5443    pub fn filter(&self) -> Directory {
5444        let query = self.selection.select("filter");
5445        Directory {
5446            proc: self.proc.clone(),
5447            selection: query,
5448            graphql_client: self.graphql_client.clone(),
5449        }
5450    }
5451    /// Return a snapshot with some paths included or excluded
5452    ///
5453    /// # Arguments
5454    ///
5455    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5456    pub fn filter_opts<'a>(&self, opts: DirectoryFilterOpts<'a>) -> Directory {
5457        let mut query = self.selection.select("filter");
5458        if let Some(exclude) = opts.exclude {
5459            query = query.arg("exclude", exclude);
5460        }
5461        if let Some(include) = opts.include {
5462            query = query.arg("include", include);
5463        }
5464        Directory {
5465            proc: self.proc.clone(),
5466            selection: query,
5467            graphql_client: self.graphql_client.clone(),
5468        }
5469    }
5470    /// Search up the directory tree for a file or directory, and return its path. If no match, return null
5471    ///
5472    /// # Arguments
5473    ///
5474    /// * `name` - The name of the file or directory to search for
5475    /// * `start` - The path to start the search from
5476    pub async fn find_up(
5477        &self,
5478        name: impl Into<String>,
5479        start: impl Into<String>,
5480    ) -> Result<String, DaggerError> {
5481        let mut query = self.selection.select("findUp");
5482        query = query.arg("name", name.into());
5483        query = query.arg("start", start.into());
5484        query.execute(self.graphql_client.clone()).await
5485    }
5486    /// Returns a list of files and directories that matche the given pattern.
5487    ///
5488    /// # Arguments
5489    ///
5490    /// * `pattern` - Pattern to match (e.g., "*.md").
5491    pub async fn glob(&self, pattern: impl Into<String>) -> Result<Vec<String>, DaggerError> {
5492        let mut query = self.selection.select("glob");
5493        query = query.arg("pattern", pattern.into());
5494        query.execute(self.graphql_client.clone()).await
5495    }
5496    /// A unique identifier for this Directory.
5497    pub async fn id(&self) -> Result<DirectoryId, DaggerError> {
5498        let query = self.selection.select("id");
5499        query.execute(self.graphql_client.clone()).await
5500    }
5501    /// Returns the name of the directory.
5502    pub async fn name(&self) -> Result<String, DaggerError> {
5503        let query = self.selection.select("name");
5504        query.execute(self.graphql_client.clone()).await
5505    }
5506    /// Searches for content matching the given regular expression or literal string.
5507    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
5508    ///
5509    /// # Arguments
5510    ///
5511    /// * `pattern` - The text to match.
5512    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5513    pub fn search(&self, pattern: impl Into<String>) -> Vec<SearchResult> {
5514        let mut query = self.selection.select("search");
5515        query = query.arg("pattern", pattern.into());
5516        vec![SearchResult {
5517            proc: self.proc.clone(),
5518            selection: query,
5519            graphql_client: self.graphql_client.clone(),
5520        }]
5521    }
5522    /// Searches for content matching the given regular expression or literal string.
5523    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
5524    ///
5525    /// # Arguments
5526    ///
5527    /// * `pattern` - The text to match.
5528    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5529    pub fn search_opts<'a>(
5530        &self,
5531        pattern: impl Into<String>,
5532        opts: DirectorySearchOpts<'a>,
5533    ) -> Vec<SearchResult> {
5534        let mut query = self.selection.select("search");
5535        query = query.arg("pattern", pattern.into());
5536        if let Some(paths) = opts.paths {
5537            query = query.arg("paths", paths);
5538        }
5539        if let Some(globs) = opts.globs {
5540            query = query.arg("globs", globs);
5541        }
5542        if let Some(literal) = opts.literal {
5543            query = query.arg("literal", literal);
5544        }
5545        if let Some(multiline) = opts.multiline {
5546            query = query.arg("multiline", multiline);
5547        }
5548        if let Some(dotall) = opts.dotall {
5549            query = query.arg("dotall", dotall);
5550        }
5551        if let Some(insensitive) = opts.insensitive {
5552            query = query.arg("insensitive", insensitive);
5553        }
5554        if let Some(skip_ignored) = opts.skip_ignored {
5555            query = query.arg("skipIgnored", skip_ignored);
5556        }
5557        if let Some(skip_hidden) = opts.skip_hidden {
5558            query = query.arg("skipHidden", skip_hidden);
5559        }
5560        if let Some(files_only) = opts.files_only {
5561            query = query.arg("filesOnly", files_only);
5562        }
5563        if let Some(limit) = opts.limit {
5564            query = query.arg("limit", limit);
5565        }
5566        vec![SearchResult {
5567            proc: self.proc.clone(),
5568            selection: query,
5569            graphql_client: self.graphql_client.clone(),
5570        }]
5571    }
5572    /// Force evaluation in the engine.
5573    pub async fn sync(&self) -> Result<DirectoryId, DaggerError> {
5574        let query = self.selection.select("sync");
5575        query.execute(self.graphql_client.clone()).await
5576    }
5577    /// Opens an interactive terminal in new container with this directory mounted inside.
5578    ///
5579    /// # Arguments
5580    ///
5581    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5582    pub fn terminal(&self) -> Directory {
5583        let query = self.selection.select("terminal");
5584        Directory {
5585            proc: self.proc.clone(),
5586            selection: query,
5587            graphql_client: self.graphql_client.clone(),
5588        }
5589    }
5590    /// Opens an interactive terminal in new container with this directory mounted inside.
5591    ///
5592    /// # Arguments
5593    ///
5594    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5595    pub fn terminal_opts<'a>(&self, opts: DirectoryTerminalOpts<'a>) -> Directory {
5596        let mut query = self.selection.select("terminal");
5597        if let Some(container) = opts.container {
5598            query = query.arg("container", container);
5599        }
5600        if let Some(cmd) = opts.cmd {
5601            query = query.arg("cmd", cmd);
5602        }
5603        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
5604            query = query.arg(
5605                "experimentalPrivilegedNesting",
5606                experimental_privileged_nesting,
5607            );
5608        }
5609        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
5610            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
5611        }
5612        Directory {
5613            proc: self.proc.clone(),
5614            selection: query,
5615            graphql_client: self.graphql_client.clone(),
5616        }
5617    }
5618    /// Return a directory with changes from another directory applied to it.
5619    ///
5620    /// # Arguments
5621    ///
5622    /// * `changes` - Changes to apply to the directory
5623    pub fn with_changes(&self, changes: impl IntoID<ChangesetId>) -> Directory {
5624        let mut query = self.selection.select("withChanges");
5625        query = query.arg_lazy(
5626            "changes",
5627            Box::new(move || {
5628                let changes = changes.clone();
5629                Box::pin(async move { changes.into_id().await.unwrap().quote() })
5630            }),
5631        );
5632        Directory {
5633            proc: self.proc.clone(),
5634            selection: query,
5635            graphql_client: self.graphql_client.clone(),
5636        }
5637    }
5638    /// Return a snapshot with a directory added
5639    ///
5640    /// # Arguments
5641    ///
5642    /// * `path` - Location of the written directory (e.g., "/src/").
5643    /// * `directory` - Identifier of the directory to copy.
5644    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5645    pub fn with_directory(
5646        &self,
5647        path: impl Into<String>,
5648        directory: impl IntoID<DirectoryId>,
5649    ) -> Directory {
5650        let mut query = self.selection.select("withDirectory");
5651        query = query.arg("path", path.into());
5652        query = query.arg_lazy(
5653            "directory",
5654            Box::new(move || {
5655                let directory = directory.clone();
5656                Box::pin(async move { directory.into_id().await.unwrap().quote() })
5657            }),
5658        );
5659        Directory {
5660            proc: self.proc.clone(),
5661            selection: query,
5662            graphql_client: self.graphql_client.clone(),
5663        }
5664    }
5665    /// Return a snapshot with a directory added
5666    ///
5667    /// # Arguments
5668    ///
5669    /// * `path` - Location of the written directory (e.g., "/src/").
5670    /// * `directory` - Identifier of the directory to copy.
5671    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5672    pub fn with_directory_opts<'a>(
5673        &self,
5674        path: impl Into<String>,
5675        directory: impl IntoID<DirectoryId>,
5676        opts: DirectoryWithDirectoryOpts<'a>,
5677    ) -> Directory {
5678        let mut query = self.selection.select("withDirectory");
5679        query = query.arg("path", path.into());
5680        query = query.arg_lazy(
5681            "directory",
5682            Box::new(move || {
5683                let directory = directory.clone();
5684                Box::pin(async move { directory.into_id().await.unwrap().quote() })
5685            }),
5686        );
5687        if let Some(exclude) = opts.exclude {
5688            query = query.arg("exclude", exclude);
5689        }
5690        if let Some(include) = opts.include {
5691            query = query.arg("include", include);
5692        }
5693        if let Some(owner) = opts.owner {
5694            query = query.arg("owner", owner);
5695        }
5696        Directory {
5697            proc: self.proc.clone(),
5698            selection: query,
5699            graphql_client: self.graphql_client.clone(),
5700        }
5701    }
5702    /// Retrieves this directory plus the contents of the given file copied to the given path.
5703    ///
5704    /// # Arguments
5705    ///
5706    /// * `path` - Location of the copied file (e.g., "/file.txt").
5707    /// * `source` - Identifier of the file to copy.
5708    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5709    pub fn with_file(&self, path: impl Into<String>, source: impl IntoID<FileId>) -> Directory {
5710        let mut query = self.selection.select("withFile");
5711        query = query.arg("path", path.into());
5712        query = query.arg_lazy(
5713            "source",
5714            Box::new(move || {
5715                let source = source.clone();
5716                Box::pin(async move { source.into_id().await.unwrap().quote() })
5717            }),
5718        );
5719        Directory {
5720            proc: self.proc.clone(),
5721            selection: query,
5722            graphql_client: self.graphql_client.clone(),
5723        }
5724    }
5725    /// Retrieves this directory plus the contents of the given file copied to the given path.
5726    ///
5727    /// # Arguments
5728    ///
5729    /// * `path` - Location of the copied file (e.g., "/file.txt").
5730    /// * `source` - Identifier of the file to copy.
5731    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5732    pub fn with_file_opts<'a>(
5733        &self,
5734        path: impl Into<String>,
5735        source: impl IntoID<FileId>,
5736        opts: DirectoryWithFileOpts<'a>,
5737    ) -> Directory {
5738        let mut query = self.selection.select("withFile");
5739        query = query.arg("path", path.into());
5740        query = query.arg_lazy(
5741            "source",
5742            Box::new(move || {
5743                let source = source.clone();
5744                Box::pin(async move { source.into_id().await.unwrap().quote() })
5745            }),
5746        );
5747        if let Some(permissions) = opts.permissions {
5748            query = query.arg("permissions", permissions);
5749        }
5750        if let Some(owner) = opts.owner {
5751            query = query.arg("owner", owner);
5752        }
5753        Directory {
5754            proc: self.proc.clone(),
5755            selection: query,
5756            graphql_client: self.graphql_client.clone(),
5757        }
5758    }
5759    /// Retrieves this directory plus the contents of the given files copied to the given path.
5760    ///
5761    /// # Arguments
5762    ///
5763    /// * `path` - Location where copied files should be placed (e.g., "/src").
5764    /// * `sources` - Identifiers of the files to copy.
5765    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5766    pub fn with_files(&self, path: impl Into<String>, sources: Vec<FileId>) -> Directory {
5767        let mut query = self.selection.select("withFiles");
5768        query = query.arg("path", path.into());
5769        query = query.arg("sources", sources);
5770        Directory {
5771            proc: self.proc.clone(),
5772            selection: query,
5773            graphql_client: self.graphql_client.clone(),
5774        }
5775    }
5776    /// Retrieves this directory plus the contents of the given files copied to the given path.
5777    ///
5778    /// # Arguments
5779    ///
5780    /// * `path` - Location where copied files should be placed (e.g., "/src").
5781    /// * `sources` - Identifiers of the files to copy.
5782    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5783    pub fn with_files_opts(
5784        &self,
5785        path: impl Into<String>,
5786        sources: Vec<FileId>,
5787        opts: DirectoryWithFilesOpts,
5788    ) -> Directory {
5789        let mut query = self.selection.select("withFiles");
5790        query = query.arg("path", path.into());
5791        query = query.arg("sources", sources);
5792        if let Some(permissions) = opts.permissions {
5793            query = query.arg("permissions", permissions);
5794        }
5795        Directory {
5796            proc: self.proc.clone(),
5797            selection: query,
5798            graphql_client: self.graphql_client.clone(),
5799        }
5800    }
5801    /// Retrieves this directory plus a new directory created at the given path.
5802    ///
5803    /// # Arguments
5804    ///
5805    /// * `path` - Location of the directory created (e.g., "/logs").
5806    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5807    pub fn with_new_directory(&self, path: impl Into<String>) -> Directory {
5808        let mut query = self.selection.select("withNewDirectory");
5809        query = query.arg("path", path.into());
5810        Directory {
5811            proc: self.proc.clone(),
5812            selection: query,
5813            graphql_client: self.graphql_client.clone(),
5814        }
5815    }
5816    /// Retrieves this directory plus a new directory created at the given path.
5817    ///
5818    /// # Arguments
5819    ///
5820    /// * `path` - Location of the directory created (e.g., "/logs").
5821    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5822    pub fn with_new_directory_opts(
5823        &self,
5824        path: impl Into<String>,
5825        opts: DirectoryWithNewDirectoryOpts,
5826    ) -> Directory {
5827        let mut query = self.selection.select("withNewDirectory");
5828        query = query.arg("path", path.into());
5829        if let Some(permissions) = opts.permissions {
5830            query = query.arg("permissions", permissions);
5831        }
5832        Directory {
5833            proc: self.proc.clone(),
5834            selection: query,
5835            graphql_client: self.graphql_client.clone(),
5836        }
5837    }
5838    /// Return a snapshot with a new file added
5839    ///
5840    /// # Arguments
5841    ///
5842    /// * `path` - Path of the new file. Example: "foo/bar.txt"
5843    /// * `contents` - Contents of the new file. Example: "Hello world!"
5844    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5845    pub fn with_new_file(&self, path: impl Into<String>, contents: impl Into<String>) -> Directory {
5846        let mut query = self.selection.select("withNewFile");
5847        query = query.arg("path", path.into());
5848        query = query.arg("contents", contents.into());
5849        Directory {
5850            proc: self.proc.clone(),
5851            selection: query,
5852            graphql_client: self.graphql_client.clone(),
5853        }
5854    }
5855    /// Return a snapshot with a new file added
5856    ///
5857    /// # Arguments
5858    ///
5859    /// * `path` - Path of the new file. Example: "foo/bar.txt"
5860    /// * `contents` - Contents of the new file. Example: "Hello world!"
5861    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5862    pub fn with_new_file_opts(
5863        &self,
5864        path: impl Into<String>,
5865        contents: impl Into<String>,
5866        opts: DirectoryWithNewFileOpts,
5867    ) -> Directory {
5868        let mut query = self.selection.select("withNewFile");
5869        query = query.arg("path", path.into());
5870        query = query.arg("contents", contents.into());
5871        if let Some(permissions) = opts.permissions {
5872            query = query.arg("permissions", permissions);
5873        }
5874        Directory {
5875            proc: self.proc.clone(),
5876            selection: query,
5877            graphql_client: self.graphql_client.clone(),
5878        }
5879    }
5880    /// Retrieves this directory with the given Git-compatible patch applied.
5881    ///
5882    /// # Arguments
5883    ///
5884    /// * `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").
5885    pub fn with_patch(&self, patch: impl Into<String>) -> Directory {
5886        let mut query = self.selection.select("withPatch");
5887        query = query.arg("patch", patch.into());
5888        Directory {
5889            proc: self.proc.clone(),
5890            selection: query,
5891            graphql_client: self.graphql_client.clone(),
5892        }
5893    }
5894    /// Retrieves this directory with the given Git-compatible patch file applied.
5895    ///
5896    /// # Arguments
5897    ///
5898    /// * `patch` - File containing the patch to apply
5899    pub fn with_patch_file(&self, patch: impl IntoID<FileId>) -> Directory {
5900        let mut query = self.selection.select("withPatchFile");
5901        query = query.arg_lazy(
5902            "patch",
5903            Box::new(move || {
5904                let patch = patch.clone();
5905                Box::pin(async move { patch.into_id().await.unwrap().quote() })
5906            }),
5907        );
5908        Directory {
5909            proc: self.proc.clone(),
5910            selection: query,
5911            graphql_client: self.graphql_client.clone(),
5912        }
5913    }
5914    /// Return a snapshot with a symlink
5915    ///
5916    /// # Arguments
5917    ///
5918    /// * `target` - Location of the file or directory to link to (e.g., "/existing/file").
5919    /// * `link_name` - Location where the symbolic link will be created (e.g., "/new-file-link").
5920    pub fn with_symlink(
5921        &self,
5922        target: impl Into<String>,
5923        link_name: impl Into<String>,
5924    ) -> Directory {
5925        let mut query = self.selection.select("withSymlink");
5926        query = query.arg("target", target.into());
5927        query = query.arg("linkName", link_name.into());
5928        Directory {
5929            proc: self.proc.clone(),
5930            selection: query,
5931            graphql_client: self.graphql_client.clone(),
5932        }
5933    }
5934    /// Retrieves this directory with all file/dir timestamps set to the given time.
5935    ///
5936    /// # Arguments
5937    ///
5938    /// * `timestamp` - Timestamp to set dir/files in.
5939    ///
5940    /// Formatted in seconds following Unix epoch (e.g., 1672531199).
5941    pub fn with_timestamps(&self, timestamp: isize) -> Directory {
5942        let mut query = self.selection.select("withTimestamps");
5943        query = query.arg("timestamp", timestamp);
5944        Directory {
5945            proc: self.proc.clone(),
5946            selection: query,
5947            graphql_client: self.graphql_client.clone(),
5948        }
5949    }
5950    /// Return a snapshot with a subdirectory removed
5951    ///
5952    /// # Arguments
5953    ///
5954    /// * `path` - Path of the subdirectory to remove. Example: ".github/workflows"
5955    pub fn without_directory(&self, path: impl Into<String>) -> Directory {
5956        let mut query = self.selection.select("withoutDirectory");
5957        query = query.arg("path", path.into());
5958        Directory {
5959            proc: self.proc.clone(),
5960            selection: query,
5961            graphql_client: self.graphql_client.clone(),
5962        }
5963    }
5964    /// Return a snapshot with a file removed
5965    ///
5966    /// # Arguments
5967    ///
5968    /// * `path` - Path of the file to remove (e.g., "/file.txt").
5969    pub fn without_file(&self, path: impl Into<String>) -> Directory {
5970        let mut query = self.selection.select("withoutFile");
5971        query = query.arg("path", path.into());
5972        Directory {
5973            proc: self.proc.clone(),
5974            selection: query,
5975            graphql_client: self.graphql_client.clone(),
5976        }
5977    }
5978    /// Return a snapshot with files removed
5979    ///
5980    /// # Arguments
5981    ///
5982    /// * `paths` - Paths of the files to remove (e.g., ["/file.txt"]).
5983    pub fn without_files(&self, paths: Vec<impl Into<String>>) -> Directory {
5984        let mut query = self.selection.select("withoutFiles");
5985        query = query.arg(
5986            "paths",
5987            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
5988        );
5989        Directory {
5990            proc: self.proc.clone(),
5991            selection: query,
5992            graphql_client: self.graphql_client.clone(),
5993        }
5994    }
5995}
5996#[derive(Clone)]
5997pub struct Engine {
5998    pub proc: Option<Arc<DaggerSessionProc>>,
5999    pub selection: Selection,
6000    pub graphql_client: DynGraphQLClient,
6001}
6002impl Engine {
6003    /// A unique identifier for this Engine.
6004    pub async fn id(&self) -> Result<EngineId, DaggerError> {
6005        let query = self.selection.select("id");
6006        query.execute(self.graphql_client.clone()).await
6007    }
6008    /// The local (on-disk) cache for the Dagger engine
6009    pub fn local_cache(&self) -> EngineCache {
6010        let query = self.selection.select("localCache");
6011        EngineCache {
6012            proc: self.proc.clone(),
6013            selection: query,
6014            graphql_client: self.graphql_client.clone(),
6015        }
6016    }
6017}
6018#[derive(Clone)]
6019pub struct EngineCache {
6020    pub proc: Option<Arc<DaggerSessionProc>>,
6021    pub selection: Selection,
6022    pub graphql_client: DynGraphQLClient,
6023}
6024#[derive(Builder, Debug, PartialEq)]
6025pub struct EngineCacheEntrySetOpts<'a> {
6026    #[builder(setter(into, strip_option), default)]
6027    pub key: Option<&'a str>,
6028}
6029#[derive(Builder, Debug, PartialEq)]
6030pub struct EngineCachePruneOpts {
6031    /// Use the engine-wide default pruning policy if true, otherwise prune the whole cache of any releasable entries.
6032    #[builder(setter(into, strip_option), default)]
6033    pub use_default_policy: Option<bool>,
6034}
6035impl EngineCache {
6036    /// The current set of entries in the cache
6037    ///
6038    /// # Arguments
6039    ///
6040    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6041    pub fn entry_set(&self) -> EngineCacheEntrySet {
6042        let query = self.selection.select("entrySet");
6043        EngineCacheEntrySet {
6044            proc: self.proc.clone(),
6045            selection: query,
6046            graphql_client: self.graphql_client.clone(),
6047        }
6048    }
6049    /// The current set of entries in the cache
6050    ///
6051    /// # Arguments
6052    ///
6053    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6054    pub fn entry_set_opts<'a>(&self, opts: EngineCacheEntrySetOpts<'a>) -> EngineCacheEntrySet {
6055        let mut query = self.selection.select("entrySet");
6056        if let Some(key) = opts.key {
6057            query = query.arg("key", key);
6058        }
6059        EngineCacheEntrySet {
6060            proc: self.proc.clone(),
6061            selection: query,
6062            graphql_client: self.graphql_client.clone(),
6063        }
6064    }
6065    /// A unique identifier for this EngineCache.
6066    pub async fn id(&self) -> Result<EngineCacheId, DaggerError> {
6067        let query = self.selection.select("id");
6068        query.execute(self.graphql_client.clone()).await
6069    }
6070    /// The maximum bytes to keep in the cache without pruning, after which automatic pruning may kick in.
6071    pub async fn keep_bytes(&self) -> Result<isize, DaggerError> {
6072        let query = self.selection.select("keepBytes");
6073        query.execute(self.graphql_client.clone()).await
6074    }
6075    /// The maximum bytes to keep in the cache without pruning.
6076    pub async fn max_used_space(&self) -> Result<isize, DaggerError> {
6077        let query = self.selection.select("maxUsedSpace");
6078        query.execute(self.graphql_client.clone()).await
6079    }
6080    /// The target amount of free disk space the garbage collector will attempt to leave.
6081    pub async fn min_free_space(&self) -> Result<isize, DaggerError> {
6082        let query = self.selection.select("minFreeSpace");
6083        query.execute(self.graphql_client.clone()).await
6084    }
6085    /// Prune the cache of releaseable entries
6086    ///
6087    /// # Arguments
6088    ///
6089    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6090    pub async fn prune(&self) -> Result<Void, DaggerError> {
6091        let query = self.selection.select("prune");
6092        query.execute(self.graphql_client.clone()).await
6093    }
6094    /// Prune the cache of releaseable entries
6095    ///
6096    /// # Arguments
6097    ///
6098    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6099    pub async fn prune_opts(&self, opts: EngineCachePruneOpts) -> Result<Void, DaggerError> {
6100        let mut query = self.selection.select("prune");
6101        if let Some(use_default_policy) = opts.use_default_policy {
6102            query = query.arg("useDefaultPolicy", use_default_policy);
6103        }
6104        query.execute(self.graphql_client.clone()).await
6105    }
6106    /// The minimum amount of disk space this policy is guaranteed to retain.
6107    pub async fn reserved_space(&self) -> Result<isize, DaggerError> {
6108        let query = self.selection.select("reservedSpace");
6109        query.execute(self.graphql_client.clone()).await
6110    }
6111    /// The target number of bytes to keep when pruning.
6112    pub async fn target_space(&self) -> Result<isize, DaggerError> {
6113        let query = self.selection.select("targetSpace");
6114        query.execute(self.graphql_client.clone()).await
6115    }
6116}
6117#[derive(Clone)]
6118pub struct EngineCacheEntry {
6119    pub proc: Option<Arc<DaggerSessionProc>>,
6120    pub selection: Selection,
6121    pub graphql_client: DynGraphQLClient,
6122}
6123impl EngineCacheEntry {
6124    /// Whether the cache entry is actively being used.
6125    pub async fn actively_used(&self) -> Result<bool, DaggerError> {
6126        let query = self.selection.select("activelyUsed");
6127        query.execute(self.graphql_client.clone()).await
6128    }
6129    /// The time the cache entry was created, in Unix nanoseconds.
6130    pub async fn created_time_unix_nano(&self) -> Result<isize, DaggerError> {
6131        let query = self.selection.select("createdTimeUnixNano");
6132        query.execute(self.graphql_client.clone()).await
6133    }
6134    /// The description of the cache entry.
6135    pub async fn description(&self) -> Result<String, DaggerError> {
6136        let query = self.selection.select("description");
6137        query.execute(self.graphql_client.clone()).await
6138    }
6139    /// The disk space used by the cache entry.
6140    pub async fn disk_space_bytes(&self) -> Result<isize, DaggerError> {
6141        let query = self.selection.select("diskSpaceBytes");
6142        query.execute(self.graphql_client.clone()).await
6143    }
6144    /// A unique identifier for this EngineCacheEntry.
6145    pub async fn id(&self) -> Result<EngineCacheEntryId, DaggerError> {
6146        let query = self.selection.select("id");
6147        query.execute(self.graphql_client.clone()).await
6148    }
6149    /// The most recent time the cache entry was used, in Unix nanoseconds.
6150    pub async fn most_recent_use_time_unix_nano(&self) -> Result<isize, DaggerError> {
6151        let query = self.selection.select("mostRecentUseTimeUnixNano");
6152        query.execute(self.graphql_client.clone()).await
6153    }
6154}
6155#[derive(Clone)]
6156pub struct EngineCacheEntrySet {
6157    pub proc: Option<Arc<DaggerSessionProc>>,
6158    pub selection: Selection,
6159    pub graphql_client: DynGraphQLClient,
6160}
6161impl EngineCacheEntrySet {
6162    /// The total disk space used by the cache entries in this set.
6163    pub async fn disk_space_bytes(&self) -> Result<isize, DaggerError> {
6164        let query = self.selection.select("diskSpaceBytes");
6165        query.execute(self.graphql_client.clone()).await
6166    }
6167    /// The list of individual cache entries in the set
6168    pub fn entries(&self) -> Vec<EngineCacheEntry> {
6169        let query = self.selection.select("entries");
6170        vec![EngineCacheEntry {
6171            proc: self.proc.clone(),
6172            selection: query,
6173            graphql_client: self.graphql_client.clone(),
6174        }]
6175    }
6176    /// The number of cache entries in this set.
6177    pub async fn entry_count(&self) -> Result<isize, DaggerError> {
6178        let query = self.selection.select("entryCount");
6179        query.execute(self.graphql_client.clone()).await
6180    }
6181    /// A unique identifier for this EngineCacheEntrySet.
6182    pub async fn id(&self) -> Result<EngineCacheEntrySetId, DaggerError> {
6183        let query = self.selection.select("id");
6184        query.execute(self.graphql_client.clone()).await
6185    }
6186}
6187#[derive(Clone)]
6188pub struct EnumTypeDef {
6189    pub proc: Option<Arc<DaggerSessionProc>>,
6190    pub selection: Selection,
6191    pub graphql_client: DynGraphQLClient,
6192}
6193impl EnumTypeDef {
6194    /// A doc string for the enum, if any.
6195    pub async fn description(&self) -> Result<String, DaggerError> {
6196        let query = self.selection.select("description");
6197        query.execute(self.graphql_client.clone()).await
6198    }
6199    /// A unique identifier for this EnumTypeDef.
6200    pub async fn id(&self) -> Result<EnumTypeDefId, DaggerError> {
6201        let query = self.selection.select("id");
6202        query.execute(self.graphql_client.clone()).await
6203    }
6204    /// The members of the enum.
6205    pub fn members(&self) -> Vec<EnumValueTypeDef> {
6206        let query = self.selection.select("members");
6207        vec![EnumValueTypeDef {
6208            proc: self.proc.clone(),
6209            selection: query,
6210            graphql_client: self.graphql_client.clone(),
6211        }]
6212    }
6213    /// The name of the enum.
6214    pub async fn name(&self) -> Result<String, DaggerError> {
6215        let query = self.selection.select("name");
6216        query.execute(self.graphql_client.clone()).await
6217    }
6218    /// The location of this enum declaration.
6219    pub fn source_map(&self) -> SourceMap {
6220        let query = self.selection.select("sourceMap");
6221        SourceMap {
6222            proc: self.proc.clone(),
6223            selection: query,
6224            graphql_client: self.graphql_client.clone(),
6225        }
6226    }
6227    /// If this EnumTypeDef is associated with a Module, the name of the module. Unset otherwise.
6228    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
6229        let query = self.selection.select("sourceModuleName");
6230        query.execute(self.graphql_client.clone()).await
6231    }
6232    pub fn values(&self) -> Vec<EnumValueTypeDef> {
6233        let query = self.selection.select("values");
6234        vec![EnumValueTypeDef {
6235            proc: self.proc.clone(),
6236            selection: query,
6237            graphql_client: self.graphql_client.clone(),
6238        }]
6239    }
6240}
6241#[derive(Clone)]
6242pub struct EnumValueTypeDef {
6243    pub proc: Option<Arc<DaggerSessionProc>>,
6244    pub selection: Selection,
6245    pub graphql_client: DynGraphQLClient,
6246}
6247impl EnumValueTypeDef {
6248    /// A doc string for the enum member, if any.
6249    pub async fn description(&self) -> Result<String, DaggerError> {
6250        let query = self.selection.select("description");
6251        query.execute(self.graphql_client.clone()).await
6252    }
6253    /// A unique identifier for this EnumValueTypeDef.
6254    pub async fn id(&self) -> Result<EnumValueTypeDefId, DaggerError> {
6255        let query = self.selection.select("id");
6256        query.execute(self.graphql_client.clone()).await
6257    }
6258    /// The name of the enum member.
6259    pub async fn name(&self) -> Result<String, DaggerError> {
6260        let query = self.selection.select("name");
6261        query.execute(self.graphql_client.clone()).await
6262    }
6263    /// The location of this enum member declaration.
6264    pub fn source_map(&self) -> SourceMap {
6265        let query = self.selection.select("sourceMap");
6266        SourceMap {
6267            proc: self.proc.clone(),
6268            selection: query,
6269            graphql_client: self.graphql_client.clone(),
6270        }
6271    }
6272    /// The value of the enum member
6273    pub async fn value(&self) -> Result<String, DaggerError> {
6274        let query = self.selection.select("value");
6275        query.execute(self.graphql_client.clone()).await
6276    }
6277}
6278#[derive(Clone)]
6279pub struct Env {
6280    pub proc: Option<Arc<DaggerSessionProc>>,
6281    pub selection: Selection,
6282    pub graphql_client: DynGraphQLClient,
6283}
6284impl Env {
6285    /// A unique identifier for this Env.
6286    pub async fn id(&self) -> Result<EnvId, DaggerError> {
6287        let query = self.selection.select("id");
6288        query.execute(self.graphql_client.clone()).await
6289    }
6290    /// retrieve an input value by name
6291    pub fn input(&self, name: impl Into<String>) -> Binding {
6292        let mut query = self.selection.select("input");
6293        query = query.arg("name", name.into());
6294        Binding {
6295            proc: self.proc.clone(),
6296            selection: query,
6297            graphql_client: self.graphql_client.clone(),
6298        }
6299    }
6300    /// return all input values for the environment
6301    pub fn inputs(&self) -> Vec<Binding> {
6302        let query = self.selection.select("inputs");
6303        vec![Binding {
6304            proc: self.proc.clone(),
6305            selection: query,
6306            graphql_client: self.graphql_client.clone(),
6307        }]
6308    }
6309    /// retrieve an output value by name
6310    pub fn output(&self, name: impl Into<String>) -> Binding {
6311        let mut query = self.selection.select("output");
6312        query = query.arg("name", name.into());
6313        Binding {
6314            proc: self.proc.clone(),
6315            selection: query,
6316            graphql_client: self.graphql_client.clone(),
6317        }
6318    }
6319    /// return all output values for the environment
6320    pub fn outputs(&self) -> Vec<Binding> {
6321        let query = self.selection.select("outputs");
6322        vec![Binding {
6323            proc: self.proc.clone(),
6324            selection: query,
6325            graphql_client: self.graphql_client.clone(),
6326        }]
6327    }
6328    /// Create or update a binding of type Address in the environment
6329    ///
6330    /// # Arguments
6331    ///
6332    /// * `name` - The name of the binding
6333    /// * `value` - The Address value to assign to the binding
6334    /// * `description` - The purpose of the input
6335    pub fn with_address_input(
6336        &self,
6337        name: impl Into<String>,
6338        value: impl IntoID<AddressId>,
6339        description: impl Into<String>,
6340    ) -> Env {
6341        let mut query = self.selection.select("withAddressInput");
6342        query = query.arg("name", name.into());
6343        query = query.arg_lazy(
6344            "value",
6345            Box::new(move || {
6346                let value = value.clone();
6347                Box::pin(async move { value.into_id().await.unwrap().quote() })
6348            }),
6349        );
6350        query = query.arg("description", description.into());
6351        Env {
6352            proc: self.proc.clone(),
6353            selection: query,
6354            graphql_client: self.graphql_client.clone(),
6355        }
6356    }
6357    /// Declare a desired Address output to be assigned in the environment
6358    ///
6359    /// # Arguments
6360    ///
6361    /// * `name` - The name of the binding
6362    /// * `description` - A description of the desired value of the binding
6363    pub fn with_address_output(
6364        &self,
6365        name: impl Into<String>,
6366        description: impl Into<String>,
6367    ) -> Env {
6368        let mut query = self.selection.select("withAddressOutput");
6369        query = query.arg("name", name.into());
6370        query = query.arg("description", description.into());
6371        Env {
6372            proc: self.proc.clone(),
6373            selection: query,
6374            graphql_client: self.graphql_client.clone(),
6375        }
6376    }
6377    /// Create or update a binding of type CacheVolume in the environment
6378    ///
6379    /// # Arguments
6380    ///
6381    /// * `name` - The name of the binding
6382    /// * `value` - The CacheVolume value to assign to the binding
6383    /// * `description` - The purpose of the input
6384    pub fn with_cache_volume_input(
6385        &self,
6386        name: impl Into<String>,
6387        value: impl IntoID<CacheVolumeId>,
6388        description: impl Into<String>,
6389    ) -> Env {
6390        let mut query = self.selection.select("withCacheVolumeInput");
6391        query = query.arg("name", name.into());
6392        query = query.arg_lazy(
6393            "value",
6394            Box::new(move || {
6395                let value = value.clone();
6396                Box::pin(async move { value.into_id().await.unwrap().quote() })
6397            }),
6398        );
6399        query = query.arg("description", description.into());
6400        Env {
6401            proc: self.proc.clone(),
6402            selection: query,
6403            graphql_client: self.graphql_client.clone(),
6404        }
6405    }
6406    /// Declare a desired CacheVolume output to be assigned in the environment
6407    ///
6408    /// # Arguments
6409    ///
6410    /// * `name` - The name of the binding
6411    /// * `description` - A description of the desired value of the binding
6412    pub fn with_cache_volume_output(
6413        &self,
6414        name: impl Into<String>,
6415        description: impl Into<String>,
6416    ) -> Env {
6417        let mut query = self.selection.select("withCacheVolumeOutput");
6418        query = query.arg("name", name.into());
6419        query = query.arg("description", description.into());
6420        Env {
6421            proc: self.proc.clone(),
6422            selection: query,
6423            graphql_client: self.graphql_client.clone(),
6424        }
6425    }
6426    /// Create or update a binding of type Changeset in the environment
6427    ///
6428    /// # Arguments
6429    ///
6430    /// * `name` - The name of the binding
6431    /// * `value` - The Changeset value to assign to the binding
6432    /// * `description` - The purpose of the input
6433    pub fn with_changeset_input(
6434        &self,
6435        name: impl Into<String>,
6436        value: impl IntoID<ChangesetId>,
6437        description: impl Into<String>,
6438    ) -> Env {
6439        let mut query = self.selection.select("withChangesetInput");
6440        query = query.arg("name", name.into());
6441        query = query.arg_lazy(
6442            "value",
6443            Box::new(move || {
6444                let value = value.clone();
6445                Box::pin(async move { value.into_id().await.unwrap().quote() })
6446            }),
6447        );
6448        query = query.arg("description", description.into());
6449        Env {
6450            proc: self.proc.clone(),
6451            selection: query,
6452            graphql_client: self.graphql_client.clone(),
6453        }
6454    }
6455    /// Declare a desired Changeset output to be assigned in the environment
6456    ///
6457    /// # Arguments
6458    ///
6459    /// * `name` - The name of the binding
6460    /// * `description` - A description of the desired value of the binding
6461    pub fn with_changeset_output(
6462        &self,
6463        name: impl Into<String>,
6464        description: impl Into<String>,
6465    ) -> Env {
6466        let mut query = self.selection.select("withChangesetOutput");
6467        query = query.arg("name", name.into());
6468        query = query.arg("description", description.into());
6469        Env {
6470            proc: self.proc.clone(),
6471            selection: query,
6472            graphql_client: self.graphql_client.clone(),
6473        }
6474    }
6475    /// Create or update a binding of type Cloud in the environment
6476    ///
6477    /// # Arguments
6478    ///
6479    /// * `name` - The name of the binding
6480    /// * `value` - The Cloud value to assign to the binding
6481    /// * `description` - The purpose of the input
6482    pub fn with_cloud_input(
6483        &self,
6484        name: impl Into<String>,
6485        value: impl IntoID<CloudId>,
6486        description: impl Into<String>,
6487    ) -> Env {
6488        let mut query = self.selection.select("withCloudInput");
6489        query = query.arg("name", name.into());
6490        query = query.arg_lazy(
6491            "value",
6492            Box::new(move || {
6493                let value = value.clone();
6494                Box::pin(async move { value.into_id().await.unwrap().quote() })
6495            }),
6496        );
6497        query = query.arg("description", description.into());
6498        Env {
6499            proc: self.proc.clone(),
6500            selection: query,
6501            graphql_client: self.graphql_client.clone(),
6502        }
6503    }
6504    /// Declare a desired Cloud output to be assigned in the environment
6505    ///
6506    /// # Arguments
6507    ///
6508    /// * `name` - The name of the binding
6509    /// * `description` - A description of the desired value of the binding
6510    pub fn with_cloud_output(
6511        &self,
6512        name: impl Into<String>,
6513        description: impl Into<String>,
6514    ) -> Env {
6515        let mut query = self.selection.select("withCloudOutput");
6516        query = query.arg("name", name.into());
6517        query = query.arg("description", description.into());
6518        Env {
6519            proc: self.proc.clone(),
6520            selection: query,
6521            graphql_client: self.graphql_client.clone(),
6522        }
6523    }
6524    /// Create or update a binding of type Container in the environment
6525    ///
6526    /// # Arguments
6527    ///
6528    /// * `name` - The name of the binding
6529    /// * `value` - The Container value to assign to the binding
6530    /// * `description` - The purpose of the input
6531    pub fn with_container_input(
6532        &self,
6533        name: impl Into<String>,
6534        value: impl IntoID<ContainerId>,
6535        description: impl Into<String>,
6536    ) -> Env {
6537        let mut query = self.selection.select("withContainerInput");
6538        query = query.arg("name", name.into());
6539        query = query.arg_lazy(
6540            "value",
6541            Box::new(move || {
6542                let value = value.clone();
6543                Box::pin(async move { value.into_id().await.unwrap().quote() })
6544            }),
6545        );
6546        query = query.arg("description", description.into());
6547        Env {
6548            proc: self.proc.clone(),
6549            selection: query,
6550            graphql_client: self.graphql_client.clone(),
6551        }
6552    }
6553    /// Declare a desired Container output to be assigned in the environment
6554    ///
6555    /// # Arguments
6556    ///
6557    /// * `name` - The name of the binding
6558    /// * `description` - A description of the desired value of the binding
6559    pub fn with_container_output(
6560        &self,
6561        name: impl Into<String>,
6562        description: impl Into<String>,
6563    ) -> Env {
6564        let mut query = self.selection.select("withContainerOutput");
6565        query = query.arg("name", name.into());
6566        query = query.arg("description", description.into());
6567        Env {
6568            proc: self.proc.clone(),
6569            selection: query,
6570            graphql_client: self.graphql_client.clone(),
6571        }
6572    }
6573    /// Create or update a binding of type Directory in the environment
6574    ///
6575    /// # Arguments
6576    ///
6577    /// * `name` - The name of the binding
6578    /// * `value` - The Directory value to assign to the binding
6579    /// * `description` - The purpose of the input
6580    pub fn with_directory_input(
6581        &self,
6582        name: impl Into<String>,
6583        value: impl IntoID<DirectoryId>,
6584        description: impl Into<String>,
6585    ) -> Env {
6586        let mut query = self.selection.select("withDirectoryInput");
6587        query = query.arg("name", name.into());
6588        query = query.arg_lazy(
6589            "value",
6590            Box::new(move || {
6591                let value = value.clone();
6592                Box::pin(async move { value.into_id().await.unwrap().quote() })
6593            }),
6594        );
6595        query = query.arg("description", description.into());
6596        Env {
6597            proc: self.proc.clone(),
6598            selection: query,
6599            graphql_client: self.graphql_client.clone(),
6600        }
6601    }
6602    /// Declare a desired Directory output to be assigned in the environment
6603    ///
6604    /// # Arguments
6605    ///
6606    /// * `name` - The name of the binding
6607    /// * `description` - A description of the desired value of the binding
6608    pub fn with_directory_output(
6609        &self,
6610        name: impl Into<String>,
6611        description: impl Into<String>,
6612    ) -> Env {
6613        let mut query = self.selection.select("withDirectoryOutput");
6614        query = query.arg("name", name.into());
6615        query = query.arg("description", description.into());
6616        Env {
6617            proc: self.proc.clone(),
6618            selection: query,
6619            graphql_client: self.graphql_client.clone(),
6620        }
6621    }
6622    /// Create or update a binding of type EnvFile in the environment
6623    ///
6624    /// # Arguments
6625    ///
6626    /// * `name` - The name of the binding
6627    /// * `value` - The EnvFile value to assign to the binding
6628    /// * `description` - The purpose of the input
6629    pub fn with_env_file_input(
6630        &self,
6631        name: impl Into<String>,
6632        value: impl IntoID<EnvFileId>,
6633        description: impl Into<String>,
6634    ) -> Env {
6635        let mut query = self.selection.select("withEnvFileInput");
6636        query = query.arg("name", name.into());
6637        query = query.arg_lazy(
6638            "value",
6639            Box::new(move || {
6640                let value = value.clone();
6641                Box::pin(async move { value.into_id().await.unwrap().quote() })
6642            }),
6643        );
6644        query = query.arg("description", description.into());
6645        Env {
6646            proc: self.proc.clone(),
6647            selection: query,
6648            graphql_client: self.graphql_client.clone(),
6649        }
6650    }
6651    /// Declare a desired EnvFile output to be assigned in the environment
6652    ///
6653    /// # Arguments
6654    ///
6655    /// * `name` - The name of the binding
6656    /// * `description` - A description of the desired value of the binding
6657    pub fn with_env_file_output(
6658        &self,
6659        name: impl Into<String>,
6660        description: impl Into<String>,
6661    ) -> Env {
6662        let mut query = self.selection.select("withEnvFileOutput");
6663        query = query.arg("name", name.into());
6664        query = query.arg("description", description.into());
6665        Env {
6666            proc: self.proc.clone(),
6667            selection: query,
6668            graphql_client: self.graphql_client.clone(),
6669        }
6670    }
6671    /// Create or update a binding of type Env in the environment
6672    ///
6673    /// # Arguments
6674    ///
6675    /// * `name` - The name of the binding
6676    /// * `value` - The Env value to assign to the binding
6677    /// * `description` - The purpose of the input
6678    pub fn with_env_input(
6679        &self,
6680        name: impl Into<String>,
6681        value: impl IntoID<EnvId>,
6682        description: impl Into<String>,
6683    ) -> Env {
6684        let mut query = self.selection.select("withEnvInput");
6685        query = query.arg("name", name.into());
6686        query = query.arg_lazy(
6687            "value",
6688            Box::new(move || {
6689                let value = value.clone();
6690                Box::pin(async move { value.into_id().await.unwrap().quote() })
6691            }),
6692        );
6693        query = query.arg("description", description.into());
6694        Env {
6695            proc: self.proc.clone(),
6696            selection: query,
6697            graphql_client: self.graphql_client.clone(),
6698        }
6699    }
6700    /// Declare a desired Env output to be assigned in the environment
6701    ///
6702    /// # Arguments
6703    ///
6704    /// * `name` - The name of the binding
6705    /// * `description` - A description of the desired value of the binding
6706    pub fn with_env_output(&self, name: impl Into<String>, description: impl Into<String>) -> Env {
6707        let mut query = self.selection.select("withEnvOutput");
6708        query = query.arg("name", name.into());
6709        query = query.arg("description", description.into());
6710        Env {
6711            proc: self.proc.clone(),
6712            selection: query,
6713            graphql_client: self.graphql_client.clone(),
6714        }
6715    }
6716    /// Create or update a binding of type File in the environment
6717    ///
6718    /// # Arguments
6719    ///
6720    /// * `name` - The name of the binding
6721    /// * `value` - The File value to assign to the binding
6722    /// * `description` - The purpose of the input
6723    pub fn with_file_input(
6724        &self,
6725        name: impl Into<String>,
6726        value: impl IntoID<FileId>,
6727        description: impl Into<String>,
6728    ) -> Env {
6729        let mut query = self.selection.select("withFileInput");
6730        query = query.arg("name", name.into());
6731        query = query.arg_lazy(
6732            "value",
6733            Box::new(move || {
6734                let value = value.clone();
6735                Box::pin(async move { value.into_id().await.unwrap().quote() })
6736            }),
6737        );
6738        query = query.arg("description", description.into());
6739        Env {
6740            proc: self.proc.clone(),
6741            selection: query,
6742            graphql_client: self.graphql_client.clone(),
6743        }
6744    }
6745    /// Declare a desired File output to be assigned in the environment
6746    ///
6747    /// # Arguments
6748    ///
6749    /// * `name` - The name of the binding
6750    /// * `description` - A description of the desired value of the binding
6751    pub fn with_file_output(&self, name: impl Into<String>, description: impl Into<String>) -> Env {
6752        let mut query = self.selection.select("withFileOutput");
6753        query = query.arg("name", name.into());
6754        query = query.arg("description", description.into());
6755        Env {
6756            proc: self.proc.clone(),
6757            selection: query,
6758            graphql_client: self.graphql_client.clone(),
6759        }
6760    }
6761    /// Create or update a binding of type GitRef in the environment
6762    ///
6763    /// # Arguments
6764    ///
6765    /// * `name` - The name of the binding
6766    /// * `value` - The GitRef value to assign to the binding
6767    /// * `description` - The purpose of the input
6768    pub fn with_git_ref_input(
6769        &self,
6770        name: impl Into<String>,
6771        value: impl IntoID<GitRefId>,
6772        description: impl Into<String>,
6773    ) -> Env {
6774        let mut query = self.selection.select("withGitRefInput");
6775        query = query.arg("name", name.into());
6776        query = query.arg_lazy(
6777            "value",
6778            Box::new(move || {
6779                let value = value.clone();
6780                Box::pin(async move { value.into_id().await.unwrap().quote() })
6781            }),
6782        );
6783        query = query.arg("description", description.into());
6784        Env {
6785            proc: self.proc.clone(),
6786            selection: query,
6787            graphql_client: self.graphql_client.clone(),
6788        }
6789    }
6790    /// Declare a desired GitRef output to be assigned in the environment
6791    ///
6792    /// # Arguments
6793    ///
6794    /// * `name` - The name of the binding
6795    /// * `description` - A description of the desired value of the binding
6796    pub fn with_git_ref_output(
6797        &self,
6798        name: impl Into<String>,
6799        description: impl Into<String>,
6800    ) -> Env {
6801        let mut query = self.selection.select("withGitRefOutput");
6802        query = query.arg("name", name.into());
6803        query = query.arg("description", description.into());
6804        Env {
6805            proc: self.proc.clone(),
6806            selection: query,
6807            graphql_client: self.graphql_client.clone(),
6808        }
6809    }
6810    /// Create or update a binding of type GitRepository in the environment
6811    ///
6812    /// # Arguments
6813    ///
6814    /// * `name` - The name of the binding
6815    /// * `value` - The GitRepository value to assign to the binding
6816    /// * `description` - The purpose of the input
6817    pub fn with_git_repository_input(
6818        &self,
6819        name: impl Into<String>,
6820        value: impl IntoID<GitRepositoryId>,
6821        description: impl Into<String>,
6822    ) -> Env {
6823        let mut query = self.selection.select("withGitRepositoryInput");
6824        query = query.arg("name", name.into());
6825        query = query.arg_lazy(
6826            "value",
6827            Box::new(move || {
6828                let value = value.clone();
6829                Box::pin(async move { value.into_id().await.unwrap().quote() })
6830            }),
6831        );
6832        query = query.arg("description", description.into());
6833        Env {
6834            proc: self.proc.clone(),
6835            selection: query,
6836            graphql_client: self.graphql_client.clone(),
6837        }
6838    }
6839    /// Declare a desired GitRepository output to be assigned in the environment
6840    ///
6841    /// # Arguments
6842    ///
6843    /// * `name` - The name of the binding
6844    /// * `description` - A description of the desired value of the binding
6845    pub fn with_git_repository_output(
6846        &self,
6847        name: impl Into<String>,
6848        description: impl Into<String>,
6849    ) -> Env {
6850        let mut query = self.selection.select("withGitRepositoryOutput");
6851        query = query.arg("name", name.into());
6852        query = query.arg("description", description.into());
6853        Env {
6854            proc: self.proc.clone(),
6855            selection: query,
6856            graphql_client: self.graphql_client.clone(),
6857        }
6858    }
6859    /// Create or update a binding of type JSONValue in the environment
6860    ///
6861    /// # Arguments
6862    ///
6863    /// * `name` - The name of the binding
6864    /// * `value` - The JSONValue value to assign to the binding
6865    /// * `description` - The purpose of the input
6866    pub fn with_json_value_input(
6867        &self,
6868        name: impl Into<String>,
6869        value: impl IntoID<JsonValueId>,
6870        description: impl Into<String>,
6871    ) -> Env {
6872        let mut query = self.selection.select("withJSONValueInput");
6873        query = query.arg("name", name.into());
6874        query = query.arg_lazy(
6875            "value",
6876            Box::new(move || {
6877                let value = value.clone();
6878                Box::pin(async move { value.into_id().await.unwrap().quote() })
6879            }),
6880        );
6881        query = query.arg("description", description.into());
6882        Env {
6883            proc: self.proc.clone(),
6884            selection: query,
6885            graphql_client: self.graphql_client.clone(),
6886        }
6887    }
6888    /// Declare a desired JSONValue output to be assigned in the environment
6889    ///
6890    /// # Arguments
6891    ///
6892    /// * `name` - The name of the binding
6893    /// * `description` - A description of the desired value of the binding
6894    pub fn with_json_value_output(
6895        &self,
6896        name: impl Into<String>,
6897        description: impl Into<String>,
6898    ) -> Env {
6899        let mut query = self.selection.select("withJSONValueOutput");
6900        query = query.arg("name", name.into());
6901        query = query.arg("description", description.into());
6902        Env {
6903            proc: self.proc.clone(),
6904            selection: query,
6905            graphql_client: self.graphql_client.clone(),
6906        }
6907    }
6908    /// Create or update a binding of type LLM in the environment
6909    ///
6910    /// # Arguments
6911    ///
6912    /// * `name` - The name of the binding
6913    /// * `value` - The LLM value to assign to the binding
6914    /// * `description` - The purpose of the input
6915    pub fn with_llm_input(
6916        &self,
6917        name: impl Into<String>,
6918        value: impl IntoID<Llmid>,
6919        description: impl Into<String>,
6920    ) -> Env {
6921        let mut query = self.selection.select("withLLMInput");
6922        query = query.arg("name", name.into());
6923        query = query.arg_lazy(
6924            "value",
6925            Box::new(move || {
6926                let value = value.clone();
6927                Box::pin(async move { value.into_id().await.unwrap().quote() })
6928            }),
6929        );
6930        query = query.arg("description", description.into());
6931        Env {
6932            proc: self.proc.clone(),
6933            selection: query,
6934            graphql_client: self.graphql_client.clone(),
6935        }
6936    }
6937    /// Declare a desired LLM output to be assigned in the environment
6938    ///
6939    /// # Arguments
6940    ///
6941    /// * `name` - The name of the binding
6942    /// * `description` - A description of the desired value of the binding
6943    pub fn with_llm_output(&self, name: impl Into<String>, description: impl Into<String>) -> Env {
6944        let mut query = self.selection.select("withLLMOutput");
6945        query = query.arg("name", name.into());
6946        query = query.arg("description", description.into());
6947        Env {
6948            proc: self.proc.clone(),
6949            selection: query,
6950            graphql_client: self.graphql_client.clone(),
6951        }
6952    }
6953    /// Create or update a binding of type ModuleConfigClient in the environment
6954    ///
6955    /// # Arguments
6956    ///
6957    /// * `name` - The name of the binding
6958    /// * `value` - The ModuleConfigClient value to assign to the binding
6959    /// * `description` - The purpose of the input
6960    pub fn with_module_config_client_input(
6961        &self,
6962        name: impl Into<String>,
6963        value: impl IntoID<ModuleConfigClientId>,
6964        description: impl Into<String>,
6965    ) -> Env {
6966        let mut query = self.selection.select("withModuleConfigClientInput");
6967        query = query.arg("name", name.into());
6968        query = query.arg_lazy(
6969            "value",
6970            Box::new(move || {
6971                let value = value.clone();
6972                Box::pin(async move { value.into_id().await.unwrap().quote() })
6973            }),
6974        );
6975        query = query.arg("description", description.into());
6976        Env {
6977            proc: self.proc.clone(),
6978            selection: query,
6979            graphql_client: self.graphql_client.clone(),
6980        }
6981    }
6982    /// Declare a desired ModuleConfigClient output to be assigned in the environment
6983    ///
6984    /// # Arguments
6985    ///
6986    /// * `name` - The name of the binding
6987    /// * `description` - A description of the desired value of the binding
6988    pub fn with_module_config_client_output(
6989        &self,
6990        name: impl Into<String>,
6991        description: impl Into<String>,
6992    ) -> Env {
6993        let mut query = self.selection.select("withModuleConfigClientOutput");
6994        query = query.arg("name", name.into());
6995        query = query.arg("description", description.into());
6996        Env {
6997            proc: self.proc.clone(),
6998            selection: query,
6999            graphql_client: self.graphql_client.clone(),
7000        }
7001    }
7002    /// Create or update a binding of type Module in the environment
7003    ///
7004    /// # Arguments
7005    ///
7006    /// * `name` - The name of the binding
7007    /// * `value` - The Module value to assign to the binding
7008    /// * `description` - The purpose of the input
7009    pub fn with_module_input(
7010        &self,
7011        name: impl Into<String>,
7012        value: impl IntoID<ModuleId>,
7013        description: impl Into<String>,
7014    ) -> Env {
7015        let mut query = self.selection.select("withModuleInput");
7016        query = query.arg("name", name.into());
7017        query = query.arg_lazy(
7018            "value",
7019            Box::new(move || {
7020                let value = value.clone();
7021                Box::pin(async move { value.into_id().await.unwrap().quote() })
7022            }),
7023        );
7024        query = query.arg("description", description.into());
7025        Env {
7026            proc: self.proc.clone(),
7027            selection: query,
7028            graphql_client: self.graphql_client.clone(),
7029        }
7030    }
7031    /// Declare a desired Module output to be assigned in the environment
7032    ///
7033    /// # Arguments
7034    ///
7035    /// * `name` - The name of the binding
7036    /// * `description` - A description of the desired value of the binding
7037    pub fn with_module_output(
7038        &self,
7039        name: impl Into<String>,
7040        description: impl Into<String>,
7041    ) -> Env {
7042        let mut query = self.selection.select("withModuleOutput");
7043        query = query.arg("name", name.into());
7044        query = query.arg("description", description.into());
7045        Env {
7046            proc: self.proc.clone(),
7047            selection: query,
7048            graphql_client: self.graphql_client.clone(),
7049        }
7050    }
7051    /// Create or update a binding of type ModuleSource in the environment
7052    ///
7053    /// # Arguments
7054    ///
7055    /// * `name` - The name of the binding
7056    /// * `value` - The ModuleSource value to assign to the binding
7057    /// * `description` - The purpose of the input
7058    pub fn with_module_source_input(
7059        &self,
7060        name: impl Into<String>,
7061        value: impl IntoID<ModuleSourceId>,
7062        description: impl Into<String>,
7063    ) -> Env {
7064        let mut query = self.selection.select("withModuleSourceInput");
7065        query = query.arg("name", name.into());
7066        query = query.arg_lazy(
7067            "value",
7068            Box::new(move || {
7069                let value = value.clone();
7070                Box::pin(async move { value.into_id().await.unwrap().quote() })
7071            }),
7072        );
7073        query = query.arg("description", description.into());
7074        Env {
7075            proc: self.proc.clone(),
7076            selection: query,
7077            graphql_client: self.graphql_client.clone(),
7078        }
7079    }
7080    /// Declare a desired ModuleSource output to be assigned in the environment
7081    ///
7082    /// # Arguments
7083    ///
7084    /// * `name` - The name of the binding
7085    /// * `description` - A description of the desired value of the binding
7086    pub fn with_module_source_output(
7087        &self,
7088        name: impl Into<String>,
7089        description: impl Into<String>,
7090    ) -> Env {
7091        let mut query = self.selection.select("withModuleSourceOutput");
7092        query = query.arg("name", name.into());
7093        query = query.arg("description", description.into());
7094        Env {
7095            proc: self.proc.clone(),
7096            selection: query,
7097            graphql_client: self.graphql_client.clone(),
7098        }
7099    }
7100    /// Create or update a binding of type SearchResult in the environment
7101    ///
7102    /// # Arguments
7103    ///
7104    /// * `name` - The name of the binding
7105    /// * `value` - The SearchResult value to assign to the binding
7106    /// * `description` - The purpose of the input
7107    pub fn with_search_result_input(
7108        &self,
7109        name: impl Into<String>,
7110        value: impl IntoID<SearchResultId>,
7111        description: impl Into<String>,
7112    ) -> Env {
7113        let mut query = self.selection.select("withSearchResultInput");
7114        query = query.arg("name", name.into());
7115        query = query.arg_lazy(
7116            "value",
7117            Box::new(move || {
7118                let value = value.clone();
7119                Box::pin(async move { value.into_id().await.unwrap().quote() })
7120            }),
7121        );
7122        query = query.arg("description", description.into());
7123        Env {
7124            proc: self.proc.clone(),
7125            selection: query,
7126            graphql_client: self.graphql_client.clone(),
7127        }
7128    }
7129    /// Declare a desired SearchResult output to be assigned in the environment
7130    ///
7131    /// # Arguments
7132    ///
7133    /// * `name` - The name of the binding
7134    /// * `description` - A description of the desired value of the binding
7135    pub fn with_search_result_output(
7136        &self,
7137        name: impl Into<String>,
7138        description: impl Into<String>,
7139    ) -> Env {
7140        let mut query = self.selection.select("withSearchResultOutput");
7141        query = query.arg("name", name.into());
7142        query = query.arg("description", description.into());
7143        Env {
7144            proc: self.proc.clone(),
7145            selection: query,
7146            graphql_client: self.graphql_client.clone(),
7147        }
7148    }
7149    /// Create or update a binding of type SearchSubmatch in the environment
7150    ///
7151    /// # Arguments
7152    ///
7153    /// * `name` - The name of the binding
7154    /// * `value` - The SearchSubmatch value to assign to the binding
7155    /// * `description` - The purpose of the input
7156    pub fn with_search_submatch_input(
7157        &self,
7158        name: impl Into<String>,
7159        value: impl IntoID<SearchSubmatchId>,
7160        description: impl Into<String>,
7161    ) -> Env {
7162        let mut query = self.selection.select("withSearchSubmatchInput");
7163        query = query.arg("name", name.into());
7164        query = query.arg_lazy(
7165            "value",
7166            Box::new(move || {
7167                let value = value.clone();
7168                Box::pin(async move { value.into_id().await.unwrap().quote() })
7169            }),
7170        );
7171        query = query.arg("description", description.into());
7172        Env {
7173            proc: self.proc.clone(),
7174            selection: query,
7175            graphql_client: self.graphql_client.clone(),
7176        }
7177    }
7178    /// Declare a desired SearchSubmatch output to be assigned in the environment
7179    ///
7180    /// # Arguments
7181    ///
7182    /// * `name` - The name of the binding
7183    /// * `description` - A description of the desired value of the binding
7184    pub fn with_search_submatch_output(
7185        &self,
7186        name: impl Into<String>,
7187        description: impl Into<String>,
7188    ) -> Env {
7189        let mut query = self.selection.select("withSearchSubmatchOutput");
7190        query = query.arg("name", name.into());
7191        query = query.arg("description", description.into());
7192        Env {
7193            proc: self.proc.clone(),
7194            selection: query,
7195            graphql_client: self.graphql_client.clone(),
7196        }
7197    }
7198    /// Create or update a binding of type Secret in the environment
7199    ///
7200    /// # Arguments
7201    ///
7202    /// * `name` - The name of the binding
7203    /// * `value` - The Secret value to assign to the binding
7204    /// * `description` - The purpose of the input
7205    pub fn with_secret_input(
7206        &self,
7207        name: impl Into<String>,
7208        value: impl IntoID<SecretId>,
7209        description: impl Into<String>,
7210    ) -> Env {
7211        let mut query = self.selection.select("withSecretInput");
7212        query = query.arg("name", name.into());
7213        query = query.arg_lazy(
7214            "value",
7215            Box::new(move || {
7216                let value = value.clone();
7217                Box::pin(async move { value.into_id().await.unwrap().quote() })
7218            }),
7219        );
7220        query = query.arg("description", description.into());
7221        Env {
7222            proc: self.proc.clone(),
7223            selection: query,
7224            graphql_client: self.graphql_client.clone(),
7225        }
7226    }
7227    /// Declare a desired Secret output to be assigned in the environment
7228    ///
7229    /// # Arguments
7230    ///
7231    /// * `name` - The name of the binding
7232    /// * `description` - A description of the desired value of the binding
7233    pub fn with_secret_output(
7234        &self,
7235        name: impl Into<String>,
7236        description: impl Into<String>,
7237    ) -> Env {
7238        let mut query = self.selection.select("withSecretOutput");
7239        query = query.arg("name", name.into());
7240        query = query.arg("description", description.into());
7241        Env {
7242            proc: self.proc.clone(),
7243            selection: query,
7244            graphql_client: self.graphql_client.clone(),
7245        }
7246    }
7247    /// Create or update a binding of type Service in the environment
7248    ///
7249    /// # Arguments
7250    ///
7251    /// * `name` - The name of the binding
7252    /// * `value` - The Service value to assign to the binding
7253    /// * `description` - The purpose of the input
7254    pub fn with_service_input(
7255        &self,
7256        name: impl Into<String>,
7257        value: impl IntoID<ServiceId>,
7258        description: impl Into<String>,
7259    ) -> Env {
7260        let mut query = self.selection.select("withServiceInput");
7261        query = query.arg("name", name.into());
7262        query = query.arg_lazy(
7263            "value",
7264            Box::new(move || {
7265                let value = value.clone();
7266                Box::pin(async move { value.into_id().await.unwrap().quote() })
7267            }),
7268        );
7269        query = query.arg("description", description.into());
7270        Env {
7271            proc: self.proc.clone(),
7272            selection: query,
7273            graphql_client: self.graphql_client.clone(),
7274        }
7275    }
7276    /// Declare a desired Service output to be assigned in the environment
7277    ///
7278    /// # Arguments
7279    ///
7280    /// * `name` - The name of the binding
7281    /// * `description` - A description of the desired value of the binding
7282    pub fn with_service_output(
7283        &self,
7284        name: impl Into<String>,
7285        description: impl Into<String>,
7286    ) -> Env {
7287        let mut query = self.selection.select("withServiceOutput");
7288        query = query.arg("name", name.into());
7289        query = query.arg("description", description.into());
7290        Env {
7291            proc: self.proc.clone(),
7292            selection: query,
7293            graphql_client: self.graphql_client.clone(),
7294        }
7295    }
7296    /// Create or update a binding of type Socket in the environment
7297    ///
7298    /// # Arguments
7299    ///
7300    /// * `name` - The name of the binding
7301    /// * `value` - The Socket value to assign to the binding
7302    /// * `description` - The purpose of the input
7303    pub fn with_socket_input(
7304        &self,
7305        name: impl Into<String>,
7306        value: impl IntoID<SocketId>,
7307        description: impl Into<String>,
7308    ) -> Env {
7309        let mut query = self.selection.select("withSocketInput");
7310        query = query.arg("name", name.into());
7311        query = query.arg_lazy(
7312            "value",
7313            Box::new(move || {
7314                let value = value.clone();
7315                Box::pin(async move { value.into_id().await.unwrap().quote() })
7316            }),
7317        );
7318        query = query.arg("description", description.into());
7319        Env {
7320            proc: self.proc.clone(),
7321            selection: query,
7322            graphql_client: self.graphql_client.clone(),
7323        }
7324    }
7325    /// Declare a desired Socket output to be assigned in the environment
7326    ///
7327    /// # Arguments
7328    ///
7329    /// * `name` - The name of the binding
7330    /// * `description` - A description of the desired value of the binding
7331    pub fn with_socket_output(
7332        &self,
7333        name: impl Into<String>,
7334        description: impl Into<String>,
7335    ) -> Env {
7336        let mut query = self.selection.select("withSocketOutput");
7337        query = query.arg("name", name.into());
7338        query = query.arg("description", description.into());
7339        Env {
7340            proc: self.proc.clone(),
7341            selection: query,
7342            graphql_client: self.graphql_client.clone(),
7343        }
7344    }
7345    /// Create or update an input value of type string
7346    ///
7347    /// # Arguments
7348    ///
7349    /// * `name` - The name of the binding
7350    /// * `value` - The string value to assign to the binding
7351    /// * `description` - The description of the input
7352    pub fn with_string_input(
7353        &self,
7354        name: impl Into<String>,
7355        value: impl Into<String>,
7356        description: impl Into<String>,
7357    ) -> Env {
7358        let mut query = self.selection.select("withStringInput");
7359        query = query.arg("name", name.into());
7360        query = query.arg("value", value.into());
7361        query = query.arg("description", description.into());
7362        Env {
7363            proc: self.proc.clone(),
7364            selection: query,
7365            graphql_client: self.graphql_client.clone(),
7366        }
7367    }
7368    /// Create or update an input value of type string
7369    ///
7370    /// # Arguments
7371    ///
7372    /// * `name` - The name of the binding
7373    /// * `description` - The description of the output
7374    pub fn with_string_output(
7375        &self,
7376        name: impl Into<String>,
7377        description: impl Into<String>,
7378    ) -> Env {
7379        let mut query = self.selection.select("withStringOutput");
7380        query = query.arg("name", name.into());
7381        query = query.arg("description", description.into());
7382        Env {
7383            proc: self.proc.clone(),
7384            selection: query,
7385            graphql_client: self.graphql_client.clone(),
7386        }
7387    }
7388}
7389#[derive(Clone)]
7390pub struct EnvFile {
7391    pub proc: Option<Arc<DaggerSessionProc>>,
7392    pub selection: Selection,
7393    pub graphql_client: DynGraphQLClient,
7394}
7395impl EnvFile {
7396    /// Return as a file
7397    pub fn as_file(&self) -> File {
7398        let query = self.selection.select("asFile");
7399        File {
7400            proc: self.proc.clone(),
7401            selection: query,
7402            graphql_client: self.graphql_client.clone(),
7403        }
7404    }
7405    /// Check if a variable exists
7406    ///
7407    /// # Arguments
7408    ///
7409    /// * `name` - Variable name
7410    pub async fn exists(&self, name: impl Into<String>) -> Result<bool, DaggerError> {
7411        let mut query = self.selection.select("exists");
7412        query = query.arg("name", name.into());
7413        query.execute(self.graphql_client.clone()).await
7414    }
7415    /// Lookup a variable (last occurrence wins) and return its value, or an empty string
7416    ///
7417    /// # Arguments
7418    ///
7419    /// * `name` - Variable name
7420    pub async fn get(&self, name: impl Into<String>) -> Result<String, DaggerError> {
7421        let mut query = self.selection.select("get");
7422        query = query.arg("name", name.into());
7423        query.execute(self.graphql_client.clone()).await
7424    }
7425    /// A unique identifier for this EnvFile.
7426    pub async fn id(&self) -> Result<EnvFileId, DaggerError> {
7427        let query = self.selection.select("id");
7428        query.execute(self.graphql_client.clone()).await
7429    }
7430    /// Return all variables
7431    pub fn variables(&self) -> Vec<EnvVariable> {
7432        let query = self.selection.select("variables");
7433        vec![EnvVariable {
7434            proc: self.proc.clone(),
7435            selection: query,
7436            graphql_client: self.graphql_client.clone(),
7437        }]
7438    }
7439    /// Add a variable
7440    ///
7441    /// # Arguments
7442    ///
7443    /// * `name` - Variable name
7444    /// * `value` - Variable value
7445    pub fn with_variable(&self, name: impl Into<String>, value: impl Into<String>) -> EnvFile {
7446        let mut query = self.selection.select("withVariable");
7447        query = query.arg("name", name.into());
7448        query = query.arg("value", value.into());
7449        EnvFile {
7450            proc: self.proc.clone(),
7451            selection: query,
7452            graphql_client: self.graphql_client.clone(),
7453        }
7454    }
7455    /// Remove all occurrences of the named variable
7456    ///
7457    /// # Arguments
7458    ///
7459    /// * `name` - Variable name
7460    pub fn without_variable(&self, name: impl Into<String>) -> EnvFile {
7461        let mut query = self.selection.select("withoutVariable");
7462        query = query.arg("name", name.into());
7463        EnvFile {
7464            proc: self.proc.clone(),
7465            selection: query,
7466            graphql_client: self.graphql_client.clone(),
7467        }
7468    }
7469}
7470#[derive(Clone)]
7471pub struct EnvVariable {
7472    pub proc: Option<Arc<DaggerSessionProc>>,
7473    pub selection: Selection,
7474    pub graphql_client: DynGraphQLClient,
7475}
7476impl EnvVariable {
7477    /// A unique identifier for this EnvVariable.
7478    pub async fn id(&self) -> Result<EnvVariableId, DaggerError> {
7479        let query = self.selection.select("id");
7480        query.execute(self.graphql_client.clone()).await
7481    }
7482    /// The environment variable name.
7483    pub async fn name(&self) -> Result<String, DaggerError> {
7484        let query = self.selection.select("name");
7485        query.execute(self.graphql_client.clone()).await
7486    }
7487    /// The environment variable value.
7488    pub async fn value(&self) -> Result<String, DaggerError> {
7489        let query = self.selection.select("value");
7490        query.execute(self.graphql_client.clone()).await
7491    }
7492}
7493#[derive(Clone)]
7494pub struct Error {
7495    pub proc: Option<Arc<DaggerSessionProc>>,
7496    pub selection: Selection,
7497    pub graphql_client: DynGraphQLClient,
7498}
7499impl Error {
7500    /// A unique identifier for this Error.
7501    pub async fn id(&self) -> Result<ErrorId, DaggerError> {
7502        let query = self.selection.select("id");
7503        query.execute(self.graphql_client.clone()).await
7504    }
7505    /// A description of the error.
7506    pub async fn message(&self) -> Result<String, DaggerError> {
7507        let query = self.selection.select("message");
7508        query.execute(self.graphql_client.clone()).await
7509    }
7510    /// The extensions of the error.
7511    pub fn values(&self) -> Vec<ErrorValue> {
7512        let query = self.selection.select("values");
7513        vec![ErrorValue {
7514            proc: self.proc.clone(),
7515            selection: query,
7516            graphql_client: self.graphql_client.clone(),
7517        }]
7518    }
7519    /// Add a value to the error.
7520    ///
7521    /// # Arguments
7522    ///
7523    /// * `name` - The name of the value.
7524    /// * `value` - The value to store on the error.
7525    pub fn with_value(&self, name: impl Into<String>, value: Json) -> Error {
7526        let mut query = self.selection.select("withValue");
7527        query = query.arg("name", name.into());
7528        query = query.arg("value", value);
7529        Error {
7530            proc: self.proc.clone(),
7531            selection: query,
7532            graphql_client: self.graphql_client.clone(),
7533        }
7534    }
7535}
7536#[derive(Clone)]
7537pub struct ErrorValue {
7538    pub proc: Option<Arc<DaggerSessionProc>>,
7539    pub selection: Selection,
7540    pub graphql_client: DynGraphQLClient,
7541}
7542impl ErrorValue {
7543    /// A unique identifier for this ErrorValue.
7544    pub async fn id(&self) -> Result<ErrorValueId, DaggerError> {
7545        let query = self.selection.select("id");
7546        query.execute(self.graphql_client.clone()).await
7547    }
7548    /// The name of the value.
7549    pub async fn name(&self) -> Result<String, DaggerError> {
7550        let query = self.selection.select("name");
7551        query.execute(self.graphql_client.clone()).await
7552    }
7553    /// The value.
7554    pub async fn value(&self) -> Result<Json, DaggerError> {
7555        let query = self.selection.select("value");
7556        query.execute(self.graphql_client.clone()).await
7557    }
7558}
7559#[derive(Clone)]
7560pub struct FieldTypeDef {
7561    pub proc: Option<Arc<DaggerSessionProc>>,
7562    pub selection: Selection,
7563    pub graphql_client: DynGraphQLClient,
7564}
7565impl FieldTypeDef {
7566    /// A doc string for the field, if any.
7567    pub async fn description(&self) -> Result<String, DaggerError> {
7568        let query = self.selection.select("description");
7569        query.execute(self.graphql_client.clone()).await
7570    }
7571    /// A unique identifier for this FieldTypeDef.
7572    pub async fn id(&self) -> Result<FieldTypeDefId, DaggerError> {
7573        let query = self.selection.select("id");
7574        query.execute(self.graphql_client.clone()).await
7575    }
7576    /// The name of the field in lowerCamelCase format.
7577    pub async fn name(&self) -> Result<String, DaggerError> {
7578        let query = self.selection.select("name");
7579        query.execute(self.graphql_client.clone()).await
7580    }
7581    /// The location of this field declaration.
7582    pub fn source_map(&self) -> SourceMap {
7583        let query = self.selection.select("sourceMap");
7584        SourceMap {
7585            proc: self.proc.clone(),
7586            selection: query,
7587            graphql_client: self.graphql_client.clone(),
7588        }
7589    }
7590    /// The type of the field.
7591    pub fn type_def(&self) -> TypeDef {
7592        let query = self.selection.select("typeDef");
7593        TypeDef {
7594            proc: self.proc.clone(),
7595            selection: query,
7596            graphql_client: self.graphql_client.clone(),
7597        }
7598    }
7599}
7600#[derive(Clone)]
7601pub struct File {
7602    pub proc: Option<Arc<DaggerSessionProc>>,
7603    pub selection: Selection,
7604    pub graphql_client: DynGraphQLClient,
7605}
7606#[derive(Builder, Debug, PartialEq)]
7607pub struct FileAsEnvFileOpts {
7608    /// Replace "${VAR}" or "$VAR" with the value of other vars
7609    #[builder(setter(into, strip_option), default)]
7610    pub expand: Option<bool>,
7611}
7612#[derive(Builder, Debug, PartialEq)]
7613pub struct FileContentsOpts {
7614    /// Maximum number of lines to read
7615    #[builder(setter(into, strip_option), default)]
7616    pub limit_lines: Option<isize>,
7617    /// Start reading after this line
7618    #[builder(setter(into, strip_option), default)]
7619    pub offset_lines: Option<isize>,
7620}
7621#[derive(Builder, Debug, PartialEq)]
7622pub struct FileDigestOpts {
7623    /// If true, exclude metadata from the digest.
7624    #[builder(setter(into, strip_option), default)]
7625    pub exclude_metadata: Option<bool>,
7626}
7627#[derive(Builder, Debug, PartialEq)]
7628pub struct FileExportOpts {
7629    /// If allowParentDirPath is true, the path argument can be a directory path, in which case the file will be created in that directory.
7630    #[builder(setter(into, strip_option), default)]
7631    pub allow_parent_dir_path: Option<bool>,
7632}
7633#[derive(Builder, Debug, PartialEq)]
7634pub struct FileSearchOpts<'a> {
7635    /// Allow the . pattern to match newlines in multiline mode.
7636    #[builder(setter(into, strip_option), default)]
7637    pub dotall: Option<bool>,
7638    /// Only return matching files, not lines and content
7639    #[builder(setter(into, strip_option), default)]
7640    pub files_only: Option<bool>,
7641    #[builder(setter(into, strip_option), default)]
7642    pub globs: Option<Vec<&'a str>>,
7643    /// Enable case-insensitive matching.
7644    #[builder(setter(into, strip_option), default)]
7645    pub insensitive: Option<bool>,
7646    /// Limit the number of results to return
7647    #[builder(setter(into, strip_option), default)]
7648    pub limit: Option<isize>,
7649    /// Interpret the pattern as a literal string instead of a regular expression.
7650    #[builder(setter(into, strip_option), default)]
7651    pub literal: Option<bool>,
7652    /// Enable searching across multiple lines.
7653    #[builder(setter(into, strip_option), default)]
7654    pub multiline: Option<bool>,
7655    #[builder(setter(into, strip_option), default)]
7656    pub paths: Option<Vec<&'a str>>,
7657    /// Skip hidden files (files starting with .).
7658    #[builder(setter(into, strip_option), default)]
7659    pub skip_hidden: Option<bool>,
7660    /// Honor .gitignore, .ignore, and .rgignore files.
7661    #[builder(setter(into, strip_option), default)]
7662    pub skip_ignored: Option<bool>,
7663}
7664#[derive(Builder, Debug, PartialEq)]
7665pub struct FileWithReplacedOpts {
7666    /// Replace all occurrences of the pattern.
7667    #[builder(setter(into, strip_option), default)]
7668    pub all: Option<bool>,
7669    /// Replace the first match starting from the specified line.
7670    #[builder(setter(into, strip_option), default)]
7671    pub first_from: Option<isize>,
7672}
7673impl File {
7674    /// Parse as an env file
7675    ///
7676    /// # Arguments
7677    ///
7678    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7679    pub fn as_env_file(&self) -> EnvFile {
7680        let query = self.selection.select("asEnvFile");
7681        EnvFile {
7682            proc: self.proc.clone(),
7683            selection: query,
7684            graphql_client: self.graphql_client.clone(),
7685        }
7686    }
7687    /// Parse as an env file
7688    ///
7689    /// # Arguments
7690    ///
7691    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7692    pub fn as_env_file_opts(&self, opts: FileAsEnvFileOpts) -> EnvFile {
7693        let mut query = self.selection.select("asEnvFile");
7694        if let Some(expand) = opts.expand {
7695            query = query.arg("expand", expand);
7696        }
7697        EnvFile {
7698            proc: self.proc.clone(),
7699            selection: query,
7700            graphql_client: self.graphql_client.clone(),
7701        }
7702    }
7703    /// Change the owner of the file recursively.
7704    ///
7705    /// # Arguments
7706    ///
7707    /// * `owner` - A user:group to set for the file.
7708    ///
7709    /// The user and group must be an ID (1000:1000), not a name (foo:bar).
7710    ///
7711    /// If the group is omitted, it defaults to the same as the user.
7712    pub fn chown(&self, owner: impl Into<String>) -> File {
7713        let mut query = self.selection.select("chown");
7714        query = query.arg("owner", owner.into());
7715        File {
7716            proc: self.proc.clone(),
7717            selection: query,
7718            graphql_client: self.graphql_client.clone(),
7719        }
7720    }
7721    /// Retrieves the contents of the file.
7722    ///
7723    /// # Arguments
7724    ///
7725    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7726    pub async fn contents(&self) -> Result<String, DaggerError> {
7727        let query = self.selection.select("contents");
7728        query.execute(self.graphql_client.clone()).await
7729    }
7730    /// Retrieves the contents of the file.
7731    ///
7732    /// # Arguments
7733    ///
7734    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7735    pub async fn contents_opts(&self, opts: FileContentsOpts) -> Result<String, DaggerError> {
7736        let mut query = self.selection.select("contents");
7737        if let Some(offset_lines) = opts.offset_lines {
7738            query = query.arg("offsetLines", offset_lines);
7739        }
7740        if let Some(limit_lines) = opts.limit_lines {
7741            query = query.arg("limitLines", limit_lines);
7742        }
7743        query.execute(self.graphql_client.clone()).await
7744    }
7745    /// 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.
7746    ///
7747    /// # Arguments
7748    ///
7749    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7750    pub async fn digest(&self) -> Result<String, DaggerError> {
7751        let query = self.selection.select("digest");
7752        query.execute(self.graphql_client.clone()).await
7753    }
7754    /// 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.
7755    ///
7756    /// # Arguments
7757    ///
7758    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7759    pub async fn digest_opts(&self, opts: FileDigestOpts) -> Result<String, DaggerError> {
7760        let mut query = self.selection.select("digest");
7761        if let Some(exclude_metadata) = opts.exclude_metadata {
7762            query = query.arg("excludeMetadata", exclude_metadata);
7763        }
7764        query.execute(self.graphql_client.clone()).await
7765    }
7766    /// Writes the file to a file path on the host.
7767    ///
7768    /// # Arguments
7769    ///
7770    /// * `path` - Location of the written directory (e.g., "output.txt").
7771    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7772    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
7773        let mut query = self.selection.select("export");
7774        query = query.arg("path", path.into());
7775        query.execute(self.graphql_client.clone()).await
7776    }
7777    /// Writes the file to a file path on the host.
7778    ///
7779    /// # Arguments
7780    ///
7781    /// * `path` - Location of the written directory (e.g., "output.txt").
7782    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7783    pub async fn export_opts(
7784        &self,
7785        path: impl Into<String>,
7786        opts: FileExportOpts,
7787    ) -> Result<String, DaggerError> {
7788        let mut query = self.selection.select("export");
7789        query = query.arg("path", path.into());
7790        if let Some(allow_parent_dir_path) = opts.allow_parent_dir_path {
7791            query = query.arg("allowParentDirPath", allow_parent_dir_path);
7792        }
7793        query.execute(self.graphql_client.clone()).await
7794    }
7795    /// A unique identifier for this File.
7796    pub async fn id(&self) -> Result<FileId, DaggerError> {
7797        let query = self.selection.select("id");
7798        query.execute(self.graphql_client.clone()).await
7799    }
7800    /// Retrieves the name of the file.
7801    pub async fn name(&self) -> Result<String, DaggerError> {
7802        let query = self.selection.select("name");
7803        query.execute(self.graphql_client.clone()).await
7804    }
7805    /// Searches for content matching the given regular expression or literal string.
7806    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
7807    ///
7808    /// # Arguments
7809    ///
7810    /// * `pattern` - The text to match.
7811    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7812    pub fn search(&self, pattern: impl Into<String>) -> Vec<SearchResult> {
7813        let mut query = self.selection.select("search");
7814        query = query.arg("pattern", pattern.into());
7815        vec![SearchResult {
7816            proc: self.proc.clone(),
7817            selection: query,
7818            graphql_client: self.graphql_client.clone(),
7819        }]
7820    }
7821    /// Searches for content matching the given regular expression or literal string.
7822    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
7823    ///
7824    /// # Arguments
7825    ///
7826    /// * `pattern` - The text to match.
7827    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7828    pub fn search_opts<'a>(
7829        &self,
7830        pattern: impl Into<String>,
7831        opts: FileSearchOpts<'a>,
7832    ) -> Vec<SearchResult> {
7833        let mut query = self.selection.select("search");
7834        query = query.arg("pattern", pattern.into());
7835        if let Some(literal) = opts.literal {
7836            query = query.arg("literal", literal);
7837        }
7838        if let Some(multiline) = opts.multiline {
7839            query = query.arg("multiline", multiline);
7840        }
7841        if let Some(dotall) = opts.dotall {
7842            query = query.arg("dotall", dotall);
7843        }
7844        if let Some(insensitive) = opts.insensitive {
7845            query = query.arg("insensitive", insensitive);
7846        }
7847        if let Some(skip_ignored) = opts.skip_ignored {
7848            query = query.arg("skipIgnored", skip_ignored);
7849        }
7850        if let Some(skip_hidden) = opts.skip_hidden {
7851            query = query.arg("skipHidden", skip_hidden);
7852        }
7853        if let Some(files_only) = opts.files_only {
7854            query = query.arg("filesOnly", files_only);
7855        }
7856        if let Some(limit) = opts.limit {
7857            query = query.arg("limit", limit);
7858        }
7859        if let Some(paths) = opts.paths {
7860            query = query.arg("paths", paths);
7861        }
7862        if let Some(globs) = opts.globs {
7863            query = query.arg("globs", globs);
7864        }
7865        vec![SearchResult {
7866            proc: self.proc.clone(),
7867            selection: query,
7868            graphql_client: self.graphql_client.clone(),
7869        }]
7870    }
7871    /// Retrieves the size of the file, in bytes.
7872    pub async fn size(&self) -> Result<isize, DaggerError> {
7873        let query = self.selection.select("size");
7874        query.execute(self.graphql_client.clone()).await
7875    }
7876    /// Force evaluation in the engine.
7877    pub async fn sync(&self) -> Result<FileId, DaggerError> {
7878        let query = self.selection.select("sync");
7879        query.execute(self.graphql_client.clone()).await
7880    }
7881    /// Retrieves this file with its name set to the given name.
7882    ///
7883    /// # Arguments
7884    ///
7885    /// * `name` - Name to set file to.
7886    pub fn with_name(&self, name: impl Into<String>) -> File {
7887        let mut query = self.selection.select("withName");
7888        query = query.arg("name", name.into());
7889        File {
7890            proc: self.proc.clone(),
7891            selection: query,
7892            graphql_client: self.graphql_client.clone(),
7893        }
7894    }
7895    /// Retrieves the file with content replaced with the given text.
7896    /// If 'all' is true, all occurrences of the pattern will be replaced.
7897    /// If 'firstAfter' is specified, only the first match starting at the specified line will be replaced.
7898    /// If neither are specified, and there are multiple matches for the pattern, this will error.
7899    /// If there are no matches for the pattern, this will error.
7900    ///
7901    /// # Arguments
7902    ///
7903    /// * `search` - The text to match.
7904    /// * `replacement` - The text to match.
7905    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7906    pub fn with_replaced(&self, search: impl Into<String>, replacement: impl Into<String>) -> File {
7907        let mut query = self.selection.select("withReplaced");
7908        query = query.arg("search", search.into());
7909        query = query.arg("replacement", replacement.into());
7910        File {
7911            proc: self.proc.clone(),
7912            selection: query,
7913            graphql_client: self.graphql_client.clone(),
7914        }
7915    }
7916    /// Retrieves the file with content replaced with the given text.
7917    /// If 'all' is true, all occurrences of the pattern will be replaced.
7918    /// If 'firstAfter' is specified, only the first match starting at the specified line will be replaced.
7919    /// If neither are specified, and there are multiple matches for the pattern, this will error.
7920    /// If there are no matches for the pattern, this will error.
7921    ///
7922    /// # Arguments
7923    ///
7924    /// * `search` - The text to match.
7925    /// * `replacement` - The text to match.
7926    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7927    pub fn with_replaced_opts(
7928        &self,
7929        search: impl Into<String>,
7930        replacement: impl Into<String>,
7931        opts: FileWithReplacedOpts,
7932    ) -> File {
7933        let mut query = self.selection.select("withReplaced");
7934        query = query.arg("search", search.into());
7935        query = query.arg("replacement", replacement.into());
7936        if let Some(all) = opts.all {
7937            query = query.arg("all", all);
7938        }
7939        if let Some(first_from) = opts.first_from {
7940            query = query.arg("firstFrom", first_from);
7941        }
7942        File {
7943            proc: self.proc.clone(),
7944            selection: query,
7945            graphql_client: self.graphql_client.clone(),
7946        }
7947    }
7948    /// Retrieves this file with its created/modified timestamps set to the given time.
7949    ///
7950    /// # Arguments
7951    ///
7952    /// * `timestamp` - Timestamp to set dir/files in.
7953    ///
7954    /// Formatted in seconds following Unix epoch (e.g., 1672531199).
7955    pub fn with_timestamps(&self, timestamp: isize) -> File {
7956        let mut query = self.selection.select("withTimestamps");
7957        query = query.arg("timestamp", timestamp);
7958        File {
7959            proc: self.proc.clone(),
7960            selection: query,
7961            graphql_client: self.graphql_client.clone(),
7962        }
7963    }
7964}
7965#[derive(Clone)]
7966pub struct Function {
7967    pub proc: Option<Arc<DaggerSessionProc>>,
7968    pub selection: Selection,
7969    pub graphql_client: DynGraphQLClient,
7970}
7971#[derive(Builder, Debug, PartialEq)]
7972pub struct FunctionWithArgOpts<'a> {
7973    /// If the argument is a Directory or File type, default to load path from context directory, relative to root directory.
7974    #[builder(setter(into, strip_option), default)]
7975    pub default_path: Option<&'a str>,
7976    /// A default value to use for this argument if not explicitly set by the caller, if any
7977    #[builder(setter(into, strip_option), default)]
7978    pub default_value: Option<Json>,
7979    /// A doc string for the argument, if any
7980    #[builder(setter(into, strip_option), default)]
7981    pub description: Option<&'a str>,
7982    /// Patterns to ignore when loading the contextual argument value.
7983    #[builder(setter(into, strip_option), default)]
7984    pub ignore: Option<Vec<&'a str>>,
7985    /// The source map for the argument definition.
7986    #[builder(setter(into, strip_option), default)]
7987    pub source_map: Option<SourceMapId>,
7988}
7989impl Function {
7990    /// Arguments accepted by the function, if any.
7991    pub fn args(&self) -> Vec<FunctionArg> {
7992        let query = self.selection.select("args");
7993        vec![FunctionArg {
7994            proc: self.proc.clone(),
7995            selection: query,
7996            graphql_client: self.graphql_client.clone(),
7997        }]
7998    }
7999    /// A doc string for the function, if any.
8000    pub async fn description(&self) -> Result<String, DaggerError> {
8001        let query = self.selection.select("description");
8002        query.execute(self.graphql_client.clone()).await
8003    }
8004    /// A unique identifier for this Function.
8005    pub async fn id(&self) -> Result<FunctionId, DaggerError> {
8006        let query = self.selection.select("id");
8007        query.execute(self.graphql_client.clone()).await
8008    }
8009    /// The name of the function.
8010    pub async fn name(&self) -> Result<String, DaggerError> {
8011        let query = self.selection.select("name");
8012        query.execute(self.graphql_client.clone()).await
8013    }
8014    /// The type returned by the function.
8015    pub fn return_type(&self) -> TypeDef {
8016        let query = self.selection.select("returnType");
8017        TypeDef {
8018            proc: self.proc.clone(),
8019            selection: query,
8020            graphql_client: self.graphql_client.clone(),
8021        }
8022    }
8023    /// The location of this function declaration.
8024    pub fn source_map(&self) -> SourceMap {
8025        let query = self.selection.select("sourceMap");
8026        SourceMap {
8027            proc: self.proc.clone(),
8028            selection: query,
8029            graphql_client: self.graphql_client.clone(),
8030        }
8031    }
8032    /// Returns the function with the provided argument
8033    ///
8034    /// # Arguments
8035    ///
8036    /// * `name` - The name of the argument
8037    /// * `type_def` - The type of the argument
8038    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8039    pub fn with_arg(&self, name: impl Into<String>, type_def: impl IntoID<TypeDefId>) -> Function {
8040        let mut query = self.selection.select("withArg");
8041        query = query.arg("name", name.into());
8042        query = query.arg_lazy(
8043            "typeDef",
8044            Box::new(move || {
8045                let type_def = type_def.clone();
8046                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
8047            }),
8048        );
8049        Function {
8050            proc: self.proc.clone(),
8051            selection: query,
8052            graphql_client: self.graphql_client.clone(),
8053        }
8054    }
8055    /// Returns the function with the provided argument
8056    ///
8057    /// # Arguments
8058    ///
8059    /// * `name` - The name of the argument
8060    /// * `type_def` - The type of the argument
8061    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8062    pub fn with_arg_opts<'a>(
8063        &self,
8064        name: impl Into<String>,
8065        type_def: impl IntoID<TypeDefId>,
8066        opts: FunctionWithArgOpts<'a>,
8067    ) -> Function {
8068        let mut query = self.selection.select("withArg");
8069        query = query.arg("name", name.into());
8070        query = query.arg_lazy(
8071            "typeDef",
8072            Box::new(move || {
8073                let type_def = type_def.clone();
8074                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
8075            }),
8076        );
8077        if let Some(description) = opts.description {
8078            query = query.arg("description", description);
8079        }
8080        if let Some(default_value) = opts.default_value {
8081            query = query.arg("defaultValue", default_value);
8082        }
8083        if let Some(default_path) = opts.default_path {
8084            query = query.arg("defaultPath", default_path);
8085        }
8086        if let Some(ignore) = opts.ignore {
8087            query = query.arg("ignore", ignore);
8088        }
8089        if let Some(source_map) = opts.source_map {
8090            query = query.arg("sourceMap", source_map);
8091        }
8092        Function {
8093            proc: self.proc.clone(),
8094            selection: query,
8095            graphql_client: self.graphql_client.clone(),
8096        }
8097    }
8098    /// Returns the function with the given doc string.
8099    ///
8100    /// # Arguments
8101    ///
8102    /// * `description` - The doc string to set.
8103    pub fn with_description(&self, description: impl Into<String>) -> Function {
8104        let mut query = self.selection.select("withDescription");
8105        query = query.arg("description", description.into());
8106        Function {
8107            proc: self.proc.clone(),
8108            selection: query,
8109            graphql_client: self.graphql_client.clone(),
8110        }
8111    }
8112    /// Returns the function with the given source map.
8113    ///
8114    /// # Arguments
8115    ///
8116    /// * `source_map` - The source map for the function definition.
8117    pub fn with_source_map(&self, source_map: impl IntoID<SourceMapId>) -> Function {
8118        let mut query = self.selection.select("withSourceMap");
8119        query = query.arg_lazy(
8120            "sourceMap",
8121            Box::new(move || {
8122                let source_map = source_map.clone();
8123                Box::pin(async move { source_map.into_id().await.unwrap().quote() })
8124            }),
8125        );
8126        Function {
8127            proc: self.proc.clone(),
8128            selection: query,
8129            graphql_client: self.graphql_client.clone(),
8130        }
8131    }
8132}
8133#[derive(Clone)]
8134pub struct FunctionArg {
8135    pub proc: Option<Arc<DaggerSessionProc>>,
8136    pub selection: Selection,
8137    pub graphql_client: DynGraphQLClient,
8138}
8139impl FunctionArg {
8140    /// 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
8141    pub async fn default_path(&self) -> Result<String, DaggerError> {
8142        let query = self.selection.select("defaultPath");
8143        query.execute(self.graphql_client.clone()).await
8144    }
8145    /// A default value to use for this argument when not explicitly set by the caller, if any.
8146    pub async fn default_value(&self) -> Result<Json, DaggerError> {
8147        let query = self.selection.select("defaultValue");
8148        query.execute(self.graphql_client.clone()).await
8149    }
8150    /// A doc string for the argument, if any.
8151    pub async fn description(&self) -> Result<String, DaggerError> {
8152        let query = self.selection.select("description");
8153        query.execute(self.graphql_client.clone()).await
8154    }
8155    /// A unique identifier for this FunctionArg.
8156    pub async fn id(&self) -> Result<FunctionArgId, DaggerError> {
8157        let query = self.selection.select("id");
8158        query.execute(self.graphql_client.clone()).await
8159    }
8160    /// 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.
8161    pub async fn ignore(&self) -> Result<Vec<String>, DaggerError> {
8162        let query = self.selection.select("ignore");
8163        query.execute(self.graphql_client.clone()).await
8164    }
8165    /// The name of the argument in lowerCamelCase format.
8166    pub async fn name(&self) -> Result<String, DaggerError> {
8167        let query = self.selection.select("name");
8168        query.execute(self.graphql_client.clone()).await
8169    }
8170    /// The location of this arg declaration.
8171    pub fn source_map(&self) -> SourceMap {
8172        let query = self.selection.select("sourceMap");
8173        SourceMap {
8174            proc: self.proc.clone(),
8175            selection: query,
8176            graphql_client: self.graphql_client.clone(),
8177        }
8178    }
8179    /// The type of the argument.
8180    pub fn type_def(&self) -> TypeDef {
8181        let query = self.selection.select("typeDef");
8182        TypeDef {
8183            proc: self.proc.clone(),
8184            selection: query,
8185            graphql_client: self.graphql_client.clone(),
8186        }
8187    }
8188}
8189#[derive(Clone)]
8190pub struct FunctionCall {
8191    pub proc: Option<Arc<DaggerSessionProc>>,
8192    pub selection: Selection,
8193    pub graphql_client: DynGraphQLClient,
8194}
8195impl FunctionCall {
8196    /// A unique identifier for this FunctionCall.
8197    pub async fn id(&self) -> Result<FunctionCallId, DaggerError> {
8198        let query = self.selection.select("id");
8199        query.execute(self.graphql_client.clone()).await
8200    }
8201    /// The argument values the function is being invoked with.
8202    pub fn input_args(&self) -> Vec<FunctionCallArgValue> {
8203        let query = self.selection.select("inputArgs");
8204        vec![FunctionCallArgValue {
8205            proc: self.proc.clone(),
8206            selection: query,
8207            graphql_client: self.graphql_client.clone(),
8208        }]
8209    }
8210    /// The name of the function being called.
8211    pub async fn name(&self) -> Result<String, DaggerError> {
8212        let query = self.selection.select("name");
8213        query.execute(self.graphql_client.clone()).await
8214    }
8215    /// 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.
8216    pub async fn parent(&self) -> Result<Json, DaggerError> {
8217        let query = self.selection.select("parent");
8218        query.execute(self.graphql_client.clone()).await
8219    }
8220    /// 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.
8221    pub async fn parent_name(&self) -> Result<String, DaggerError> {
8222        let query = self.selection.select("parentName");
8223        query.execute(self.graphql_client.clone()).await
8224    }
8225    /// Return an error from the function.
8226    ///
8227    /// # Arguments
8228    ///
8229    /// * `error` - The error to return.
8230    pub async fn return_error(&self, error: impl IntoID<ErrorId>) -> Result<Void, DaggerError> {
8231        let mut query = self.selection.select("returnError");
8232        query = query.arg_lazy(
8233            "error",
8234            Box::new(move || {
8235                let error = error.clone();
8236                Box::pin(async move { error.into_id().await.unwrap().quote() })
8237            }),
8238        );
8239        query.execute(self.graphql_client.clone()).await
8240    }
8241    /// Set the return value of the function call to the provided value.
8242    ///
8243    /// # Arguments
8244    ///
8245    /// * `value` - JSON serialization of the return value.
8246    pub async fn return_value(&self, value: Json) -> Result<Void, DaggerError> {
8247        let mut query = self.selection.select("returnValue");
8248        query = query.arg("value", value);
8249        query.execute(self.graphql_client.clone()).await
8250    }
8251}
8252#[derive(Clone)]
8253pub struct FunctionCallArgValue {
8254    pub proc: Option<Arc<DaggerSessionProc>>,
8255    pub selection: Selection,
8256    pub graphql_client: DynGraphQLClient,
8257}
8258impl FunctionCallArgValue {
8259    /// A unique identifier for this FunctionCallArgValue.
8260    pub async fn id(&self) -> Result<FunctionCallArgValueId, DaggerError> {
8261        let query = self.selection.select("id");
8262        query.execute(self.graphql_client.clone()).await
8263    }
8264    /// The name of the argument.
8265    pub async fn name(&self) -> Result<String, DaggerError> {
8266        let query = self.selection.select("name");
8267        query.execute(self.graphql_client.clone()).await
8268    }
8269    /// The value of the argument represented as a JSON serialized string.
8270    pub async fn value(&self) -> Result<Json, DaggerError> {
8271        let query = self.selection.select("value");
8272        query.execute(self.graphql_client.clone()).await
8273    }
8274}
8275#[derive(Clone)]
8276pub struct GeneratedCode {
8277    pub proc: Option<Arc<DaggerSessionProc>>,
8278    pub selection: Selection,
8279    pub graphql_client: DynGraphQLClient,
8280}
8281impl GeneratedCode {
8282    /// The directory containing the generated code.
8283    pub fn code(&self) -> Directory {
8284        let query = self.selection.select("code");
8285        Directory {
8286            proc: self.proc.clone(),
8287            selection: query,
8288            graphql_client: self.graphql_client.clone(),
8289        }
8290    }
8291    /// A unique identifier for this GeneratedCode.
8292    pub async fn id(&self) -> Result<GeneratedCodeId, DaggerError> {
8293        let query = self.selection.select("id");
8294        query.execute(self.graphql_client.clone()).await
8295    }
8296    /// List of paths to mark generated in version control (i.e. .gitattributes).
8297    pub async fn vcs_generated_paths(&self) -> Result<Vec<String>, DaggerError> {
8298        let query = self.selection.select("vcsGeneratedPaths");
8299        query.execute(self.graphql_client.clone()).await
8300    }
8301    /// List of paths to ignore in version control (i.e. .gitignore).
8302    pub async fn vcs_ignored_paths(&self) -> Result<Vec<String>, DaggerError> {
8303        let query = self.selection.select("vcsIgnoredPaths");
8304        query.execute(self.graphql_client.clone()).await
8305    }
8306    /// Set the list of paths to mark generated in version control.
8307    pub fn with_vcs_generated_paths(&self, paths: Vec<impl Into<String>>) -> GeneratedCode {
8308        let mut query = self.selection.select("withVCSGeneratedPaths");
8309        query = query.arg(
8310            "paths",
8311            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
8312        );
8313        GeneratedCode {
8314            proc: self.proc.clone(),
8315            selection: query,
8316            graphql_client: self.graphql_client.clone(),
8317        }
8318    }
8319    /// Set the list of paths to ignore in version control.
8320    pub fn with_vcs_ignored_paths(&self, paths: Vec<impl Into<String>>) -> GeneratedCode {
8321        let mut query = self.selection.select("withVCSIgnoredPaths");
8322        query = query.arg(
8323            "paths",
8324            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
8325        );
8326        GeneratedCode {
8327            proc: self.proc.clone(),
8328            selection: query,
8329            graphql_client: self.graphql_client.clone(),
8330        }
8331    }
8332}
8333#[derive(Clone)]
8334pub struct GitRef {
8335    pub proc: Option<Arc<DaggerSessionProc>>,
8336    pub selection: Selection,
8337    pub graphql_client: DynGraphQLClient,
8338}
8339#[derive(Builder, Debug, PartialEq)]
8340pub struct GitRefTreeOpts {
8341    /// The depth of the tree to fetch.
8342    #[builder(setter(into, strip_option), default)]
8343    pub depth: Option<isize>,
8344    /// Set to true to discard .git directory.
8345    #[builder(setter(into, strip_option), default)]
8346    pub discard_git_dir: Option<bool>,
8347}
8348impl GitRef {
8349    /// The resolved commit id at this ref.
8350    pub async fn commit(&self) -> Result<String, DaggerError> {
8351        let query = self.selection.select("commit");
8352        query.execute(self.graphql_client.clone()).await
8353    }
8354    /// Find the best common ancestor between this ref and another ref.
8355    ///
8356    /// # Arguments
8357    ///
8358    /// * `other` - The other ref to compare against.
8359    pub fn common_ancestor(&self, other: impl IntoID<GitRefId>) -> GitRef {
8360        let mut query = self.selection.select("commonAncestor");
8361        query = query.arg_lazy(
8362            "other",
8363            Box::new(move || {
8364                let other = other.clone();
8365                Box::pin(async move { other.into_id().await.unwrap().quote() })
8366            }),
8367        );
8368        GitRef {
8369            proc: self.proc.clone(),
8370            selection: query,
8371            graphql_client: self.graphql_client.clone(),
8372        }
8373    }
8374    /// A unique identifier for this GitRef.
8375    pub async fn id(&self) -> Result<GitRefId, DaggerError> {
8376        let query = self.selection.select("id");
8377        query.execute(self.graphql_client.clone()).await
8378    }
8379    /// The resolved ref name at this ref.
8380    pub async fn r#ref(&self) -> Result<String, DaggerError> {
8381        let query = self.selection.select("ref");
8382        query.execute(self.graphql_client.clone()).await
8383    }
8384    /// The filesystem tree at this ref.
8385    ///
8386    /// # Arguments
8387    ///
8388    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8389    pub fn tree(&self) -> Directory {
8390        let query = self.selection.select("tree");
8391        Directory {
8392            proc: self.proc.clone(),
8393            selection: query,
8394            graphql_client: self.graphql_client.clone(),
8395        }
8396    }
8397    /// The filesystem tree at this ref.
8398    ///
8399    /// # Arguments
8400    ///
8401    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8402    pub fn tree_opts(&self, opts: GitRefTreeOpts) -> Directory {
8403        let mut query = self.selection.select("tree");
8404        if let Some(discard_git_dir) = opts.discard_git_dir {
8405            query = query.arg("discardGitDir", discard_git_dir);
8406        }
8407        if let Some(depth) = opts.depth {
8408            query = query.arg("depth", depth);
8409        }
8410        Directory {
8411            proc: self.proc.clone(),
8412            selection: query,
8413            graphql_client: self.graphql_client.clone(),
8414        }
8415    }
8416}
8417#[derive(Clone)]
8418pub struct GitRepository {
8419    pub proc: Option<Arc<DaggerSessionProc>>,
8420    pub selection: Selection,
8421    pub graphql_client: DynGraphQLClient,
8422}
8423#[derive(Builder, Debug, PartialEq)]
8424pub struct GitRepositoryBranchesOpts<'a> {
8425    /// Glob patterns (e.g., "refs/tags/v*").
8426    #[builder(setter(into, strip_option), default)]
8427    pub patterns: Option<Vec<&'a str>>,
8428}
8429#[derive(Builder, Debug, PartialEq)]
8430pub struct GitRepositoryTagsOpts<'a> {
8431    /// Glob patterns (e.g., "refs/tags/v*").
8432    #[builder(setter(into, strip_option), default)]
8433    pub patterns: Option<Vec<&'a str>>,
8434}
8435impl GitRepository {
8436    /// Returns details of a branch.
8437    ///
8438    /// # Arguments
8439    ///
8440    /// * `name` - Branch's name (e.g., "main").
8441    pub fn branch(&self, name: impl Into<String>) -> GitRef {
8442        let mut query = self.selection.select("branch");
8443        query = query.arg("name", name.into());
8444        GitRef {
8445            proc: self.proc.clone(),
8446            selection: query,
8447            graphql_client: self.graphql_client.clone(),
8448        }
8449    }
8450    /// branches that match any of the given glob patterns.
8451    ///
8452    /// # Arguments
8453    ///
8454    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8455    pub async fn branches(&self) -> Result<Vec<String>, DaggerError> {
8456        let query = self.selection.select("branches");
8457        query.execute(self.graphql_client.clone()).await
8458    }
8459    /// branches that match any of the given glob patterns.
8460    ///
8461    /// # Arguments
8462    ///
8463    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8464    pub async fn branches_opts<'a>(
8465        &self,
8466        opts: GitRepositoryBranchesOpts<'a>,
8467    ) -> Result<Vec<String>, DaggerError> {
8468        let mut query = self.selection.select("branches");
8469        if let Some(patterns) = opts.patterns {
8470            query = query.arg("patterns", patterns);
8471        }
8472        query.execute(self.graphql_client.clone()).await
8473    }
8474    /// Returns details of a commit.
8475    ///
8476    /// # Arguments
8477    ///
8478    /// * `id` - Identifier of the commit (e.g., "b6315d8f2810962c601af73f86831f6866ea798b").
8479    pub fn commit(&self, id: impl Into<String>) -> GitRef {
8480        let mut query = self.selection.select("commit");
8481        query = query.arg("id", id.into());
8482        GitRef {
8483            proc: self.proc.clone(),
8484            selection: query,
8485            graphql_client: self.graphql_client.clone(),
8486        }
8487    }
8488    /// Returns details for HEAD.
8489    pub fn head(&self) -> GitRef {
8490        let query = self.selection.select("head");
8491        GitRef {
8492            proc: self.proc.clone(),
8493            selection: query,
8494            graphql_client: self.graphql_client.clone(),
8495        }
8496    }
8497    /// A unique identifier for this GitRepository.
8498    pub async fn id(&self) -> Result<GitRepositoryId, DaggerError> {
8499        let query = self.selection.select("id");
8500        query.execute(self.graphql_client.clone()).await
8501    }
8502    /// Returns details for the latest semver tag.
8503    pub fn latest_version(&self) -> GitRef {
8504        let query = self.selection.select("latestVersion");
8505        GitRef {
8506            proc: self.proc.clone(),
8507            selection: query,
8508            graphql_client: self.graphql_client.clone(),
8509        }
8510    }
8511    /// Returns details of a ref.
8512    ///
8513    /// # Arguments
8514    ///
8515    /// * `name` - Ref's name (can be a commit identifier, a tag name, a branch name, or a fully-qualified ref).
8516    pub fn r#ref(&self, name: impl Into<String>) -> GitRef {
8517        let mut query = self.selection.select("ref");
8518        query = query.arg("name", name.into());
8519        GitRef {
8520            proc: self.proc.clone(),
8521            selection: query,
8522            graphql_client: self.graphql_client.clone(),
8523        }
8524    }
8525    /// Returns details of a tag.
8526    ///
8527    /// # Arguments
8528    ///
8529    /// * `name` - Tag's name (e.g., "v0.3.9").
8530    pub fn tag(&self, name: impl Into<String>) -> GitRef {
8531        let mut query = self.selection.select("tag");
8532        query = query.arg("name", name.into());
8533        GitRef {
8534            proc: self.proc.clone(),
8535            selection: query,
8536            graphql_client: self.graphql_client.clone(),
8537        }
8538    }
8539    /// tags that match any of the given glob patterns.
8540    ///
8541    /// # Arguments
8542    ///
8543    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8544    pub async fn tags(&self) -> Result<Vec<String>, DaggerError> {
8545        let query = self.selection.select("tags");
8546        query.execute(self.graphql_client.clone()).await
8547    }
8548    /// tags that match any of the given glob patterns.
8549    ///
8550    /// # Arguments
8551    ///
8552    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8553    pub async fn tags_opts<'a>(
8554        &self,
8555        opts: GitRepositoryTagsOpts<'a>,
8556    ) -> Result<Vec<String>, DaggerError> {
8557        let mut query = self.selection.select("tags");
8558        if let Some(patterns) = opts.patterns {
8559            query = query.arg("patterns", patterns);
8560        }
8561        query.execute(self.graphql_client.clone()).await
8562    }
8563    /// The URL of the git repository.
8564    pub async fn url(&self) -> Result<String, DaggerError> {
8565        let query = self.selection.select("url");
8566        query.execute(self.graphql_client.clone()).await
8567    }
8568    /// Header to authenticate the remote with.
8569    ///
8570    /// # Arguments
8571    ///
8572    /// * `header` - Secret used to populate the Authorization HTTP header
8573    pub fn with_auth_header(&self, header: impl IntoID<SecretId>) -> GitRepository {
8574        let mut query = self.selection.select("withAuthHeader");
8575        query = query.arg_lazy(
8576            "header",
8577            Box::new(move || {
8578                let header = header.clone();
8579                Box::pin(async move { header.into_id().await.unwrap().quote() })
8580            }),
8581        );
8582        GitRepository {
8583            proc: self.proc.clone(),
8584            selection: query,
8585            graphql_client: self.graphql_client.clone(),
8586        }
8587    }
8588    /// Token to authenticate the remote with.
8589    ///
8590    /// # Arguments
8591    ///
8592    /// * `token` - Secret used to populate the password during basic HTTP Authorization
8593    pub fn with_auth_token(&self, token: impl IntoID<SecretId>) -> GitRepository {
8594        let mut query = self.selection.select("withAuthToken");
8595        query = query.arg_lazy(
8596            "token",
8597            Box::new(move || {
8598                let token = token.clone();
8599                Box::pin(async move { token.into_id().await.unwrap().quote() })
8600            }),
8601        );
8602        GitRepository {
8603            proc: self.proc.clone(),
8604            selection: query,
8605            graphql_client: self.graphql_client.clone(),
8606        }
8607    }
8608}
8609#[derive(Clone)]
8610pub struct Host {
8611    pub proc: Option<Arc<DaggerSessionProc>>,
8612    pub selection: Selection,
8613    pub graphql_client: DynGraphQLClient,
8614}
8615#[derive(Builder, Debug, PartialEq)]
8616pub struct HostDirectoryOpts<'a> {
8617    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
8618    #[builder(setter(into, strip_option), default)]
8619    pub exclude: Option<Vec<&'a str>>,
8620    /// Apply .gitignore filter rules inside the directory
8621    #[builder(setter(into, strip_option), default)]
8622    pub gitignore: Option<bool>,
8623    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
8624    #[builder(setter(into, strip_option), default)]
8625    pub include: Option<Vec<&'a str>>,
8626    /// If true, the directory will always be reloaded from the host.
8627    #[builder(setter(into, strip_option), default)]
8628    pub no_cache: Option<bool>,
8629}
8630#[derive(Builder, Debug, PartialEq)]
8631pub struct HostFileOpts {
8632    /// If true, the file will always be reloaded from the host.
8633    #[builder(setter(into, strip_option), default)]
8634    pub no_cache: Option<bool>,
8635}
8636#[derive(Builder, Debug, PartialEq)]
8637pub struct HostFindUpOpts {
8638    #[builder(setter(into, strip_option), default)]
8639    pub no_cache: Option<bool>,
8640}
8641#[derive(Builder, Debug, PartialEq)]
8642pub struct HostServiceOpts<'a> {
8643    /// Upstream host to forward traffic to.
8644    #[builder(setter(into, strip_option), default)]
8645    pub host: Option<&'a str>,
8646}
8647#[derive(Builder, Debug, PartialEq)]
8648pub struct HostTunnelOpts {
8649    /// Map each service port to the same port on the host, as if the service were running natively.
8650    /// Note: enabling may result in port conflicts.
8651    #[builder(setter(into, strip_option), default)]
8652    pub native: Option<bool>,
8653    /// Configure explicit port forwarding rules for the tunnel.
8654    /// If a port's frontend is unspecified or 0, a random port will be chosen by the host.
8655    /// 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.
8656    /// If ports are given and native is true, the ports are additive.
8657    #[builder(setter(into, strip_option), default)]
8658    pub ports: Option<Vec<PortForward>>,
8659}
8660impl Host {
8661    /// Accesses a container image on the host.
8662    ///
8663    /// # Arguments
8664    ///
8665    /// * `name` - Name of the image to access.
8666    pub fn container_image(&self, name: impl Into<String>) -> Container {
8667        let mut query = self.selection.select("containerImage");
8668        query = query.arg("name", name.into());
8669        Container {
8670            proc: self.proc.clone(),
8671            selection: query,
8672            graphql_client: self.graphql_client.clone(),
8673        }
8674    }
8675    /// Accesses a directory on the host.
8676    ///
8677    /// # Arguments
8678    ///
8679    /// * `path` - Location of the directory to access (e.g., ".").
8680    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8681    pub fn directory(&self, path: impl Into<String>) -> Directory {
8682        let mut query = self.selection.select("directory");
8683        query = query.arg("path", path.into());
8684        Directory {
8685            proc: self.proc.clone(),
8686            selection: query,
8687            graphql_client: self.graphql_client.clone(),
8688        }
8689    }
8690    /// Accesses a directory on the host.
8691    ///
8692    /// # Arguments
8693    ///
8694    /// * `path` - Location of the directory to access (e.g., ".").
8695    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8696    pub fn directory_opts<'a>(
8697        &self,
8698        path: impl Into<String>,
8699        opts: HostDirectoryOpts<'a>,
8700    ) -> Directory {
8701        let mut query = self.selection.select("directory");
8702        query = query.arg("path", path.into());
8703        if let Some(exclude) = opts.exclude {
8704            query = query.arg("exclude", exclude);
8705        }
8706        if let Some(include) = opts.include {
8707            query = query.arg("include", include);
8708        }
8709        if let Some(no_cache) = opts.no_cache {
8710            query = query.arg("noCache", no_cache);
8711        }
8712        if let Some(gitignore) = opts.gitignore {
8713            query = query.arg("gitignore", gitignore);
8714        }
8715        Directory {
8716            proc: self.proc.clone(),
8717            selection: query,
8718            graphql_client: self.graphql_client.clone(),
8719        }
8720    }
8721    /// Accesses a file on the host.
8722    ///
8723    /// # Arguments
8724    ///
8725    /// * `path` - Location of the file to retrieve (e.g., "README.md").
8726    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8727    pub fn file(&self, path: impl Into<String>) -> File {
8728        let mut query = self.selection.select("file");
8729        query = query.arg("path", path.into());
8730        File {
8731            proc: self.proc.clone(),
8732            selection: query,
8733            graphql_client: self.graphql_client.clone(),
8734        }
8735    }
8736    /// Accesses a file on the host.
8737    ///
8738    /// # Arguments
8739    ///
8740    /// * `path` - Location of the file to retrieve (e.g., "README.md").
8741    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8742    pub fn file_opts(&self, path: impl Into<String>, opts: HostFileOpts) -> File {
8743        let mut query = self.selection.select("file");
8744        query = query.arg("path", path.into());
8745        if let Some(no_cache) = opts.no_cache {
8746            query = query.arg("noCache", no_cache);
8747        }
8748        File {
8749            proc: self.proc.clone(),
8750            selection: query,
8751            graphql_client: self.graphql_client.clone(),
8752        }
8753    }
8754    /// Search for a file or directory by walking up the tree from system workdir. Return its relative path. If no match, return null
8755    ///
8756    /// # Arguments
8757    ///
8758    /// * `name` - name of the file or directory to search for
8759    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8760    pub async fn find_up(&self, name: impl Into<String>) -> Result<String, DaggerError> {
8761        let mut query = self.selection.select("findUp");
8762        query = query.arg("name", name.into());
8763        query.execute(self.graphql_client.clone()).await
8764    }
8765    /// Search for a file or directory by walking up the tree from system workdir. Return its relative path. If no match, return null
8766    ///
8767    /// # Arguments
8768    ///
8769    /// * `name` - name of the file or directory to search for
8770    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8771    pub async fn find_up_opts(
8772        &self,
8773        name: impl Into<String>,
8774        opts: HostFindUpOpts,
8775    ) -> Result<String, DaggerError> {
8776        let mut query = self.selection.select("findUp");
8777        query = query.arg("name", name.into());
8778        if let Some(no_cache) = opts.no_cache {
8779            query = query.arg("noCache", no_cache);
8780        }
8781        query.execute(self.graphql_client.clone()).await
8782    }
8783    /// A unique identifier for this Host.
8784    pub async fn id(&self) -> Result<HostId, DaggerError> {
8785        let query = self.selection.select("id");
8786        query.execute(self.graphql_client.clone()).await
8787    }
8788    /// Creates a service that forwards traffic to a specified address via the host.
8789    ///
8790    /// # Arguments
8791    ///
8792    /// * `ports` - Ports to expose via the service, forwarding through the host network.
8793    ///
8794    /// If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
8795    ///
8796    /// An empty set of ports is not valid; an error will be returned.
8797    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8798    pub fn service(&self, ports: Vec<PortForward>) -> Service {
8799        let mut query = self.selection.select("service");
8800        query = query.arg("ports", ports);
8801        Service {
8802            proc: self.proc.clone(),
8803            selection: query,
8804            graphql_client: self.graphql_client.clone(),
8805        }
8806    }
8807    /// Creates a service that forwards traffic to a specified address via the host.
8808    ///
8809    /// # Arguments
8810    ///
8811    /// * `ports` - Ports to expose via the service, forwarding through the host network.
8812    ///
8813    /// If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
8814    ///
8815    /// An empty set of ports is not valid; an error will be returned.
8816    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8817    pub fn service_opts<'a>(&self, ports: Vec<PortForward>, opts: HostServiceOpts<'a>) -> Service {
8818        let mut query = self.selection.select("service");
8819        query = query.arg("ports", ports);
8820        if let Some(host) = opts.host {
8821            query = query.arg("host", host);
8822        }
8823        Service {
8824            proc: self.proc.clone(),
8825            selection: query,
8826            graphql_client: self.graphql_client.clone(),
8827        }
8828    }
8829    /// Sets a secret given a user-defined name and the file path on the host, and returns the secret.
8830    /// The file is limited to a size of 512000 bytes.
8831    ///
8832    /// # Arguments
8833    ///
8834    /// * `name` - The user defined name for this secret.
8835    /// * `path` - Location of the file to set as a secret.
8836    pub fn set_secret_file(&self, name: impl Into<String>, path: impl Into<String>) -> Secret {
8837        let mut query = self.selection.select("setSecretFile");
8838        query = query.arg("name", name.into());
8839        query = query.arg("path", path.into());
8840        Secret {
8841            proc: self.proc.clone(),
8842            selection: query,
8843            graphql_client: self.graphql_client.clone(),
8844        }
8845    }
8846    /// Creates a tunnel that forwards traffic from the host to a service.
8847    ///
8848    /// # Arguments
8849    ///
8850    /// * `service` - Service to send traffic from the tunnel.
8851    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8852    pub fn tunnel(&self, service: impl IntoID<ServiceId>) -> Service {
8853        let mut query = self.selection.select("tunnel");
8854        query = query.arg_lazy(
8855            "service",
8856            Box::new(move || {
8857                let service = service.clone();
8858                Box::pin(async move { service.into_id().await.unwrap().quote() })
8859            }),
8860        );
8861        Service {
8862            proc: self.proc.clone(),
8863            selection: query,
8864            graphql_client: self.graphql_client.clone(),
8865        }
8866    }
8867    /// Creates a tunnel that forwards traffic from the host to a service.
8868    ///
8869    /// # Arguments
8870    ///
8871    /// * `service` - Service to send traffic from the tunnel.
8872    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8873    pub fn tunnel_opts(&self, service: impl IntoID<ServiceId>, opts: HostTunnelOpts) -> Service {
8874        let mut query = self.selection.select("tunnel");
8875        query = query.arg_lazy(
8876            "service",
8877            Box::new(move || {
8878                let service = service.clone();
8879                Box::pin(async move { service.into_id().await.unwrap().quote() })
8880            }),
8881        );
8882        if let Some(native) = opts.native {
8883            query = query.arg("native", native);
8884        }
8885        if let Some(ports) = opts.ports {
8886            query = query.arg("ports", ports);
8887        }
8888        Service {
8889            proc: self.proc.clone(),
8890            selection: query,
8891            graphql_client: self.graphql_client.clone(),
8892        }
8893    }
8894    /// Accesses a Unix socket on the host.
8895    ///
8896    /// # Arguments
8897    ///
8898    /// * `path` - Location of the Unix socket (e.g., "/var/run/docker.sock").
8899    pub fn unix_socket(&self, path: impl Into<String>) -> Socket {
8900        let mut query = self.selection.select("unixSocket");
8901        query = query.arg("path", path.into());
8902        Socket {
8903            proc: self.proc.clone(),
8904            selection: query,
8905            graphql_client: self.graphql_client.clone(),
8906        }
8907    }
8908}
8909#[derive(Clone)]
8910pub struct InputTypeDef {
8911    pub proc: Option<Arc<DaggerSessionProc>>,
8912    pub selection: Selection,
8913    pub graphql_client: DynGraphQLClient,
8914}
8915impl InputTypeDef {
8916    /// Static fields defined on this input object, if any.
8917    pub fn fields(&self) -> Vec<FieldTypeDef> {
8918        let query = self.selection.select("fields");
8919        vec![FieldTypeDef {
8920            proc: self.proc.clone(),
8921            selection: query,
8922            graphql_client: self.graphql_client.clone(),
8923        }]
8924    }
8925    /// A unique identifier for this InputTypeDef.
8926    pub async fn id(&self) -> Result<InputTypeDefId, DaggerError> {
8927        let query = self.selection.select("id");
8928        query.execute(self.graphql_client.clone()).await
8929    }
8930    /// The name of the input object.
8931    pub async fn name(&self) -> Result<String, DaggerError> {
8932        let query = self.selection.select("name");
8933        query.execute(self.graphql_client.clone()).await
8934    }
8935}
8936#[derive(Clone)]
8937pub struct InterfaceTypeDef {
8938    pub proc: Option<Arc<DaggerSessionProc>>,
8939    pub selection: Selection,
8940    pub graphql_client: DynGraphQLClient,
8941}
8942impl InterfaceTypeDef {
8943    /// The doc string for the interface, if any.
8944    pub async fn description(&self) -> Result<String, DaggerError> {
8945        let query = self.selection.select("description");
8946        query.execute(self.graphql_client.clone()).await
8947    }
8948    /// Functions defined on this interface, if any.
8949    pub fn functions(&self) -> Vec<Function> {
8950        let query = self.selection.select("functions");
8951        vec![Function {
8952            proc: self.proc.clone(),
8953            selection: query,
8954            graphql_client: self.graphql_client.clone(),
8955        }]
8956    }
8957    /// A unique identifier for this InterfaceTypeDef.
8958    pub async fn id(&self) -> Result<InterfaceTypeDefId, DaggerError> {
8959        let query = self.selection.select("id");
8960        query.execute(self.graphql_client.clone()).await
8961    }
8962    /// The name of the interface.
8963    pub async fn name(&self) -> Result<String, DaggerError> {
8964        let query = self.selection.select("name");
8965        query.execute(self.graphql_client.clone()).await
8966    }
8967    /// The location of this interface declaration.
8968    pub fn source_map(&self) -> SourceMap {
8969        let query = self.selection.select("sourceMap");
8970        SourceMap {
8971            proc: self.proc.clone(),
8972            selection: query,
8973            graphql_client: self.graphql_client.clone(),
8974        }
8975    }
8976    /// If this InterfaceTypeDef is associated with a Module, the name of the module. Unset otherwise.
8977    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
8978        let query = self.selection.select("sourceModuleName");
8979        query.execute(self.graphql_client.clone()).await
8980    }
8981}
8982#[derive(Clone)]
8983pub struct JsonValue {
8984    pub proc: Option<Arc<DaggerSessionProc>>,
8985    pub selection: Selection,
8986    pub graphql_client: DynGraphQLClient,
8987}
8988#[derive(Builder, Debug, PartialEq)]
8989pub struct JsonValueContentsOpts<'a> {
8990    /// Optional line prefix
8991    #[builder(setter(into, strip_option), default)]
8992    pub indent: Option<&'a str>,
8993    /// Pretty-print
8994    #[builder(setter(into, strip_option), default)]
8995    pub pretty: Option<bool>,
8996}
8997impl JsonValue {
8998    /// Decode an array from json
8999    pub fn as_array(&self) -> Vec<JsonValue> {
9000        let query = self.selection.select("asArray");
9001        vec![JsonValue {
9002            proc: self.proc.clone(),
9003            selection: query,
9004            graphql_client: self.graphql_client.clone(),
9005        }]
9006    }
9007    /// Decode a boolean from json
9008    pub async fn as_boolean(&self) -> Result<bool, DaggerError> {
9009        let query = self.selection.select("asBoolean");
9010        query.execute(self.graphql_client.clone()).await
9011    }
9012    /// Decode an integer from json
9013    pub async fn as_integer(&self) -> Result<isize, DaggerError> {
9014        let query = self.selection.select("asInteger");
9015        query.execute(self.graphql_client.clone()).await
9016    }
9017    /// Decode a string from json
9018    pub async fn as_string(&self) -> Result<String, DaggerError> {
9019        let query = self.selection.select("asString");
9020        query.execute(self.graphql_client.clone()).await
9021    }
9022    /// Return the value encoded as json
9023    ///
9024    /// # Arguments
9025    ///
9026    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9027    pub async fn contents(&self) -> Result<Json, DaggerError> {
9028        let query = self.selection.select("contents");
9029        query.execute(self.graphql_client.clone()).await
9030    }
9031    /// Return the value encoded as json
9032    ///
9033    /// # Arguments
9034    ///
9035    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9036    pub async fn contents_opts<'a>(
9037        &self,
9038        opts: JsonValueContentsOpts<'a>,
9039    ) -> Result<Json, DaggerError> {
9040        let mut query = self.selection.select("contents");
9041        if let Some(pretty) = opts.pretty {
9042            query = query.arg("pretty", pretty);
9043        }
9044        if let Some(indent) = opts.indent {
9045            query = query.arg("indent", indent);
9046        }
9047        query.execute(self.graphql_client.clone()).await
9048    }
9049    /// Lookup the field at the given path, and return its value.
9050    ///
9051    /// # Arguments
9052    ///
9053    /// * `path` - Path of the field to lookup, encoded as an array of field names
9054    pub fn field(&self, path: Vec<impl Into<String>>) -> JsonValue {
9055        let mut query = self.selection.select("field");
9056        query = query.arg(
9057            "path",
9058            path.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
9059        );
9060        JsonValue {
9061            proc: self.proc.clone(),
9062            selection: query,
9063            graphql_client: self.graphql_client.clone(),
9064        }
9065    }
9066    /// List fields of the encoded object
9067    pub async fn fields(&self) -> Result<Vec<String>, DaggerError> {
9068        let query = self.selection.select("fields");
9069        query.execute(self.graphql_client.clone()).await
9070    }
9071    /// A unique identifier for this JSONValue.
9072    pub async fn id(&self) -> Result<JsonValueId, DaggerError> {
9073        let query = self.selection.select("id");
9074        query.execute(self.graphql_client.clone()).await
9075    }
9076    /// Encode a boolean to json
9077    ///
9078    /// # Arguments
9079    ///
9080    /// * `value` - New boolean value
9081    pub fn new_boolean(&self, value: bool) -> JsonValue {
9082        let mut query = self.selection.select("newBoolean");
9083        query = query.arg("value", value);
9084        JsonValue {
9085            proc: self.proc.clone(),
9086            selection: query,
9087            graphql_client: self.graphql_client.clone(),
9088        }
9089    }
9090    /// Encode an integer to json
9091    ///
9092    /// # Arguments
9093    ///
9094    /// * `value` - New integer value
9095    pub fn new_integer(&self, value: isize) -> JsonValue {
9096        let mut query = self.selection.select("newInteger");
9097        query = query.arg("value", value);
9098        JsonValue {
9099            proc: self.proc.clone(),
9100            selection: query,
9101            graphql_client: self.graphql_client.clone(),
9102        }
9103    }
9104    /// Encode a string to json
9105    ///
9106    /// # Arguments
9107    ///
9108    /// * `value` - New string value
9109    pub fn new_string(&self, value: impl Into<String>) -> JsonValue {
9110        let mut query = self.selection.select("newString");
9111        query = query.arg("value", value.into());
9112        JsonValue {
9113            proc: self.proc.clone(),
9114            selection: query,
9115            graphql_client: self.graphql_client.clone(),
9116        }
9117    }
9118    /// Return a new json value, decoded from the given content
9119    ///
9120    /// # Arguments
9121    ///
9122    /// * `contents` - New JSON-encoded contents
9123    pub fn with_contents(&self, contents: Json) -> JsonValue {
9124        let mut query = self.selection.select("withContents");
9125        query = query.arg("contents", contents);
9126        JsonValue {
9127            proc: self.proc.clone(),
9128            selection: query,
9129            graphql_client: self.graphql_client.clone(),
9130        }
9131    }
9132    /// Set a new field at the given path
9133    ///
9134    /// # Arguments
9135    ///
9136    /// * `path` - Path of the field to set, encoded as an array of field names
9137    /// * `value` - The new value of the field
9138    pub fn with_field(
9139        &self,
9140        path: Vec<impl Into<String>>,
9141        value: impl IntoID<JsonValueId>,
9142    ) -> JsonValue {
9143        let mut query = self.selection.select("withField");
9144        query = query.arg(
9145            "path",
9146            path.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
9147        );
9148        query = query.arg_lazy(
9149            "value",
9150            Box::new(move || {
9151                let value = value.clone();
9152                Box::pin(async move { value.into_id().await.unwrap().quote() })
9153            }),
9154        );
9155        JsonValue {
9156            proc: self.proc.clone(),
9157            selection: query,
9158            graphql_client: self.graphql_client.clone(),
9159        }
9160    }
9161}
9162#[derive(Clone)]
9163pub struct Llm {
9164    pub proc: Option<Arc<DaggerSessionProc>>,
9165    pub selection: Selection,
9166    pub graphql_client: DynGraphQLClient,
9167}
9168impl Llm {
9169    /// create a branch in the LLM's history
9170    pub fn attempt(&self, number: isize) -> Llm {
9171        let mut query = self.selection.select("attempt");
9172        query = query.arg("number", number);
9173        Llm {
9174            proc: self.proc.clone(),
9175            selection: query,
9176            graphql_client: self.graphql_client.clone(),
9177        }
9178    }
9179    /// returns the type of the current state
9180    pub fn bind_result(&self, name: impl Into<String>) -> Binding {
9181        let mut query = self.selection.select("bindResult");
9182        query = query.arg("name", name.into());
9183        Binding {
9184            proc: self.proc.clone(),
9185            selection: query,
9186            graphql_client: self.graphql_client.clone(),
9187        }
9188    }
9189    /// return the LLM's current environment
9190    pub fn env(&self) -> Env {
9191        let query = self.selection.select("env");
9192        Env {
9193            proc: self.proc.clone(),
9194            selection: query,
9195            graphql_client: self.graphql_client.clone(),
9196        }
9197    }
9198    /// return the llm message history
9199    pub async fn history(&self) -> Result<Vec<String>, DaggerError> {
9200        let query = self.selection.select("history");
9201        query.execute(self.graphql_client.clone()).await
9202    }
9203    /// return the raw llm message history as json
9204    pub async fn history_json(&self) -> Result<Json, DaggerError> {
9205        let query = self.selection.select("historyJSON");
9206        query.execute(self.graphql_client.clone()).await
9207    }
9208    /// A unique identifier for this LLM.
9209    pub async fn id(&self) -> Result<Llmid, DaggerError> {
9210        let query = self.selection.select("id");
9211        query.execute(self.graphql_client.clone()).await
9212    }
9213    /// return the last llm reply from the history
9214    pub async fn last_reply(&self) -> Result<String, DaggerError> {
9215        let query = self.selection.select("lastReply");
9216        query.execute(self.graphql_client.clone()).await
9217    }
9218    /// synchronize LLM state
9219    pub fn r#loop(&self) -> Llm {
9220        let query = self.selection.select("loop");
9221        Llm {
9222            proc: self.proc.clone(),
9223            selection: query,
9224            graphql_client: self.graphql_client.clone(),
9225        }
9226    }
9227    /// return the model used by the llm
9228    pub async fn model(&self) -> Result<String, DaggerError> {
9229        let query = self.selection.select("model");
9230        query.execute(self.graphql_client.clone()).await
9231    }
9232    /// return the provider used by the llm
9233    pub async fn provider(&self) -> Result<String, DaggerError> {
9234        let query = self.selection.select("provider");
9235        query.execute(self.graphql_client.clone()).await
9236    }
9237    /// synchronize LLM state
9238    pub async fn sync(&self) -> Result<Llmid, DaggerError> {
9239        let query = self.selection.select("sync");
9240        query.execute(self.graphql_client.clone()).await
9241    }
9242    /// returns the token usage of the current state
9243    pub fn token_usage(&self) -> LlmTokenUsage {
9244        let query = self.selection.select("tokenUsage");
9245        LlmTokenUsage {
9246            proc: self.proc.clone(),
9247            selection: query,
9248            graphql_client: self.graphql_client.clone(),
9249        }
9250    }
9251    /// print documentation for available tools
9252    pub async fn tools(&self) -> Result<String, DaggerError> {
9253        let query = self.selection.select("tools");
9254        query.execute(self.graphql_client.clone()).await
9255    }
9256    /// allow the LLM to interact with an environment via MCP
9257    pub fn with_env(&self, env: impl IntoID<EnvId>) -> Llm {
9258        let mut query = self.selection.select("withEnv");
9259        query = query.arg_lazy(
9260            "env",
9261            Box::new(move || {
9262                let env = env.clone();
9263                Box::pin(async move { env.into_id().await.unwrap().quote() })
9264            }),
9265        );
9266        Llm {
9267            proc: self.proc.clone(),
9268            selection: query,
9269            graphql_client: self.graphql_client.clone(),
9270        }
9271    }
9272    /// swap out the llm model
9273    ///
9274    /// # Arguments
9275    ///
9276    /// * `model` - The model to use
9277    pub fn with_model(&self, model: impl Into<String>) -> Llm {
9278        let mut query = self.selection.select("withModel");
9279        query = query.arg("model", model.into());
9280        Llm {
9281            proc: self.proc.clone(),
9282            selection: query,
9283            graphql_client: self.graphql_client.clone(),
9284        }
9285    }
9286    /// append a prompt to the llm context
9287    ///
9288    /// # Arguments
9289    ///
9290    /// * `prompt` - The prompt to send
9291    pub fn with_prompt(&self, prompt: impl Into<String>) -> Llm {
9292        let mut query = self.selection.select("withPrompt");
9293        query = query.arg("prompt", prompt.into());
9294        Llm {
9295            proc: self.proc.clone(),
9296            selection: query,
9297            graphql_client: self.graphql_client.clone(),
9298        }
9299    }
9300    /// append the contents of a file to the llm context
9301    ///
9302    /// # Arguments
9303    ///
9304    /// * `file` - The file to read the prompt from
9305    pub fn with_prompt_file(&self, file: impl IntoID<FileId>) -> Llm {
9306        let mut query = self.selection.select("withPromptFile");
9307        query = query.arg_lazy(
9308            "file",
9309            Box::new(move || {
9310                let file = file.clone();
9311                Box::pin(async move { file.into_id().await.unwrap().quote() })
9312            }),
9313        );
9314        Llm {
9315            proc: self.proc.clone(),
9316            selection: query,
9317            graphql_client: self.graphql_client.clone(),
9318        }
9319    }
9320    /// Add a system prompt to the LLM's environment
9321    ///
9322    /// # Arguments
9323    ///
9324    /// * `prompt` - The system prompt to send
9325    pub fn with_system_prompt(&self, prompt: impl Into<String>) -> Llm {
9326        let mut query = self.selection.select("withSystemPrompt");
9327        query = query.arg("prompt", prompt.into());
9328        Llm {
9329            proc: self.proc.clone(),
9330            selection: query,
9331            graphql_client: self.graphql_client.clone(),
9332        }
9333    }
9334    /// Disable the default system prompt
9335    pub fn without_default_system_prompt(&self) -> Llm {
9336        let query = self.selection.select("withoutDefaultSystemPrompt");
9337        Llm {
9338            proc: self.proc.clone(),
9339            selection: query,
9340            graphql_client: self.graphql_client.clone(),
9341        }
9342    }
9343}
9344#[derive(Clone)]
9345pub struct LlmTokenUsage {
9346    pub proc: Option<Arc<DaggerSessionProc>>,
9347    pub selection: Selection,
9348    pub graphql_client: DynGraphQLClient,
9349}
9350impl LlmTokenUsage {
9351    pub async fn cached_token_reads(&self) -> Result<isize, DaggerError> {
9352        let query = self.selection.select("cachedTokenReads");
9353        query.execute(self.graphql_client.clone()).await
9354    }
9355    pub async fn cached_token_writes(&self) -> Result<isize, DaggerError> {
9356        let query = self.selection.select("cachedTokenWrites");
9357        query.execute(self.graphql_client.clone()).await
9358    }
9359    /// A unique identifier for this LLMTokenUsage.
9360    pub async fn id(&self) -> Result<LlmTokenUsageId, DaggerError> {
9361        let query = self.selection.select("id");
9362        query.execute(self.graphql_client.clone()).await
9363    }
9364    pub async fn input_tokens(&self) -> Result<isize, DaggerError> {
9365        let query = self.selection.select("inputTokens");
9366        query.execute(self.graphql_client.clone()).await
9367    }
9368    pub async fn output_tokens(&self) -> Result<isize, DaggerError> {
9369        let query = self.selection.select("outputTokens");
9370        query.execute(self.graphql_client.clone()).await
9371    }
9372    pub async fn total_tokens(&self) -> Result<isize, DaggerError> {
9373        let query = self.selection.select("totalTokens");
9374        query.execute(self.graphql_client.clone()).await
9375    }
9376}
9377#[derive(Clone)]
9378pub struct Label {
9379    pub proc: Option<Arc<DaggerSessionProc>>,
9380    pub selection: Selection,
9381    pub graphql_client: DynGraphQLClient,
9382}
9383impl Label {
9384    /// A unique identifier for this Label.
9385    pub async fn id(&self) -> Result<LabelId, DaggerError> {
9386        let query = self.selection.select("id");
9387        query.execute(self.graphql_client.clone()).await
9388    }
9389    /// The label name.
9390    pub async fn name(&self) -> Result<String, DaggerError> {
9391        let query = self.selection.select("name");
9392        query.execute(self.graphql_client.clone()).await
9393    }
9394    /// The label value.
9395    pub async fn value(&self) -> Result<String, DaggerError> {
9396        let query = self.selection.select("value");
9397        query.execute(self.graphql_client.clone()).await
9398    }
9399}
9400#[derive(Clone)]
9401pub struct ListTypeDef {
9402    pub proc: Option<Arc<DaggerSessionProc>>,
9403    pub selection: Selection,
9404    pub graphql_client: DynGraphQLClient,
9405}
9406impl ListTypeDef {
9407    /// The type of the elements in the list.
9408    pub fn element_type_def(&self) -> TypeDef {
9409        let query = self.selection.select("elementTypeDef");
9410        TypeDef {
9411            proc: self.proc.clone(),
9412            selection: query,
9413            graphql_client: self.graphql_client.clone(),
9414        }
9415    }
9416    /// A unique identifier for this ListTypeDef.
9417    pub async fn id(&self) -> Result<ListTypeDefId, DaggerError> {
9418        let query = self.selection.select("id");
9419        query.execute(self.graphql_client.clone()).await
9420    }
9421}
9422#[derive(Clone)]
9423pub struct Module {
9424    pub proc: Option<Arc<DaggerSessionProc>>,
9425    pub selection: Selection,
9426    pub graphql_client: DynGraphQLClient,
9427}
9428#[derive(Builder, Debug, PartialEq)]
9429pub struct ModuleServeOpts {
9430    /// Expose the dependencies of this module to the client
9431    #[builder(setter(into, strip_option), default)]
9432    pub include_dependencies: Option<bool>,
9433}
9434impl Module {
9435    /// The dependencies of the module.
9436    pub fn dependencies(&self) -> Vec<Module> {
9437        let query = self.selection.select("dependencies");
9438        vec![Module {
9439            proc: self.proc.clone(),
9440            selection: query,
9441            graphql_client: self.graphql_client.clone(),
9442        }]
9443    }
9444    /// The doc string of the module, if any
9445    pub async fn description(&self) -> Result<String, DaggerError> {
9446        let query = self.selection.select("description");
9447        query.execute(self.graphql_client.clone()).await
9448    }
9449    /// Enumerations served by this module.
9450    pub fn enums(&self) -> Vec<TypeDef> {
9451        let query = self.selection.select("enums");
9452        vec![TypeDef {
9453            proc: self.proc.clone(),
9454            selection: query,
9455            graphql_client: self.graphql_client.clone(),
9456        }]
9457    }
9458    /// The generated files and directories made on top of the module source's context directory.
9459    pub fn generated_context_directory(&self) -> Directory {
9460        let query = self.selection.select("generatedContextDirectory");
9461        Directory {
9462            proc: self.proc.clone(),
9463            selection: query,
9464            graphql_client: self.graphql_client.clone(),
9465        }
9466    }
9467    /// A unique identifier for this Module.
9468    pub async fn id(&self) -> Result<ModuleId, DaggerError> {
9469        let query = self.selection.select("id");
9470        query.execute(self.graphql_client.clone()).await
9471    }
9472    /// Interfaces served by this module.
9473    pub fn interfaces(&self) -> Vec<TypeDef> {
9474        let query = self.selection.select("interfaces");
9475        vec![TypeDef {
9476            proc: self.proc.clone(),
9477            selection: query,
9478            graphql_client: self.graphql_client.clone(),
9479        }]
9480    }
9481    /// The name of the module
9482    pub async fn name(&self) -> Result<String, DaggerError> {
9483        let query = self.selection.select("name");
9484        query.execute(self.graphql_client.clone()).await
9485    }
9486    /// Objects served by this module.
9487    pub fn objects(&self) -> Vec<TypeDef> {
9488        let query = self.selection.select("objects");
9489        vec![TypeDef {
9490            proc: self.proc.clone(),
9491            selection: query,
9492            graphql_client: self.graphql_client.clone(),
9493        }]
9494    }
9495    /// The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile.
9496    pub fn runtime(&self) -> Container {
9497        let query = self.selection.select("runtime");
9498        Container {
9499            proc: self.proc.clone(),
9500            selection: query,
9501            graphql_client: self.graphql_client.clone(),
9502        }
9503    }
9504    /// The SDK config used by this module.
9505    pub fn sdk(&self) -> SdkConfig {
9506        let query = self.selection.select("sdk");
9507        SdkConfig {
9508            proc: self.proc.clone(),
9509            selection: query,
9510            graphql_client: self.graphql_client.clone(),
9511        }
9512    }
9513    /// Serve a module's API in the current session.
9514    /// Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
9515    ///
9516    /// # Arguments
9517    ///
9518    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9519    pub async fn serve(&self) -> Result<Void, DaggerError> {
9520        let query = self.selection.select("serve");
9521        query.execute(self.graphql_client.clone()).await
9522    }
9523    /// Serve a module's API in the current session.
9524    /// Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
9525    ///
9526    /// # Arguments
9527    ///
9528    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9529    pub async fn serve_opts(&self, opts: ModuleServeOpts) -> Result<Void, DaggerError> {
9530        let mut query = self.selection.select("serve");
9531        if let Some(include_dependencies) = opts.include_dependencies {
9532            query = query.arg("includeDependencies", include_dependencies);
9533        }
9534        query.execute(self.graphql_client.clone()).await
9535    }
9536    /// The source for the module.
9537    pub fn source(&self) -> ModuleSource {
9538        let query = self.selection.select("source");
9539        ModuleSource {
9540            proc: self.proc.clone(),
9541            selection: query,
9542            graphql_client: self.graphql_client.clone(),
9543        }
9544    }
9545    /// Forces evaluation of the module, including any loading into the engine and associated validation.
9546    pub async fn sync(&self) -> Result<ModuleId, DaggerError> {
9547        let query = self.selection.select("sync");
9548        query.execute(self.graphql_client.clone()).await
9549    }
9550    /// Retrieves the module with the given description
9551    ///
9552    /// # Arguments
9553    ///
9554    /// * `description` - The description to set
9555    pub fn with_description(&self, description: impl Into<String>) -> Module {
9556        let mut query = self.selection.select("withDescription");
9557        query = query.arg("description", description.into());
9558        Module {
9559            proc: self.proc.clone(),
9560            selection: query,
9561            graphql_client: self.graphql_client.clone(),
9562        }
9563    }
9564    /// This module plus the given Enum type and associated values
9565    pub fn with_enum(&self, r#enum: impl IntoID<TypeDefId>) -> Module {
9566        let mut query = self.selection.select("withEnum");
9567        query = query.arg_lazy(
9568            "enum",
9569            Box::new(move || {
9570                let r#enum = r#enum.clone();
9571                Box::pin(async move { r#enum.into_id().await.unwrap().quote() })
9572            }),
9573        );
9574        Module {
9575            proc: self.proc.clone(),
9576            selection: query,
9577            graphql_client: self.graphql_client.clone(),
9578        }
9579    }
9580    /// This module plus the given Interface type and associated functions
9581    pub fn with_interface(&self, iface: impl IntoID<TypeDefId>) -> Module {
9582        let mut query = self.selection.select("withInterface");
9583        query = query.arg_lazy(
9584            "iface",
9585            Box::new(move || {
9586                let iface = iface.clone();
9587                Box::pin(async move { iface.into_id().await.unwrap().quote() })
9588            }),
9589        );
9590        Module {
9591            proc: self.proc.clone(),
9592            selection: query,
9593            graphql_client: self.graphql_client.clone(),
9594        }
9595    }
9596    /// This module plus the given Object type and associated functions.
9597    pub fn with_object(&self, object: impl IntoID<TypeDefId>) -> Module {
9598        let mut query = self.selection.select("withObject");
9599        query = query.arg_lazy(
9600            "object",
9601            Box::new(move || {
9602                let object = object.clone();
9603                Box::pin(async move { object.into_id().await.unwrap().quote() })
9604            }),
9605        );
9606        Module {
9607            proc: self.proc.clone(),
9608            selection: query,
9609            graphql_client: self.graphql_client.clone(),
9610        }
9611    }
9612}
9613#[derive(Clone)]
9614pub struct ModuleConfigClient {
9615    pub proc: Option<Arc<DaggerSessionProc>>,
9616    pub selection: Selection,
9617    pub graphql_client: DynGraphQLClient,
9618}
9619impl ModuleConfigClient {
9620    /// The directory the client is generated in.
9621    pub async fn directory(&self) -> Result<String, DaggerError> {
9622        let query = self.selection.select("directory");
9623        query.execute(self.graphql_client.clone()).await
9624    }
9625    /// The generator to use
9626    pub async fn generator(&self) -> Result<String, DaggerError> {
9627        let query = self.selection.select("generator");
9628        query.execute(self.graphql_client.clone()).await
9629    }
9630    /// A unique identifier for this ModuleConfigClient.
9631    pub async fn id(&self) -> Result<ModuleConfigClientId, DaggerError> {
9632        let query = self.selection.select("id");
9633        query.execute(self.graphql_client.clone()).await
9634    }
9635}
9636#[derive(Clone)]
9637pub struct ModuleSource {
9638    pub proc: Option<Arc<DaggerSessionProc>>,
9639    pub selection: Selection,
9640    pub graphql_client: DynGraphQLClient,
9641}
9642impl ModuleSource {
9643    /// Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation
9644    pub fn as_module(&self) -> Module {
9645        let query = self.selection.select("asModule");
9646        Module {
9647            proc: self.proc.clone(),
9648            selection: query,
9649            graphql_client: self.graphql_client.clone(),
9650        }
9651    }
9652    /// A human readable ref string representation of this module source.
9653    pub async fn as_string(&self) -> Result<String, DaggerError> {
9654        let query = self.selection.select("asString");
9655        query.execute(self.graphql_client.clone()).await
9656    }
9657    /// The blueprint referenced by the module source.
9658    pub fn blueprint(&self) -> ModuleSource {
9659        let query = self.selection.select("blueprint");
9660        ModuleSource {
9661            proc: self.proc.clone(),
9662            selection: query,
9663            graphql_client: self.graphql_client.clone(),
9664        }
9665    }
9666    /// The ref to clone the root of the git repo from. Only valid for git sources.
9667    pub async fn clone_ref(&self) -> Result<String, DaggerError> {
9668        let query = self.selection.select("cloneRef");
9669        query.execute(self.graphql_client.clone()).await
9670    }
9671    /// The resolved commit of the git repo this source points to.
9672    pub async fn commit(&self) -> Result<String, DaggerError> {
9673        let query = self.selection.select("commit");
9674        query.execute(self.graphql_client.clone()).await
9675    }
9676    /// The clients generated for the module.
9677    pub fn config_clients(&self) -> Vec<ModuleConfigClient> {
9678        let query = self.selection.select("configClients");
9679        vec![ModuleConfigClient {
9680            proc: self.proc.clone(),
9681            selection: query,
9682            graphql_client: self.graphql_client.clone(),
9683        }]
9684    }
9685    /// Whether an existing dagger.json for the module was found.
9686    pub async fn config_exists(&self) -> Result<bool, DaggerError> {
9687        let query = self.selection.select("configExists");
9688        query.execute(self.graphql_client.clone()).await
9689    }
9690    /// The full directory loaded for the module source, including the source code as a subdirectory.
9691    pub fn context_directory(&self) -> Directory {
9692        let query = self.selection.select("contextDirectory");
9693        Directory {
9694            proc: self.proc.clone(),
9695            selection: query,
9696            graphql_client: self.graphql_client.clone(),
9697        }
9698    }
9699    /// The dependencies of the module source.
9700    pub fn dependencies(&self) -> Vec<ModuleSource> {
9701        let query = self.selection.select("dependencies");
9702        vec![ModuleSource {
9703            proc: self.proc.clone(),
9704            selection: query,
9705            graphql_client: self.graphql_client.clone(),
9706        }]
9707    }
9708    /// 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.
9709    pub async fn digest(&self) -> Result<String, DaggerError> {
9710        let query = self.selection.select("digest");
9711        query.execute(self.graphql_client.clone()).await
9712    }
9713    /// The directory containing the module configuration and source code (source code may be in a subdir).
9714    ///
9715    /// # Arguments
9716    ///
9717    /// * `path` - A subpath from the source directory to select.
9718    pub fn directory(&self, path: impl Into<String>) -> Directory {
9719        let mut query = self.selection.select("directory");
9720        query = query.arg("path", path.into());
9721        Directory {
9722            proc: self.proc.clone(),
9723            selection: query,
9724            graphql_client: self.graphql_client.clone(),
9725        }
9726    }
9727    /// The engine version of the module.
9728    pub async fn engine_version(&self) -> Result<String, DaggerError> {
9729        let query = self.selection.select("engineVersion");
9730        query.execute(self.graphql_client.clone()).await
9731    }
9732    /// The generated files and directories made on top of the module source's context directory.
9733    pub fn generated_context_directory(&self) -> Directory {
9734        let query = self.selection.select("generatedContextDirectory");
9735        Directory {
9736            proc: self.proc.clone(),
9737            selection: query,
9738            graphql_client: self.graphql_client.clone(),
9739        }
9740    }
9741    /// The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket).
9742    pub async fn html_repo_url(&self) -> Result<String, DaggerError> {
9743        let query = self.selection.select("htmlRepoURL");
9744        query.execute(self.graphql_client.clone()).await
9745    }
9746    /// The URL to the source's git repo in a web browser. Only valid for git sources.
9747    pub async fn html_url(&self) -> Result<String, DaggerError> {
9748        let query = self.selection.select("htmlURL");
9749        query.execute(self.graphql_client.clone()).await
9750    }
9751    /// A unique identifier for this ModuleSource.
9752    pub async fn id(&self) -> Result<ModuleSourceId, DaggerError> {
9753        let query = self.selection.select("id");
9754        query.execute(self.graphql_client.clone()).await
9755    }
9756    /// The kind of module source (currently local, git or dir).
9757    pub async fn kind(&self) -> Result<ModuleSourceKind, DaggerError> {
9758        let query = self.selection.select("kind");
9759        query.execute(self.graphql_client.clone()).await
9760    }
9761    /// 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.
9762    pub async fn local_context_directory_path(&self) -> Result<String, DaggerError> {
9763        let query = self.selection.select("localContextDirectoryPath");
9764        query.execute(self.graphql_client.clone()).await
9765    }
9766    /// The name of the module, including any setting via the withName API.
9767    pub async fn module_name(&self) -> Result<String, DaggerError> {
9768        let query = self.selection.select("moduleName");
9769        query.execute(self.graphql_client.clone()).await
9770    }
9771    /// The original name of the module as read from the module's dagger.json (or set for the first time with the withName API).
9772    pub async fn module_original_name(&self) -> Result<String, DaggerError> {
9773        let query = self.selection.select("moduleOriginalName");
9774        query.execute(self.graphql_client.clone()).await
9775    }
9776    /// The original subpath used when instantiating this module source, relative to the context directory.
9777    pub async fn original_subpath(&self) -> Result<String, DaggerError> {
9778        let query = self.selection.select("originalSubpath");
9779        query.execute(self.graphql_client.clone()).await
9780    }
9781    /// The pinned version of this module source.
9782    pub async fn pin(&self) -> Result<String, DaggerError> {
9783        let query = self.selection.select("pin");
9784        query.execute(self.graphql_client.clone()).await
9785    }
9786    /// The import path corresponding to the root of the git repo this source points to. Only valid for git sources.
9787    pub async fn repo_root_path(&self) -> Result<String, DaggerError> {
9788        let query = self.selection.select("repoRootPath");
9789        query.execute(self.graphql_client.clone()).await
9790    }
9791    /// The SDK configuration of the module.
9792    pub fn sdk(&self) -> SdkConfig {
9793        let query = self.selection.select("sdk");
9794        SdkConfig {
9795            proc: self.proc.clone(),
9796            selection: query,
9797            graphql_client: self.graphql_client.clone(),
9798        }
9799    }
9800    /// The path, relative to the context directory, that contains the module's dagger.json.
9801    pub async fn source_root_subpath(&self) -> Result<String, DaggerError> {
9802        let query = self.selection.select("sourceRootSubpath");
9803        query.execute(self.graphql_client.clone()).await
9804    }
9805    /// The path to the directory containing the module's source code, relative to the context directory.
9806    pub async fn source_subpath(&self) -> Result<String, DaggerError> {
9807        let query = self.selection.select("sourceSubpath");
9808        query.execute(self.graphql_client.clone()).await
9809    }
9810    /// Forces evaluation of the module source, including any loading into the engine and associated validation.
9811    pub async fn sync(&self) -> Result<ModuleSourceId, DaggerError> {
9812        let query = self.selection.select("sync");
9813        query.execute(self.graphql_client.clone()).await
9814    }
9815    /// The specified version of the git repo this source points to.
9816    pub async fn version(&self) -> Result<String, DaggerError> {
9817        let query = self.selection.select("version");
9818        query.execute(self.graphql_client.clone()).await
9819    }
9820    /// Set a blueprint for the module source.
9821    ///
9822    /// # Arguments
9823    ///
9824    /// * `blueprint` - The blueprint module to set.
9825    pub fn with_blueprint(&self, blueprint: impl IntoID<ModuleSourceId>) -> ModuleSource {
9826        let mut query = self.selection.select("withBlueprint");
9827        query = query.arg_lazy(
9828            "blueprint",
9829            Box::new(move || {
9830                let blueprint = blueprint.clone();
9831                Box::pin(async move { blueprint.into_id().await.unwrap().quote() })
9832            }),
9833        );
9834        ModuleSource {
9835            proc: self.proc.clone(),
9836            selection: query,
9837            graphql_client: self.graphql_client.clone(),
9838        }
9839    }
9840    /// Update the module source with a new client to generate.
9841    ///
9842    /// # Arguments
9843    ///
9844    /// * `generator` - The generator to use
9845    /// * `output_dir` - The output directory for the generated client.
9846    pub fn with_client(
9847        &self,
9848        generator: impl Into<String>,
9849        output_dir: impl Into<String>,
9850    ) -> ModuleSource {
9851        let mut query = self.selection.select("withClient");
9852        query = query.arg("generator", generator.into());
9853        query = query.arg("outputDir", output_dir.into());
9854        ModuleSource {
9855            proc: self.proc.clone(),
9856            selection: query,
9857            graphql_client: self.graphql_client.clone(),
9858        }
9859    }
9860    /// Append the provided dependencies to the module source's dependency list.
9861    ///
9862    /// # Arguments
9863    ///
9864    /// * `dependencies` - The dependencies to append.
9865    pub fn with_dependencies(&self, dependencies: Vec<ModuleSourceId>) -> ModuleSource {
9866        let mut query = self.selection.select("withDependencies");
9867        query = query.arg("dependencies", dependencies);
9868        ModuleSource {
9869            proc: self.proc.clone(),
9870            selection: query,
9871            graphql_client: self.graphql_client.clone(),
9872        }
9873    }
9874    /// Upgrade the engine version of the module to the given value.
9875    ///
9876    /// # Arguments
9877    ///
9878    /// * `version` - The engine version to upgrade to.
9879    pub fn with_engine_version(&self, version: impl Into<String>) -> ModuleSource {
9880        let mut query = self.selection.select("withEngineVersion");
9881        query = query.arg("version", version.into());
9882        ModuleSource {
9883            proc: self.proc.clone(),
9884            selection: query,
9885            graphql_client: self.graphql_client.clone(),
9886        }
9887    }
9888    /// Update the module source with additional include patterns for files+directories from its context that are required for building it
9889    ///
9890    /// # Arguments
9891    ///
9892    /// * `patterns` - The new additional include patterns.
9893    pub fn with_includes(&self, patterns: Vec<impl Into<String>>) -> ModuleSource {
9894        let mut query = self.selection.select("withIncludes");
9895        query = query.arg(
9896            "patterns",
9897            patterns
9898                .into_iter()
9899                .map(|i| i.into())
9900                .collect::<Vec<String>>(),
9901        );
9902        ModuleSource {
9903            proc: self.proc.clone(),
9904            selection: query,
9905            graphql_client: self.graphql_client.clone(),
9906        }
9907    }
9908    /// Update the module source with a new name.
9909    ///
9910    /// # Arguments
9911    ///
9912    /// * `name` - The name to set.
9913    pub fn with_name(&self, name: impl Into<String>) -> ModuleSource {
9914        let mut query = self.selection.select("withName");
9915        query = query.arg("name", name.into());
9916        ModuleSource {
9917            proc: self.proc.clone(),
9918            selection: query,
9919            graphql_client: self.graphql_client.clone(),
9920        }
9921    }
9922    /// Update the module source with a new SDK.
9923    ///
9924    /// # Arguments
9925    ///
9926    /// * `source` - The SDK source to set.
9927    pub fn with_sdk(&self, source: impl Into<String>) -> ModuleSource {
9928        let mut query = self.selection.select("withSDK");
9929        query = query.arg("source", source.into());
9930        ModuleSource {
9931            proc: self.proc.clone(),
9932            selection: query,
9933            graphql_client: self.graphql_client.clone(),
9934        }
9935    }
9936    /// Update the module source with a new source subpath.
9937    ///
9938    /// # Arguments
9939    ///
9940    /// * `path` - The path to set as the source subpath. Must be relative to the module source's source root directory.
9941    pub fn with_source_subpath(&self, path: impl Into<String>) -> ModuleSource {
9942        let mut query = self.selection.select("withSourceSubpath");
9943        query = query.arg("path", path.into());
9944        ModuleSource {
9945            proc: self.proc.clone(),
9946            selection: query,
9947            graphql_client: self.graphql_client.clone(),
9948        }
9949    }
9950    /// Update the blueprint module to the latest version.
9951    pub fn with_update_blueprint(&self) -> ModuleSource {
9952        let query = self.selection.select("withUpdateBlueprint");
9953        ModuleSource {
9954            proc: self.proc.clone(),
9955            selection: query,
9956            graphql_client: self.graphql_client.clone(),
9957        }
9958    }
9959    /// Update one or more module dependencies.
9960    ///
9961    /// # Arguments
9962    ///
9963    /// * `dependencies` - The dependencies to update.
9964    pub fn with_update_dependencies(&self, dependencies: Vec<impl Into<String>>) -> ModuleSource {
9965        let mut query = self.selection.select("withUpdateDependencies");
9966        query = query.arg(
9967            "dependencies",
9968            dependencies
9969                .into_iter()
9970                .map(|i| i.into())
9971                .collect::<Vec<String>>(),
9972        );
9973        ModuleSource {
9974            proc: self.proc.clone(),
9975            selection: query,
9976            graphql_client: self.graphql_client.clone(),
9977        }
9978    }
9979    /// Update one or more clients.
9980    ///
9981    /// # Arguments
9982    ///
9983    /// * `clients` - The clients to update
9984    pub fn with_updated_clients(&self, clients: Vec<impl Into<String>>) -> ModuleSource {
9985        let mut query = self.selection.select("withUpdatedClients");
9986        query = query.arg(
9987            "clients",
9988            clients
9989                .into_iter()
9990                .map(|i| i.into())
9991                .collect::<Vec<String>>(),
9992        );
9993        ModuleSource {
9994            proc: self.proc.clone(),
9995            selection: query,
9996            graphql_client: self.graphql_client.clone(),
9997        }
9998    }
9999    /// Remove the current blueprint from the module source.
10000    pub fn without_blueprint(&self) -> ModuleSource {
10001        let query = self.selection.select("withoutBlueprint");
10002        ModuleSource {
10003            proc: self.proc.clone(),
10004            selection: query,
10005            graphql_client: self.graphql_client.clone(),
10006        }
10007    }
10008    /// Remove a client from the module source.
10009    ///
10010    /// # Arguments
10011    ///
10012    /// * `path` - The path of the client to remove.
10013    pub fn without_client(&self, path: impl Into<String>) -> ModuleSource {
10014        let mut query = self.selection.select("withoutClient");
10015        query = query.arg("path", path.into());
10016        ModuleSource {
10017            proc: self.proc.clone(),
10018            selection: query,
10019            graphql_client: self.graphql_client.clone(),
10020        }
10021    }
10022    /// Remove the provided dependencies from the module source's dependency list.
10023    ///
10024    /// # Arguments
10025    ///
10026    /// * `dependencies` - The dependencies to remove.
10027    pub fn without_dependencies(&self, dependencies: Vec<impl Into<String>>) -> ModuleSource {
10028        let mut query = self.selection.select("withoutDependencies");
10029        query = query.arg(
10030            "dependencies",
10031            dependencies
10032                .into_iter()
10033                .map(|i| i.into())
10034                .collect::<Vec<String>>(),
10035        );
10036        ModuleSource {
10037            proc: self.proc.clone(),
10038            selection: query,
10039            graphql_client: self.graphql_client.clone(),
10040        }
10041    }
10042}
10043#[derive(Clone)]
10044pub struct ObjectTypeDef {
10045    pub proc: Option<Arc<DaggerSessionProc>>,
10046    pub selection: Selection,
10047    pub graphql_client: DynGraphQLClient,
10048}
10049impl ObjectTypeDef {
10050    /// The function used to construct new instances of this object, if any
10051    pub fn constructor(&self) -> Function {
10052        let query = self.selection.select("constructor");
10053        Function {
10054            proc: self.proc.clone(),
10055            selection: query,
10056            graphql_client: self.graphql_client.clone(),
10057        }
10058    }
10059    /// The doc string for the object, if any.
10060    pub async fn description(&self) -> Result<String, DaggerError> {
10061        let query = self.selection.select("description");
10062        query.execute(self.graphql_client.clone()).await
10063    }
10064    /// Static fields defined on this object, if any.
10065    pub fn fields(&self) -> Vec<FieldTypeDef> {
10066        let query = self.selection.select("fields");
10067        vec![FieldTypeDef {
10068            proc: self.proc.clone(),
10069            selection: query,
10070            graphql_client: self.graphql_client.clone(),
10071        }]
10072    }
10073    /// Functions defined on this object, if any.
10074    pub fn functions(&self) -> Vec<Function> {
10075        let query = self.selection.select("functions");
10076        vec![Function {
10077            proc: self.proc.clone(),
10078            selection: query,
10079            graphql_client: self.graphql_client.clone(),
10080        }]
10081    }
10082    /// A unique identifier for this ObjectTypeDef.
10083    pub async fn id(&self) -> Result<ObjectTypeDefId, DaggerError> {
10084        let query = self.selection.select("id");
10085        query.execute(self.graphql_client.clone()).await
10086    }
10087    /// The name of the object.
10088    pub async fn name(&self) -> Result<String, DaggerError> {
10089        let query = self.selection.select("name");
10090        query.execute(self.graphql_client.clone()).await
10091    }
10092    /// The location of this object declaration.
10093    pub fn source_map(&self) -> SourceMap {
10094        let query = self.selection.select("sourceMap");
10095        SourceMap {
10096            proc: self.proc.clone(),
10097            selection: query,
10098            graphql_client: self.graphql_client.clone(),
10099        }
10100    }
10101    /// If this ObjectTypeDef is associated with a Module, the name of the module. Unset otherwise.
10102    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
10103        let query = self.selection.select("sourceModuleName");
10104        query.execute(self.graphql_client.clone()).await
10105    }
10106}
10107#[derive(Clone)]
10108pub struct Port {
10109    pub proc: Option<Arc<DaggerSessionProc>>,
10110    pub selection: Selection,
10111    pub graphql_client: DynGraphQLClient,
10112}
10113impl Port {
10114    /// The port description.
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    /// Skip the health check when run as a service.
10120    pub async fn experimental_skip_healthcheck(&self) -> Result<bool, DaggerError> {
10121        let query = self.selection.select("experimentalSkipHealthcheck");
10122        query.execute(self.graphql_client.clone()).await
10123    }
10124    /// A unique identifier for this Port.
10125    pub async fn id(&self) -> Result<PortId, DaggerError> {
10126        let query = self.selection.select("id");
10127        query.execute(self.graphql_client.clone()).await
10128    }
10129    /// The port number.
10130    pub async fn port(&self) -> Result<isize, DaggerError> {
10131        let query = self.selection.select("port");
10132        query.execute(self.graphql_client.clone()).await
10133    }
10134    /// The transport layer protocol.
10135    pub async fn protocol(&self) -> Result<NetworkProtocol, DaggerError> {
10136        let query = self.selection.select("protocol");
10137        query.execute(self.graphql_client.clone()).await
10138    }
10139}
10140#[derive(Clone)]
10141pub struct Query {
10142    pub proc: Option<Arc<DaggerSessionProc>>,
10143    pub selection: Selection,
10144    pub graphql_client: DynGraphQLClient,
10145}
10146#[derive(Builder, Debug, PartialEq)]
10147pub struct QueryContainerOpts {
10148    /// Platform to initialize the container with. Defaults to the native platform of the current engine
10149    #[builder(setter(into, strip_option), default)]
10150    pub platform: Option<Platform>,
10151}
10152#[derive(Builder, Debug, PartialEq)]
10153pub struct QueryEnvOpts {
10154    /// Give the environment the same privileges as the caller: core API including host access, current module, and dependencies
10155    #[builder(setter(into, strip_option), default)]
10156    pub privileged: Option<bool>,
10157    /// Allow new outputs to be declared and saved in the environment
10158    #[builder(setter(into, strip_option), default)]
10159    pub writable: Option<bool>,
10160}
10161#[derive(Builder, Debug, PartialEq)]
10162pub struct QueryEnvFileOpts {
10163    /// Replace "${VAR}" or "$VAR" with the value of other vars
10164    #[builder(setter(into, strip_option), default)]
10165    pub expand: Option<bool>,
10166}
10167#[derive(Builder, Debug, PartialEq)]
10168pub struct QueryFileOpts {
10169    /// Permissions of the new file. Example: 0600
10170    #[builder(setter(into, strip_option), default)]
10171    pub permissions: Option<isize>,
10172}
10173#[derive(Builder, Debug, PartialEq)]
10174pub struct QueryGitOpts<'a> {
10175    /// A service which must be started before the repo is fetched.
10176    #[builder(setter(into, strip_option), default)]
10177    pub experimental_service_host: Option<ServiceId>,
10178    /// Secret used to populate the Authorization HTTP header
10179    #[builder(setter(into, strip_option), default)]
10180    pub http_auth_header: Option<SecretId>,
10181    /// Secret used to populate the password during basic HTTP Authorization
10182    #[builder(setter(into, strip_option), default)]
10183    pub http_auth_token: Option<SecretId>,
10184    /// Username used to populate the password during basic HTTP Authorization
10185    #[builder(setter(into, strip_option), default)]
10186    pub http_auth_username: Option<&'a str>,
10187    /// DEPRECATED: Set to true to keep .git directory.
10188    #[builder(setter(into, strip_option), default)]
10189    pub keep_git_dir: Option<bool>,
10190    /// Set SSH auth socket
10191    #[builder(setter(into, strip_option), default)]
10192    pub ssh_auth_socket: Option<SocketId>,
10193    /// Set SSH known hosts
10194    #[builder(setter(into, strip_option), default)]
10195    pub ssh_known_hosts: Option<&'a str>,
10196}
10197#[derive(Builder, Debug, PartialEq)]
10198pub struct QueryHttpOpts<'a> {
10199    /// Secret used to populate the Authorization HTTP header
10200    #[builder(setter(into, strip_option), default)]
10201    pub auth_header: Option<SecretId>,
10202    /// A service which must be started before the URL is fetched.
10203    #[builder(setter(into, strip_option), default)]
10204    pub experimental_service_host: Option<ServiceId>,
10205    /// File name to use for the file. Defaults to the last part of the URL.
10206    #[builder(setter(into, strip_option), default)]
10207    pub name: Option<&'a str>,
10208    /// Permissions to set on the file.
10209    #[builder(setter(into, strip_option), default)]
10210    pub permissions: Option<isize>,
10211}
10212#[derive(Builder, Debug, PartialEq)]
10213pub struct QueryLlmOpts<'a> {
10214    /// Cap the number of API calls for this LLM
10215    #[builder(setter(into, strip_option), default)]
10216    pub max_api_calls: Option<isize>,
10217    /// Model to use
10218    #[builder(setter(into, strip_option), default)]
10219    pub model: Option<&'a str>,
10220}
10221#[derive(Builder, Debug, PartialEq)]
10222pub struct QueryModuleSourceOpts<'a> {
10223    /// 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.
10224    #[builder(setter(into, strip_option), default)]
10225    pub allow_not_exists: Option<bool>,
10226    /// If true, do not attempt to find dagger.json in a parent directory of the provided path. Only relevant for local module sources.
10227    #[builder(setter(into, strip_option), default)]
10228    pub disable_find_up: Option<bool>,
10229    /// The pinned version of the module source
10230    #[builder(setter(into, strip_option), default)]
10231    pub ref_pin: Option<&'a str>,
10232    /// If set, error out if the ref string is not of the provided requireKind.
10233    #[builder(setter(into, strip_option), default)]
10234    pub require_kind: Option<ModuleSourceKind>,
10235}
10236#[derive(Builder, Debug, PartialEq)]
10237pub struct QuerySecretOpts<'a> {
10238    /// 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.
10239    /// 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.
10240    /// If not set, the cache key for the secret will be derived from its plaintext value as looked up when the secret is constructed.
10241    #[builder(setter(into, strip_option), default)]
10242    pub cache_key: Option<&'a str>,
10243}
10244impl Query {
10245    /// initialize an address to load directories, containers, secrets or other object types.
10246    pub fn address(&self, value: impl Into<String>) -> Address {
10247        let mut query = self.selection.select("address");
10248        query = query.arg("value", value.into());
10249        Address {
10250            proc: self.proc.clone(),
10251            selection: query,
10252            graphql_client: self.graphql_client.clone(),
10253        }
10254    }
10255    /// Constructs a cache volume for a given cache key.
10256    ///
10257    /// # Arguments
10258    ///
10259    /// * `key` - A string identifier to target this cache volume (e.g., "modules-cache").
10260    pub fn cache_volume(&self, key: impl Into<String>) -> CacheVolume {
10261        let mut query = self.selection.select("cacheVolume");
10262        query = query.arg("key", key.into());
10263        CacheVolume {
10264            proc: self.proc.clone(),
10265            selection: query,
10266            graphql_client: self.graphql_client.clone(),
10267        }
10268    }
10269    /// Dagger Cloud configuration and state
10270    pub fn cloud(&self) -> Cloud {
10271        let query = self.selection.select("cloud");
10272        Cloud {
10273            proc: self.proc.clone(),
10274            selection: query,
10275            graphql_client: self.graphql_client.clone(),
10276        }
10277    }
10278    /// Creates a scratch container, with no image or metadata.
10279    /// To pull an image, follow up with the "from" function.
10280    ///
10281    /// # Arguments
10282    ///
10283    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10284    pub fn container(&self) -> Container {
10285        let query = self.selection.select("container");
10286        Container {
10287            proc: self.proc.clone(),
10288            selection: query,
10289            graphql_client: self.graphql_client.clone(),
10290        }
10291    }
10292    /// Creates a scratch container, with no image or metadata.
10293    /// To pull an image, follow up with the "from" function.
10294    ///
10295    /// # Arguments
10296    ///
10297    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10298    pub fn container_opts(&self, opts: QueryContainerOpts) -> Container {
10299        let mut query = self.selection.select("container");
10300        if let Some(platform) = opts.platform {
10301            query = query.arg("platform", platform);
10302        }
10303        Container {
10304            proc: self.proc.clone(),
10305            selection: query,
10306            graphql_client: self.graphql_client.clone(),
10307        }
10308    }
10309    /// The FunctionCall context that the SDK caller is currently executing in.
10310    /// If the caller is not currently executing in a function, this will return an error.
10311    pub fn current_function_call(&self) -> FunctionCall {
10312        let query = self.selection.select("currentFunctionCall");
10313        FunctionCall {
10314            proc: self.proc.clone(),
10315            selection: query,
10316            graphql_client: self.graphql_client.clone(),
10317        }
10318    }
10319    /// The module currently being served in the session, if any.
10320    pub fn current_module(&self) -> CurrentModule {
10321        let query = self.selection.select("currentModule");
10322        CurrentModule {
10323            proc: self.proc.clone(),
10324            selection: query,
10325            graphql_client: self.graphql_client.clone(),
10326        }
10327    }
10328    /// The TypeDef representations of the objects currently being served in the session.
10329    pub fn current_type_defs(&self) -> Vec<TypeDef> {
10330        let query = self.selection.select("currentTypeDefs");
10331        vec![TypeDef {
10332            proc: self.proc.clone(),
10333            selection: query,
10334            graphql_client: self.graphql_client.clone(),
10335        }]
10336    }
10337    /// The default platform of the engine.
10338    pub async fn default_platform(&self) -> Result<Platform, DaggerError> {
10339        let query = self.selection.select("defaultPlatform");
10340        query.execute(self.graphql_client.clone()).await
10341    }
10342    /// Creates an empty directory.
10343    pub fn directory(&self) -> Directory {
10344        let query = self.selection.select("directory");
10345        Directory {
10346            proc: self.proc.clone(),
10347            selection: query,
10348            graphql_client: self.graphql_client.clone(),
10349        }
10350    }
10351    /// The Dagger engine container configuration and state
10352    pub fn engine(&self) -> Engine {
10353        let query = self.selection.select("engine");
10354        Engine {
10355            proc: self.proc.clone(),
10356            selection: query,
10357            graphql_client: self.graphql_client.clone(),
10358        }
10359    }
10360    /// Initialize a new environment
10361    ///
10362    /// # Arguments
10363    ///
10364    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10365    pub fn env(&self) -> Env {
10366        let query = self.selection.select("env");
10367        Env {
10368            proc: self.proc.clone(),
10369            selection: query,
10370            graphql_client: self.graphql_client.clone(),
10371        }
10372    }
10373    /// Initialize a new environment
10374    ///
10375    /// # Arguments
10376    ///
10377    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10378    pub fn env_opts(&self, opts: QueryEnvOpts) -> Env {
10379        let mut query = self.selection.select("env");
10380        if let Some(privileged) = opts.privileged {
10381            query = query.arg("privileged", privileged);
10382        }
10383        if let Some(writable) = opts.writable {
10384            query = query.arg("writable", writable);
10385        }
10386        Env {
10387            proc: self.proc.clone(),
10388            selection: query,
10389            graphql_client: self.graphql_client.clone(),
10390        }
10391    }
10392    /// Initialize an environment file
10393    ///
10394    /// # Arguments
10395    ///
10396    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10397    pub fn env_file(&self) -> EnvFile {
10398        let query = self.selection.select("envFile");
10399        EnvFile {
10400            proc: self.proc.clone(),
10401            selection: query,
10402            graphql_client: self.graphql_client.clone(),
10403        }
10404    }
10405    /// Initialize an environment file
10406    ///
10407    /// # Arguments
10408    ///
10409    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10410    pub fn env_file_opts(&self, opts: QueryEnvFileOpts) -> EnvFile {
10411        let mut query = self.selection.select("envFile");
10412        if let Some(expand) = opts.expand {
10413            query = query.arg("expand", expand);
10414        }
10415        EnvFile {
10416            proc: self.proc.clone(),
10417            selection: query,
10418            graphql_client: self.graphql_client.clone(),
10419        }
10420    }
10421    /// Create a new error.
10422    ///
10423    /// # Arguments
10424    ///
10425    /// * `message` - A brief description of the error.
10426    pub fn error(&self, message: impl Into<String>) -> Error {
10427        let mut query = self.selection.select("error");
10428        query = query.arg("message", message.into());
10429        Error {
10430            proc: self.proc.clone(),
10431            selection: query,
10432            graphql_client: self.graphql_client.clone(),
10433        }
10434    }
10435    /// Creates a file with the specified contents.
10436    ///
10437    /// # Arguments
10438    ///
10439    /// * `name` - Name of the new file. Example: "foo.txt"
10440    /// * `contents` - Contents of the new file. Example: "Hello world!"
10441    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10442    pub fn file(&self, name: impl Into<String>, contents: impl Into<String>) -> File {
10443        let mut query = self.selection.select("file");
10444        query = query.arg("name", name.into());
10445        query = query.arg("contents", contents.into());
10446        File {
10447            proc: self.proc.clone(),
10448            selection: query,
10449            graphql_client: self.graphql_client.clone(),
10450        }
10451    }
10452    /// Creates a file with the specified contents.
10453    ///
10454    /// # Arguments
10455    ///
10456    /// * `name` - Name of the new file. Example: "foo.txt"
10457    /// * `contents` - Contents of the new file. Example: "Hello world!"
10458    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10459    pub fn file_opts(
10460        &self,
10461        name: impl Into<String>,
10462        contents: impl Into<String>,
10463        opts: QueryFileOpts,
10464    ) -> File {
10465        let mut query = self.selection.select("file");
10466        query = query.arg("name", name.into());
10467        query = query.arg("contents", contents.into());
10468        if let Some(permissions) = opts.permissions {
10469            query = query.arg("permissions", permissions);
10470        }
10471        File {
10472            proc: self.proc.clone(),
10473            selection: query,
10474            graphql_client: self.graphql_client.clone(),
10475        }
10476    }
10477    /// Creates a function.
10478    ///
10479    /// # Arguments
10480    ///
10481    /// * `name` - Name of the function, in its original format from the implementation language.
10482    /// * `return_type` - Return type of the function.
10483    pub fn function(
10484        &self,
10485        name: impl Into<String>,
10486        return_type: impl IntoID<TypeDefId>,
10487    ) -> Function {
10488        let mut query = self.selection.select("function");
10489        query = query.arg("name", name.into());
10490        query = query.arg_lazy(
10491            "returnType",
10492            Box::new(move || {
10493                let return_type = return_type.clone();
10494                Box::pin(async move { return_type.into_id().await.unwrap().quote() })
10495            }),
10496        );
10497        Function {
10498            proc: self.proc.clone(),
10499            selection: query,
10500            graphql_client: self.graphql_client.clone(),
10501        }
10502    }
10503    /// Create a code generation result, given a directory containing the generated code.
10504    pub fn generated_code(&self, code: impl IntoID<DirectoryId>) -> GeneratedCode {
10505        let mut query = self.selection.select("generatedCode");
10506        query = query.arg_lazy(
10507            "code",
10508            Box::new(move || {
10509                let code = code.clone();
10510                Box::pin(async move { code.into_id().await.unwrap().quote() })
10511            }),
10512        );
10513        GeneratedCode {
10514            proc: self.proc.clone(),
10515            selection: query,
10516            graphql_client: self.graphql_client.clone(),
10517        }
10518    }
10519    /// Queries a Git repository.
10520    ///
10521    /// # Arguments
10522    ///
10523    /// * `url` - URL of the git repository.
10524    ///
10525    /// Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.
10526    ///
10527    /// Suffix ".git" is optional.
10528    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10529    pub fn git(&self, url: impl Into<String>) -> GitRepository {
10530        let mut query = self.selection.select("git");
10531        query = query.arg("url", url.into());
10532        GitRepository {
10533            proc: self.proc.clone(),
10534            selection: query,
10535            graphql_client: self.graphql_client.clone(),
10536        }
10537    }
10538    /// Queries a Git repository.
10539    ///
10540    /// # Arguments
10541    ///
10542    /// * `url` - URL of the git repository.
10543    ///
10544    /// Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.
10545    ///
10546    /// Suffix ".git" is optional.
10547    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10548    pub fn git_opts<'a>(&self, url: impl Into<String>, opts: QueryGitOpts<'a>) -> GitRepository {
10549        let mut query = self.selection.select("git");
10550        query = query.arg("url", url.into());
10551        if let Some(keep_git_dir) = opts.keep_git_dir {
10552            query = query.arg("keepGitDir", keep_git_dir);
10553        }
10554        if let Some(ssh_known_hosts) = opts.ssh_known_hosts {
10555            query = query.arg("sshKnownHosts", ssh_known_hosts);
10556        }
10557        if let Some(ssh_auth_socket) = opts.ssh_auth_socket {
10558            query = query.arg("sshAuthSocket", ssh_auth_socket);
10559        }
10560        if let Some(http_auth_username) = opts.http_auth_username {
10561            query = query.arg("httpAuthUsername", http_auth_username);
10562        }
10563        if let Some(http_auth_token) = opts.http_auth_token {
10564            query = query.arg("httpAuthToken", http_auth_token);
10565        }
10566        if let Some(http_auth_header) = opts.http_auth_header {
10567            query = query.arg("httpAuthHeader", http_auth_header);
10568        }
10569        if let Some(experimental_service_host) = opts.experimental_service_host {
10570            query = query.arg("experimentalServiceHost", experimental_service_host);
10571        }
10572        GitRepository {
10573            proc: self.proc.clone(),
10574            selection: query,
10575            graphql_client: self.graphql_client.clone(),
10576        }
10577    }
10578    /// Queries the host environment.
10579    pub fn host(&self) -> Host {
10580        let query = self.selection.select("host");
10581        Host {
10582            proc: self.proc.clone(),
10583            selection: query,
10584            graphql_client: self.graphql_client.clone(),
10585        }
10586    }
10587    /// Returns a file containing an http remote url content.
10588    ///
10589    /// # Arguments
10590    ///
10591    /// * `url` - HTTP url to get the content from (e.g., "https://docs.dagger.io").
10592    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10593    pub fn http(&self, url: impl Into<String>) -> File {
10594        let mut query = self.selection.select("http");
10595        query = query.arg("url", url.into());
10596        File {
10597            proc: self.proc.clone(),
10598            selection: query,
10599            graphql_client: self.graphql_client.clone(),
10600        }
10601    }
10602    /// Returns a file containing an http remote url content.
10603    ///
10604    /// # Arguments
10605    ///
10606    /// * `url` - HTTP url to get the content from (e.g., "https://docs.dagger.io").
10607    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10608    pub fn http_opts<'a>(&self, url: impl Into<String>, opts: QueryHttpOpts<'a>) -> File {
10609        let mut query = self.selection.select("http");
10610        query = query.arg("url", url.into());
10611        if let Some(name) = opts.name {
10612            query = query.arg("name", name);
10613        }
10614        if let Some(permissions) = opts.permissions {
10615            query = query.arg("permissions", permissions);
10616        }
10617        if let Some(auth_header) = opts.auth_header {
10618            query = query.arg("authHeader", auth_header);
10619        }
10620        if let Some(experimental_service_host) = opts.experimental_service_host {
10621            query = query.arg("experimentalServiceHost", experimental_service_host);
10622        }
10623        File {
10624            proc: self.proc.clone(),
10625            selection: query,
10626            graphql_client: self.graphql_client.clone(),
10627        }
10628    }
10629    /// Initialize a JSON value
10630    pub fn json(&self) -> JsonValue {
10631        let query = self.selection.select("json");
10632        JsonValue {
10633            proc: self.proc.clone(),
10634            selection: query,
10635            graphql_client: self.graphql_client.clone(),
10636        }
10637    }
10638    /// Initialize a Large Language Model (LLM)
10639    ///
10640    /// # Arguments
10641    ///
10642    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10643    pub fn llm(&self) -> Llm {
10644        let query = self.selection.select("llm");
10645        Llm {
10646            proc: self.proc.clone(),
10647            selection: query,
10648            graphql_client: self.graphql_client.clone(),
10649        }
10650    }
10651    /// Initialize a Large Language Model (LLM)
10652    ///
10653    /// # Arguments
10654    ///
10655    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10656    pub fn llm_opts<'a>(&self, opts: QueryLlmOpts<'a>) -> Llm {
10657        let mut query = self.selection.select("llm");
10658        if let Some(model) = opts.model {
10659            query = query.arg("model", model);
10660        }
10661        if let Some(max_api_calls) = opts.max_api_calls {
10662            query = query.arg("maxAPICalls", max_api_calls);
10663        }
10664        Llm {
10665            proc: self.proc.clone(),
10666            selection: query,
10667            graphql_client: self.graphql_client.clone(),
10668        }
10669    }
10670    /// Load a Address from its ID.
10671    pub fn load_address_from_id(&self, id: impl IntoID<AddressId>) -> Address {
10672        let mut query = self.selection.select("loadAddressFromID");
10673        query = query.arg_lazy(
10674            "id",
10675            Box::new(move || {
10676                let id = id.clone();
10677                Box::pin(async move { id.into_id().await.unwrap().quote() })
10678            }),
10679        );
10680        Address {
10681            proc: self.proc.clone(),
10682            selection: query,
10683            graphql_client: self.graphql_client.clone(),
10684        }
10685    }
10686    /// Load a Binding from its ID.
10687    pub fn load_binding_from_id(&self, id: impl IntoID<BindingId>) -> Binding {
10688        let mut query = self.selection.select("loadBindingFromID");
10689        query = query.arg_lazy(
10690            "id",
10691            Box::new(move || {
10692                let id = id.clone();
10693                Box::pin(async move { id.into_id().await.unwrap().quote() })
10694            }),
10695        );
10696        Binding {
10697            proc: self.proc.clone(),
10698            selection: query,
10699            graphql_client: self.graphql_client.clone(),
10700        }
10701    }
10702    /// Load a CacheVolume from its ID.
10703    pub fn load_cache_volume_from_id(&self, id: impl IntoID<CacheVolumeId>) -> CacheVolume {
10704        let mut query = self.selection.select("loadCacheVolumeFromID");
10705        query = query.arg_lazy(
10706            "id",
10707            Box::new(move || {
10708                let id = id.clone();
10709                Box::pin(async move { id.into_id().await.unwrap().quote() })
10710            }),
10711        );
10712        CacheVolume {
10713            proc: self.proc.clone(),
10714            selection: query,
10715            graphql_client: self.graphql_client.clone(),
10716        }
10717    }
10718    /// Load a Changeset from its ID.
10719    pub fn load_changeset_from_id(&self, id: impl IntoID<ChangesetId>) -> Changeset {
10720        let mut query = self.selection.select("loadChangesetFromID");
10721        query = query.arg_lazy(
10722            "id",
10723            Box::new(move || {
10724                let id = id.clone();
10725                Box::pin(async move { id.into_id().await.unwrap().quote() })
10726            }),
10727        );
10728        Changeset {
10729            proc: self.proc.clone(),
10730            selection: query,
10731            graphql_client: self.graphql_client.clone(),
10732        }
10733    }
10734    /// Load a Cloud from its ID.
10735    pub fn load_cloud_from_id(&self, id: impl IntoID<CloudId>) -> Cloud {
10736        let mut query = self.selection.select("loadCloudFromID");
10737        query = query.arg_lazy(
10738            "id",
10739            Box::new(move || {
10740                let id = id.clone();
10741                Box::pin(async move { id.into_id().await.unwrap().quote() })
10742            }),
10743        );
10744        Cloud {
10745            proc: self.proc.clone(),
10746            selection: query,
10747            graphql_client: self.graphql_client.clone(),
10748        }
10749    }
10750    /// Load a Container from its ID.
10751    pub fn load_container_from_id(&self, id: impl IntoID<ContainerId>) -> Container {
10752        let mut query = self.selection.select("loadContainerFromID");
10753        query = query.arg_lazy(
10754            "id",
10755            Box::new(move || {
10756                let id = id.clone();
10757                Box::pin(async move { id.into_id().await.unwrap().quote() })
10758            }),
10759        );
10760        Container {
10761            proc: self.proc.clone(),
10762            selection: query,
10763            graphql_client: self.graphql_client.clone(),
10764        }
10765    }
10766    /// Load a CurrentModule from its ID.
10767    pub fn load_current_module_from_id(&self, id: impl IntoID<CurrentModuleId>) -> CurrentModule {
10768        let mut query = self.selection.select("loadCurrentModuleFromID");
10769        query = query.arg_lazy(
10770            "id",
10771            Box::new(move || {
10772                let id = id.clone();
10773                Box::pin(async move { id.into_id().await.unwrap().quote() })
10774            }),
10775        );
10776        CurrentModule {
10777            proc: self.proc.clone(),
10778            selection: query,
10779            graphql_client: self.graphql_client.clone(),
10780        }
10781    }
10782    /// Load a Directory from its ID.
10783    pub fn load_directory_from_id(&self, id: impl IntoID<DirectoryId>) -> Directory {
10784        let mut query = self.selection.select("loadDirectoryFromID");
10785        query = query.arg_lazy(
10786            "id",
10787            Box::new(move || {
10788                let id = id.clone();
10789                Box::pin(async move { id.into_id().await.unwrap().quote() })
10790            }),
10791        );
10792        Directory {
10793            proc: self.proc.clone(),
10794            selection: query,
10795            graphql_client: self.graphql_client.clone(),
10796        }
10797    }
10798    /// Load a EngineCacheEntry from its ID.
10799    pub fn load_engine_cache_entry_from_id(
10800        &self,
10801        id: impl IntoID<EngineCacheEntryId>,
10802    ) -> EngineCacheEntry {
10803        let mut query = self.selection.select("loadEngineCacheEntryFromID");
10804        query = query.arg_lazy(
10805            "id",
10806            Box::new(move || {
10807                let id = id.clone();
10808                Box::pin(async move { id.into_id().await.unwrap().quote() })
10809            }),
10810        );
10811        EngineCacheEntry {
10812            proc: self.proc.clone(),
10813            selection: query,
10814            graphql_client: self.graphql_client.clone(),
10815        }
10816    }
10817    /// Load a EngineCacheEntrySet from its ID.
10818    pub fn load_engine_cache_entry_set_from_id(
10819        &self,
10820        id: impl IntoID<EngineCacheEntrySetId>,
10821    ) -> EngineCacheEntrySet {
10822        let mut query = self.selection.select("loadEngineCacheEntrySetFromID");
10823        query = query.arg_lazy(
10824            "id",
10825            Box::new(move || {
10826                let id = id.clone();
10827                Box::pin(async move { id.into_id().await.unwrap().quote() })
10828            }),
10829        );
10830        EngineCacheEntrySet {
10831            proc: self.proc.clone(),
10832            selection: query,
10833            graphql_client: self.graphql_client.clone(),
10834        }
10835    }
10836    /// Load a EngineCache from its ID.
10837    pub fn load_engine_cache_from_id(&self, id: impl IntoID<EngineCacheId>) -> EngineCache {
10838        let mut query = self.selection.select("loadEngineCacheFromID");
10839        query = query.arg_lazy(
10840            "id",
10841            Box::new(move || {
10842                let id = id.clone();
10843                Box::pin(async move { id.into_id().await.unwrap().quote() })
10844            }),
10845        );
10846        EngineCache {
10847            proc: self.proc.clone(),
10848            selection: query,
10849            graphql_client: self.graphql_client.clone(),
10850        }
10851    }
10852    /// Load a Engine from its ID.
10853    pub fn load_engine_from_id(&self, id: impl IntoID<EngineId>) -> Engine {
10854        let mut query = self.selection.select("loadEngineFromID");
10855        query = query.arg_lazy(
10856            "id",
10857            Box::new(move || {
10858                let id = id.clone();
10859                Box::pin(async move { id.into_id().await.unwrap().quote() })
10860            }),
10861        );
10862        Engine {
10863            proc: self.proc.clone(),
10864            selection: query,
10865            graphql_client: self.graphql_client.clone(),
10866        }
10867    }
10868    /// Load a EnumTypeDef from its ID.
10869    pub fn load_enum_type_def_from_id(&self, id: impl IntoID<EnumTypeDefId>) -> EnumTypeDef {
10870        let mut query = self.selection.select("loadEnumTypeDefFromID");
10871        query = query.arg_lazy(
10872            "id",
10873            Box::new(move || {
10874                let id = id.clone();
10875                Box::pin(async move { id.into_id().await.unwrap().quote() })
10876            }),
10877        );
10878        EnumTypeDef {
10879            proc: self.proc.clone(),
10880            selection: query,
10881            graphql_client: self.graphql_client.clone(),
10882        }
10883    }
10884    /// Load a EnumValueTypeDef from its ID.
10885    pub fn load_enum_value_type_def_from_id(
10886        &self,
10887        id: impl IntoID<EnumValueTypeDefId>,
10888    ) -> EnumValueTypeDef {
10889        let mut query = self.selection.select("loadEnumValueTypeDefFromID");
10890        query = query.arg_lazy(
10891            "id",
10892            Box::new(move || {
10893                let id = id.clone();
10894                Box::pin(async move { id.into_id().await.unwrap().quote() })
10895            }),
10896        );
10897        EnumValueTypeDef {
10898            proc: self.proc.clone(),
10899            selection: query,
10900            graphql_client: self.graphql_client.clone(),
10901        }
10902    }
10903    /// Load a EnvFile from its ID.
10904    pub fn load_env_file_from_id(&self, id: impl IntoID<EnvFileId>) -> EnvFile {
10905        let mut query = self.selection.select("loadEnvFileFromID");
10906        query = query.arg_lazy(
10907            "id",
10908            Box::new(move || {
10909                let id = id.clone();
10910                Box::pin(async move { id.into_id().await.unwrap().quote() })
10911            }),
10912        );
10913        EnvFile {
10914            proc: self.proc.clone(),
10915            selection: query,
10916            graphql_client: self.graphql_client.clone(),
10917        }
10918    }
10919    /// Load a Env from its ID.
10920    pub fn load_env_from_id(&self, id: impl IntoID<EnvId>) -> Env {
10921        let mut query = self.selection.select("loadEnvFromID");
10922        query = query.arg_lazy(
10923            "id",
10924            Box::new(move || {
10925                let id = id.clone();
10926                Box::pin(async move { id.into_id().await.unwrap().quote() })
10927            }),
10928        );
10929        Env {
10930            proc: self.proc.clone(),
10931            selection: query,
10932            graphql_client: self.graphql_client.clone(),
10933        }
10934    }
10935    /// Load a EnvVariable from its ID.
10936    pub fn load_env_variable_from_id(&self, id: impl IntoID<EnvVariableId>) -> EnvVariable {
10937        let mut query = self.selection.select("loadEnvVariableFromID");
10938        query = query.arg_lazy(
10939            "id",
10940            Box::new(move || {
10941                let id = id.clone();
10942                Box::pin(async move { id.into_id().await.unwrap().quote() })
10943            }),
10944        );
10945        EnvVariable {
10946            proc: self.proc.clone(),
10947            selection: query,
10948            graphql_client: self.graphql_client.clone(),
10949        }
10950    }
10951    /// Load a Error from its ID.
10952    pub fn load_error_from_id(&self, id: impl IntoID<ErrorId>) -> Error {
10953        let mut query = self.selection.select("loadErrorFromID");
10954        query = query.arg_lazy(
10955            "id",
10956            Box::new(move || {
10957                let id = id.clone();
10958                Box::pin(async move { id.into_id().await.unwrap().quote() })
10959            }),
10960        );
10961        Error {
10962            proc: self.proc.clone(),
10963            selection: query,
10964            graphql_client: self.graphql_client.clone(),
10965        }
10966    }
10967    /// Load a ErrorValue from its ID.
10968    pub fn load_error_value_from_id(&self, id: impl IntoID<ErrorValueId>) -> ErrorValue {
10969        let mut query = self.selection.select("loadErrorValueFromID");
10970        query = query.arg_lazy(
10971            "id",
10972            Box::new(move || {
10973                let id = id.clone();
10974                Box::pin(async move { id.into_id().await.unwrap().quote() })
10975            }),
10976        );
10977        ErrorValue {
10978            proc: self.proc.clone(),
10979            selection: query,
10980            graphql_client: self.graphql_client.clone(),
10981        }
10982    }
10983    /// Load a FieldTypeDef from its ID.
10984    pub fn load_field_type_def_from_id(&self, id: impl IntoID<FieldTypeDefId>) -> FieldTypeDef {
10985        let mut query = self.selection.select("loadFieldTypeDefFromID");
10986        query = query.arg_lazy(
10987            "id",
10988            Box::new(move || {
10989                let id = id.clone();
10990                Box::pin(async move { id.into_id().await.unwrap().quote() })
10991            }),
10992        );
10993        FieldTypeDef {
10994            proc: self.proc.clone(),
10995            selection: query,
10996            graphql_client: self.graphql_client.clone(),
10997        }
10998    }
10999    /// Load a File from its ID.
11000    pub fn load_file_from_id(&self, id: impl IntoID<FileId>) -> File {
11001        let mut query = self.selection.select("loadFileFromID");
11002        query = query.arg_lazy(
11003            "id",
11004            Box::new(move || {
11005                let id = id.clone();
11006                Box::pin(async move { id.into_id().await.unwrap().quote() })
11007            }),
11008        );
11009        File {
11010            proc: self.proc.clone(),
11011            selection: query,
11012            graphql_client: self.graphql_client.clone(),
11013        }
11014    }
11015    /// Load a FunctionArg from its ID.
11016    pub fn load_function_arg_from_id(&self, id: impl IntoID<FunctionArgId>) -> FunctionArg {
11017        let mut query = self.selection.select("loadFunctionArgFromID");
11018        query = query.arg_lazy(
11019            "id",
11020            Box::new(move || {
11021                let id = id.clone();
11022                Box::pin(async move { id.into_id().await.unwrap().quote() })
11023            }),
11024        );
11025        FunctionArg {
11026            proc: self.proc.clone(),
11027            selection: query,
11028            graphql_client: self.graphql_client.clone(),
11029        }
11030    }
11031    /// Load a FunctionCallArgValue from its ID.
11032    pub fn load_function_call_arg_value_from_id(
11033        &self,
11034        id: impl IntoID<FunctionCallArgValueId>,
11035    ) -> FunctionCallArgValue {
11036        let mut query = self.selection.select("loadFunctionCallArgValueFromID");
11037        query = query.arg_lazy(
11038            "id",
11039            Box::new(move || {
11040                let id = id.clone();
11041                Box::pin(async move { id.into_id().await.unwrap().quote() })
11042            }),
11043        );
11044        FunctionCallArgValue {
11045            proc: self.proc.clone(),
11046            selection: query,
11047            graphql_client: self.graphql_client.clone(),
11048        }
11049    }
11050    /// Load a FunctionCall from its ID.
11051    pub fn load_function_call_from_id(&self, id: impl IntoID<FunctionCallId>) -> FunctionCall {
11052        let mut query = self.selection.select("loadFunctionCallFromID");
11053        query = query.arg_lazy(
11054            "id",
11055            Box::new(move || {
11056                let id = id.clone();
11057                Box::pin(async move { id.into_id().await.unwrap().quote() })
11058            }),
11059        );
11060        FunctionCall {
11061            proc: self.proc.clone(),
11062            selection: query,
11063            graphql_client: self.graphql_client.clone(),
11064        }
11065    }
11066    /// Load a Function from its ID.
11067    pub fn load_function_from_id(&self, id: impl IntoID<FunctionId>) -> Function {
11068        let mut query = self.selection.select("loadFunctionFromID");
11069        query = query.arg_lazy(
11070            "id",
11071            Box::new(move || {
11072                let id = id.clone();
11073                Box::pin(async move { id.into_id().await.unwrap().quote() })
11074            }),
11075        );
11076        Function {
11077            proc: self.proc.clone(),
11078            selection: query,
11079            graphql_client: self.graphql_client.clone(),
11080        }
11081    }
11082    /// Load a GeneratedCode from its ID.
11083    pub fn load_generated_code_from_id(&self, id: impl IntoID<GeneratedCodeId>) -> GeneratedCode {
11084        let mut query = self.selection.select("loadGeneratedCodeFromID");
11085        query = query.arg_lazy(
11086            "id",
11087            Box::new(move || {
11088                let id = id.clone();
11089                Box::pin(async move { id.into_id().await.unwrap().quote() })
11090            }),
11091        );
11092        GeneratedCode {
11093            proc: self.proc.clone(),
11094            selection: query,
11095            graphql_client: self.graphql_client.clone(),
11096        }
11097    }
11098    /// Load a GitRef from its ID.
11099    pub fn load_git_ref_from_id(&self, id: impl IntoID<GitRefId>) -> GitRef {
11100        let mut query = self.selection.select("loadGitRefFromID");
11101        query = query.arg_lazy(
11102            "id",
11103            Box::new(move || {
11104                let id = id.clone();
11105                Box::pin(async move { id.into_id().await.unwrap().quote() })
11106            }),
11107        );
11108        GitRef {
11109            proc: self.proc.clone(),
11110            selection: query,
11111            graphql_client: self.graphql_client.clone(),
11112        }
11113    }
11114    /// Load a GitRepository from its ID.
11115    pub fn load_git_repository_from_id(&self, id: impl IntoID<GitRepositoryId>) -> GitRepository {
11116        let mut query = self.selection.select("loadGitRepositoryFromID");
11117        query = query.arg_lazy(
11118            "id",
11119            Box::new(move || {
11120                let id = id.clone();
11121                Box::pin(async move { id.into_id().await.unwrap().quote() })
11122            }),
11123        );
11124        GitRepository {
11125            proc: self.proc.clone(),
11126            selection: query,
11127            graphql_client: self.graphql_client.clone(),
11128        }
11129    }
11130    /// Load a Host from its ID.
11131    pub fn load_host_from_id(&self, id: impl IntoID<HostId>) -> Host {
11132        let mut query = self.selection.select("loadHostFromID");
11133        query = query.arg_lazy(
11134            "id",
11135            Box::new(move || {
11136                let id = id.clone();
11137                Box::pin(async move { id.into_id().await.unwrap().quote() })
11138            }),
11139        );
11140        Host {
11141            proc: self.proc.clone(),
11142            selection: query,
11143            graphql_client: self.graphql_client.clone(),
11144        }
11145    }
11146    /// Load a InputTypeDef from its ID.
11147    pub fn load_input_type_def_from_id(&self, id: impl IntoID<InputTypeDefId>) -> InputTypeDef {
11148        let mut query = self.selection.select("loadInputTypeDefFromID");
11149        query = query.arg_lazy(
11150            "id",
11151            Box::new(move || {
11152                let id = id.clone();
11153                Box::pin(async move { id.into_id().await.unwrap().quote() })
11154            }),
11155        );
11156        InputTypeDef {
11157            proc: self.proc.clone(),
11158            selection: query,
11159            graphql_client: self.graphql_client.clone(),
11160        }
11161    }
11162    /// Load a InterfaceTypeDef from its ID.
11163    pub fn load_interface_type_def_from_id(
11164        &self,
11165        id: impl IntoID<InterfaceTypeDefId>,
11166    ) -> InterfaceTypeDef {
11167        let mut query = self.selection.select("loadInterfaceTypeDefFromID");
11168        query = query.arg_lazy(
11169            "id",
11170            Box::new(move || {
11171                let id = id.clone();
11172                Box::pin(async move { id.into_id().await.unwrap().quote() })
11173            }),
11174        );
11175        InterfaceTypeDef {
11176            proc: self.proc.clone(),
11177            selection: query,
11178            graphql_client: self.graphql_client.clone(),
11179        }
11180    }
11181    /// Load a JSONValue from its ID.
11182    pub fn load_json_value_from_id(&self, id: impl IntoID<JsonValueId>) -> JsonValue {
11183        let mut query = self.selection.select("loadJSONValueFromID");
11184        query = query.arg_lazy(
11185            "id",
11186            Box::new(move || {
11187                let id = id.clone();
11188                Box::pin(async move { id.into_id().await.unwrap().quote() })
11189            }),
11190        );
11191        JsonValue {
11192            proc: self.proc.clone(),
11193            selection: query,
11194            graphql_client: self.graphql_client.clone(),
11195        }
11196    }
11197    /// Load a LLM from its ID.
11198    pub fn load_llm_from_id(&self, id: impl IntoID<Llmid>) -> Llm {
11199        let mut query = self.selection.select("loadLLMFromID");
11200        query = query.arg_lazy(
11201            "id",
11202            Box::new(move || {
11203                let id = id.clone();
11204                Box::pin(async move { id.into_id().await.unwrap().quote() })
11205            }),
11206        );
11207        Llm {
11208            proc: self.proc.clone(),
11209            selection: query,
11210            graphql_client: self.graphql_client.clone(),
11211        }
11212    }
11213    /// Load a LLMTokenUsage from its ID.
11214    pub fn load_llm_token_usage_from_id(&self, id: impl IntoID<LlmTokenUsageId>) -> LlmTokenUsage {
11215        let mut query = self.selection.select("loadLLMTokenUsageFromID");
11216        query = query.arg_lazy(
11217            "id",
11218            Box::new(move || {
11219                let id = id.clone();
11220                Box::pin(async move { id.into_id().await.unwrap().quote() })
11221            }),
11222        );
11223        LlmTokenUsage {
11224            proc: self.proc.clone(),
11225            selection: query,
11226            graphql_client: self.graphql_client.clone(),
11227        }
11228    }
11229    /// Load a Label from its ID.
11230    pub fn load_label_from_id(&self, id: impl IntoID<LabelId>) -> Label {
11231        let mut query = self.selection.select("loadLabelFromID");
11232        query = query.arg_lazy(
11233            "id",
11234            Box::new(move || {
11235                let id = id.clone();
11236                Box::pin(async move { id.into_id().await.unwrap().quote() })
11237            }),
11238        );
11239        Label {
11240            proc: self.proc.clone(),
11241            selection: query,
11242            graphql_client: self.graphql_client.clone(),
11243        }
11244    }
11245    /// Load a ListTypeDef from its ID.
11246    pub fn load_list_type_def_from_id(&self, id: impl IntoID<ListTypeDefId>) -> ListTypeDef {
11247        let mut query = self.selection.select("loadListTypeDefFromID");
11248        query = query.arg_lazy(
11249            "id",
11250            Box::new(move || {
11251                let id = id.clone();
11252                Box::pin(async move { id.into_id().await.unwrap().quote() })
11253            }),
11254        );
11255        ListTypeDef {
11256            proc: self.proc.clone(),
11257            selection: query,
11258            graphql_client: self.graphql_client.clone(),
11259        }
11260    }
11261    /// Load a ModuleConfigClient from its ID.
11262    pub fn load_module_config_client_from_id(
11263        &self,
11264        id: impl IntoID<ModuleConfigClientId>,
11265    ) -> ModuleConfigClient {
11266        let mut query = self.selection.select("loadModuleConfigClientFromID");
11267        query = query.arg_lazy(
11268            "id",
11269            Box::new(move || {
11270                let id = id.clone();
11271                Box::pin(async move { id.into_id().await.unwrap().quote() })
11272            }),
11273        );
11274        ModuleConfigClient {
11275            proc: self.proc.clone(),
11276            selection: query,
11277            graphql_client: self.graphql_client.clone(),
11278        }
11279    }
11280    /// Load a Module from its ID.
11281    pub fn load_module_from_id(&self, id: impl IntoID<ModuleId>) -> Module {
11282        let mut query = self.selection.select("loadModuleFromID");
11283        query = query.arg_lazy(
11284            "id",
11285            Box::new(move || {
11286                let id = id.clone();
11287                Box::pin(async move { id.into_id().await.unwrap().quote() })
11288            }),
11289        );
11290        Module {
11291            proc: self.proc.clone(),
11292            selection: query,
11293            graphql_client: self.graphql_client.clone(),
11294        }
11295    }
11296    /// Load a ModuleSource from its ID.
11297    pub fn load_module_source_from_id(&self, id: impl IntoID<ModuleSourceId>) -> ModuleSource {
11298        let mut query = self.selection.select("loadModuleSourceFromID");
11299        query = query.arg_lazy(
11300            "id",
11301            Box::new(move || {
11302                let id = id.clone();
11303                Box::pin(async move { id.into_id().await.unwrap().quote() })
11304            }),
11305        );
11306        ModuleSource {
11307            proc: self.proc.clone(),
11308            selection: query,
11309            graphql_client: self.graphql_client.clone(),
11310        }
11311    }
11312    /// Load a ObjectTypeDef from its ID.
11313    pub fn load_object_type_def_from_id(&self, id: impl IntoID<ObjectTypeDefId>) -> ObjectTypeDef {
11314        let mut query = self.selection.select("loadObjectTypeDefFromID");
11315        query = query.arg_lazy(
11316            "id",
11317            Box::new(move || {
11318                let id = id.clone();
11319                Box::pin(async move { id.into_id().await.unwrap().quote() })
11320            }),
11321        );
11322        ObjectTypeDef {
11323            proc: self.proc.clone(),
11324            selection: query,
11325            graphql_client: self.graphql_client.clone(),
11326        }
11327    }
11328    /// Load a Port from its ID.
11329    pub fn load_port_from_id(&self, id: impl IntoID<PortId>) -> Port {
11330        let mut query = self.selection.select("loadPortFromID");
11331        query = query.arg_lazy(
11332            "id",
11333            Box::new(move || {
11334                let id = id.clone();
11335                Box::pin(async move { id.into_id().await.unwrap().quote() })
11336            }),
11337        );
11338        Port {
11339            proc: self.proc.clone(),
11340            selection: query,
11341            graphql_client: self.graphql_client.clone(),
11342        }
11343    }
11344    /// Load a SDKConfig from its ID.
11345    pub fn load_sdk_config_from_id(&self, id: impl IntoID<SdkConfigId>) -> SdkConfig {
11346        let mut query = self.selection.select("loadSDKConfigFromID");
11347        query = query.arg_lazy(
11348            "id",
11349            Box::new(move || {
11350                let id = id.clone();
11351                Box::pin(async move { id.into_id().await.unwrap().quote() })
11352            }),
11353        );
11354        SdkConfig {
11355            proc: self.proc.clone(),
11356            selection: query,
11357            graphql_client: self.graphql_client.clone(),
11358        }
11359    }
11360    /// Load a ScalarTypeDef from its ID.
11361    pub fn load_scalar_type_def_from_id(&self, id: impl IntoID<ScalarTypeDefId>) -> ScalarTypeDef {
11362        let mut query = self.selection.select("loadScalarTypeDefFromID");
11363        query = query.arg_lazy(
11364            "id",
11365            Box::new(move || {
11366                let id = id.clone();
11367                Box::pin(async move { id.into_id().await.unwrap().quote() })
11368            }),
11369        );
11370        ScalarTypeDef {
11371            proc: self.proc.clone(),
11372            selection: query,
11373            graphql_client: self.graphql_client.clone(),
11374        }
11375    }
11376    /// Load a SearchResult from its ID.
11377    pub fn load_search_result_from_id(&self, id: impl IntoID<SearchResultId>) -> SearchResult {
11378        let mut query = self.selection.select("loadSearchResultFromID");
11379        query = query.arg_lazy(
11380            "id",
11381            Box::new(move || {
11382                let id = id.clone();
11383                Box::pin(async move { id.into_id().await.unwrap().quote() })
11384            }),
11385        );
11386        SearchResult {
11387            proc: self.proc.clone(),
11388            selection: query,
11389            graphql_client: self.graphql_client.clone(),
11390        }
11391    }
11392    /// Load a SearchSubmatch from its ID.
11393    pub fn load_search_submatch_from_id(
11394        &self,
11395        id: impl IntoID<SearchSubmatchId>,
11396    ) -> SearchSubmatch {
11397        let mut query = self.selection.select("loadSearchSubmatchFromID");
11398        query = query.arg_lazy(
11399            "id",
11400            Box::new(move || {
11401                let id = id.clone();
11402                Box::pin(async move { id.into_id().await.unwrap().quote() })
11403            }),
11404        );
11405        SearchSubmatch {
11406            proc: self.proc.clone(),
11407            selection: query,
11408            graphql_client: self.graphql_client.clone(),
11409        }
11410    }
11411    /// Load a Secret from its ID.
11412    pub fn load_secret_from_id(&self, id: impl IntoID<SecretId>) -> Secret {
11413        let mut query = self.selection.select("loadSecretFromID");
11414        query = query.arg_lazy(
11415            "id",
11416            Box::new(move || {
11417                let id = id.clone();
11418                Box::pin(async move { id.into_id().await.unwrap().quote() })
11419            }),
11420        );
11421        Secret {
11422            proc: self.proc.clone(),
11423            selection: query,
11424            graphql_client: self.graphql_client.clone(),
11425        }
11426    }
11427    /// Load a Service from its ID.
11428    pub fn load_service_from_id(&self, id: impl IntoID<ServiceId>) -> Service {
11429        let mut query = self.selection.select("loadServiceFromID");
11430        query = query.arg_lazy(
11431            "id",
11432            Box::new(move || {
11433                let id = id.clone();
11434                Box::pin(async move { id.into_id().await.unwrap().quote() })
11435            }),
11436        );
11437        Service {
11438            proc: self.proc.clone(),
11439            selection: query,
11440            graphql_client: self.graphql_client.clone(),
11441        }
11442    }
11443    /// Load a Socket from its ID.
11444    pub fn load_socket_from_id(&self, id: impl IntoID<SocketId>) -> Socket {
11445        let mut query = self.selection.select("loadSocketFromID");
11446        query = query.arg_lazy(
11447            "id",
11448            Box::new(move || {
11449                let id = id.clone();
11450                Box::pin(async move { id.into_id().await.unwrap().quote() })
11451            }),
11452        );
11453        Socket {
11454            proc: self.proc.clone(),
11455            selection: query,
11456            graphql_client: self.graphql_client.clone(),
11457        }
11458    }
11459    /// Load a SourceMap from its ID.
11460    pub fn load_source_map_from_id(&self, id: impl IntoID<SourceMapId>) -> SourceMap {
11461        let mut query = self.selection.select("loadSourceMapFromID");
11462        query = query.arg_lazy(
11463            "id",
11464            Box::new(move || {
11465                let id = id.clone();
11466                Box::pin(async move { id.into_id().await.unwrap().quote() })
11467            }),
11468        );
11469        SourceMap {
11470            proc: self.proc.clone(),
11471            selection: query,
11472            graphql_client: self.graphql_client.clone(),
11473        }
11474    }
11475    /// Load a Terminal from its ID.
11476    pub fn load_terminal_from_id(&self, id: impl IntoID<TerminalId>) -> Terminal {
11477        let mut query = self.selection.select("loadTerminalFromID");
11478        query = query.arg_lazy(
11479            "id",
11480            Box::new(move || {
11481                let id = id.clone();
11482                Box::pin(async move { id.into_id().await.unwrap().quote() })
11483            }),
11484        );
11485        Terminal {
11486            proc: self.proc.clone(),
11487            selection: query,
11488            graphql_client: self.graphql_client.clone(),
11489        }
11490    }
11491    /// Load a TypeDef from its ID.
11492    pub fn load_type_def_from_id(&self, id: impl IntoID<TypeDefId>) -> TypeDef {
11493        let mut query = self.selection.select("loadTypeDefFromID");
11494        query = query.arg_lazy(
11495            "id",
11496            Box::new(move || {
11497                let id = id.clone();
11498                Box::pin(async move { id.into_id().await.unwrap().quote() })
11499            }),
11500        );
11501        TypeDef {
11502            proc: self.proc.clone(),
11503            selection: query,
11504            graphql_client: self.graphql_client.clone(),
11505        }
11506    }
11507    /// Create a new module.
11508    pub fn module(&self) -> Module {
11509        let query = self.selection.select("module");
11510        Module {
11511            proc: self.proc.clone(),
11512            selection: query,
11513            graphql_client: self.graphql_client.clone(),
11514        }
11515    }
11516    /// Create a new module source instance from a source ref string
11517    ///
11518    /// # Arguments
11519    ///
11520    /// * `ref_string` - The string ref representation of the module source
11521    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11522    pub fn module_source(&self, ref_string: impl Into<String>) -> ModuleSource {
11523        let mut query = self.selection.select("moduleSource");
11524        query = query.arg("refString", ref_string.into());
11525        ModuleSource {
11526            proc: self.proc.clone(),
11527            selection: query,
11528            graphql_client: self.graphql_client.clone(),
11529        }
11530    }
11531    /// Create a new module source instance from a source ref string
11532    ///
11533    /// # Arguments
11534    ///
11535    /// * `ref_string` - The string ref representation of the module source
11536    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11537    pub fn module_source_opts<'a>(
11538        &self,
11539        ref_string: impl Into<String>,
11540        opts: QueryModuleSourceOpts<'a>,
11541    ) -> ModuleSource {
11542        let mut query = self.selection.select("moduleSource");
11543        query = query.arg("refString", ref_string.into());
11544        if let Some(ref_pin) = opts.ref_pin {
11545            query = query.arg("refPin", ref_pin);
11546        }
11547        if let Some(disable_find_up) = opts.disable_find_up {
11548            query = query.arg("disableFindUp", disable_find_up);
11549        }
11550        if let Some(allow_not_exists) = opts.allow_not_exists {
11551            query = query.arg("allowNotExists", allow_not_exists);
11552        }
11553        if let Some(require_kind) = opts.require_kind {
11554            query = query.arg("requireKind", require_kind);
11555        }
11556        ModuleSource {
11557            proc: self.proc.clone(),
11558            selection: query,
11559            graphql_client: self.graphql_client.clone(),
11560        }
11561    }
11562    /// Creates a new secret.
11563    ///
11564    /// # Arguments
11565    ///
11566    /// * `uri` - The URI of the secret store
11567    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11568    pub fn secret(&self, uri: impl Into<String>) -> Secret {
11569        let mut query = self.selection.select("secret");
11570        query = query.arg("uri", uri.into());
11571        Secret {
11572            proc: self.proc.clone(),
11573            selection: query,
11574            graphql_client: self.graphql_client.clone(),
11575        }
11576    }
11577    /// Creates a new secret.
11578    ///
11579    /// # Arguments
11580    ///
11581    /// * `uri` - The URI of the secret store
11582    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11583    pub fn secret_opts<'a>(&self, uri: impl Into<String>, opts: QuerySecretOpts<'a>) -> Secret {
11584        let mut query = self.selection.select("secret");
11585        query = query.arg("uri", uri.into());
11586        if let Some(cache_key) = opts.cache_key {
11587            query = query.arg("cacheKey", cache_key);
11588        }
11589        Secret {
11590            proc: self.proc.clone(),
11591            selection: query,
11592            graphql_client: self.graphql_client.clone(),
11593        }
11594    }
11595    /// Sets a secret given a user defined name to its plaintext and returns the secret.
11596    /// The plaintext value is limited to a size of 128000 bytes.
11597    ///
11598    /// # Arguments
11599    ///
11600    /// * `name` - The user defined name for this secret
11601    /// * `plaintext` - The plaintext of the secret
11602    pub fn set_secret(&self, name: impl Into<String>, plaintext: impl Into<String>) -> Secret {
11603        let mut query = self.selection.select("setSecret");
11604        query = query.arg("name", name.into());
11605        query = query.arg("plaintext", plaintext.into());
11606        Secret {
11607            proc: self.proc.clone(),
11608            selection: query,
11609            graphql_client: self.graphql_client.clone(),
11610        }
11611    }
11612    /// Creates source map metadata.
11613    ///
11614    /// # Arguments
11615    ///
11616    /// * `filename` - The filename from the module source.
11617    /// * `line` - The line number within the filename.
11618    /// * `column` - The column number within the line.
11619    pub fn source_map(&self, filename: impl Into<String>, line: isize, column: isize) -> SourceMap {
11620        let mut query = self.selection.select("sourceMap");
11621        query = query.arg("filename", filename.into());
11622        query = query.arg("line", line);
11623        query = query.arg("column", column);
11624        SourceMap {
11625            proc: self.proc.clone(),
11626            selection: query,
11627            graphql_client: self.graphql_client.clone(),
11628        }
11629    }
11630    /// Create a new TypeDef.
11631    pub fn type_def(&self) -> TypeDef {
11632        let query = self.selection.select("typeDef");
11633        TypeDef {
11634            proc: self.proc.clone(),
11635            selection: query,
11636            graphql_client: self.graphql_client.clone(),
11637        }
11638    }
11639    /// Get the current Dagger Engine version.
11640    pub async fn version(&self) -> Result<String, DaggerError> {
11641        let query = self.selection.select("version");
11642        query.execute(self.graphql_client.clone()).await
11643    }
11644}
11645#[derive(Clone)]
11646pub struct SdkConfig {
11647    pub proc: Option<Arc<DaggerSessionProc>>,
11648    pub selection: Selection,
11649    pub graphql_client: DynGraphQLClient,
11650}
11651impl SdkConfig {
11652    /// A unique identifier for this SDKConfig.
11653    pub async fn id(&self) -> Result<SdkConfigId, DaggerError> {
11654        let query = self.selection.select("id");
11655        query.execute(self.graphql_client.clone()).await
11656    }
11657    /// Source of the SDK. Either a name of a builtin SDK or a module source ref string pointing to the SDK's implementation.
11658    pub async fn source(&self) -> Result<String, DaggerError> {
11659        let query = self.selection.select("source");
11660        query.execute(self.graphql_client.clone()).await
11661    }
11662}
11663#[derive(Clone)]
11664pub struct ScalarTypeDef {
11665    pub proc: Option<Arc<DaggerSessionProc>>,
11666    pub selection: Selection,
11667    pub graphql_client: DynGraphQLClient,
11668}
11669impl ScalarTypeDef {
11670    /// A doc string for the scalar, if any.
11671    pub async fn description(&self) -> Result<String, DaggerError> {
11672        let query = self.selection.select("description");
11673        query.execute(self.graphql_client.clone()).await
11674    }
11675    /// A unique identifier for this ScalarTypeDef.
11676    pub async fn id(&self) -> Result<ScalarTypeDefId, DaggerError> {
11677        let query = self.selection.select("id");
11678        query.execute(self.graphql_client.clone()).await
11679    }
11680    /// The name of the scalar.
11681    pub async fn name(&self) -> Result<String, DaggerError> {
11682        let query = self.selection.select("name");
11683        query.execute(self.graphql_client.clone()).await
11684    }
11685    /// If this ScalarTypeDef is associated with a Module, the name of the module. Unset otherwise.
11686    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
11687        let query = self.selection.select("sourceModuleName");
11688        query.execute(self.graphql_client.clone()).await
11689    }
11690}
11691#[derive(Clone)]
11692pub struct SearchResult {
11693    pub proc: Option<Arc<DaggerSessionProc>>,
11694    pub selection: Selection,
11695    pub graphql_client: DynGraphQLClient,
11696}
11697impl SearchResult {
11698    /// The byte offset of this line within the file.
11699    pub async fn absolute_offset(&self) -> Result<isize, DaggerError> {
11700        let query = self.selection.select("absoluteOffset");
11701        query.execute(self.graphql_client.clone()).await
11702    }
11703    /// The path to the file that matched.
11704    pub async fn file_path(&self) -> Result<String, DaggerError> {
11705        let query = self.selection.select("filePath");
11706        query.execute(self.graphql_client.clone()).await
11707    }
11708    /// A unique identifier for this SearchResult.
11709    pub async fn id(&self) -> Result<SearchResultId, DaggerError> {
11710        let query = self.selection.select("id");
11711        query.execute(self.graphql_client.clone()).await
11712    }
11713    /// The first line that matched.
11714    pub async fn line_number(&self) -> Result<isize, DaggerError> {
11715        let query = self.selection.select("lineNumber");
11716        query.execute(self.graphql_client.clone()).await
11717    }
11718    /// The line content that matched.
11719    pub async fn matched_lines(&self) -> Result<String, DaggerError> {
11720        let query = self.selection.select("matchedLines");
11721        query.execute(self.graphql_client.clone()).await
11722    }
11723    /// Sub-match positions and content within the matched lines.
11724    pub fn submatches(&self) -> Vec<SearchSubmatch> {
11725        let query = self.selection.select("submatches");
11726        vec![SearchSubmatch {
11727            proc: self.proc.clone(),
11728            selection: query,
11729            graphql_client: self.graphql_client.clone(),
11730        }]
11731    }
11732}
11733#[derive(Clone)]
11734pub struct SearchSubmatch {
11735    pub proc: Option<Arc<DaggerSessionProc>>,
11736    pub selection: Selection,
11737    pub graphql_client: DynGraphQLClient,
11738}
11739impl SearchSubmatch {
11740    /// The match's end offset within the matched lines.
11741    pub async fn end(&self) -> Result<isize, DaggerError> {
11742        let query = self.selection.select("end");
11743        query.execute(self.graphql_client.clone()).await
11744    }
11745    /// A unique identifier for this SearchSubmatch.
11746    pub async fn id(&self) -> Result<SearchSubmatchId, DaggerError> {
11747        let query = self.selection.select("id");
11748        query.execute(self.graphql_client.clone()).await
11749    }
11750    /// The match's start offset within the matched lines.
11751    pub async fn start(&self) -> Result<isize, DaggerError> {
11752        let query = self.selection.select("start");
11753        query.execute(self.graphql_client.clone()).await
11754    }
11755    /// The matched text.
11756    pub async fn text(&self) -> Result<String, DaggerError> {
11757        let query = self.selection.select("text");
11758        query.execute(self.graphql_client.clone()).await
11759    }
11760}
11761#[derive(Clone)]
11762pub struct Secret {
11763    pub proc: Option<Arc<DaggerSessionProc>>,
11764    pub selection: Selection,
11765    pub graphql_client: DynGraphQLClient,
11766}
11767impl Secret {
11768    /// A unique identifier for this Secret.
11769    pub async fn id(&self) -> Result<SecretId, DaggerError> {
11770        let query = self.selection.select("id");
11771        query.execute(self.graphql_client.clone()).await
11772    }
11773    /// The name of this secret.
11774    pub async fn name(&self) -> Result<String, DaggerError> {
11775        let query = self.selection.select("name");
11776        query.execute(self.graphql_client.clone()).await
11777    }
11778    /// The value of this secret.
11779    pub async fn plaintext(&self) -> Result<String, DaggerError> {
11780        let query = self.selection.select("plaintext");
11781        query.execute(self.graphql_client.clone()).await
11782    }
11783    /// The URI of this secret.
11784    pub async fn uri(&self) -> Result<String, DaggerError> {
11785        let query = self.selection.select("uri");
11786        query.execute(self.graphql_client.clone()).await
11787    }
11788}
11789#[derive(Clone)]
11790pub struct Service {
11791    pub proc: Option<Arc<DaggerSessionProc>>,
11792    pub selection: Selection,
11793    pub graphql_client: DynGraphQLClient,
11794}
11795#[derive(Builder, Debug, PartialEq)]
11796pub struct ServiceEndpointOpts<'a> {
11797    /// The exposed port number for the endpoint
11798    #[builder(setter(into, strip_option), default)]
11799    pub port: Option<isize>,
11800    /// Return a URL with the given scheme, eg. http for http://
11801    #[builder(setter(into, strip_option), default)]
11802    pub scheme: Option<&'a str>,
11803}
11804#[derive(Builder, Debug, PartialEq)]
11805pub struct ServiceStopOpts {
11806    /// Immediately kill the service without waiting for a graceful exit
11807    #[builder(setter(into, strip_option), default)]
11808    pub kill: Option<bool>,
11809}
11810#[derive(Builder, Debug, PartialEq)]
11811pub struct ServiceTerminalOpts<'a> {
11812    #[builder(setter(into, strip_option), default)]
11813    pub cmd: Option<Vec<&'a str>>,
11814}
11815#[derive(Builder, Debug, PartialEq)]
11816pub struct ServiceUpOpts {
11817    /// List of frontend/backend port mappings to forward.
11818    /// Frontend is the port accepting traffic on the host, backend is the service port.
11819    #[builder(setter(into, strip_option), default)]
11820    pub ports: Option<Vec<PortForward>>,
11821    /// Bind each tunnel port to a random port on the host.
11822    #[builder(setter(into, strip_option), default)]
11823    pub random: Option<bool>,
11824}
11825impl Service {
11826    /// Retrieves an endpoint that clients can use to reach this container.
11827    /// If no port is specified, the first exposed port is used. If none exist an error is returned.
11828    /// If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.
11829    ///
11830    /// # Arguments
11831    ///
11832    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11833    pub async fn endpoint(&self) -> Result<String, DaggerError> {
11834        let query = self.selection.select("endpoint");
11835        query.execute(self.graphql_client.clone()).await
11836    }
11837    /// Retrieves an endpoint that clients can use to reach this container.
11838    /// If no port is specified, the first exposed port is used. If none exist an error is returned.
11839    /// If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.
11840    ///
11841    /// # Arguments
11842    ///
11843    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11844    pub async fn endpoint_opts<'a>(
11845        &self,
11846        opts: ServiceEndpointOpts<'a>,
11847    ) -> Result<String, DaggerError> {
11848        let mut query = self.selection.select("endpoint");
11849        if let Some(port) = opts.port {
11850            query = query.arg("port", port);
11851        }
11852        if let Some(scheme) = opts.scheme {
11853            query = query.arg("scheme", scheme);
11854        }
11855        query.execute(self.graphql_client.clone()).await
11856    }
11857    /// Retrieves a hostname which can be used by clients to reach this container.
11858    pub async fn hostname(&self) -> Result<String, DaggerError> {
11859        let query = self.selection.select("hostname");
11860        query.execute(self.graphql_client.clone()).await
11861    }
11862    /// A unique identifier for this Service.
11863    pub async fn id(&self) -> Result<ServiceId, DaggerError> {
11864        let query = self.selection.select("id");
11865        query.execute(self.graphql_client.clone()).await
11866    }
11867    /// Retrieves the list of ports provided by the service.
11868    pub fn ports(&self) -> Vec<Port> {
11869        let query = self.selection.select("ports");
11870        vec![Port {
11871            proc: self.proc.clone(),
11872            selection: query,
11873            graphql_client: self.graphql_client.clone(),
11874        }]
11875    }
11876    /// Start the service and wait for its health checks to succeed.
11877    /// Services bound to a Container do not need to be manually started.
11878    pub async fn start(&self) -> Result<ServiceId, DaggerError> {
11879        let query = self.selection.select("start");
11880        query.execute(self.graphql_client.clone()).await
11881    }
11882    /// Stop the service.
11883    ///
11884    /// # Arguments
11885    ///
11886    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11887    pub async fn stop(&self) -> Result<ServiceId, DaggerError> {
11888        let query = self.selection.select("stop");
11889        query.execute(self.graphql_client.clone()).await
11890    }
11891    /// Stop the service.
11892    ///
11893    /// # Arguments
11894    ///
11895    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11896    pub async fn stop_opts(&self, opts: ServiceStopOpts) -> Result<ServiceId, DaggerError> {
11897        let mut query = self.selection.select("stop");
11898        if let Some(kill) = opts.kill {
11899            query = query.arg("kill", kill);
11900        }
11901        query.execute(self.graphql_client.clone()).await
11902    }
11903    /// Forces evaluation of the pipeline in the engine.
11904    pub async fn sync(&self) -> Result<ServiceId, DaggerError> {
11905        let query = self.selection.select("sync");
11906        query.execute(self.graphql_client.clone()).await
11907    }
11908    ///
11909    /// # Arguments
11910    ///
11911    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11912    pub fn terminal(&self) -> Service {
11913        let query = self.selection.select("terminal");
11914        Service {
11915            proc: self.proc.clone(),
11916            selection: query,
11917            graphql_client: self.graphql_client.clone(),
11918        }
11919    }
11920    ///
11921    /// # Arguments
11922    ///
11923    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11924    pub fn terminal_opts<'a>(&self, opts: ServiceTerminalOpts<'a>) -> Service {
11925        let mut query = self.selection.select("terminal");
11926        if let Some(cmd) = opts.cmd {
11927            query = query.arg("cmd", cmd);
11928        }
11929        Service {
11930            proc: self.proc.clone(),
11931            selection: query,
11932            graphql_client: self.graphql_client.clone(),
11933        }
11934    }
11935    /// Creates a tunnel that forwards traffic from the caller's network to this service.
11936    ///
11937    /// # Arguments
11938    ///
11939    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11940    pub async fn up(&self) -> Result<Void, DaggerError> {
11941        let query = self.selection.select("up");
11942        query.execute(self.graphql_client.clone()).await
11943    }
11944    /// Creates a tunnel that forwards traffic from the caller's network to this service.
11945    ///
11946    /// # Arguments
11947    ///
11948    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11949    pub async fn up_opts(&self, opts: ServiceUpOpts) -> Result<Void, DaggerError> {
11950        let mut query = self.selection.select("up");
11951        if let Some(ports) = opts.ports {
11952            query = query.arg("ports", ports);
11953        }
11954        if let Some(random) = opts.random {
11955            query = query.arg("random", random);
11956        }
11957        query.execute(self.graphql_client.clone()).await
11958    }
11959    /// Configures a hostname which can be used by clients within the session to reach this container.
11960    ///
11961    /// # Arguments
11962    ///
11963    /// * `hostname` - The hostname to use.
11964    pub fn with_hostname(&self, hostname: impl Into<String>) -> Service {
11965        let mut query = self.selection.select("withHostname");
11966        query = query.arg("hostname", hostname.into());
11967        Service {
11968            proc: self.proc.clone(),
11969            selection: query,
11970            graphql_client: self.graphql_client.clone(),
11971        }
11972    }
11973}
11974#[derive(Clone)]
11975pub struct Socket {
11976    pub proc: Option<Arc<DaggerSessionProc>>,
11977    pub selection: Selection,
11978    pub graphql_client: DynGraphQLClient,
11979}
11980impl Socket {
11981    /// A unique identifier for this Socket.
11982    pub async fn id(&self) -> Result<SocketId, DaggerError> {
11983        let query = self.selection.select("id");
11984        query.execute(self.graphql_client.clone()).await
11985    }
11986}
11987#[derive(Clone)]
11988pub struct SourceMap {
11989    pub proc: Option<Arc<DaggerSessionProc>>,
11990    pub selection: Selection,
11991    pub graphql_client: DynGraphQLClient,
11992}
11993impl SourceMap {
11994    /// The column number within the line.
11995    pub async fn column(&self) -> Result<isize, DaggerError> {
11996        let query = self.selection.select("column");
11997        query.execute(self.graphql_client.clone()).await
11998    }
11999    /// The filename from the module source.
12000    pub async fn filename(&self) -> Result<String, DaggerError> {
12001        let query = self.selection.select("filename");
12002        query.execute(self.graphql_client.clone()).await
12003    }
12004    /// A unique identifier for this SourceMap.
12005    pub async fn id(&self) -> Result<SourceMapId, DaggerError> {
12006        let query = self.selection.select("id");
12007        query.execute(self.graphql_client.clone()).await
12008    }
12009    /// The line number within the filename.
12010    pub async fn line(&self) -> Result<isize, DaggerError> {
12011        let query = self.selection.select("line");
12012        query.execute(self.graphql_client.clone()).await
12013    }
12014    /// The module dependency this was declared in.
12015    pub async fn module(&self) -> Result<String, DaggerError> {
12016        let query = self.selection.select("module");
12017        query.execute(self.graphql_client.clone()).await
12018    }
12019    /// The URL to the file, if any. This can be used to link to the source map in the browser.
12020    pub async fn url(&self) -> Result<String, DaggerError> {
12021        let query = self.selection.select("url");
12022        query.execute(self.graphql_client.clone()).await
12023    }
12024}
12025#[derive(Clone)]
12026pub struct Terminal {
12027    pub proc: Option<Arc<DaggerSessionProc>>,
12028    pub selection: Selection,
12029    pub graphql_client: DynGraphQLClient,
12030}
12031impl Terminal {
12032    /// A unique identifier for this Terminal.
12033    pub async fn id(&self) -> Result<TerminalId, DaggerError> {
12034        let query = self.selection.select("id");
12035        query.execute(self.graphql_client.clone()).await
12036    }
12037    /// Forces evaluation of the pipeline in the engine.
12038    /// It doesn't run the default command if no exec has been set.
12039    pub async fn sync(&self) -> Result<TerminalId, DaggerError> {
12040        let query = self.selection.select("sync");
12041        query.execute(self.graphql_client.clone()).await
12042    }
12043}
12044#[derive(Clone)]
12045pub struct TypeDef {
12046    pub proc: Option<Arc<DaggerSessionProc>>,
12047    pub selection: Selection,
12048    pub graphql_client: DynGraphQLClient,
12049}
12050#[derive(Builder, Debug, PartialEq)]
12051pub struct TypeDefWithEnumOpts<'a> {
12052    /// A doc string for the enum, if any
12053    #[builder(setter(into, strip_option), default)]
12054    pub description: Option<&'a str>,
12055    /// The source map for the enum definition.
12056    #[builder(setter(into, strip_option), default)]
12057    pub source_map: Option<SourceMapId>,
12058}
12059#[derive(Builder, Debug, PartialEq)]
12060pub struct TypeDefWithEnumMemberOpts<'a> {
12061    /// A doc string for the member, if any
12062    #[builder(setter(into, strip_option), default)]
12063    pub description: Option<&'a str>,
12064    /// The source map for the enum member definition.
12065    #[builder(setter(into, strip_option), default)]
12066    pub source_map: Option<SourceMapId>,
12067    /// The value of the member in the enum
12068    #[builder(setter(into, strip_option), default)]
12069    pub value: Option<&'a str>,
12070}
12071#[derive(Builder, Debug, PartialEq)]
12072pub struct TypeDefWithEnumValueOpts<'a> {
12073    /// A doc string for the value, if any
12074    #[builder(setter(into, strip_option), default)]
12075    pub description: Option<&'a str>,
12076    /// The source map for the enum value definition.
12077    #[builder(setter(into, strip_option), default)]
12078    pub source_map: Option<SourceMapId>,
12079}
12080#[derive(Builder, Debug, PartialEq)]
12081pub struct TypeDefWithFieldOpts<'a> {
12082    /// A doc string for the field, if any
12083    #[builder(setter(into, strip_option), default)]
12084    pub description: Option<&'a str>,
12085    /// The source map for the field definition.
12086    #[builder(setter(into, strip_option), default)]
12087    pub source_map: Option<SourceMapId>,
12088}
12089#[derive(Builder, Debug, PartialEq)]
12090pub struct TypeDefWithInterfaceOpts<'a> {
12091    #[builder(setter(into, strip_option), default)]
12092    pub description: Option<&'a str>,
12093    #[builder(setter(into, strip_option), default)]
12094    pub source_map: Option<SourceMapId>,
12095}
12096#[derive(Builder, Debug, PartialEq)]
12097pub struct TypeDefWithObjectOpts<'a> {
12098    #[builder(setter(into, strip_option), default)]
12099    pub description: Option<&'a str>,
12100    #[builder(setter(into, strip_option), default)]
12101    pub source_map: Option<SourceMapId>,
12102}
12103#[derive(Builder, Debug, PartialEq)]
12104pub struct TypeDefWithScalarOpts<'a> {
12105    #[builder(setter(into, strip_option), default)]
12106    pub description: Option<&'a str>,
12107}
12108impl TypeDef {
12109    /// If kind is ENUM, the enum-specific type definition. If kind is not ENUM, this will be null.
12110    pub fn as_enum(&self) -> EnumTypeDef {
12111        let query = self.selection.select("asEnum");
12112        EnumTypeDef {
12113            proc: self.proc.clone(),
12114            selection: query,
12115            graphql_client: self.graphql_client.clone(),
12116        }
12117    }
12118    /// If kind is INPUT, the input-specific type definition. If kind is not INPUT, this will be null.
12119    pub fn as_input(&self) -> InputTypeDef {
12120        let query = self.selection.select("asInput");
12121        InputTypeDef {
12122            proc: self.proc.clone(),
12123            selection: query,
12124            graphql_client: self.graphql_client.clone(),
12125        }
12126    }
12127    /// If kind is INTERFACE, the interface-specific type definition. If kind is not INTERFACE, this will be null.
12128    pub fn as_interface(&self) -> InterfaceTypeDef {
12129        let query = self.selection.select("asInterface");
12130        InterfaceTypeDef {
12131            proc: self.proc.clone(),
12132            selection: query,
12133            graphql_client: self.graphql_client.clone(),
12134        }
12135    }
12136    /// If kind is LIST, the list-specific type definition. If kind is not LIST, this will be null.
12137    pub fn as_list(&self) -> ListTypeDef {
12138        let query = self.selection.select("asList");
12139        ListTypeDef {
12140            proc: self.proc.clone(),
12141            selection: query,
12142            graphql_client: self.graphql_client.clone(),
12143        }
12144    }
12145    /// If kind is OBJECT, the object-specific type definition. If kind is not OBJECT, this will be null.
12146    pub fn as_object(&self) -> ObjectTypeDef {
12147        let query = self.selection.select("asObject");
12148        ObjectTypeDef {
12149            proc: self.proc.clone(),
12150            selection: query,
12151            graphql_client: self.graphql_client.clone(),
12152        }
12153    }
12154    /// If kind is SCALAR, the scalar-specific type definition. If kind is not SCALAR, this will be null.
12155    pub fn as_scalar(&self) -> ScalarTypeDef {
12156        let query = self.selection.select("asScalar");
12157        ScalarTypeDef {
12158            proc: self.proc.clone(),
12159            selection: query,
12160            graphql_client: self.graphql_client.clone(),
12161        }
12162    }
12163    /// A unique identifier for this TypeDef.
12164    pub async fn id(&self) -> Result<TypeDefId, DaggerError> {
12165        let query = self.selection.select("id");
12166        query.execute(self.graphql_client.clone()).await
12167    }
12168    /// The kind of type this is (e.g. primitive, list, object).
12169    pub async fn kind(&self) -> Result<TypeDefKind, DaggerError> {
12170        let query = self.selection.select("kind");
12171        query.execute(self.graphql_client.clone()).await
12172    }
12173    /// Whether this type can be set to null. Defaults to false.
12174    pub async fn optional(&self) -> Result<bool, DaggerError> {
12175        let query = self.selection.select("optional");
12176        query.execute(self.graphql_client.clone()).await
12177    }
12178    /// Adds a function for constructing a new instance of an Object TypeDef, failing if the type is not an object.
12179    pub fn with_constructor(&self, function: impl IntoID<FunctionId>) -> TypeDef {
12180        let mut query = self.selection.select("withConstructor");
12181        query = query.arg_lazy(
12182            "function",
12183            Box::new(move || {
12184                let function = function.clone();
12185                Box::pin(async move { function.into_id().await.unwrap().quote() })
12186            }),
12187        );
12188        TypeDef {
12189            proc: self.proc.clone(),
12190            selection: query,
12191            graphql_client: self.graphql_client.clone(),
12192        }
12193    }
12194    /// Returns a TypeDef of kind Enum with the provided name.
12195    /// 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.
12196    ///
12197    /// # Arguments
12198    ///
12199    /// * `name` - The name of the enum
12200    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12201    pub fn with_enum(&self, name: impl Into<String>) -> TypeDef {
12202        let mut query = self.selection.select("withEnum");
12203        query = query.arg("name", name.into());
12204        TypeDef {
12205            proc: self.proc.clone(),
12206            selection: query,
12207            graphql_client: self.graphql_client.clone(),
12208        }
12209    }
12210    /// Returns a TypeDef of kind Enum with the provided name.
12211    /// 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.
12212    ///
12213    /// # Arguments
12214    ///
12215    /// * `name` - The name of the enum
12216    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12217    pub fn with_enum_opts<'a>(
12218        &self,
12219        name: impl Into<String>,
12220        opts: TypeDefWithEnumOpts<'a>,
12221    ) -> TypeDef {
12222        let mut query = self.selection.select("withEnum");
12223        query = query.arg("name", name.into());
12224        if let Some(description) = opts.description {
12225            query = query.arg("description", description);
12226        }
12227        if let Some(source_map) = opts.source_map {
12228            query = query.arg("sourceMap", source_map);
12229        }
12230        TypeDef {
12231            proc: self.proc.clone(),
12232            selection: query,
12233            graphql_client: self.graphql_client.clone(),
12234        }
12235    }
12236    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
12237    ///
12238    /// # Arguments
12239    ///
12240    /// * `name` - The name of the member in the enum
12241    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12242    pub fn with_enum_member(&self, name: impl Into<String>) -> TypeDef {
12243        let mut query = self.selection.select("withEnumMember");
12244        query = query.arg("name", name.into());
12245        TypeDef {
12246            proc: self.proc.clone(),
12247            selection: query,
12248            graphql_client: self.graphql_client.clone(),
12249        }
12250    }
12251    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
12252    ///
12253    /// # Arguments
12254    ///
12255    /// * `name` - The name of the member in the enum
12256    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12257    pub fn with_enum_member_opts<'a>(
12258        &self,
12259        name: impl Into<String>,
12260        opts: TypeDefWithEnumMemberOpts<'a>,
12261    ) -> TypeDef {
12262        let mut query = self.selection.select("withEnumMember");
12263        query = query.arg("name", name.into());
12264        if let Some(value) = opts.value {
12265            query = query.arg("value", value);
12266        }
12267        if let Some(description) = opts.description {
12268            query = query.arg("description", description);
12269        }
12270        if let Some(source_map) = opts.source_map {
12271            query = query.arg("sourceMap", source_map);
12272        }
12273        TypeDef {
12274            proc: self.proc.clone(),
12275            selection: query,
12276            graphql_client: self.graphql_client.clone(),
12277        }
12278    }
12279    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
12280    ///
12281    /// # Arguments
12282    ///
12283    /// * `value` - The name of the value in the enum
12284    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12285    pub fn with_enum_value(&self, value: impl Into<String>) -> TypeDef {
12286        let mut query = self.selection.select("withEnumValue");
12287        query = query.arg("value", value.into());
12288        TypeDef {
12289            proc: self.proc.clone(),
12290            selection: query,
12291            graphql_client: self.graphql_client.clone(),
12292        }
12293    }
12294    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
12295    ///
12296    /// # Arguments
12297    ///
12298    /// * `value` - The name of the value in the enum
12299    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12300    pub fn with_enum_value_opts<'a>(
12301        &self,
12302        value: impl Into<String>,
12303        opts: TypeDefWithEnumValueOpts<'a>,
12304    ) -> TypeDef {
12305        let mut query = self.selection.select("withEnumValue");
12306        query = query.arg("value", value.into());
12307        if let Some(description) = opts.description {
12308            query = query.arg("description", description);
12309        }
12310        if let Some(source_map) = opts.source_map {
12311            query = query.arg("sourceMap", source_map);
12312        }
12313        TypeDef {
12314            proc: self.proc.clone(),
12315            selection: query,
12316            graphql_client: self.graphql_client.clone(),
12317        }
12318    }
12319    /// Adds a static field for an Object TypeDef, failing if the type is not an object.
12320    ///
12321    /// # Arguments
12322    ///
12323    /// * `name` - The name of the field in the object
12324    /// * `type_def` - The type of the field
12325    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12326    pub fn with_field(&self, name: impl Into<String>, type_def: impl IntoID<TypeDefId>) -> TypeDef {
12327        let mut query = self.selection.select("withField");
12328        query = query.arg("name", name.into());
12329        query = query.arg_lazy(
12330            "typeDef",
12331            Box::new(move || {
12332                let type_def = type_def.clone();
12333                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
12334            }),
12335        );
12336        TypeDef {
12337            proc: self.proc.clone(),
12338            selection: query,
12339            graphql_client: self.graphql_client.clone(),
12340        }
12341    }
12342    /// Adds a static field for an Object TypeDef, failing if the type is not an object.
12343    ///
12344    /// # Arguments
12345    ///
12346    /// * `name` - The name of the field in the object
12347    /// * `type_def` - The type of the field
12348    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12349    pub fn with_field_opts<'a>(
12350        &self,
12351        name: impl Into<String>,
12352        type_def: impl IntoID<TypeDefId>,
12353        opts: TypeDefWithFieldOpts<'a>,
12354    ) -> TypeDef {
12355        let mut query = self.selection.select("withField");
12356        query = query.arg("name", name.into());
12357        query = query.arg_lazy(
12358            "typeDef",
12359            Box::new(move || {
12360                let type_def = type_def.clone();
12361                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
12362            }),
12363        );
12364        if let Some(description) = opts.description {
12365            query = query.arg("description", description);
12366        }
12367        if let Some(source_map) = opts.source_map {
12368            query = query.arg("sourceMap", source_map);
12369        }
12370        TypeDef {
12371            proc: self.proc.clone(),
12372            selection: query,
12373            graphql_client: self.graphql_client.clone(),
12374        }
12375    }
12376    /// Adds a function for an Object or Interface TypeDef, failing if the type is not one of those kinds.
12377    pub fn with_function(&self, function: impl IntoID<FunctionId>) -> TypeDef {
12378        let mut query = self.selection.select("withFunction");
12379        query = query.arg_lazy(
12380            "function",
12381            Box::new(move || {
12382                let function = function.clone();
12383                Box::pin(async move { function.into_id().await.unwrap().quote() })
12384            }),
12385        );
12386        TypeDef {
12387            proc: self.proc.clone(),
12388            selection: query,
12389            graphql_client: self.graphql_client.clone(),
12390        }
12391    }
12392    /// Returns a TypeDef of kind Interface with the provided name.
12393    ///
12394    /// # Arguments
12395    ///
12396    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12397    pub fn with_interface(&self, name: impl Into<String>) -> TypeDef {
12398        let mut query = self.selection.select("withInterface");
12399        query = query.arg("name", name.into());
12400        TypeDef {
12401            proc: self.proc.clone(),
12402            selection: query,
12403            graphql_client: self.graphql_client.clone(),
12404        }
12405    }
12406    /// Returns a TypeDef of kind Interface with the provided name.
12407    ///
12408    /// # Arguments
12409    ///
12410    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12411    pub fn with_interface_opts<'a>(
12412        &self,
12413        name: impl Into<String>,
12414        opts: TypeDefWithInterfaceOpts<'a>,
12415    ) -> TypeDef {
12416        let mut query = self.selection.select("withInterface");
12417        query = query.arg("name", name.into());
12418        if let Some(description) = opts.description {
12419            query = query.arg("description", description);
12420        }
12421        if let Some(source_map) = opts.source_map {
12422            query = query.arg("sourceMap", source_map);
12423        }
12424        TypeDef {
12425            proc: self.proc.clone(),
12426            selection: query,
12427            graphql_client: self.graphql_client.clone(),
12428        }
12429    }
12430    /// Sets the kind of the type.
12431    pub fn with_kind(&self, kind: TypeDefKind) -> TypeDef {
12432        let mut query = self.selection.select("withKind");
12433        query = query.arg("kind", kind);
12434        TypeDef {
12435            proc: self.proc.clone(),
12436            selection: query,
12437            graphql_client: self.graphql_client.clone(),
12438        }
12439    }
12440    /// Returns a TypeDef of kind List with the provided type for its elements.
12441    pub fn with_list_of(&self, element_type: impl IntoID<TypeDefId>) -> TypeDef {
12442        let mut query = self.selection.select("withListOf");
12443        query = query.arg_lazy(
12444            "elementType",
12445            Box::new(move || {
12446                let element_type = element_type.clone();
12447                Box::pin(async move { element_type.into_id().await.unwrap().quote() })
12448            }),
12449        );
12450        TypeDef {
12451            proc: self.proc.clone(),
12452            selection: query,
12453            graphql_client: self.graphql_client.clone(),
12454        }
12455    }
12456    /// Returns a TypeDef of kind Object with the provided name.
12457    /// 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.
12458    ///
12459    /// # Arguments
12460    ///
12461    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12462    pub fn with_object(&self, name: impl Into<String>) -> TypeDef {
12463        let mut query = self.selection.select("withObject");
12464        query = query.arg("name", name.into());
12465        TypeDef {
12466            proc: self.proc.clone(),
12467            selection: query,
12468            graphql_client: self.graphql_client.clone(),
12469        }
12470    }
12471    /// Returns a TypeDef of kind Object with the provided name.
12472    /// 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.
12473    ///
12474    /// # Arguments
12475    ///
12476    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12477    pub fn with_object_opts<'a>(
12478        &self,
12479        name: impl Into<String>,
12480        opts: TypeDefWithObjectOpts<'a>,
12481    ) -> TypeDef {
12482        let mut query = self.selection.select("withObject");
12483        query = query.arg("name", name.into());
12484        if let Some(description) = opts.description {
12485            query = query.arg("description", description);
12486        }
12487        if let Some(source_map) = opts.source_map {
12488            query = query.arg("sourceMap", source_map);
12489        }
12490        TypeDef {
12491            proc: self.proc.clone(),
12492            selection: query,
12493            graphql_client: self.graphql_client.clone(),
12494        }
12495    }
12496    /// Sets whether this type can be set to null.
12497    pub fn with_optional(&self, optional: bool) -> TypeDef {
12498        let mut query = self.selection.select("withOptional");
12499        query = query.arg("optional", optional);
12500        TypeDef {
12501            proc: self.proc.clone(),
12502            selection: query,
12503            graphql_client: self.graphql_client.clone(),
12504        }
12505    }
12506    /// Returns a TypeDef of kind Scalar with the provided name.
12507    ///
12508    /// # Arguments
12509    ///
12510    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12511    pub fn with_scalar(&self, name: impl Into<String>) -> TypeDef {
12512        let mut query = self.selection.select("withScalar");
12513        query = query.arg("name", name.into());
12514        TypeDef {
12515            proc: self.proc.clone(),
12516            selection: query,
12517            graphql_client: self.graphql_client.clone(),
12518        }
12519    }
12520    /// Returns a TypeDef of kind Scalar with the provided name.
12521    ///
12522    /// # Arguments
12523    ///
12524    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12525    pub fn with_scalar_opts<'a>(
12526        &self,
12527        name: impl Into<String>,
12528        opts: TypeDefWithScalarOpts<'a>,
12529    ) -> TypeDef {
12530        let mut query = self.selection.select("withScalar");
12531        query = query.arg("name", name.into());
12532        if let Some(description) = opts.description {
12533            query = query.arg("description", description);
12534        }
12535        TypeDef {
12536            proc: self.proc.clone(),
12537            selection: query,
12538            graphql_client: self.graphql_client.clone(),
12539        }
12540    }
12541}
12542#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
12543pub enum CacheSharingMode {
12544    #[serde(rename = "LOCKED")]
12545    Locked,
12546    #[serde(rename = "PRIVATE")]
12547    Private,
12548    #[serde(rename = "SHARED")]
12549    Shared,
12550}
12551#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
12552pub enum ExistsType {
12553    #[serde(rename = "DIRECTORY_TYPE")]
12554    DirectoryType,
12555    #[serde(rename = "REGULAR_TYPE")]
12556    RegularType,
12557    #[serde(rename = "SYMLINK_TYPE")]
12558    SymlinkType,
12559}
12560#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
12561pub enum ImageLayerCompression {
12562    #[serde(rename = "EStarGZ")]
12563    EStarGz,
12564    #[serde(rename = "ESTARGZ")]
12565    Estargz,
12566    #[serde(rename = "Gzip")]
12567    Gzip,
12568    #[serde(rename = "Uncompressed")]
12569    Uncompressed,
12570    #[serde(rename = "Zstd")]
12571    Zstd,
12572}
12573#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
12574pub enum ImageMediaTypes {
12575    #[serde(rename = "DOCKER")]
12576    Docker,
12577    #[serde(rename = "DockerMediaTypes")]
12578    DockerMediaTypes,
12579    #[serde(rename = "OCI")]
12580    Oci,
12581    #[serde(rename = "OCIMediaTypes")]
12582    OciMediaTypes,
12583}
12584#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
12585pub enum ModuleSourceKind {
12586    #[serde(rename = "DIR")]
12587    Dir,
12588    #[serde(rename = "DIR_SOURCE")]
12589    DirSource,
12590    #[serde(rename = "GIT")]
12591    Git,
12592    #[serde(rename = "GIT_SOURCE")]
12593    GitSource,
12594    #[serde(rename = "LOCAL")]
12595    Local,
12596    #[serde(rename = "LOCAL_SOURCE")]
12597    LocalSource,
12598}
12599#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
12600pub enum NetworkProtocol {
12601    #[serde(rename = "TCP")]
12602    Tcp,
12603    #[serde(rename = "UDP")]
12604    Udp,
12605}
12606#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
12607pub enum ReturnType {
12608    #[serde(rename = "ANY")]
12609    Any,
12610    #[serde(rename = "FAILURE")]
12611    Failure,
12612    #[serde(rename = "SUCCESS")]
12613    Success,
12614}
12615#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
12616pub enum TypeDefKind {
12617    #[serde(rename = "BOOLEAN")]
12618    Boolean,
12619    #[serde(rename = "BOOLEAN_KIND")]
12620    BooleanKind,
12621    #[serde(rename = "ENUM")]
12622    Enum,
12623    #[serde(rename = "ENUM_KIND")]
12624    EnumKind,
12625    #[serde(rename = "FLOAT")]
12626    Float,
12627    #[serde(rename = "FLOAT_KIND")]
12628    FloatKind,
12629    #[serde(rename = "INPUT")]
12630    Input,
12631    #[serde(rename = "INPUT_KIND")]
12632    InputKind,
12633    #[serde(rename = "INTEGER")]
12634    Integer,
12635    #[serde(rename = "INTEGER_KIND")]
12636    IntegerKind,
12637    #[serde(rename = "INTERFACE")]
12638    Interface,
12639    #[serde(rename = "INTERFACE_KIND")]
12640    InterfaceKind,
12641    #[serde(rename = "LIST")]
12642    List,
12643    #[serde(rename = "LIST_KIND")]
12644    ListKind,
12645    #[serde(rename = "OBJECT")]
12646    Object,
12647    #[serde(rename = "OBJECT_KIND")]
12648    ObjectKind,
12649    #[serde(rename = "SCALAR")]
12650    Scalar,
12651    #[serde(rename = "SCALAR_KIND")]
12652    ScalarKind,
12653    #[serde(rename = "STRING")]
12654    String,
12655    #[serde(rename = "STRING_KIND")]
12656    StringKind,
12657    #[serde(rename = "VOID")]
12658    Void,
12659    #[serde(rename = "VOID_KIND")]
12660    VoidKind,
12661}