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 Module
2100    pub fn as_module(&self) -> Module {
2101        let query = self.selection.select("asModule");
2102        Module {
2103            proc: self.proc.clone(),
2104            selection: query,
2105            graphql_client: self.graphql_client.clone(),
2106        }
2107    }
2108    /// Retrieve the binding value, as type ModuleConfigClient
2109    pub fn as_module_config_client(&self) -> ModuleConfigClient {
2110        let query = self.selection.select("asModuleConfigClient");
2111        ModuleConfigClient {
2112            proc: self.proc.clone(),
2113            selection: query,
2114            graphql_client: self.graphql_client.clone(),
2115        }
2116    }
2117    /// Retrieve the binding value, as type ModuleSource
2118    pub fn as_module_source(&self) -> ModuleSource {
2119        let query = self.selection.select("asModuleSource");
2120        ModuleSource {
2121            proc: self.proc.clone(),
2122            selection: query,
2123            graphql_client: self.graphql_client.clone(),
2124        }
2125    }
2126    /// Retrieve the binding value, as type SearchResult
2127    pub fn as_search_result(&self) -> SearchResult {
2128        let query = self.selection.select("asSearchResult");
2129        SearchResult {
2130            proc: self.proc.clone(),
2131            selection: query,
2132            graphql_client: self.graphql_client.clone(),
2133        }
2134    }
2135    /// Retrieve the binding value, as type SearchSubmatch
2136    pub fn as_search_submatch(&self) -> SearchSubmatch {
2137        let query = self.selection.select("asSearchSubmatch");
2138        SearchSubmatch {
2139            proc: self.proc.clone(),
2140            selection: query,
2141            graphql_client: self.graphql_client.clone(),
2142        }
2143    }
2144    /// Retrieve the binding value, as type Secret
2145    pub fn as_secret(&self) -> Secret {
2146        let query = self.selection.select("asSecret");
2147        Secret {
2148            proc: self.proc.clone(),
2149            selection: query,
2150            graphql_client: self.graphql_client.clone(),
2151        }
2152    }
2153    /// Retrieve the binding value, as type Service
2154    pub fn as_service(&self) -> Service {
2155        let query = self.selection.select("asService");
2156        Service {
2157            proc: self.proc.clone(),
2158            selection: query,
2159            graphql_client: self.graphql_client.clone(),
2160        }
2161    }
2162    /// Retrieve the binding value, as type Socket
2163    pub fn as_socket(&self) -> Socket {
2164        let query = self.selection.select("asSocket");
2165        Socket {
2166            proc: self.proc.clone(),
2167            selection: query,
2168            graphql_client: self.graphql_client.clone(),
2169        }
2170    }
2171    /// Returns the binding's string value
2172    pub async fn as_string(&self) -> Result<String, DaggerError> {
2173        let query = self.selection.select("asString");
2174        query.execute(self.graphql_client.clone()).await
2175    }
2176    /// Returns the digest of the binding value
2177    pub async fn digest(&self) -> Result<String, DaggerError> {
2178        let query = self.selection.select("digest");
2179        query.execute(self.graphql_client.clone()).await
2180    }
2181    /// A unique identifier for this Binding.
2182    pub async fn id(&self) -> Result<BindingId, DaggerError> {
2183        let query = self.selection.select("id");
2184        query.execute(self.graphql_client.clone()).await
2185    }
2186    /// Returns true if the binding is null
2187    pub async fn is_null(&self) -> Result<bool, DaggerError> {
2188        let query = self.selection.select("isNull");
2189        query.execute(self.graphql_client.clone()).await
2190    }
2191    /// Returns the binding name
2192    pub async fn name(&self) -> Result<String, DaggerError> {
2193        let query = self.selection.select("name");
2194        query.execute(self.graphql_client.clone()).await
2195    }
2196    /// Returns the binding type
2197    pub async fn type_name(&self) -> Result<String, DaggerError> {
2198        let query = self.selection.select("typeName");
2199        query.execute(self.graphql_client.clone()).await
2200    }
2201}
2202#[derive(Clone)]
2203pub struct CacheVolume {
2204    pub proc: Option<Arc<DaggerSessionProc>>,
2205    pub selection: Selection,
2206    pub graphql_client: DynGraphQLClient,
2207}
2208impl CacheVolume {
2209    /// A unique identifier for this CacheVolume.
2210    pub async fn id(&self) -> Result<CacheVolumeId, DaggerError> {
2211        let query = self.selection.select("id");
2212        query.execute(self.graphql_client.clone()).await
2213    }
2214}
2215#[derive(Clone)]
2216pub struct Changeset {
2217    pub proc: Option<Arc<DaggerSessionProc>>,
2218    pub selection: Selection,
2219    pub graphql_client: DynGraphQLClient,
2220}
2221impl Changeset {
2222    /// Files and directories that were added in the newer directory.
2223    pub async fn added_paths(&self) -> Result<Vec<String>, DaggerError> {
2224        let query = self.selection.select("addedPaths");
2225        query.execute(self.graphql_client.clone()).await
2226    }
2227    /// The newer/upper snapshot.
2228    pub fn after(&self) -> Directory {
2229        let query = self.selection.select("after");
2230        Directory {
2231            proc: self.proc.clone(),
2232            selection: query,
2233            graphql_client: self.graphql_client.clone(),
2234        }
2235    }
2236    /// Return a Git-compatible patch of the changes
2237    pub fn as_patch(&self) -> File {
2238        let query = self.selection.select("asPatch");
2239        File {
2240            proc: self.proc.clone(),
2241            selection: query,
2242            graphql_client: self.graphql_client.clone(),
2243        }
2244    }
2245    /// The older/lower snapshot to compare against.
2246    pub fn before(&self) -> Directory {
2247        let query = self.selection.select("before");
2248        Directory {
2249            proc: self.proc.clone(),
2250            selection: query,
2251            graphql_client: self.graphql_client.clone(),
2252        }
2253    }
2254    /// Applies the diff represented by this changeset to a path on the host.
2255    ///
2256    /// # Arguments
2257    ///
2258    /// * `path` - Location of the copied directory (e.g., "logs/").
2259    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
2260        let mut query = self.selection.select("export");
2261        query = query.arg("path", path.into());
2262        query.execute(self.graphql_client.clone()).await
2263    }
2264    /// A unique identifier for this Changeset.
2265    pub async fn id(&self) -> Result<ChangesetId, DaggerError> {
2266        let query = self.selection.select("id");
2267        query.execute(self.graphql_client.clone()).await
2268    }
2269    /// Returns true if the changeset is empty (i.e. there are no changes).
2270    pub async fn is_empty(&self) -> Result<bool, DaggerError> {
2271        let query = self.selection.select("isEmpty");
2272        query.execute(self.graphql_client.clone()).await
2273    }
2274    /// Return a snapshot containing only the created and modified files
2275    pub fn layer(&self) -> Directory {
2276        let query = self.selection.select("layer");
2277        Directory {
2278            proc: self.proc.clone(),
2279            selection: query,
2280            graphql_client: self.graphql_client.clone(),
2281        }
2282    }
2283    /// Files and directories that existed before and were updated in the newer directory.
2284    pub async fn modified_paths(&self) -> Result<Vec<String>, DaggerError> {
2285        let query = self.selection.select("modifiedPaths");
2286        query.execute(self.graphql_client.clone()).await
2287    }
2288    /// Files and directories that were removed. Directories are indicated by a trailing slash, and their child paths are not included.
2289    pub async fn removed_paths(&self) -> Result<Vec<String>, DaggerError> {
2290        let query = self.selection.select("removedPaths");
2291        query.execute(self.graphql_client.clone()).await
2292    }
2293    /// Force evaluation in the engine.
2294    pub async fn sync(&self) -> Result<ChangesetId, DaggerError> {
2295        let query = self.selection.select("sync");
2296        query.execute(self.graphql_client.clone()).await
2297    }
2298}
2299#[derive(Clone)]
2300pub struct Cloud {
2301    pub proc: Option<Arc<DaggerSessionProc>>,
2302    pub selection: Selection,
2303    pub graphql_client: DynGraphQLClient,
2304}
2305impl Cloud {
2306    /// A unique identifier for this Cloud.
2307    pub async fn id(&self) -> Result<CloudId, DaggerError> {
2308        let query = self.selection.select("id");
2309        query.execute(self.graphql_client.clone()).await
2310    }
2311    /// The trace URL for the current session
2312    pub async fn trace_url(&self) -> Result<String, DaggerError> {
2313        let query = self.selection.select("traceURL");
2314        query.execute(self.graphql_client.clone()).await
2315    }
2316}
2317#[derive(Clone)]
2318pub struct Container {
2319    pub proc: Option<Arc<DaggerSessionProc>>,
2320    pub selection: Selection,
2321    pub graphql_client: DynGraphQLClient,
2322}
2323#[derive(Builder, Debug, PartialEq)]
2324pub struct ContainerAsServiceOpts<'a> {
2325    /// Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).
2326    /// If empty, the container's default command is used.
2327    #[builder(setter(into, strip_option), default)]
2328    pub args: Option<Vec<&'a str>>,
2329    /// Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2330    #[builder(setter(into, strip_option), default)]
2331    pub expand: Option<bool>,
2332    /// Provides Dagger access to the executed command.
2333    #[builder(setter(into, strip_option), default)]
2334    pub experimental_privileged_nesting: Option<bool>,
2335    /// 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.
2336    #[builder(setter(into, strip_option), default)]
2337    pub insecure_root_capabilities: Option<bool>,
2338    /// If set, skip the automatic init process injected into containers by default.
2339    /// 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.
2340    #[builder(setter(into, strip_option), default)]
2341    pub no_init: Option<bool>,
2342    /// If the container has an entrypoint, prepend it to the args.
2343    #[builder(setter(into, strip_option), default)]
2344    pub use_entrypoint: Option<bool>,
2345}
2346#[derive(Builder, Debug, PartialEq)]
2347pub struct ContainerAsTarballOpts {
2348    /// Force each layer of the image to use the specified compression algorithm.
2349    /// 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.
2350    #[builder(setter(into, strip_option), default)]
2351    pub forced_compression: Option<ImageLayerCompression>,
2352    /// Use the specified media types for the image's layers.
2353    /// Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
2354    #[builder(setter(into, strip_option), default)]
2355    pub media_types: Option<ImageMediaTypes>,
2356    /// Identifiers for other platform specific containers.
2357    /// Used for multi-platform images.
2358    #[builder(setter(into, strip_option), default)]
2359    pub platform_variants: Option<Vec<ContainerId>>,
2360}
2361#[derive(Builder, Debug, PartialEq)]
2362pub struct ContainerDirectoryOpts {
2363    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2364    #[builder(setter(into, strip_option), default)]
2365    pub expand: Option<bool>,
2366}
2367#[derive(Builder, Debug, PartialEq)]
2368pub struct ContainerExistsOpts {
2369    /// If specified, do not follow symlinks.
2370    #[builder(setter(into, strip_option), default)]
2371    pub do_not_follow_symlinks: Option<bool>,
2372    /// If specified, also validate the type of file (e.g. "REGULAR_TYPE", "DIRECTORY_TYPE", or "SYMLINK_TYPE").
2373    #[builder(setter(into, strip_option), default)]
2374    pub expected_type: Option<ExistsType>,
2375}
2376#[derive(Builder, Debug, PartialEq)]
2377pub struct ContainerExportOpts {
2378    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2379    #[builder(setter(into, strip_option), default)]
2380    pub expand: Option<bool>,
2381    /// Force each layer of the exported image to use the specified compression algorithm.
2382    /// 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.
2383    #[builder(setter(into, strip_option), default)]
2384    pub forced_compression: Option<ImageLayerCompression>,
2385    /// Use the specified media types for the exported image's layers.
2386    /// Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
2387    #[builder(setter(into, strip_option), default)]
2388    pub media_types: Option<ImageMediaTypes>,
2389    /// Identifiers for other platform specific containers.
2390    /// Used for multi-platform image.
2391    #[builder(setter(into, strip_option), default)]
2392    pub platform_variants: Option<Vec<ContainerId>>,
2393}
2394#[derive(Builder, Debug, PartialEq)]
2395pub struct ContainerExportImageOpts {
2396    /// Force each layer of the exported image to use the specified compression algorithm.
2397    /// 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.
2398    #[builder(setter(into, strip_option), default)]
2399    pub forced_compression: Option<ImageLayerCompression>,
2400    /// Use the specified media types for the exported image's layers.
2401    /// Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
2402    #[builder(setter(into, strip_option), default)]
2403    pub media_types: Option<ImageMediaTypes>,
2404    /// Identifiers for other platform specific containers.
2405    /// Used for multi-platform image.
2406    #[builder(setter(into, strip_option), default)]
2407    pub platform_variants: Option<Vec<ContainerId>>,
2408}
2409#[derive(Builder, Debug, PartialEq)]
2410pub struct ContainerFileOpts {
2411    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2412    #[builder(setter(into, strip_option), default)]
2413    pub expand: Option<bool>,
2414}
2415#[derive(Builder, Debug, PartialEq)]
2416pub struct ContainerImportOpts<'a> {
2417    /// Identifies the tag to import from the archive, if the archive bundles multiple tags.
2418    #[builder(setter(into, strip_option), default)]
2419    pub tag: Option<&'a str>,
2420}
2421#[derive(Builder, Debug, PartialEq)]
2422pub struct ContainerPublishOpts {
2423    /// Force each layer of the published image to use the specified compression algorithm.
2424    /// 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.
2425    #[builder(setter(into, strip_option), default)]
2426    pub forced_compression: Option<ImageLayerCompression>,
2427    /// Use the specified media types for the published image's layers.
2428    /// Defaults to "OCI", which is compatible with most recent registries, but "Docker" may be needed for older registries without OCI support.
2429    #[builder(setter(into, strip_option), default)]
2430    pub media_types: Option<ImageMediaTypes>,
2431    /// Identifiers for other platform specific containers.
2432    /// Used for multi-platform image.
2433    #[builder(setter(into, strip_option), default)]
2434    pub platform_variants: Option<Vec<ContainerId>>,
2435}
2436#[derive(Builder, Debug, PartialEq)]
2437pub struct ContainerTerminalOpts<'a> {
2438    /// If set, override the container's default terminal command and invoke these command arguments instead.
2439    #[builder(setter(into, strip_option), default)]
2440    pub cmd: Option<Vec<&'a str>>,
2441    /// Provides Dagger access to the executed command.
2442    #[builder(setter(into, strip_option), default)]
2443    pub experimental_privileged_nesting: Option<bool>,
2444    /// 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.
2445    #[builder(setter(into, strip_option), default)]
2446    pub insecure_root_capabilities: Option<bool>,
2447}
2448#[derive(Builder, Debug, PartialEq)]
2449pub struct ContainerUpOpts<'a> {
2450    /// Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).
2451    /// If empty, the container's default command is used.
2452    #[builder(setter(into, strip_option), default)]
2453    pub args: Option<Vec<&'a str>>,
2454    /// Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2455    #[builder(setter(into, strip_option), default)]
2456    pub expand: Option<bool>,
2457    /// Provides Dagger access to the executed command.
2458    #[builder(setter(into, strip_option), default)]
2459    pub experimental_privileged_nesting: Option<bool>,
2460    /// 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.
2461    #[builder(setter(into, strip_option), default)]
2462    pub insecure_root_capabilities: Option<bool>,
2463    /// If set, skip the automatic init process injected into containers by default.
2464    /// 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.
2465    #[builder(setter(into, strip_option), default)]
2466    pub no_init: Option<bool>,
2467    /// List of frontend/backend port mappings to forward.
2468    /// Frontend is the port accepting traffic on the host, backend is the service port.
2469    #[builder(setter(into, strip_option), default)]
2470    pub ports: Option<Vec<PortForward>>,
2471    /// Bind each tunnel port to a random port on the host.
2472    #[builder(setter(into, strip_option), default)]
2473    pub random: Option<bool>,
2474    /// If the container has an entrypoint, prepend it to the args.
2475    #[builder(setter(into, strip_option), default)]
2476    pub use_entrypoint: Option<bool>,
2477}
2478#[derive(Builder, Debug, PartialEq)]
2479pub struct ContainerWithDefaultTerminalCmdOpts {
2480    /// Provides Dagger access to the executed command.
2481    #[builder(setter(into, strip_option), default)]
2482    pub experimental_privileged_nesting: Option<bool>,
2483    /// 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.
2484    #[builder(setter(into, strip_option), default)]
2485    pub insecure_root_capabilities: Option<bool>,
2486}
2487#[derive(Builder, Debug, PartialEq)]
2488pub struct ContainerWithDirectoryOpts<'a> {
2489    /// Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]).
2490    #[builder(setter(into, strip_option), default)]
2491    pub exclude: Option<Vec<&'a str>>,
2492    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2493    #[builder(setter(into, strip_option), default)]
2494    pub expand: Option<bool>,
2495    /// Patterns to include in the written directory (e.g. ["*.go", "go.mod", "go.sum"]).
2496    #[builder(setter(into, strip_option), default)]
2497    pub include: Option<Vec<&'a str>>,
2498    /// A user:group to set for the directory and its contents.
2499    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2500    /// If the group is omitted, it defaults to the same as the user.
2501    #[builder(setter(into, strip_option), default)]
2502    pub owner: Option<&'a str>,
2503}
2504#[derive(Builder, Debug, PartialEq)]
2505pub struct ContainerWithEntrypointOpts {
2506    /// Don't reset the default arguments when setting the entrypoint. By default it is reset, since entrypoint and default args are often tightly coupled.
2507    #[builder(setter(into, strip_option), default)]
2508    pub keep_default_args: Option<bool>,
2509}
2510#[derive(Builder, Debug, PartialEq)]
2511pub struct ContainerWithEnvVariableOpts {
2512    /// Replace "${VAR}" or "$VAR" in the value according to the current environment variables defined in the container (e.g. "/opt/bin:$PATH").
2513    #[builder(setter(into, strip_option), default)]
2514    pub expand: Option<bool>,
2515}
2516#[derive(Builder, Debug, PartialEq)]
2517pub struct ContainerWithExecOpts<'a> {
2518    /// Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2519    #[builder(setter(into, strip_option), default)]
2520    pub expand: Option<bool>,
2521    /// Exit codes this command is allowed to exit with without error
2522    #[builder(setter(into, strip_option), default)]
2523    pub expect: Option<ReturnType>,
2524    /// Provides Dagger access to the executed command.
2525    #[builder(setter(into, strip_option), default)]
2526    pub experimental_privileged_nesting: Option<bool>,
2527    /// Execute the command with all root capabilities. Like --privileged in Docker
2528    /// 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.
2529    #[builder(setter(into, strip_option), default)]
2530    pub insecure_root_capabilities: Option<bool>,
2531    /// Skip the automatic init process injected into containers by default.
2532    /// 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.
2533    #[builder(setter(into, strip_option), default)]
2534    pub no_init: Option<bool>,
2535    /// Redirect the command's standard error to a file in the container. Example: "./stderr.txt"
2536    #[builder(setter(into, strip_option), default)]
2537    pub redirect_stderr: Option<&'a str>,
2538    /// Redirect the command's standard input from a file in the container. Example: "./stdin.txt"
2539    #[builder(setter(into, strip_option), default)]
2540    pub redirect_stdin: Option<&'a str>,
2541    /// Redirect the command's standard output to a file in the container. Example: "./stdout.txt"
2542    #[builder(setter(into, strip_option), default)]
2543    pub redirect_stdout: Option<&'a str>,
2544    /// Content to write to the command's standard input. Example: "Hello world")
2545    #[builder(setter(into, strip_option), default)]
2546    pub stdin: Option<&'a str>,
2547    /// Apply the OCI entrypoint, if present, by prepending it to the args. Ignored by default.
2548    #[builder(setter(into, strip_option), default)]
2549    pub use_entrypoint: Option<bool>,
2550}
2551#[derive(Builder, Debug, PartialEq)]
2552pub struct ContainerWithExposedPortOpts<'a> {
2553    /// Port description. Example: "payment API endpoint"
2554    #[builder(setter(into, strip_option), default)]
2555    pub description: Option<&'a str>,
2556    /// Skip the health check when run as a service.
2557    #[builder(setter(into, strip_option), default)]
2558    pub experimental_skip_healthcheck: Option<bool>,
2559    /// Network protocol. Example: "tcp"
2560    #[builder(setter(into, strip_option), default)]
2561    pub protocol: Option<NetworkProtocol>,
2562}
2563#[derive(Builder, Debug, PartialEq)]
2564pub struct ContainerWithFileOpts<'a> {
2565    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2566    #[builder(setter(into, strip_option), default)]
2567    pub expand: Option<bool>,
2568    /// A user:group to set for the file.
2569    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2570    /// If the group is omitted, it defaults to the same as the user.
2571    #[builder(setter(into, strip_option), default)]
2572    pub owner: Option<&'a str>,
2573    /// Permissions of the new file. Example: 0600
2574    #[builder(setter(into, strip_option), default)]
2575    pub permissions: Option<isize>,
2576}
2577#[derive(Builder, Debug, PartialEq)]
2578pub struct ContainerWithFilesOpts<'a> {
2579    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2580    #[builder(setter(into, strip_option), default)]
2581    pub expand: Option<bool>,
2582    /// A user:group to set for the files.
2583    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2584    /// If the group is omitted, it defaults to the same as the user.
2585    #[builder(setter(into, strip_option), default)]
2586    pub owner: Option<&'a str>,
2587    /// Permission given to the copied files (e.g., 0600).
2588    #[builder(setter(into, strip_option), default)]
2589    pub permissions: Option<isize>,
2590}
2591#[derive(Builder, Debug, PartialEq)]
2592pub struct ContainerWithMountedCacheOpts<'a> {
2593    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2594    #[builder(setter(into, strip_option), default)]
2595    pub expand: Option<bool>,
2596    /// A user:group to set for the mounted cache directory.
2597    /// 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.
2598    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2599    /// If the group is omitted, it defaults to the same as the user.
2600    #[builder(setter(into, strip_option), default)]
2601    pub owner: Option<&'a str>,
2602    /// Sharing mode of the cache volume.
2603    #[builder(setter(into, strip_option), default)]
2604    pub sharing: Option<CacheSharingMode>,
2605    /// Identifier of the directory to use as the cache volume's root.
2606    #[builder(setter(into, strip_option), default)]
2607    pub source: Option<DirectoryId>,
2608}
2609#[derive(Builder, Debug, PartialEq)]
2610pub struct ContainerWithMountedDirectoryOpts<'a> {
2611    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2612    #[builder(setter(into, strip_option), default)]
2613    pub expand: Option<bool>,
2614    /// A user:group to set for the mounted directory and its contents.
2615    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2616    /// If the group is omitted, it defaults to the same as the user.
2617    #[builder(setter(into, strip_option), default)]
2618    pub owner: Option<&'a str>,
2619}
2620#[derive(Builder, Debug, PartialEq)]
2621pub struct ContainerWithMountedFileOpts<'a> {
2622    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2623    #[builder(setter(into, strip_option), default)]
2624    pub expand: Option<bool>,
2625    /// A user or user:group to set for the mounted file.
2626    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2627    /// If the group is omitted, it defaults to the same as the user.
2628    #[builder(setter(into, strip_option), default)]
2629    pub owner: Option<&'a str>,
2630}
2631#[derive(Builder, Debug, PartialEq)]
2632pub struct ContainerWithMountedSecretOpts<'a> {
2633    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2634    #[builder(setter(into, strip_option), default)]
2635    pub expand: Option<bool>,
2636    /// Permission given to the mounted secret (e.g., 0600).
2637    /// This option requires an owner to be set to be active.
2638    #[builder(setter(into, strip_option), default)]
2639    pub mode: Option<isize>,
2640    /// A user:group to set for the mounted secret.
2641    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2642    /// If the group is omitted, it defaults to the same as the user.
2643    #[builder(setter(into, strip_option), default)]
2644    pub owner: Option<&'a str>,
2645}
2646#[derive(Builder, Debug, PartialEq)]
2647pub struct ContainerWithMountedTempOpts {
2648    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2649    #[builder(setter(into, strip_option), default)]
2650    pub expand: Option<bool>,
2651    /// Size of the temporary directory in bytes.
2652    #[builder(setter(into, strip_option), default)]
2653    pub size: Option<isize>,
2654}
2655#[derive(Builder, Debug, PartialEq)]
2656pub struct ContainerWithNewFileOpts<'a> {
2657    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2658    #[builder(setter(into, strip_option), default)]
2659    pub expand: Option<bool>,
2660    /// A user:group to set for the file.
2661    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2662    /// If the group is omitted, it defaults to the same as the user.
2663    #[builder(setter(into, strip_option), default)]
2664    pub owner: Option<&'a str>,
2665    /// Permissions of the new file. Example: 0600
2666    #[builder(setter(into, strip_option), default)]
2667    pub permissions: Option<isize>,
2668}
2669#[derive(Builder, Debug, PartialEq)]
2670pub struct ContainerWithSymlinkOpts {
2671    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2672    #[builder(setter(into, strip_option), default)]
2673    pub expand: Option<bool>,
2674}
2675#[derive(Builder, Debug, PartialEq)]
2676pub struct ContainerWithUnixSocketOpts<'a> {
2677    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2678    #[builder(setter(into, strip_option), default)]
2679    pub expand: Option<bool>,
2680    /// A user:group to set for the mounted socket.
2681    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
2682    /// If the group is omitted, it defaults to the same as the user.
2683    #[builder(setter(into, strip_option), default)]
2684    pub owner: Option<&'a str>,
2685}
2686#[derive(Builder, Debug, PartialEq)]
2687pub struct ContainerWithWorkdirOpts {
2688    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2689    #[builder(setter(into, strip_option), default)]
2690    pub expand: Option<bool>,
2691}
2692#[derive(Builder, Debug, PartialEq)]
2693pub struct ContainerWithoutDirectoryOpts {
2694    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2695    #[builder(setter(into, strip_option), default)]
2696    pub expand: Option<bool>,
2697}
2698#[derive(Builder, Debug, PartialEq)]
2699pub struct ContainerWithoutEntrypointOpts {
2700    /// Don't remove the default arguments when unsetting the entrypoint.
2701    #[builder(setter(into, strip_option), default)]
2702    pub keep_default_args: Option<bool>,
2703}
2704#[derive(Builder, Debug, PartialEq)]
2705pub struct ContainerWithoutExposedPortOpts {
2706    /// Port protocol to unexpose
2707    #[builder(setter(into, strip_option), default)]
2708    pub protocol: Option<NetworkProtocol>,
2709}
2710#[derive(Builder, Debug, PartialEq)]
2711pub struct ContainerWithoutFileOpts {
2712    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2713    #[builder(setter(into, strip_option), default)]
2714    pub expand: Option<bool>,
2715}
2716#[derive(Builder, Debug, PartialEq)]
2717pub struct ContainerWithoutFilesOpts {
2718    /// Replace "${VAR}" or "$VAR" in the value of paths according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
2719    #[builder(setter(into, strip_option), default)]
2720    pub expand: Option<bool>,
2721}
2722#[derive(Builder, Debug, PartialEq)]
2723pub struct ContainerWithoutMountOpts {
2724    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2725    #[builder(setter(into, strip_option), default)]
2726    pub expand: Option<bool>,
2727}
2728#[derive(Builder, Debug, PartialEq)]
2729pub struct ContainerWithoutUnixSocketOpts {
2730    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
2731    #[builder(setter(into, strip_option), default)]
2732    pub expand: Option<bool>,
2733}
2734impl Container {
2735    /// Turn the container into a Service.
2736    /// Be sure to set any exposed ports before this conversion.
2737    ///
2738    /// # Arguments
2739    ///
2740    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2741    pub fn as_service(&self) -> Service {
2742        let query = self.selection.select("asService");
2743        Service {
2744            proc: self.proc.clone(),
2745            selection: query,
2746            graphql_client: self.graphql_client.clone(),
2747        }
2748    }
2749    /// Turn the container into a Service.
2750    /// Be sure to set any exposed ports before this conversion.
2751    ///
2752    /// # Arguments
2753    ///
2754    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2755    pub fn as_service_opts<'a>(&self, opts: ContainerAsServiceOpts<'a>) -> Service {
2756        let mut query = self.selection.select("asService");
2757        if let Some(args) = opts.args {
2758            query = query.arg("args", args);
2759        }
2760        if let Some(use_entrypoint) = opts.use_entrypoint {
2761            query = query.arg("useEntrypoint", use_entrypoint);
2762        }
2763        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
2764            query = query.arg(
2765                "experimentalPrivilegedNesting",
2766                experimental_privileged_nesting,
2767            );
2768        }
2769        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
2770            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
2771        }
2772        if let Some(expand) = opts.expand {
2773            query = query.arg("expand", expand);
2774        }
2775        if let Some(no_init) = opts.no_init {
2776            query = query.arg("noInit", no_init);
2777        }
2778        Service {
2779            proc: self.proc.clone(),
2780            selection: query,
2781            graphql_client: self.graphql_client.clone(),
2782        }
2783    }
2784    /// Package the container state as an OCI image, and return it as a tar archive
2785    ///
2786    /// # Arguments
2787    ///
2788    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2789    pub fn as_tarball(&self) -> File {
2790        let query = self.selection.select("asTarball");
2791        File {
2792            proc: self.proc.clone(),
2793            selection: query,
2794            graphql_client: self.graphql_client.clone(),
2795        }
2796    }
2797    /// Package the container state as an OCI image, and return it as a tar archive
2798    ///
2799    /// # Arguments
2800    ///
2801    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2802    pub fn as_tarball_opts(&self, opts: ContainerAsTarballOpts) -> File {
2803        let mut query = self.selection.select("asTarball");
2804        if let Some(platform_variants) = opts.platform_variants {
2805            query = query.arg("platformVariants", platform_variants);
2806        }
2807        if let Some(forced_compression) = opts.forced_compression {
2808            query = query.arg("forcedCompression", forced_compression);
2809        }
2810        if let Some(media_types) = opts.media_types {
2811            query = query.arg("mediaTypes", media_types);
2812        }
2813        File {
2814            proc: self.proc.clone(),
2815            selection: query,
2816            graphql_client: self.graphql_client.clone(),
2817        }
2818    }
2819    /// The combined buffered standard output and standard error stream of the last executed command
2820    /// Returns an error if no command was executed
2821    pub async fn combined_output(&self) -> Result<String, DaggerError> {
2822        let query = self.selection.select("combinedOutput");
2823        query.execute(self.graphql_client.clone()).await
2824    }
2825    /// Return the container's default arguments.
2826    pub async fn default_args(&self) -> Result<Vec<String>, DaggerError> {
2827        let query = self.selection.select("defaultArgs");
2828        query.execute(self.graphql_client.clone()).await
2829    }
2830    /// Retrieve a directory from the container's root filesystem
2831    /// Mounts are included.
2832    ///
2833    /// # Arguments
2834    ///
2835    /// * `path` - The path of the directory to retrieve (e.g., "./src").
2836    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2837    pub fn directory(&self, path: impl Into<String>) -> Directory {
2838        let mut query = self.selection.select("directory");
2839        query = query.arg("path", path.into());
2840        Directory {
2841            proc: self.proc.clone(),
2842            selection: query,
2843            graphql_client: self.graphql_client.clone(),
2844        }
2845    }
2846    /// Retrieve a directory from the container's root filesystem
2847    /// Mounts are included.
2848    ///
2849    /// # Arguments
2850    ///
2851    /// * `path` - The path of the directory to retrieve (e.g., "./src").
2852    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2853    pub fn directory_opts(
2854        &self,
2855        path: impl Into<String>,
2856        opts: ContainerDirectoryOpts,
2857    ) -> Directory {
2858        let mut query = self.selection.select("directory");
2859        query = query.arg("path", path.into());
2860        if let Some(expand) = opts.expand {
2861            query = query.arg("expand", expand);
2862        }
2863        Directory {
2864            proc: self.proc.clone(),
2865            selection: query,
2866            graphql_client: self.graphql_client.clone(),
2867        }
2868    }
2869    /// Return the container's OCI entrypoint.
2870    pub async fn entrypoint(&self) -> Result<Vec<String>, DaggerError> {
2871        let query = self.selection.select("entrypoint");
2872        query.execute(self.graphql_client.clone()).await
2873    }
2874    /// Retrieves the value of the specified environment variable.
2875    ///
2876    /// # Arguments
2877    ///
2878    /// * `name` - The name of the environment variable to retrieve (e.g., "PATH").
2879    pub async fn env_variable(&self, name: impl Into<String>) -> Result<String, DaggerError> {
2880        let mut query = self.selection.select("envVariable");
2881        query = query.arg("name", name.into());
2882        query.execute(self.graphql_client.clone()).await
2883    }
2884    /// Retrieves the list of environment variables passed to commands.
2885    pub fn env_variables(&self) -> Vec<EnvVariable> {
2886        let query = self.selection.select("envVariables");
2887        vec![EnvVariable {
2888            proc: self.proc.clone(),
2889            selection: query,
2890            graphql_client: self.graphql_client.clone(),
2891        }]
2892    }
2893    /// check if a file or directory exists
2894    ///
2895    /// # Arguments
2896    ///
2897    /// * `path` - Path to check (e.g., "/file.txt").
2898    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2899    pub async fn exists(&self, path: impl Into<String>) -> Result<bool, DaggerError> {
2900        let mut query = self.selection.select("exists");
2901        query = query.arg("path", path.into());
2902        query.execute(self.graphql_client.clone()).await
2903    }
2904    /// check if a file or directory exists
2905    ///
2906    /// # Arguments
2907    ///
2908    /// * `path` - Path to check (e.g., "/file.txt").
2909    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2910    pub async fn exists_opts(
2911        &self,
2912        path: impl Into<String>,
2913        opts: ContainerExistsOpts,
2914    ) -> Result<bool, DaggerError> {
2915        let mut query = self.selection.select("exists");
2916        query = query.arg("path", path.into());
2917        if let Some(expected_type) = opts.expected_type {
2918            query = query.arg("expectedType", expected_type);
2919        }
2920        if let Some(do_not_follow_symlinks) = opts.do_not_follow_symlinks {
2921            query = query.arg("doNotFollowSymlinks", do_not_follow_symlinks);
2922        }
2923        query.execute(self.graphql_client.clone()).await
2924    }
2925    /// The exit code of the last executed command
2926    /// Returns an error if no command was executed
2927    pub async fn exit_code(&self) -> Result<isize, DaggerError> {
2928        let query = self.selection.select("exitCode");
2929        query.execute(self.graphql_client.clone()).await
2930    }
2931    /// EXPERIMENTAL API! Subject to change/removal at any time.
2932    /// Configures all available GPUs on the host to be accessible to this container.
2933    /// This currently works for Nvidia devices only.
2934    pub fn experimental_with_all_gp_us(&self) -> Container {
2935        let query = self.selection.select("experimentalWithAllGPUs");
2936        Container {
2937            proc: self.proc.clone(),
2938            selection: query,
2939            graphql_client: self.graphql_client.clone(),
2940        }
2941    }
2942    /// EXPERIMENTAL API! Subject to change/removal at any time.
2943    /// Configures the provided list of devices to be accessible to this container.
2944    /// This currently works for Nvidia devices only.
2945    ///
2946    /// # Arguments
2947    ///
2948    /// * `devices` - List of devices to be accessible to this container.
2949    pub fn experimental_with_gpu(&self, devices: Vec<impl Into<String>>) -> Container {
2950        let mut query = self.selection.select("experimentalWithGPU");
2951        query = query.arg(
2952            "devices",
2953            devices
2954                .into_iter()
2955                .map(|i| i.into())
2956                .collect::<Vec<String>>(),
2957        );
2958        Container {
2959            proc: self.proc.clone(),
2960            selection: query,
2961            graphql_client: self.graphql_client.clone(),
2962        }
2963    }
2964    /// Writes the container as an OCI tarball to the destination file path on the host.
2965    /// It can also export platform variants.
2966    ///
2967    /// # Arguments
2968    ///
2969    /// * `path` - Host's destination path (e.g., "./tarball").
2970    ///
2971    /// Path can be relative to the engine's workdir or absolute.
2972    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2973    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
2974        let mut query = self.selection.select("export");
2975        query = query.arg("path", path.into());
2976        query.execute(self.graphql_client.clone()).await
2977    }
2978    /// Writes the container as an OCI tarball to the destination file path on the host.
2979    /// It can also export platform variants.
2980    ///
2981    /// # Arguments
2982    ///
2983    /// * `path` - Host's destination path (e.g., "./tarball").
2984    ///
2985    /// Path can be relative to the engine's workdir or absolute.
2986    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2987    pub async fn export_opts(
2988        &self,
2989        path: impl Into<String>,
2990        opts: ContainerExportOpts,
2991    ) -> Result<String, DaggerError> {
2992        let mut query = self.selection.select("export");
2993        query = query.arg("path", path.into());
2994        if let Some(platform_variants) = opts.platform_variants {
2995            query = query.arg("platformVariants", platform_variants);
2996        }
2997        if let Some(forced_compression) = opts.forced_compression {
2998            query = query.arg("forcedCompression", forced_compression);
2999        }
3000        if let Some(media_types) = opts.media_types {
3001            query = query.arg("mediaTypes", media_types);
3002        }
3003        if let Some(expand) = opts.expand {
3004            query = query.arg("expand", expand);
3005        }
3006        query.execute(self.graphql_client.clone()).await
3007    }
3008    /// Exports the container as an image to the host's container image store.
3009    ///
3010    /// # Arguments
3011    ///
3012    /// * `name` - Name of image to export to in the host's store
3013    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3014    pub async fn export_image(&self, name: impl Into<String>) -> Result<Void, DaggerError> {
3015        let mut query = self.selection.select("exportImage");
3016        query = query.arg("name", name.into());
3017        query.execute(self.graphql_client.clone()).await
3018    }
3019    /// Exports the container as an image to the host's container image store.
3020    ///
3021    /// # Arguments
3022    ///
3023    /// * `name` - Name of image to export to in the host's store
3024    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3025    pub async fn export_image_opts(
3026        &self,
3027        name: impl Into<String>,
3028        opts: ContainerExportImageOpts,
3029    ) -> Result<Void, DaggerError> {
3030        let mut query = self.selection.select("exportImage");
3031        query = query.arg("name", name.into());
3032        if let Some(platform_variants) = opts.platform_variants {
3033            query = query.arg("platformVariants", platform_variants);
3034        }
3035        if let Some(forced_compression) = opts.forced_compression {
3036            query = query.arg("forcedCompression", forced_compression);
3037        }
3038        if let Some(media_types) = opts.media_types {
3039            query = query.arg("mediaTypes", media_types);
3040        }
3041        query.execute(self.graphql_client.clone()).await
3042    }
3043    /// Retrieves the list of exposed ports.
3044    /// This includes ports already exposed by the image, even if not explicitly added with dagger.
3045    pub fn exposed_ports(&self) -> Vec<Port> {
3046        let query = self.selection.select("exposedPorts");
3047        vec![Port {
3048            proc: self.proc.clone(),
3049            selection: query,
3050            graphql_client: self.graphql_client.clone(),
3051        }]
3052    }
3053    /// Retrieves a file at the given path.
3054    /// Mounts are included.
3055    ///
3056    /// # Arguments
3057    ///
3058    /// * `path` - The path of the file to retrieve (e.g., "./README.md").
3059    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3060    pub fn file(&self, path: impl Into<String>) -> File {
3061        let mut query = self.selection.select("file");
3062        query = query.arg("path", path.into());
3063        File {
3064            proc: self.proc.clone(),
3065            selection: query,
3066            graphql_client: self.graphql_client.clone(),
3067        }
3068    }
3069    /// Retrieves a file at the given path.
3070    /// Mounts are included.
3071    ///
3072    /// # Arguments
3073    ///
3074    /// * `path` - The path of the file to retrieve (e.g., "./README.md").
3075    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3076    pub fn file_opts(&self, path: impl Into<String>, opts: ContainerFileOpts) -> File {
3077        let mut query = self.selection.select("file");
3078        query = query.arg("path", path.into());
3079        if let Some(expand) = opts.expand {
3080            query = query.arg("expand", expand);
3081        }
3082        File {
3083            proc: self.proc.clone(),
3084            selection: query,
3085            graphql_client: self.graphql_client.clone(),
3086        }
3087    }
3088    /// Download a container image, and apply it to the container state. All previous state will be lost.
3089    ///
3090    /// # Arguments
3091    ///
3092    /// * `address` - Address of the container image to download, in standard OCI ref format. Example:"registry.dagger.io/engine:latest"
3093    pub fn from(&self, address: impl Into<String>) -> Container {
3094        let mut query = self.selection.select("from");
3095        query = query.arg("address", address.into());
3096        Container {
3097            proc: self.proc.clone(),
3098            selection: query,
3099            graphql_client: self.graphql_client.clone(),
3100        }
3101    }
3102    /// A unique identifier for this Container.
3103    pub async fn id(&self) -> Result<ContainerId, DaggerError> {
3104        let query = self.selection.select("id");
3105        query.execute(self.graphql_client.clone()).await
3106    }
3107    /// The unique image reference which can only be retrieved immediately after the 'Container.From' call.
3108    pub async fn image_ref(&self) -> Result<String, DaggerError> {
3109        let query = self.selection.select("imageRef");
3110        query.execute(self.graphql_client.clone()).await
3111    }
3112    /// Reads the container from an OCI tarball.
3113    ///
3114    /// # Arguments
3115    ///
3116    /// * `source` - File to read the container from.
3117    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3118    pub fn import(&self, source: impl IntoID<FileId>) -> Container {
3119        let mut query = self.selection.select("import");
3120        query = query.arg_lazy(
3121            "source",
3122            Box::new(move || {
3123                let source = source.clone();
3124                Box::pin(async move { source.into_id().await.unwrap().quote() })
3125            }),
3126        );
3127        Container {
3128            proc: self.proc.clone(),
3129            selection: query,
3130            graphql_client: self.graphql_client.clone(),
3131        }
3132    }
3133    /// Reads the container from an OCI tarball.
3134    ///
3135    /// # Arguments
3136    ///
3137    /// * `source` - File to read the container from.
3138    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3139    pub fn import_opts<'a>(
3140        &self,
3141        source: impl IntoID<FileId>,
3142        opts: ContainerImportOpts<'a>,
3143    ) -> Container {
3144        let mut query = self.selection.select("import");
3145        query = query.arg_lazy(
3146            "source",
3147            Box::new(move || {
3148                let source = source.clone();
3149                Box::pin(async move { source.into_id().await.unwrap().quote() })
3150            }),
3151        );
3152        if let Some(tag) = opts.tag {
3153            query = query.arg("tag", tag);
3154        }
3155        Container {
3156            proc: self.proc.clone(),
3157            selection: query,
3158            graphql_client: self.graphql_client.clone(),
3159        }
3160    }
3161    /// Retrieves the value of the specified label.
3162    ///
3163    /// # Arguments
3164    ///
3165    /// * `name` - The name of the label (e.g., "org.opencontainers.artifact.created").
3166    pub async fn label(&self, name: impl Into<String>) -> Result<String, DaggerError> {
3167        let mut query = self.selection.select("label");
3168        query = query.arg("name", name.into());
3169        query.execute(self.graphql_client.clone()).await
3170    }
3171    /// Retrieves the list of labels passed to container.
3172    pub fn labels(&self) -> Vec<Label> {
3173        let query = self.selection.select("labels");
3174        vec![Label {
3175            proc: self.proc.clone(),
3176            selection: query,
3177            graphql_client: self.graphql_client.clone(),
3178        }]
3179    }
3180    /// Retrieves the list of paths where a directory is mounted.
3181    pub async fn mounts(&self) -> Result<Vec<String>, DaggerError> {
3182        let query = self.selection.select("mounts");
3183        query.execute(self.graphql_client.clone()).await
3184    }
3185    /// The platform this container executes and publishes as.
3186    pub async fn platform(&self) -> Result<Platform, DaggerError> {
3187        let query = self.selection.select("platform");
3188        query.execute(self.graphql_client.clone()).await
3189    }
3190    /// Package the container state as an OCI image, and publish it to a registry
3191    /// Returns the fully qualified address of the published image, with digest
3192    ///
3193    /// # Arguments
3194    ///
3195    /// * `address` - The OCI address to publish to
3196    ///
3197    /// Same format as "docker push". Example: "registry.example.com/user/repo:tag"
3198    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3199    pub async fn publish(&self, address: impl Into<String>) -> Result<String, DaggerError> {
3200        let mut query = self.selection.select("publish");
3201        query = query.arg("address", address.into());
3202        query.execute(self.graphql_client.clone()).await
3203    }
3204    /// Package the container state as an OCI image, and publish it to a registry
3205    /// Returns the fully qualified address of the published image, with digest
3206    ///
3207    /// # Arguments
3208    ///
3209    /// * `address` - The OCI address to publish to
3210    ///
3211    /// Same format as "docker push". Example: "registry.example.com/user/repo:tag"
3212    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3213    pub async fn publish_opts(
3214        &self,
3215        address: impl Into<String>,
3216        opts: ContainerPublishOpts,
3217    ) -> Result<String, DaggerError> {
3218        let mut query = self.selection.select("publish");
3219        query = query.arg("address", address.into());
3220        if let Some(platform_variants) = opts.platform_variants {
3221            query = query.arg("platformVariants", platform_variants);
3222        }
3223        if let Some(forced_compression) = opts.forced_compression {
3224            query = query.arg("forcedCompression", forced_compression);
3225        }
3226        if let Some(media_types) = opts.media_types {
3227            query = query.arg("mediaTypes", media_types);
3228        }
3229        query.execute(self.graphql_client.clone()).await
3230    }
3231    /// 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.
3232    pub fn rootfs(&self) -> Directory {
3233        let query = self.selection.select("rootfs");
3234        Directory {
3235            proc: self.proc.clone(),
3236            selection: query,
3237            graphql_client: self.graphql_client.clone(),
3238        }
3239    }
3240    /// The buffered standard error stream of the last executed command
3241    /// Returns an error if no command was executed
3242    pub async fn stderr(&self) -> Result<String, DaggerError> {
3243        let query = self.selection.select("stderr");
3244        query.execute(self.graphql_client.clone()).await
3245    }
3246    /// The buffered standard output stream of the last executed command
3247    /// Returns an error if no command was executed
3248    pub async fn stdout(&self) -> Result<String, DaggerError> {
3249        let query = self.selection.select("stdout");
3250        query.execute(self.graphql_client.clone()).await
3251    }
3252    /// Forces evaluation of the pipeline in the engine.
3253    /// It doesn't run the default command if no exec has been set.
3254    pub async fn sync(&self) -> Result<ContainerId, DaggerError> {
3255        let query = self.selection.select("sync");
3256        query.execute(self.graphql_client.clone()).await
3257    }
3258    /// Opens an interactive terminal for this container using its configured default terminal command if not overridden by args (or sh as a fallback default).
3259    ///
3260    /// # Arguments
3261    ///
3262    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3263    pub fn terminal(&self) -> Container {
3264        let query = self.selection.select("terminal");
3265        Container {
3266            proc: self.proc.clone(),
3267            selection: query,
3268            graphql_client: self.graphql_client.clone(),
3269        }
3270    }
3271    /// Opens an interactive terminal for this container using its configured default terminal command if not overridden by args (or sh as a fallback default).
3272    ///
3273    /// # Arguments
3274    ///
3275    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3276    pub fn terminal_opts<'a>(&self, opts: ContainerTerminalOpts<'a>) -> Container {
3277        let mut query = self.selection.select("terminal");
3278        if let Some(cmd) = opts.cmd {
3279            query = query.arg("cmd", cmd);
3280        }
3281        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
3282            query = query.arg(
3283                "experimentalPrivilegedNesting",
3284                experimental_privileged_nesting,
3285            );
3286        }
3287        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
3288            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
3289        }
3290        Container {
3291            proc: self.proc.clone(),
3292            selection: query,
3293            graphql_client: self.graphql_client.clone(),
3294        }
3295    }
3296    /// Starts a Service and creates a tunnel that forwards traffic from the caller's network to that service.
3297    /// Be sure to set any exposed ports before calling this api.
3298    ///
3299    /// # Arguments
3300    ///
3301    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3302    pub async fn up(&self) -> Result<Void, DaggerError> {
3303        let query = self.selection.select("up");
3304        query.execute(self.graphql_client.clone()).await
3305    }
3306    /// Starts a Service and creates a tunnel that forwards traffic from the caller's network to that service.
3307    /// Be sure to set any exposed ports before calling this api.
3308    ///
3309    /// # Arguments
3310    ///
3311    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3312    pub async fn up_opts<'a>(&self, opts: ContainerUpOpts<'a>) -> Result<Void, DaggerError> {
3313        let mut query = self.selection.select("up");
3314        if let Some(random) = opts.random {
3315            query = query.arg("random", random);
3316        }
3317        if let Some(ports) = opts.ports {
3318            query = query.arg("ports", ports);
3319        }
3320        if let Some(args) = opts.args {
3321            query = query.arg("args", args);
3322        }
3323        if let Some(use_entrypoint) = opts.use_entrypoint {
3324            query = query.arg("useEntrypoint", use_entrypoint);
3325        }
3326        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
3327            query = query.arg(
3328                "experimentalPrivilegedNesting",
3329                experimental_privileged_nesting,
3330            );
3331        }
3332        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
3333            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
3334        }
3335        if let Some(expand) = opts.expand {
3336            query = query.arg("expand", expand);
3337        }
3338        if let Some(no_init) = opts.no_init {
3339            query = query.arg("noInit", no_init);
3340        }
3341        query.execute(self.graphql_client.clone()).await
3342    }
3343    /// Retrieves the user to be set for all commands.
3344    pub async fn user(&self) -> Result<String, DaggerError> {
3345        let query = self.selection.select("user");
3346        query.execute(self.graphql_client.clone()).await
3347    }
3348    /// Retrieves this container plus the given OCI anotation.
3349    ///
3350    /// # Arguments
3351    ///
3352    /// * `name` - The name of the annotation.
3353    /// * `value` - The value of the annotation.
3354    pub fn with_annotation(&self, name: impl Into<String>, value: impl Into<String>) -> Container {
3355        let mut query = self.selection.select("withAnnotation");
3356        query = query.arg("name", name.into());
3357        query = query.arg("value", value.into());
3358        Container {
3359            proc: self.proc.clone(),
3360            selection: query,
3361            graphql_client: self.graphql_client.clone(),
3362        }
3363    }
3364    /// Configures default arguments for future commands. Like CMD in Dockerfile.
3365    ///
3366    /// # Arguments
3367    ///
3368    /// * `args` - Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]).
3369    pub fn with_default_args(&self, args: Vec<impl Into<String>>) -> Container {
3370        let mut query = self.selection.select("withDefaultArgs");
3371        query = query.arg(
3372            "args",
3373            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3374        );
3375        Container {
3376            proc: self.proc.clone(),
3377            selection: query,
3378            graphql_client: self.graphql_client.clone(),
3379        }
3380    }
3381    /// Set the default command to invoke for the container's terminal API.
3382    ///
3383    /// # Arguments
3384    ///
3385    /// * `args` - The args of the command.
3386    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3387    pub fn with_default_terminal_cmd(&self, args: Vec<impl Into<String>>) -> Container {
3388        let mut query = self.selection.select("withDefaultTerminalCmd");
3389        query = query.arg(
3390            "args",
3391            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3392        );
3393        Container {
3394            proc: self.proc.clone(),
3395            selection: query,
3396            graphql_client: self.graphql_client.clone(),
3397        }
3398    }
3399    /// Set the default command to invoke for the container's terminal API.
3400    ///
3401    /// # Arguments
3402    ///
3403    /// * `args` - The args of the command.
3404    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3405    pub fn with_default_terminal_cmd_opts(
3406        &self,
3407        args: Vec<impl Into<String>>,
3408        opts: ContainerWithDefaultTerminalCmdOpts,
3409    ) -> Container {
3410        let mut query = self.selection.select("withDefaultTerminalCmd");
3411        query = query.arg(
3412            "args",
3413            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3414        );
3415        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
3416            query = query.arg(
3417                "experimentalPrivilegedNesting",
3418                experimental_privileged_nesting,
3419            );
3420        }
3421        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
3422            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
3423        }
3424        Container {
3425            proc: self.proc.clone(),
3426            selection: query,
3427            graphql_client: self.graphql_client.clone(),
3428        }
3429    }
3430    /// Return a new container snapshot, with a directory added to its filesystem
3431    ///
3432    /// # Arguments
3433    ///
3434    /// * `path` - Location of the written directory (e.g., "/tmp/directory").
3435    /// * `source` - Identifier of the directory to write
3436    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3437    pub fn with_directory(
3438        &self,
3439        path: impl Into<String>,
3440        source: impl IntoID<DirectoryId>,
3441    ) -> Container {
3442        let mut query = self.selection.select("withDirectory");
3443        query = query.arg("path", path.into());
3444        query = query.arg_lazy(
3445            "source",
3446            Box::new(move || {
3447                let source = source.clone();
3448                Box::pin(async move { source.into_id().await.unwrap().quote() })
3449            }),
3450        );
3451        Container {
3452            proc: self.proc.clone(),
3453            selection: query,
3454            graphql_client: self.graphql_client.clone(),
3455        }
3456    }
3457    /// Return a new container snapshot, with a directory added to its filesystem
3458    ///
3459    /// # Arguments
3460    ///
3461    /// * `path` - Location of the written directory (e.g., "/tmp/directory").
3462    /// * `source` - Identifier of the directory to write
3463    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3464    pub fn with_directory_opts<'a>(
3465        &self,
3466        path: impl Into<String>,
3467        source: impl IntoID<DirectoryId>,
3468        opts: ContainerWithDirectoryOpts<'a>,
3469    ) -> Container {
3470        let mut query = self.selection.select("withDirectory");
3471        query = query.arg("path", path.into());
3472        query = query.arg_lazy(
3473            "source",
3474            Box::new(move || {
3475                let source = source.clone();
3476                Box::pin(async move { source.into_id().await.unwrap().quote() })
3477            }),
3478        );
3479        if let Some(exclude) = opts.exclude {
3480            query = query.arg("exclude", exclude);
3481        }
3482        if let Some(include) = opts.include {
3483            query = query.arg("include", include);
3484        }
3485        if let Some(owner) = opts.owner {
3486            query = query.arg("owner", owner);
3487        }
3488        if let Some(expand) = opts.expand {
3489            query = query.arg("expand", expand);
3490        }
3491        Container {
3492            proc: self.proc.clone(),
3493            selection: query,
3494            graphql_client: self.graphql_client.clone(),
3495        }
3496    }
3497    /// Set an OCI-style entrypoint. It will be included in the container's OCI configuration. Note, withExec ignores the entrypoint by default.
3498    ///
3499    /// # Arguments
3500    ///
3501    /// * `args` - Arguments of the entrypoint. Example: ["go", "run"].
3502    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3503    pub fn with_entrypoint(&self, args: Vec<impl Into<String>>) -> Container {
3504        let mut query = self.selection.select("withEntrypoint");
3505        query = query.arg(
3506            "args",
3507            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3508        );
3509        Container {
3510            proc: self.proc.clone(),
3511            selection: query,
3512            graphql_client: self.graphql_client.clone(),
3513        }
3514    }
3515    /// Set an OCI-style entrypoint. It will be included in the container's OCI configuration. Note, withExec ignores the entrypoint by default.
3516    ///
3517    /// # Arguments
3518    ///
3519    /// * `args` - Arguments of the entrypoint. Example: ["go", "run"].
3520    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3521    pub fn with_entrypoint_opts(
3522        &self,
3523        args: Vec<impl Into<String>>,
3524        opts: ContainerWithEntrypointOpts,
3525    ) -> Container {
3526        let mut query = self.selection.select("withEntrypoint");
3527        query = query.arg(
3528            "args",
3529            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3530        );
3531        if let Some(keep_default_args) = opts.keep_default_args {
3532            query = query.arg("keepDefaultArgs", keep_default_args);
3533        }
3534        Container {
3535            proc: self.proc.clone(),
3536            selection: query,
3537            graphql_client: self.graphql_client.clone(),
3538        }
3539    }
3540    /// Set a new environment variable in the container.
3541    ///
3542    /// # Arguments
3543    ///
3544    /// * `name` - Name of the environment variable (e.g., "HOST").
3545    /// * `value` - Value of the environment variable. (e.g., "localhost").
3546    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3547    pub fn with_env_variable(
3548        &self,
3549        name: impl Into<String>,
3550        value: impl Into<String>,
3551    ) -> Container {
3552        let mut query = self.selection.select("withEnvVariable");
3553        query = query.arg("name", name.into());
3554        query = query.arg("value", value.into());
3555        Container {
3556            proc: self.proc.clone(),
3557            selection: query,
3558            graphql_client: self.graphql_client.clone(),
3559        }
3560    }
3561    /// Set a new environment variable in the container.
3562    ///
3563    /// # Arguments
3564    ///
3565    /// * `name` - Name of the environment variable (e.g., "HOST").
3566    /// * `value` - Value of the environment variable. (e.g., "localhost").
3567    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3568    pub fn with_env_variable_opts(
3569        &self,
3570        name: impl Into<String>,
3571        value: impl Into<String>,
3572        opts: ContainerWithEnvVariableOpts,
3573    ) -> Container {
3574        let mut query = self.selection.select("withEnvVariable");
3575        query = query.arg("name", name.into());
3576        query = query.arg("value", value.into());
3577        if let Some(expand) = opts.expand {
3578            query = query.arg("expand", expand);
3579        }
3580        Container {
3581            proc: self.proc.clone(),
3582            selection: query,
3583            graphql_client: self.graphql_client.clone(),
3584        }
3585    }
3586    /// Raise an error.
3587    ///
3588    /// # Arguments
3589    ///
3590    /// * `err` - Message of the error to raise. If empty, the error will be ignored.
3591    pub fn with_error(&self, err: impl Into<String>) -> Container {
3592        let mut query = self.selection.select("withError");
3593        query = query.arg("err", err.into());
3594        Container {
3595            proc: self.proc.clone(),
3596            selection: query,
3597            graphql_client: self.graphql_client.clone(),
3598        }
3599    }
3600    /// Execute a command in the container, and return a new snapshot of the container state after execution.
3601    ///
3602    /// # Arguments
3603    ///
3604    /// * `args` - Command to execute. Must be valid exec() arguments, not a shell command. Example: ["go", "run", "main.go"].
3605    ///
3606    /// To run a shell command, execute the shell and pass the shell command as argument. Example: ["sh", "-c", "ls -l | grep foo"]
3607    ///
3608    /// Defaults to the container's default arguments (see "defaultArgs" and "withDefaultArgs").
3609    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3610    pub fn with_exec(&self, args: Vec<impl Into<String>>) -> Container {
3611        let mut query = self.selection.select("withExec");
3612        query = query.arg(
3613            "args",
3614            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3615        );
3616        Container {
3617            proc: self.proc.clone(),
3618            selection: query,
3619            graphql_client: self.graphql_client.clone(),
3620        }
3621    }
3622    /// Execute a command in the container, and return a new snapshot of the container state after execution.
3623    ///
3624    /// # Arguments
3625    ///
3626    /// * `args` - Command to execute. Must be valid exec() arguments, not a shell command. Example: ["go", "run", "main.go"].
3627    ///
3628    /// To run a shell command, execute the shell and pass the shell command as argument. Example: ["sh", "-c", "ls -l | grep foo"]
3629    ///
3630    /// Defaults to the container's default arguments (see "defaultArgs" and "withDefaultArgs").
3631    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3632    pub fn with_exec_opts<'a>(
3633        &self,
3634        args: Vec<impl Into<String>>,
3635        opts: ContainerWithExecOpts<'a>,
3636    ) -> Container {
3637        let mut query = self.selection.select("withExec");
3638        query = query.arg(
3639            "args",
3640            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3641        );
3642        if let Some(use_entrypoint) = opts.use_entrypoint {
3643            query = query.arg("useEntrypoint", use_entrypoint);
3644        }
3645        if let Some(stdin) = opts.stdin {
3646            query = query.arg("stdin", stdin);
3647        }
3648        if let Some(redirect_stdin) = opts.redirect_stdin {
3649            query = query.arg("redirectStdin", redirect_stdin);
3650        }
3651        if let Some(redirect_stdout) = opts.redirect_stdout {
3652            query = query.arg("redirectStdout", redirect_stdout);
3653        }
3654        if let Some(redirect_stderr) = opts.redirect_stderr {
3655            query = query.arg("redirectStderr", redirect_stderr);
3656        }
3657        if let Some(expect) = opts.expect {
3658            query = query.arg("expect", expect);
3659        }
3660        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
3661            query = query.arg(
3662                "experimentalPrivilegedNesting",
3663                experimental_privileged_nesting,
3664            );
3665        }
3666        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
3667            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
3668        }
3669        if let Some(expand) = opts.expand {
3670            query = query.arg("expand", expand);
3671        }
3672        if let Some(no_init) = opts.no_init {
3673            query = query.arg("noInit", no_init);
3674        }
3675        Container {
3676            proc: self.proc.clone(),
3677            selection: query,
3678            graphql_client: self.graphql_client.clone(),
3679        }
3680    }
3681    /// Expose a network port. Like EXPOSE in Dockerfile (but with healthcheck support)
3682    /// Exposed ports serve two purposes:
3683    /// - For health checks and introspection, when running services
3684    /// - For setting the EXPOSE OCI field when publishing the container
3685    ///
3686    /// # Arguments
3687    ///
3688    /// * `port` - Port number to expose. Example: 8080
3689    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3690    pub fn with_exposed_port(&self, port: isize) -> Container {
3691        let mut query = self.selection.select("withExposedPort");
3692        query = query.arg("port", port);
3693        Container {
3694            proc: self.proc.clone(),
3695            selection: query,
3696            graphql_client: self.graphql_client.clone(),
3697        }
3698    }
3699    /// Expose a network port. Like EXPOSE in Dockerfile (but with healthcheck support)
3700    /// Exposed ports serve two purposes:
3701    /// - For health checks and introspection, when running services
3702    /// - For setting the EXPOSE OCI field when publishing the container
3703    ///
3704    /// # Arguments
3705    ///
3706    /// * `port` - Port number to expose. Example: 8080
3707    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3708    pub fn with_exposed_port_opts<'a>(
3709        &self,
3710        port: isize,
3711        opts: ContainerWithExposedPortOpts<'a>,
3712    ) -> Container {
3713        let mut query = self.selection.select("withExposedPort");
3714        query = query.arg("port", port);
3715        if let Some(protocol) = opts.protocol {
3716            query = query.arg("protocol", protocol);
3717        }
3718        if let Some(description) = opts.description {
3719            query = query.arg("description", description);
3720        }
3721        if let Some(experimental_skip_healthcheck) = opts.experimental_skip_healthcheck {
3722            query = query.arg("experimentalSkipHealthcheck", experimental_skip_healthcheck);
3723        }
3724        Container {
3725            proc: self.proc.clone(),
3726            selection: query,
3727            graphql_client: self.graphql_client.clone(),
3728        }
3729    }
3730    /// Return a container snapshot with a file added
3731    ///
3732    /// # Arguments
3733    ///
3734    /// * `path` - Path of the new file. Example: "/path/to/new-file.txt"
3735    /// * `source` - File to add
3736    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3737    pub fn with_file(&self, path: impl Into<String>, source: impl IntoID<FileId>) -> Container {
3738        let mut query = self.selection.select("withFile");
3739        query = query.arg("path", path.into());
3740        query = query.arg_lazy(
3741            "source",
3742            Box::new(move || {
3743                let source = source.clone();
3744                Box::pin(async move { source.into_id().await.unwrap().quote() })
3745            }),
3746        );
3747        Container {
3748            proc: self.proc.clone(),
3749            selection: query,
3750            graphql_client: self.graphql_client.clone(),
3751        }
3752    }
3753    /// Return a container snapshot with a file added
3754    ///
3755    /// # Arguments
3756    ///
3757    /// * `path` - Path of the new file. Example: "/path/to/new-file.txt"
3758    /// * `source` - File to add
3759    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3760    pub fn with_file_opts<'a>(
3761        &self,
3762        path: impl Into<String>,
3763        source: impl IntoID<FileId>,
3764        opts: ContainerWithFileOpts<'a>,
3765    ) -> Container {
3766        let mut query = self.selection.select("withFile");
3767        query = query.arg("path", path.into());
3768        query = query.arg_lazy(
3769            "source",
3770            Box::new(move || {
3771                let source = source.clone();
3772                Box::pin(async move { source.into_id().await.unwrap().quote() })
3773            }),
3774        );
3775        if let Some(permissions) = opts.permissions {
3776            query = query.arg("permissions", permissions);
3777        }
3778        if let Some(owner) = opts.owner {
3779            query = query.arg("owner", owner);
3780        }
3781        if let Some(expand) = opts.expand {
3782            query = query.arg("expand", expand);
3783        }
3784        Container {
3785            proc: self.proc.clone(),
3786            selection: query,
3787            graphql_client: self.graphql_client.clone(),
3788        }
3789    }
3790    /// Retrieves this container plus the contents of the given files copied to the given path.
3791    ///
3792    /// # Arguments
3793    ///
3794    /// * `path` - Location where copied files should be placed (e.g., "/src").
3795    /// * `sources` - Identifiers of the files to copy.
3796    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3797    pub fn with_files(&self, path: impl Into<String>, sources: Vec<FileId>) -> Container {
3798        let mut query = self.selection.select("withFiles");
3799        query = query.arg("path", path.into());
3800        query = query.arg("sources", sources);
3801        Container {
3802            proc: self.proc.clone(),
3803            selection: query,
3804            graphql_client: self.graphql_client.clone(),
3805        }
3806    }
3807    /// Retrieves this container plus the contents of the given files copied to the given path.
3808    ///
3809    /// # Arguments
3810    ///
3811    /// * `path` - Location where copied files should be placed (e.g., "/src").
3812    /// * `sources` - Identifiers of the files to copy.
3813    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3814    pub fn with_files_opts<'a>(
3815        &self,
3816        path: impl Into<String>,
3817        sources: Vec<FileId>,
3818        opts: ContainerWithFilesOpts<'a>,
3819    ) -> Container {
3820        let mut query = self.selection.select("withFiles");
3821        query = query.arg("path", path.into());
3822        query = query.arg("sources", sources);
3823        if let Some(permissions) = opts.permissions {
3824            query = query.arg("permissions", permissions);
3825        }
3826        if let Some(owner) = opts.owner {
3827            query = query.arg("owner", owner);
3828        }
3829        if let Some(expand) = opts.expand {
3830            query = query.arg("expand", expand);
3831        }
3832        Container {
3833            proc: self.proc.clone(),
3834            selection: query,
3835            graphql_client: self.graphql_client.clone(),
3836        }
3837    }
3838    /// Retrieves this container plus the given label.
3839    ///
3840    /// # Arguments
3841    ///
3842    /// * `name` - The name of the label (e.g., "org.opencontainers.artifact.created").
3843    /// * `value` - The value of the label (e.g., "2023-01-01T00:00:00Z").
3844    pub fn with_label(&self, name: impl Into<String>, value: impl Into<String>) -> Container {
3845        let mut query = self.selection.select("withLabel");
3846        query = query.arg("name", name.into());
3847        query = query.arg("value", value.into());
3848        Container {
3849            proc: self.proc.clone(),
3850            selection: query,
3851            graphql_client: self.graphql_client.clone(),
3852        }
3853    }
3854    /// Retrieves this container plus a cache volume mounted at the given path.
3855    ///
3856    /// # Arguments
3857    ///
3858    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
3859    /// * `cache` - Identifier of the cache volume to mount.
3860    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3861    pub fn with_mounted_cache(
3862        &self,
3863        path: impl Into<String>,
3864        cache: impl IntoID<CacheVolumeId>,
3865    ) -> Container {
3866        let mut query = self.selection.select("withMountedCache");
3867        query = query.arg("path", path.into());
3868        query = query.arg_lazy(
3869            "cache",
3870            Box::new(move || {
3871                let cache = cache.clone();
3872                Box::pin(async move { cache.into_id().await.unwrap().quote() })
3873            }),
3874        );
3875        Container {
3876            proc: self.proc.clone(),
3877            selection: query,
3878            graphql_client: self.graphql_client.clone(),
3879        }
3880    }
3881    /// Retrieves this container plus a cache volume mounted at the given path.
3882    ///
3883    /// # Arguments
3884    ///
3885    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
3886    /// * `cache` - Identifier of the cache volume to mount.
3887    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3888    pub fn with_mounted_cache_opts<'a>(
3889        &self,
3890        path: impl Into<String>,
3891        cache: impl IntoID<CacheVolumeId>,
3892        opts: ContainerWithMountedCacheOpts<'a>,
3893    ) -> Container {
3894        let mut query = self.selection.select("withMountedCache");
3895        query = query.arg("path", path.into());
3896        query = query.arg_lazy(
3897            "cache",
3898            Box::new(move || {
3899                let cache = cache.clone();
3900                Box::pin(async move { cache.into_id().await.unwrap().quote() })
3901            }),
3902        );
3903        if let Some(source) = opts.source {
3904            query = query.arg("source", source);
3905        }
3906        if let Some(sharing) = opts.sharing {
3907            query = query.arg("sharing", sharing);
3908        }
3909        if let Some(owner) = opts.owner {
3910            query = query.arg("owner", owner);
3911        }
3912        if let Some(expand) = opts.expand {
3913            query = query.arg("expand", expand);
3914        }
3915        Container {
3916            proc: self.proc.clone(),
3917            selection: query,
3918            graphql_client: self.graphql_client.clone(),
3919        }
3920    }
3921    /// Retrieves this container plus a directory mounted at the given path.
3922    ///
3923    /// # Arguments
3924    ///
3925    /// * `path` - Location of the mounted directory (e.g., "/mnt/directory").
3926    /// * `source` - Identifier of the mounted directory.
3927    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3928    pub fn with_mounted_directory(
3929        &self,
3930        path: impl Into<String>,
3931        source: impl IntoID<DirectoryId>,
3932    ) -> Container {
3933        let mut query = self.selection.select("withMountedDirectory");
3934        query = query.arg("path", path.into());
3935        query = query.arg_lazy(
3936            "source",
3937            Box::new(move || {
3938                let source = source.clone();
3939                Box::pin(async move { source.into_id().await.unwrap().quote() })
3940            }),
3941        );
3942        Container {
3943            proc: self.proc.clone(),
3944            selection: query,
3945            graphql_client: self.graphql_client.clone(),
3946        }
3947    }
3948    /// Retrieves this container plus a directory mounted at the given path.
3949    ///
3950    /// # Arguments
3951    ///
3952    /// * `path` - Location of the mounted directory (e.g., "/mnt/directory").
3953    /// * `source` - Identifier of the mounted directory.
3954    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3955    pub fn with_mounted_directory_opts<'a>(
3956        &self,
3957        path: impl Into<String>,
3958        source: impl IntoID<DirectoryId>,
3959        opts: ContainerWithMountedDirectoryOpts<'a>,
3960    ) -> Container {
3961        let mut query = self.selection.select("withMountedDirectory");
3962        query = query.arg("path", path.into());
3963        query = query.arg_lazy(
3964            "source",
3965            Box::new(move || {
3966                let source = source.clone();
3967                Box::pin(async move { source.into_id().await.unwrap().quote() })
3968            }),
3969        );
3970        if let Some(owner) = opts.owner {
3971            query = query.arg("owner", owner);
3972        }
3973        if let Some(expand) = opts.expand {
3974            query = query.arg("expand", expand);
3975        }
3976        Container {
3977            proc: self.proc.clone(),
3978            selection: query,
3979            graphql_client: self.graphql_client.clone(),
3980        }
3981    }
3982    /// Retrieves this container plus a file mounted at the given path.
3983    ///
3984    /// # Arguments
3985    ///
3986    /// * `path` - Location of the mounted file (e.g., "/tmp/file.txt").
3987    /// * `source` - Identifier of the mounted file.
3988    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3989    pub fn with_mounted_file(
3990        &self,
3991        path: impl Into<String>,
3992        source: impl IntoID<FileId>,
3993    ) -> Container {
3994        let mut query = self.selection.select("withMountedFile");
3995        query = query.arg("path", path.into());
3996        query = query.arg_lazy(
3997            "source",
3998            Box::new(move || {
3999                let source = source.clone();
4000                Box::pin(async move { source.into_id().await.unwrap().quote() })
4001            }),
4002        );
4003        Container {
4004            proc: self.proc.clone(),
4005            selection: query,
4006            graphql_client: self.graphql_client.clone(),
4007        }
4008    }
4009    /// Retrieves this container plus a file mounted at the given path.
4010    ///
4011    /// # Arguments
4012    ///
4013    /// * `path` - Location of the mounted file (e.g., "/tmp/file.txt").
4014    /// * `source` - Identifier of the mounted file.
4015    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4016    pub fn with_mounted_file_opts<'a>(
4017        &self,
4018        path: impl Into<String>,
4019        source: impl IntoID<FileId>,
4020        opts: ContainerWithMountedFileOpts<'a>,
4021    ) -> Container {
4022        let mut query = self.selection.select("withMountedFile");
4023        query = query.arg("path", path.into());
4024        query = query.arg_lazy(
4025            "source",
4026            Box::new(move || {
4027                let source = source.clone();
4028                Box::pin(async move { source.into_id().await.unwrap().quote() })
4029            }),
4030        );
4031        if let Some(owner) = opts.owner {
4032            query = query.arg("owner", owner);
4033        }
4034        if let Some(expand) = opts.expand {
4035            query = query.arg("expand", expand);
4036        }
4037        Container {
4038            proc: self.proc.clone(),
4039            selection: query,
4040            graphql_client: self.graphql_client.clone(),
4041        }
4042    }
4043    /// Retrieves this container plus a secret mounted into a file at the given path.
4044    ///
4045    /// # Arguments
4046    ///
4047    /// * `path` - Location of the secret file (e.g., "/tmp/secret.txt").
4048    /// * `source` - Identifier of the secret to mount.
4049    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4050    pub fn with_mounted_secret(
4051        &self,
4052        path: impl Into<String>,
4053        source: impl IntoID<SecretId>,
4054    ) -> Container {
4055        let mut query = self.selection.select("withMountedSecret");
4056        query = query.arg("path", path.into());
4057        query = query.arg_lazy(
4058            "source",
4059            Box::new(move || {
4060                let source = source.clone();
4061                Box::pin(async move { source.into_id().await.unwrap().quote() })
4062            }),
4063        );
4064        Container {
4065            proc: self.proc.clone(),
4066            selection: query,
4067            graphql_client: self.graphql_client.clone(),
4068        }
4069    }
4070    /// Retrieves this container plus a secret mounted into a file at the given path.
4071    ///
4072    /// # Arguments
4073    ///
4074    /// * `path` - Location of the secret file (e.g., "/tmp/secret.txt").
4075    /// * `source` - Identifier of the secret to mount.
4076    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4077    pub fn with_mounted_secret_opts<'a>(
4078        &self,
4079        path: impl Into<String>,
4080        source: impl IntoID<SecretId>,
4081        opts: ContainerWithMountedSecretOpts<'a>,
4082    ) -> Container {
4083        let mut query = self.selection.select("withMountedSecret");
4084        query = query.arg("path", path.into());
4085        query = query.arg_lazy(
4086            "source",
4087            Box::new(move || {
4088                let source = source.clone();
4089                Box::pin(async move { source.into_id().await.unwrap().quote() })
4090            }),
4091        );
4092        if let Some(owner) = opts.owner {
4093            query = query.arg("owner", owner);
4094        }
4095        if let Some(mode) = opts.mode {
4096            query = query.arg("mode", mode);
4097        }
4098        if let Some(expand) = opts.expand {
4099            query = query.arg("expand", expand);
4100        }
4101        Container {
4102            proc: self.proc.clone(),
4103            selection: query,
4104            graphql_client: self.graphql_client.clone(),
4105        }
4106    }
4107    /// 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.
4108    ///
4109    /// # Arguments
4110    ///
4111    /// * `path` - Location of the temporary directory (e.g., "/tmp/temp_dir").
4112    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4113    pub fn with_mounted_temp(&self, path: impl Into<String>) -> Container {
4114        let mut query = self.selection.select("withMountedTemp");
4115        query = query.arg("path", path.into());
4116        Container {
4117            proc: self.proc.clone(),
4118            selection: query,
4119            graphql_client: self.graphql_client.clone(),
4120        }
4121    }
4122    /// 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.
4123    ///
4124    /// # Arguments
4125    ///
4126    /// * `path` - Location of the temporary directory (e.g., "/tmp/temp_dir").
4127    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4128    pub fn with_mounted_temp_opts(
4129        &self,
4130        path: impl Into<String>,
4131        opts: ContainerWithMountedTempOpts,
4132    ) -> Container {
4133        let mut query = self.selection.select("withMountedTemp");
4134        query = query.arg("path", path.into());
4135        if let Some(size) = opts.size {
4136            query = query.arg("size", size);
4137        }
4138        if let Some(expand) = opts.expand {
4139            query = query.arg("expand", expand);
4140        }
4141        Container {
4142            proc: self.proc.clone(),
4143            selection: query,
4144            graphql_client: self.graphql_client.clone(),
4145        }
4146    }
4147    /// Return a new container snapshot, with a file added to its filesystem with text content
4148    ///
4149    /// # Arguments
4150    ///
4151    /// * `path` - Path of the new file. May be relative or absolute. Example: "README.md" or "/etc/profile"
4152    /// * `contents` - Contents of the new file. Example: "Hello world!"
4153    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4154    pub fn with_new_file(&self, path: impl Into<String>, contents: impl Into<String>) -> Container {
4155        let mut query = self.selection.select("withNewFile");
4156        query = query.arg("path", path.into());
4157        query = query.arg("contents", contents.into());
4158        Container {
4159            proc: self.proc.clone(),
4160            selection: query,
4161            graphql_client: self.graphql_client.clone(),
4162        }
4163    }
4164    /// Return a new container snapshot, with a file added to its filesystem with text content
4165    ///
4166    /// # Arguments
4167    ///
4168    /// * `path` - Path of the new file. May be relative or absolute. Example: "README.md" or "/etc/profile"
4169    /// * `contents` - Contents of the new file. Example: "Hello world!"
4170    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4171    pub fn with_new_file_opts<'a>(
4172        &self,
4173        path: impl Into<String>,
4174        contents: impl Into<String>,
4175        opts: ContainerWithNewFileOpts<'a>,
4176    ) -> Container {
4177        let mut query = self.selection.select("withNewFile");
4178        query = query.arg("path", path.into());
4179        query = query.arg("contents", contents.into());
4180        if let Some(permissions) = opts.permissions {
4181            query = query.arg("permissions", permissions);
4182        }
4183        if let Some(owner) = opts.owner {
4184            query = query.arg("owner", owner);
4185        }
4186        if let Some(expand) = opts.expand {
4187            query = query.arg("expand", expand);
4188        }
4189        Container {
4190            proc: self.proc.clone(),
4191            selection: query,
4192            graphql_client: self.graphql_client.clone(),
4193        }
4194    }
4195    /// Attach credentials for future publishing to a registry. Use in combination with publish
4196    ///
4197    /// # Arguments
4198    ///
4199    /// * `address` - The image address that needs authentication. Same format as "docker push". Example: "registry.dagger.io/dagger:latest"
4200    /// * `username` - The username to authenticate with. Example: "alice"
4201    /// * `secret` - The API key, password or token to authenticate to this registry
4202    pub fn with_registry_auth(
4203        &self,
4204        address: impl Into<String>,
4205        username: impl Into<String>,
4206        secret: impl IntoID<SecretId>,
4207    ) -> Container {
4208        let mut query = self.selection.select("withRegistryAuth");
4209        query = query.arg("address", address.into());
4210        query = query.arg("username", username.into());
4211        query = query.arg_lazy(
4212            "secret",
4213            Box::new(move || {
4214                let secret = secret.clone();
4215                Box::pin(async move { secret.into_id().await.unwrap().quote() })
4216            }),
4217        );
4218        Container {
4219            proc: self.proc.clone(),
4220            selection: query,
4221            graphql_client: self.graphql_client.clone(),
4222        }
4223    }
4224    /// Change the container's root filesystem. The previous root filesystem will be lost.
4225    ///
4226    /// # Arguments
4227    ///
4228    /// * `directory` - The new root filesystem.
4229    pub fn with_rootfs(&self, directory: impl IntoID<DirectoryId>) -> Container {
4230        let mut query = self.selection.select("withRootfs");
4231        query = query.arg_lazy(
4232            "directory",
4233            Box::new(move || {
4234                let directory = directory.clone();
4235                Box::pin(async move { directory.into_id().await.unwrap().quote() })
4236            }),
4237        );
4238        Container {
4239            proc: self.proc.clone(),
4240            selection: query,
4241            graphql_client: self.graphql_client.clone(),
4242        }
4243    }
4244    /// Set a new environment variable, using a secret value
4245    ///
4246    /// # Arguments
4247    ///
4248    /// * `name` - Name of the secret variable (e.g., "API_SECRET").
4249    /// * `secret` - Identifier of the secret value.
4250    pub fn with_secret_variable(
4251        &self,
4252        name: impl Into<String>,
4253        secret: impl IntoID<SecretId>,
4254    ) -> Container {
4255        let mut query = self.selection.select("withSecretVariable");
4256        query = query.arg("name", name.into());
4257        query = query.arg_lazy(
4258            "secret",
4259            Box::new(move || {
4260                let secret = secret.clone();
4261                Box::pin(async move { secret.into_id().await.unwrap().quote() })
4262            }),
4263        );
4264        Container {
4265            proc: self.proc.clone(),
4266            selection: query,
4267            graphql_client: self.graphql_client.clone(),
4268        }
4269    }
4270    /// Establish a runtime dependency from a container to a network service.
4271    /// The service will be started automatically when needed and detached when it is no longer needed, executing the default command if none is set.
4272    /// The service will be reachable from the container via the provided hostname alias.
4273    /// The service dependency will also convey to any files or directories produced by the container.
4274    ///
4275    /// # Arguments
4276    ///
4277    /// * `alias` - Hostname that will resolve to the target service (only accessible from within this container)
4278    /// * `service` - The target service
4279    pub fn with_service_binding(
4280        &self,
4281        alias: impl Into<String>,
4282        service: impl IntoID<ServiceId>,
4283    ) -> Container {
4284        let mut query = self.selection.select("withServiceBinding");
4285        query = query.arg("alias", alias.into());
4286        query = query.arg_lazy(
4287            "service",
4288            Box::new(move || {
4289                let service = service.clone();
4290                Box::pin(async move { service.into_id().await.unwrap().quote() })
4291            }),
4292        );
4293        Container {
4294            proc: self.proc.clone(),
4295            selection: query,
4296            graphql_client: self.graphql_client.clone(),
4297        }
4298    }
4299    /// Return a snapshot with a symlink
4300    ///
4301    /// # Arguments
4302    ///
4303    /// * `target` - Location of the file or directory to link to (e.g., "/existing/file").
4304    /// * `link_name` - Location where the symbolic link will be created (e.g., "/new-file-link").
4305    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4306    pub fn with_symlink(
4307        &self,
4308        target: impl Into<String>,
4309        link_name: impl Into<String>,
4310    ) -> Container {
4311        let mut query = self.selection.select("withSymlink");
4312        query = query.arg("target", target.into());
4313        query = query.arg("linkName", link_name.into());
4314        Container {
4315            proc: self.proc.clone(),
4316            selection: query,
4317            graphql_client: self.graphql_client.clone(),
4318        }
4319    }
4320    /// Return a snapshot with a symlink
4321    ///
4322    /// # Arguments
4323    ///
4324    /// * `target` - Location of the file or directory to link to (e.g., "/existing/file").
4325    /// * `link_name` - Location where the symbolic link will be created (e.g., "/new-file-link").
4326    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4327    pub fn with_symlink_opts(
4328        &self,
4329        target: impl Into<String>,
4330        link_name: impl Into<String>,
4331        opts: ContainerWithSymlinkOpts,
4332    ) -> Container {
4333        let mut query = self.selection.select("withSymlink");
4334        query = query.arg("target", target.into());
4335        query = query.arg("linkName", link_name.into());
4336        if let Some(expand) = opts.expand {
4337            query = query.arg("expand", expand);
4338        }
4339        Container {
4340            proc: self.proc.clone(),
4341            selection: query,
4342            graphql_client: self.graphql_client.clone(),
4343        }
4344    }
4345    /// Retrieves this container plus a socket forwarded to the given Unix socket path.
4346    ///
4347    /// # Arguments
4348    ///
4349    /// * `path` - Location of the forwarded Unix socket (e.g., "/tmp/socket").
4350    /// * `source` - Identifier of the socket to forward.
4351    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4352    pub fn with_unix_socket(
4353        &self,
4354        path: impl Into<String>,
4355        source: impl IntoID<SocketId>,
4356    ) -> Container {
4357        let mut query = self.selection.select("withUnixSocket");
4358        query = query.arg("path", path.into());
4359        query = query.arg_lazy(
4360            "source",
4361            Box::new(move || {
4362                let source = source.clone();
4363                Box::pin(async move { source.into_id().await.unwrap().quote() })
4364            }),
4365        );
4366        Container {
4367            proc: self.proc.clone(),
4368            selection: query,
4369            graphql_client: self.graphql_client.clone(),
4370        }
4371    }
4372    /// Retrieves this container plus a socket forwarded to the given Unix socket path.
4373    ///
4374    /// # Arguments
4375    ///
4376    /// * `path` - Location of the forwarded Unix socket (e.g., "/tmp/socket").
4377    /// * `source` - Identifier of the socket to forward.
4378    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4379    pub fn with_unix_socket_opts<'a>(
4380        &self,
4381        path: impl Into<String>,
4382        source: impl IntoID<SocketId>,
4383        opts: ContainerWithUnixSocketOpts<'a>,
4384    ) -> Container {
4385        let mut query = self.selection.select("withUnixSocket");
4386        query = query.arg("path", path.into());
4387        query = query.arg_lazy(
4388            "source",
4389            Box::new(move || {
4390                let source = source.clone();
4391                Box::pin(async move { source.into_id().await.unwrap().quote() })
4392            }),
4393        );
4394        if let Some(owner) = opts.owner {
4395            query = query.arg("owner", owner);
4396        }
4397        if let Some(expand) = opts.expand {
4398            query = query.arg("expand", expand);
4399        }
4400        Container {
4401            proc: self.proc.clone(),
4402            selection: query,
4403            graphql_client: self.graphql_client.clone(),
4404        }
4405    }
4406    /// Retrieves this container with a different command user.
4407    ///
4408    /// # Arguments
4409    ///
4410    /// * `name` - The user to set (e.g., "root").
4411    pub fn with_user(&self, name: impl Into<String>) -> Container {
4412        let mut query = self.selection.select("withUser");
4413        query = query.arg("name", name.into());
4414        Container {
4415            proc: self.proc.clone(),
4416            selection: query,
4417            graphql_client: self.graphql_client.clone(),
4418        }
4419    }
4420    /// Change the container's working directory. Like WORKDIR in Dockerfile.
4421    ///
4422    /// # Arguments
4423    ///
4424    /// * `path` - The path to set as the working directory (e.g., "/app").
4425    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4426    pub fn with_workdir(&self, path: impl Into<String>) -> Container {
4427        let mut query = self.selection.select("withWorkdir");
4428        query = query.arg("path", path.into());
4429        Container {
4430            proc: self.proc.clone(),
4431            selection: query,
4432            graphql_client: self.graphql_client.clone(),
4433        }
4434    }
4435    /// Change the container's working directory. Like WORKDIR in Dockerfile.
4436    ///
4437    /// # Arguments
4438    ///
4439    /// * `path` - The path to set as the working directory (e.g., "/app").
4440    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4441    pub fn with_workdir_opts(
4442        &self,
4443        path: impl Into<String>,
4444        opts: ContainerWithWorkdirOpts,
4445    ) -> Container {
4446        let mut query = self.selection.select("withWorkdir");
4447        query = query.arg("path", path.into());
4448        if let Some(expand) = opts.expand {
4449            query = query.arg("expand", expand);
4450        }
4451        Container {
4452            proc: self.proc.clone(),
4453            selection: query,
4454            graphql_client: self.graphql_client.clone(),
4455        }
4456    }
4457    /// Retrieves this container minus the given OCI annotation.
4458    ///
4459    /// # Arguments
4460    ///
4461    /// * `name` - The name of the annotation.
4462    pub fn without_annotation(&self, name: impl Into<String>) -> Container {
4463        let mut query = self.selection.select("withoutAnnotation");
4464        query = query.arg("name", name.into());
4465        Container {
4466            proc: self.proc.clone(),
4467            selection: query,
4468            graphql_client: self.graphql_client.clone(),
4469        }
4470    }
4471    /// Remove the container's default arguments.
4472    pub fn without_default_args(&self) -> Container {
4473        let query = self.selection.select("withoutDefaultArgs");
4474        Container {
4475            proc: self.proc.clone(),
4476            selection: query,
4477            graphql_client: self.graphql_client.clone(),
4478        }
4479    }
4480    /// Return a new container snapshot, with a directory removed from its filesystem
4481    ///
4482    /// # Arguments
4483    ///
4484    /// * `path` - Location of the directory to remove (e.g., ".github/").
4485    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4486    pub fn without_directory(&self, path: impl Into<String>) -> Container {
4487        let mut query = self.selection.select("withoutDirectory");
4488        query = query.arg("path", path.into());
4489        Container {
4490            proc: self.proc.clone(),
4491            selection: query,
4492            graphql_client: self.graphql_client.clone(),
4493        }
4494    }
4495    /// Return a new container snapshot, with a directory removed from its filesystem
4496    ///
4497    /// # Arguments
4498    ///
4499    /// * `path` - Location of the directory to remove (e.g., ".github/").
4500    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4501    pub fn without_directory_opts(
4502        &self,
4503        path: impl Into<String>,
4504        opts: ContainerWithoutDirectoryOpts,
4505    ) -> Container {
4506        let mut query = self.selection.select("withoutDirectory");
4507        query = query.arg("path", path.into());
4508        if let Some(expand) = opts.expand {
4509            query = query.arg("expand", expand);
4510        }
4511        Container {
4512            proc: self.proc.clone(),
4513            selection: query,
4514            graphql_client: self.graphql_client.clone(),
4515        }
4516    }
4517    /// Reset the container's OCI entrypoint.
4518    ///
4519    /// # Arguments
4520    ///
4521    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4522    pub fn without_entrypoint(&self) -> Container {
4523        let query = self.selection.select("withoutEntrypoint");
4524        Container {
4525            proc: self.proc.clone(),
4526            selection: query,
4527            graphql_client: self.graphql_client.clone(),
4528        }
4529    }
4530    /// Reset the container's OCI entrypoint.
4531    ///
4532    /// # Arguments
4533    ///
4534    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4535    pub fn without_entrypoint_opts(&self, opts: ContainerWithoutEntrypointOpts) -> Container {
4536        let mut query = self.selection.select("withoutEntrypoint");
4537        if let Some(keep_default_args) = opts.keep_default_args {
4538            query = query.arg("keepDefaultArgs", keep_default_args);
4539        }
4540        Container {
4541            proc: self.proc.clone(),
4542            selection: query,
4543            graphql_client: self.graphql_client.clone(),
4544        }
4545    }
4546    /// Retrieves this container minus the given environment variable.
4547    ///
4548    /// # Arguments
4549    ///
4550    /// * `name` - The name of the environment variable (e.g., "HOST").
4551    pub fn without_env_variable(&self, name: impl Into<String>) -> Container {
4552        let mut query = self.selection.select("withoutEnvVariable");
4553        query = query.arg("name", name.into());
4554        Container {
4555            proc: self.proc.clone(),
4556            selection: query,
4557            graphql_client: self.graphql_client.clone(),
4558        }
4559    }
4560    /// Unexpose a previously exposed port.
4561    ///
4562    /// # Arguments
4563    ///
4564    /// * `port` - Port number to unexpose
4565    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4566    pub fn without_exposed_port(&self, port: isize) -> Container {
4567        let mut query = self.selection.select("withoutExposedPort");
4568        query = query.arg("port", port);
4569        Container {
4570            proc: self.proc.clone(),
4571            selection: query,
4572            graphql_client: self.graphql_client.clone(),
4573        }
4574    }
4575    /// Unexpose a previously exposed port.
4576    ///
4577    /// # Arguments
4578    ///
4579    /// * `port` - Port number to unexpose
4580    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4581    pub fn without_exposed_port_opts(
4582        &self,
4583        port: isize,
4584        opts: ContainerWithoutExposedPortOpts,
4585    ) -> Container {
4586        let mut query = self.selection.select("withoutExposedPort");
4587        query = query.arg("port", port);
4588        if let Some(protocol) = opts.protocol {
4589            query = query.arg("protocol", protocol);
4590        }
4591        Container {
4592            proc: self.proc.clone(),
4593            selection: query,
4594            graphql_client: self.graphql_client.clone(),
4595        }
4596    }
4597    /// Retrieves this container with the file at the given path removed.
4598    ///
4599    /// # Arguments
4600    ///
4601    /// * `path` - Location of the file to remove (e.g., "/file.txt").
4602    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4603    pub fn without_file(&self, path: impl Into<String>) -> Container {
4604        let mut query = self.selection.select("withoutFile");
4605        query = query.arg("path", path.into());
4606        Container {
4607            proc: self.proc.clone(),
4608            selection: query,
4609            graphql_client: self.graphql_client.clone(),
4610        }
4611    }
4612    /// Retrieves this container with the file at the given path removed.
4613    ///
4614    /// # Arguments
4615    ///
4616    /// * `path` - Location of the file to remove (e.g., "/file.txt").
4617    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4618    pub fn without_file_opts(
4619        &self,
4620        path: impl Into<String>,
4621        opts: ContainerWithoutFileOpts,
4622    ) -> Container {
4623        let mut query = self.selection.select("withoutFile");
4624        query = query.arg("path", path.into());
4625        if let Some(expand) = opts.expand {
4626            query = query.arg("expand", expand);
4627        }
4628        Container {
4629            proc: self.proc.clone(),
4630            selection: query,
4631            graphql_client: self.graphql_client.clone(),
4632        }
4633    }
4634    /// Return a new container spanshot with specified files removed
4635    ///
4636    /// # Arguments
4637    ///
4638    /// * `paths` - Paths of the files to remove. Example: ["foo.txt, "/root/.ssh/config"
4639    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4640    pub fn without_files(&self, paths: Vec<impl Into<String>>) -> Container {
4641        let mut query = self.selection.select("withoutFiles");
4642        query = query.arg(
4643            "paths",
4644            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
4645        );
4646        Container {
4647            proc: self.proc.clone(),
4648            selection: query,
4649            graphql_client: self.graphql_client.clone(),
4650        }
4651    }
4652    /// Return a new container spanshot with specified files removed
4653    ///
4654    /// # Arguments
4655    ///
4656    /// * `paths` - Paths of the files to remove. Example: ["foo.txt, "/root/.ssh/config"
4657    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4658    pub fn without_files_opts(
4659        &self,
4660        paths: Vec<impl Into<String>>,
4661        opts: ContainerWithoutFilesOpts,
4662    ) -> Container {
4663        let mut query = self.selection.select("withoutFiles");
4664        query = query.arg(
4665            "paths",
4666            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
4667        );
4668        if let Some(expand) = opts.expand {
4669            query = query.arg("expand", expand);
4670        }
4671        Container {
4672            proc: self.proc.clone(),
4673            selection: query,
4674            graphql_client: self.graphql_client.clone(),
4675        }
4676    }
4677    /// Retrieves this container minus the given environment label.
4678    ///
4679    /// # Arguments
4680    ///
4681    /// * `name` - The name of the label to remove (e.g., "org.opencontainers.artifact.created").
4682    pub fn without_label(&self, name: impl Into<String>) -> Container {
4683        let mut query = self.selection.select("withoutLabel");
4684        query = query.arg("name", name.into());
4685        Container {
4686            proc: self.proc.clone(),
4687            selection: query,
4688            graphql_client: self.graphql_client.clone(),
4689        }
4690    }
4691    /// Retrieves this container after unmounting everything at the given path.
4692    ///
4693    /// # Arguments
4694    ///
4695    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
4696    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4697    pub fn without_mount(&self, path: impl Into<String>) -> Container {
4698        let mut query = self.selection.select("withoutMount");
4699        query = query.arg("path", path.into());
4700        Container {
4701            proc: self.proc.clone(),
4702            selection: query,
4703            graphql_client: self.graphql_client.clone(),
4704        }
4705    }
4706    /// Retrieves this container after unmounting everything at the given path.
4707    ///
4708    /// # Arguments
4709    ///
4710    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
4711    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4712    pub fn without_mount_opts(
4713        &self,
4714        path: impl Into<String>,
4715        opts: ContainerWithoutMountOpts,
4716    ) -> Container {
4717        let mut query = self.selection.select("withoutMount");
4718        query = query.arg("path", path.into());
4719        if let Some(expand) = opts.expand {
4720            query = query.arg("expand", expand);
4721        }
4722        Container {
4723            proc: self.proc.clone(),
4724            selection: query,
4725            graphql_client: self.graphql_client.clone(),
4726        }
4727    }
4728    /// Retrieves this container without the registry authentication of a given address.
4729    ///
4730    /// # Arguments
4731    ///
4732    /// * `address` - Registry's address to remove the authentication from.
4733    ///
4734    /// Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
4735    pub fn without_registry_auth(&self, address: impl Into<String>) -> Container {
4736        let mut query = self.selection.select("withoutRegistryAuth");
4737        query = query.arg("address", address.into());
4738        Container {
4739            proc: self.proc.clone(),
4740            selection: query,
4741            graphql_client: self.graphql_client.clone(),
4742        }
4743    }
4744    /// Retrieves this container minus the given environment variable containing the secret.
4745    ///
4746    /// # Arguments
4747    ///
4748    /// * `name` - The name of the environment variable (e.g., "HOST").
4749    pub fn without_secret_variable(&self, name: impl Into<String>) -> Container {
4750        let mut query = self.selection.select("withoutSecretVariable");
4751        query = query.arg("name", name.into());
4752        Container {
4753            proc: self.proc.clone(),
4754            selection: query,
4755            graphql_client: self.graphql_client.clone(),
4756        }
4757    }
4758    /// Retrieves this container with a previously added Unix socket removed.
4759    ///
4760    /// # Arguments
4761    ///
4762    /// * `path` - Location of the socket to remove (e.g., "/tmp/socket").
4763    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4764    pub fn without_unix_socket(&self, path: impl Into<String>) -> Container {
4765        let mut query = self.selection.select("withoutUnixSocket");
4766        query = query.arg("path", path.into());
4767        Container {
4768            proc: self.proc.clone(),
4769            selection: query,
4770            graphql_client: self.graphql_client.clone(),
4771        }
4772    }
4773    /// Retrieves this container with a previously added Unix socket removed.
4774    ///
4775    /// # Arguments
4776    ///
4777    /// * `path` - Location of the socket to remove (e.g., "/tmp/socket").
4778    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4779    pub fn without_unix_socket_opts(
4780        &self,
4781        path: impl Into<String>,
4782        opts: ContainerWithoutUnixSocketOpts,
4783    ) -> Container {
4784        let mut query = self.selection.select("withoutUnixSocket");
4785        query = query.arg("path", path.into());
4786        if let Some(expand) = opts.expand {
4787            query = query.arg("expand", expand);
4788        }
4789        Container {
4790            proc: self.proc.clone(),
4791            selection: query,
4792            graphql_client: self.graphql_client.clone(),
4793        }
4794    }
4795    /// Retrieves this container with an unset command user.
4796    /// Should default to root.
4797    pub fn without_user(&self) -> Container {
4798        let query = self.selection.select("withoutUser");
4799        Container {
4800            proc: self.proc.clone(),
4801            selection: query,
4802            graphql_client: self.graphql_client.clone(),
4803        }
4804    }
4805    /// Unset the container's working directory.
4806    /// Should default to "/".
4807    pub fn without_workdir(&self) -> Container {
4808        let query = self.selection.select("withoutWorkdir");
4809        Container {
4810            proc: self.proc.clone(),
4811            selection: query,
4812            graphql_client: self.graphql_client.clone(),
4813        }
4814    }
4815    /// Retrieves the working directory for all commands.
4816    pub async fn workdir(&self) -> Result<String, DaggerError> {
4817        let query = self.selection.select("workdir");
4818        query.execute(self.graphql_client.clone()).await
4819    }
4820}
4821#[derive(Clone)]
4822pub struct CurrentModule {
4823    pub proc: Option<Arc<DaggerSessionProc>>,
4824    pub selection: Selection,
4825    pub graphql_client: DynGraphQLClient,
4826}
4827#[derive(Builder, Debug, PartialEq)]
4828pub struct CurrentModuleWorkdirOpts<'a> {
4829    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
4830    #[builder(setter(into, strip_option), default)]
4831    pub exclude: Option<Vec<&'a str>>,
4832    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
4833    #[builder(setter(into, strip_option), default)]
4834    pub include: Option<Vec<&'a str>>,
4835}
4836impl CurrentModule {
4837    /// A unique identifier for this CurrentModule.
4838    pub async fn id(&self) -> Result<CurrentModuleId, DaggerError> {
4839        let query = self.selection.select("id");
4840        query.execute(self.graphql_client.clone()).await
4841    }
4842    /// The name of the module being executed in
4843    pub async fn name(&self) -> Result<String, DaggerError> {
4844        let query = self.selection.select("name");
4845        query.execute(self.graphql_client.clone()).await
4846    }
4847    /// The directory containing the module's source code loaded into the engine (plus any generated code that may have been created).
4848    pub fn source(&self) -> Directory {
4849        let query = self.selection.select("source");
4850        Directory {
4851            proc: self.proc.clone(),
4852            selection: query,
4853            graphql_client: self.graphql_client.clone(),
4854        }
4855    }
4856    /// Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.
4857    ///
4858    /// # Arguments
4859    ///
4860    /// * `path` - Location of the directory to access (e.g., ".").
4861    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4862    pub fn workdir(&self, path: impl Into<String>) -> Directory {
4863        let mut query = self.selection.select("workdir");
4864        query = query.arg("path", path.into());
4865        Directory {
4866            proc: self.proc.clone(),
4867            selection: query,
4868            graphql_client: self.graphql_client.clone(),
4869        }
4870    }
4871    /// Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.
4872    ///
4873    /// # Arguments
4874    ///
4875    /// * `path` - Location of the directory to access (e.g., ".").
4876    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4877    pub fn workdir_opts<'a>(
4878        &self,
4879        path: impl Into<String>,
4880        opts: CurrentModuleWorkdirOpts<'a>,
4881    ) -> Directory {
4882        let mut query = self.selection.select("workdir");
4883        query = query.arg("path", path.into());
4884        if let Some(exclude) = opts.exclude {
4885            query = query.arg("exclude", exclude);
4886        }
4887        if let Some(include) = opts.include {
4888            query = query.arg("include", include);
4889        }
4890        Directory {
4891            proc: self.proc.clone(),
4892            selection: query,
4893            graphql_client: self.graphql_client.clone(),
4894        }
4895    }
4896    /// 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.
4897    ///
4898    /// # Arguments
4899    ///
4900    /// * `path` - Location of the file to retrieve (e.g., "README.md").
4901    pub fn workdir_file(&self, path: impl Into<String>) -> File {
4902        let mut query = self.selection.select("workdirFile");
4903        query = query.arg("path", path.into());
4904        File {
4905            proc: self.proc.clone(),
4906            selection: query,
4907            graphql_client: self.graphql_client.clone(),
4908        }
4909    }
4910}
4911#[derive(Clone)]
4912pub struct Directory {
4913    pub proc: Option<Arc<DaggerSessionProc>>,
4914    pub selection: Selection,
4915    pub graphql_client: DynGraphQLClient,
4916}
4917#[derive(Builder, Debug, PartialEq)]
4918pub struct DirectoryAsModuleOpts<'a> {
4919    /// An optional subpath of the directory which contains the module's configuration file.
4920    /// If not set, the module source code is loaded from the root of the directory.
4921    #[builder(setter(into, strip_option), default)]
4922    pub source_root_path: Option<&'a str>,
4923}
4924#[derive(Builder, Debug, PartialEq)]
4925pub struct DirectoryAsModuleSourceOpts<'a> {
4926    /// An optional subpath of the directory which contains the module's configuration file.
4927    /// If not set, the module source code is loaded from the root of the directory.
4928    #[builder(setter(into, strip_option), default)]
4929    pub source_root_path: Option<&'a str>,
4930}
4931#[derive(Builder, Debug, PartialEq)]
4932pub struct DirectoryDockerBuildOpts<'a> {
4933    /// Build arguments to use in the build.
4934    #[builder(setter(into, strip_option), default)]
4935    pub build_args: Option<Vec<BuildArg>>,
4936    /// Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
4937    #[builder(setter(into, strip_option), default)]
4938    pub dockerfile: Option<&'a str>,
4939    /// If set, skip the automatic init process injected into containers created by RUN statements.
4940    /// 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.
4941    #[builder(setter(into, strip_option), default)]
4942    pub no_init: Option<bool>,
4943    /// The platform to build.
4944    #[builder(setter(into, strip_option), default)]
4945    pub platform: Option<Platform>,
4946    /// Secrets to pass to the build.
4947    /// They will be mounted at /run/secrets/[secret-name].
4948    #[builder(setter(into, strip_option), default)]
4949    pub secrets: Option<Vec<SecretId>>,
4950    /// Target build stage to build.
4951    #[builder(setter(into, strip_option), default)]
4952    pub target: Option<&'a str>,
4953}
4954#[derive(Builder, Debug, PartialEq)]
4955pub struct DirectoryEntriesOpts<'a> {
4956    /// Location of the directory to look at (e.g., "/src").
4957    #[builder(setter(into, strip_option), default)]
4958    pub path: Option<&'a str>,
4959}
4960#[derive(Builder, Debug, PartialEq)]
4961pub struct DirectoryExistsOpts {
4962    /// If specified, do not follow symlinks.
4963    #[builder(setter(into, strip_option), default)]
4964    pub do_not_follow_symlinks: Option<bool>,
4965    /// If specified, also validate the type of file (e.g. "REGULAR_TYPE", "DIRECTORY_TYPE", or "SYMLINK_TYPE").
4966    #[builder(setter(into, strip_option), default)]
4967    pub expected_type: Option<ExistsType>,
4968}
4969#[derive(Builder, Debug, PartialEq)]
4970pub struct DirectoryExportOpts {
4971    /// 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.
4972    #[builder(setter(into, strip_option), default)]
4973    pub wipe: Option<bool>,
4974}
4975#[derive(Builder, Debug, PartialEq)]
4976pub struct DirectoryFilterOpts<'a> {
4977    /// If set, paths matching one of these glob patterns is excluded from the new snapshot. Example: ["node_modules/", ".git*", ".env"]
4978    #[builder(setter(into, strip_option), default)]
4979    pub exclude: Option<Vec<&'a str>>,
4980    /// If set, only paths matching one of these glob patterns is included in the new snapshot. Example: (e.g., ["app/", "package.*"]).
4981    #[builder(setter(into, strip_option), default)]
4982    pub include: Option<Vec<&'a str>>,
4983}
4984#[derive(Builder, Debug, PartialEq)]
4985pub struct DirectorySearchOpts<'a> {
4986    /// Allow the . pattern to match newlines in multiline mode.
4987    #[builder(setter(into, strip_option), default)]
4988    pub dotall: Option<bool>,
4989    /// Only return matching files, not lines and content
4990    #[builder(setter(into, strip_option), default)]
4991    pub files_only: Option<bool>,
4992    /// Glob patterns to match (e.g., "*.md")
4993    #[builder(setter(into, strip_option), default)]
4994    pub globs: Option<Vec<&'a str>>,
4995    /// Enable case-insensitive matching.
4996    #[builder(setter(into, strip_option), default)]
4997    pub insensitive: Option<bool>,
4998    /// Limit the number of results to return
4999    #[builder(setter(into, strip_option), default)]
5000    pub limit: Option<isize>,
5001    /// Interpret the pattern as a literal string instead of a regular expression.
5002    #[builder(setter(into, strip_option), default)]
5003    pub literal: Option<bool>,
5004    /// Enable searching across multiple lines.
5005    #[builder(setter(into, strip_option), default)]
5006    pub multiline: Option<bool>,
5007    /// Directory or file paths to search
5008    #[builder(setter(into, strip_option), default)]
5009    pub paths: Option<Vec<&'a str>>,
5010    /// Skip hidden files (files starting with .).
5011    #[builder(setter(into, strip_option), default)]
5012    pub skip_hidden: Option<bool>,
5013    /// Honor .gitignore, .ignore, and .rgignore files.
5014    #[builder(setter(into, strip_option), default)]
5015    pub skip_ignored: Option<bool>,
5016}
5017#[derive(Builder, Debug, PartialEq)]
5018pub struct DirectoryTerminalOpts<'a> {
5019    /// If set, override the container's default terminal command and invoke these command arguments instead.
5020    #[builder(setter(into, strip_option), default)]
5021    pub cmd: Option<Vec<&'a str>>,
5022    /// If set, override the default container used for the terminal.
5023    #[builder(setter(into, strip_option), default)]
5024    pub container: Option<ContainerId>,
5025    /// Provides Dagger access to the executed command.
5026    #[builder(setter(into, strip_option), default)]
5027    pub experimental_privileged_nesting: Option<bool>,
5028    /// 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.
5029    #[builder(setter(into, strip_option), default)]
5030    pub insecure_root_capabilities: Option<bool>,
5031}
5032#[derive(Builder, Debug, PartialEq)]
5033pub struct DirectoryWithDirectoryOpts<'a> {
5034    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
5035    #[builder(setter(into, strip_option), default)]
5036    pub exclude: Option<Vec<&'a str>>,
5037    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
5038    #[builder(setter(into, strip_option), default)]
5039    pub include: Option<Vec<&'a str>>,
5040    /// A user:group to set for the copied directory and its contents.
5041    /// The user and group must be an ID (1000:1000), not a name (foo:bar).
5042    /// If the group is omitted, it defaults to the same as the user.
5043    #[builder(setter(into, strip_option), default)]
5044    pub owner: Option<&'a str>,
5045}
5046#[derive(Builder, Debug, PartialEq)]
5047pub struct DirectoryWithFileOpts<'a> {
5048    /// A user:group to set for the copied directory and its contents.
5049    /// The user and group must be an ID (1000:1000), not a name (foo:bar).
5050    /// If the group is omitted, it defaults to the same as the user.
5051    #[builder(setter(into, strip_option), default)]
5052    pub owner: Option<&'a str>,
5053    /// Permission given to the copied file (e.g., 0600).
5054    #[builder(setter(into, strip_option), default)]
5055    pub permissions: Option<isize>,
5056}
5057#[derive(Builder, Debug, PartialEq)]
5058pub struct DirectoryWithFilesOpts {
5059    /// Permission given to the copied files (e.g., 0600).
5060    #[builder(setter(into, strip_option), default)]
5061    pub permissions: Option<isize>,
5062}
5063#[derive(Builder, Debug, PartialEq)]
5064pub struct DirectoryWithNewDirectoryOpts {
5065    /// Permission granted to the created directory (e.g., 0777).
5066    #[builder(setter(into, strip_option), default)]
5067    pub permissions: Option<isize>,
5068}
5069#[derive(Builder, Debug, PartialEq)]
5070pub struct DirectoryWithNewFileOpts {
5071    /// Permissions of the new file. Example: 0600
5072    #[builder(setter(into, strip_option), default)]
5073    pub permissions: Option<isize>,
5074}
5075impl Directory {
5076    /// Converts this directory to a local git repository
5077    pub fn as_git(&self) -> GitRepository {
5078        let query = self.selection.select("asGit");
5079        GitRepository {
5080            proc: self.proc.clone(),
5081            selection: query,
5082            graphql_client: self.graphql_client.clone(),
5083        }
5084    }
5085    /// Load the directory as a Dagger module source
5086    ///
5087    /// # Arguments
5088    ///
5089    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5090    pub fn as_module(&self) -> Module {
5091        let query = self.selection.select("asModule");
5092        Module {
5093            proc: self.proc.clone(),
5094            selection: query,
5095            graphql_client: self.graphql_client.clone(),
5096        }
5097    }
5098    /// Load the directory as a Dagger module source
5099    ///
5100    /// # Arguments
5101    ///
5102    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5103    pub fn as_module_opts<'a>(&self, opts: DirectoryAsModuleOpts<'a>) -> Module {
5104        let mut query = self.selection.select("asModule");
5105        if let Some(source_root_path) = opts.source_root_path {
5106            query = query.arg("sourceRootPath", source_root_path);
5107        }
5108        Module {
5109            proc: self.proc.clone(),
5110            selection: query,
5111            graphql_client: self.graphql_client.clone(),
5112        }
5113    }
5114    /// Load the directory as a Dagger module source
5115    ///
5116    /// # Arguments
5117    ///
5118    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5119    pub fn as_module_source(&self) -> ModuleSource {
5120        let query = self.selection.select("asModuleSource");
5121        ModuleSource {
5122            proc: self.proc.clone(),
5123            selection: query,
5124            graphql_client: self.graphql_client.clone(),
5125        }
5126    }
5127    /// Load the directory as a Dagger module source
5128    ///
5129    /// # Arguments
5130    ///
5131    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5132    pub fn as_module_source_opts<'a>(&self, opts: DirectoryAsModuleSourceOpts<'a>) -> ModuleSource {
5133        let mut query = self.selection.select("asModuleSource");
5134        if let Some(source_root_path) = opts.source_root_path {
5135            query = query.arg("sourceRootPath", source_root_path);
5136        }
5137        ModuleSource {
5138            proc: self.proc.clone(),
5139            selection: query,
5140            graphql_client: self.graphql_client.clone(),
5141        }
5142    }
5143    /// Return the difference between this directory and another directory, typically an older snapshot.
5144    /// The difference is encoded as a changeset, which also tracks removed files, and can be applied to other directories.
5145    ///
5146    /// # Arguments
5147    ///
5148    /// * `from` - The base directory snapshot to compare against
5149    pub fn changes(&self, from: impl IntoID<DirectoryId>) -> Changeset {
5150        let mut query = self.selection.select("changes");
5151        query = query.arg_lazy(
5152            "from",
5153            Box::new(move || {
5154                let from = from.clone();
5155                Box::pin(async move { from.into_id().await.unwrap().quote() })
5156            }),
5157        );
5158        Changeset {
5159            proc: self.proc.clone(),
5160            selection: query,
5161            graphql_client: self.graphql_client.clone(),
5162        }
5163    }
5164    /// Change the owner of the directory contents recursively.
5165    ///
5166    /// # Arguments
5167    ///
5168    /// * `path` - Path of the directory to change ownership of (e.g., "/").
5169    /// * `owner` - A user:group to set for the mounted directory and its contents.
5170    ///
5171    /// The user and group must be an ID (1000:1000), not a name (foo:bar).
5172    ///
5173    /// If the group is omitted, it defaults to the same as the user.
5174    pub fn chown(&self, path: impl Into<String>, owner: impl Into<String>) -> Directory {
5175        let mut query = self.selection.select("chown");
5176        query = query.arg("path", path.into());
5177        query = query.arg("owner", owner.into());
5178        Directory {
5179            proc: self.proc.clone(),
5180            selection: query,
5181            graphql_client: self.graphql_client.clone(),
5182        }
5183    }
5184    /// Return the difference between this directory and an another directory. The difference is encoded as a directory.
5185    ///
5186    /// # Arguments
5187    ///
5188    /// * `other` - The directory to compare against
5189    pub fn diff(&self, other: impl IntoID<DirectoryId>) -> Directory {
5190        let mut query = self.selection.select("diff");
5191        query = query.arg_lazy(
5192            "other",
5193            Box::new(move || {
5194                let other = other.clone();
5195                Box::pin(async move { other.into_id().await.unwrap().quote() })
5196            }),
5197        );
5198        Directory {
5199            proc: self.proc.clone(),
5200            selection: query,
5201            graphql_client: self.graphql_client.clone(),
5202        }
5203    }
5204    /// 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.
5205    pub async fn digest(&self) -> Result<String, DaggerError> {
5206        let query = self.selection.select("digest");
5207        query.execute(self.graphql_client.clone()).await
5208    }
5209    /// Retrieves a directory at the given path.
5210    ///
5211    /// # Arguments
5212    ///
5213    /// * `path` - Location of the directory to retrieve. Example: "/src"
5214    pub fn directory(&self, path: impl Into<String>) -> Directory {
5215        let mut query = self.selection.select("directory");
5216        query = query.arg("path", path.into());
5217        Directory {
5218            proc: self.proc.clone(),
5219            selection: query,
5220            graphql_client: self.graphql_client.clone(),
5221        }
5222    }
5223    /// 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.
5224    ///
5225    /// # Arguments
5226    ///
5227    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5228    pub fn docker_build(&self) -> Container {
5229        let query = self.selection.select("dockerBuild");
5230        Container {
5231            proc: self.proc.clone(),
5232            selection: query,
5233            graphql_client: self.graphql_client.clone(),
5234        }
5235    }
5236    /// 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.
5237    ///
5238    /// # Arguments
5239    ///
5240    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5241    pub fn docker_build_opts<'a>(&self, opts: DirectoryDockerBuildOpts<'a>) -> Container {
5242        let mut query = self.selection.select("dockerBuild");
5243        if let Some(dockerfile) = opts.dockerfile {
5244            query = query.arg("dockerfile", dockerfile);
5245        }
5246        if let Some(platform) = opts.platform {
5247            query = query.arg("platform", platform);
5248        }
5249        if let Some(build_args) = opts.build_args {
5250            query = query.arg("buildArgs", build_args);
5251        }
5252        if let Some(target) = opts.target {
5253            query = query.arg("target", target);
5254        }
5255        if let Some(secrets) = opts.secrets {
5256            query = query.arg("secrets", secrets);
5257        }
5258        if let Some(no_init) = opts.no_init {
5259            query = query.arg("noInit", no_init);
5260        }
5261        Container {
5262            proc: self.proc.clone(),
5263            selection: query,
5264            graphql_client: self.graphql_client.clone(),
5265        }
5266    }
5267    /// Returns a list of files and directories at the given path.
5268    ///
5269    /// # Arguments
5270    ///
5271    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5272    pub async fn entries(&self) -> Result<Vec<String>, DaggerError> {
5273        let query = self.selection.select("entries");
5274        query.execute(self.graphql_client.clone()).await
5275    }
5276    /// Returns a list of files and directories at the given path.
5277    ///
5278    /// # Arguments
5279    ///
5280    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5281    pub async fn entries_opts<'a>(
5282        &self,
5283        opts: DirectoryEntriesOpts<'a>,
5284    ) -> Result<Vec<String>, DaggerError> {
5285        let mut query = self.selection.select("entries");
5286        if let Some(path) = opts.path {
5287            query = query.arg("path", path);
5288        }
5289        query.execute(self.graphql_client.clone()).await
5290    }
5291    /// check if a file or directory exists
5292    ///
5293    /// # Arguments
5294    ///
5295    /// * `path` - Path to check (e.g., "/file.txt").
5296    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5297    pub async fn exists(&self, path: impl Into<String>) -> Result<bool, DaggerError> {
5298        let mut query = self.selection.select("exists");
5299        query = query.arg("path", path.into());
5300        query.execute(self.graphql_client.clone()).await
5301    }
5302    /// check if a file or directory exists
5303    ///
5304    /// # Arguments
5305    ///
5306    /// * `path` - Path to check (e.g., "/file.txt").
5307    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5308    pub async fn exists_opts(
5309        &self,
5310        path: impl Into<String>,
5311        opts: DirectoryExistsOpts,
5312    ) -> Result<bool, DaggerError> {
5313        let mut query = self.selection.select("exists");
5314        query = query.arg("path", path.into());
5315        if let Some(expected_type) = opts.expected_type {
5316            query = query.arg("expectedType", expected_type);
5317        }
5318        if let Some(do_not_follow_symlinks) = opts.do_not_follow_symlinks {
5319            query = query.arg("doNotFollowSymlinks", do_not_follow_symlinks);
5320        }
5321        query.execute(self.graphql_client.clone()).await
5322    }
5323    /// Writes the contents of the directory to a path on the host.
5324    ///
5325    /// # Arguments
5326    ///
5327    /// * `path` - Location of the copied directory (e.g., "logs/").
5328    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5329    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
5330        let mut query = self.selection.select("export");
5331        query = query.arg("path", path.into());
5332        query.execute(self.graphql_client.clone()).await
5333    }
5334    /// Writes the contents of the directory to a path on the host.
5335    ///
5336    /// # Arguments
5337    ///
5338    /// * `path` - Location of the copied directory (e.g., "logs/").
5339    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5340    pub async fn export_opts(
5341        &self,
5342        path: impl Into<String>,
5343        opts: DirectoryExportOpts,
5344    ) -> Result<String, DaggerError> {
5345        let mut query = self.selection.select("export");
5346        query = query.arg("path", path.into());
5347        if let Some(wipe) = opts.wipe {
5348            query = query.arg("wipe", wipe);
5349        }
5350        query.execute(self.graphql_client.clone()).await
5351    }
5352    /// Retrieve a file at the given path.
5353    ///
5354    /// # Arguments
5355    ///
5356    /// * `path` - Location of the file to retrieve (e.g., "README.md").
5357    pub fn file(&self, path: impl Into<String>) -> File {
5358        let mut query = self.selection.select("file");
5359        query = query.arg("path", path.into());
5360        File {
5361            proc: self.proc.clone(),
5362            selection: query,
5363            graphql_client: self.graphql_client.clone(),
5364        }
5365    }
5366    /// Return a snapshot with some paths included or excluded
5367    ///
5368    /// # Arguments
5369    ///
5370    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5371    pub fn filter(&self) -> Directory {
5372        let query = self.selection.select("filter");
5373        Directory {
5374            proc: self.proc.clone(),
5375            selection: query,
5376            graphql_client: self.graphql_client.clone(),
5377        }
5378    }
5379    /// Return a snapshot with some paths included or excluded
5380    ///
5381    /// # Arguments
5382    ///
5383    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5384    pub fn filter_opts<'a>(&self, opts: DirectoryFilterOpts<'a>) -> Directory {
5385        let mut query = self.selection.select("filter");
5386        if let Some(exclude) = opts.exclude {
5387            query = query.arg("exclude", exclude);
5388        }
5389        if let Some(include) = opts.include {
5390            query = query.arg("include", include);
5391        }
5392        Directory {
5393            proc: self.proc.clone(),
5394            selection: query,
5395            graphql_client: self.graphql_client.clone(),
5396        }
5397    }
5398    /// Search up the directory tree for a file or directory, and return its path. If no match, return null
5399    ///
5400    /// # Arguments
5401    ///
5402    /// * `name` - The name of the file or directory to search for
5403    /// * `start` - The path to start the search from
5404    pub async fn find_up(
5405        &self,
5406        name: impl Into<String>,
5407        start: impl Into<String>,
5408    ) -> Result<String, DaggerError> {
5409        let mut query = self.selection.select("findUp");
5410        query = query.arg("name", name.into());
5411        query = query.arg("start", start.into());
5412        query.execute(self.graphql_client.clone()).await
5413    }
5414    /// Returns a list of files and directories that matche the given pattern.
5415    ///
5416    /// # Arguments
5417    ///
5418    /// * `pattern` - Pattern to match (e.g., "*.md").
5419    pub async fn glob(&self, pattern: impl Into<String>) -> Result<Vec<String>, DaggerError> {
5420        let mut query = self.selection.select("glob");
5421        query = query.arg("pattern", pattern.into());
5422        query.execute(self.graphql_client.clone()).await
5423    }
5424    /// A unique identifier for this Directory.
5425    pub async fn id(&self) -> Result<DirectoryId, DaggerError> {
5426        let query = self.selection.select("id");
5427        query.execute(self.graphql_client.clone()).await
5428    }
5429    /// Returns the name of the directory.
5430    pub async fn name(&self) -> Result<String, DaggerError> {
5431        let query = self.selection.select("name");
5432        query.execute(self.graphql_client.clone()).await
5433    }
5434    /// Searches for content matching the given regular expression or literal string.
5435    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
5436    ///
5437    /// # Arguments
5438    ///
5439    /// * `pattern` - The text to match.
5440    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5441    pub fn search(&self, pattern: impl Into<String>) -> Vec<SearchResult> {
5442        let mut query = self.selection.select("search");
5443        query = query.arg("pattern", pattern.into());
5444        vec![SearchResult {
5445            proc: self.proc.clone(),
5446            selection: query,
5447            graphql_client: self.graphql_client.clone(),
5448        }]
5449    }
5450    /// Searches for content matching the given regular expression or literal string.
5451    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
5452    ///
5453    /// # Arguments
5454    ///
5455    /// * `pattern` - The text to match.
5456    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5457    pub fn search_opts<'a>(
5458        &self,
5459        pattern: impl Into<String>,
5460        opts: DirectorySearchOpts<'a>,
5461    ) -> Vec<SearchResult> {
5462        let mut query = self.selection.select("search");
5463        query = query.arg("pattern", pattern.into());
5464        if let Some(paths) = opts.paths {
5465            query = query.arg("paths", paths);
5466        }
5467        if let Some(globs) = opts.globs {
5468            query = query.arg("globs", globs);
5469        }
5470        if let Some(literal) = opts.literal {
5471            query = query.arg("literal", literal);
5472        }
5473        if let Some(multiline) = opts.multiline {
5474            query = query.arg("multiline", multiline);
5475        }
5476        if let Some(dotall) = opts.dotall {
5477            query = query.arg("dotall", dotall);
5478        }
5479        if let Some(insensitive) = opts.insensitive {
5480            query = query.arg("insensitive", insensitive);
5481        }
5482        if let Some(skip_ignored) = opts.skip_ignored {
5483            query = query.arg("skipIgnored", skip_ignored);
5484        }
5485        if let Some(skip_hidden) = opts.skip_hidden {
5486            query = query.arg("skipHidden", skip_hidden);
5487        }
5488        if let Some(files_only) = opts.files_only {
5489            query = query.arg("filesOnly", files_only);
5490        }
5491        if let Some(limit) = opts.limit {
5492            query = query.arg("limit", limit);
5493        }
5494        vec![SearchResult {
5495            proc: self.proc.clone(),
5496            selection: query,
5497            graphql_client: self.graphql_client.clone(),
5498        }]
5499    }
5500    /// Force evaluation in the engine.
5501    pub async fn sync(&self) -> Result<DirectoryId, DaggerError> {
5502        let query = self.selection.select("sync");
5503        query.execute(self.graphql_client.clone()).await
5504    }
5505    /// Opens an interactive terminal in new container with this directory mounted inside.
5506    ///
5507    /// # Arguments
5508    ///
5509    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5510    pub fn terminal(&self) -> Directory {
5511        let query = self.selection.select("terminal");
5512        Directory {
5513            proc: self.proc.clone(),
5514            selection: query,
5515            graphql_client: self.graphql_client.clone(),
5516        }
5517    }
5518    /// Opens an interactive terminal in new container with this directory mounted inside.
5519    ///
5520    /// # Arguments
5521    ///
5522    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5523    pub fn terminal_opts<'a>(&self, opts: DirectoryTerminalOpts<'a>) -> Directory {
5524        let mut query = self.selection.select("terminal");
5525        if let Some(container) = opts.container {
5526            query = query.arg("container", container);
5527        }
5528        if let Some(cmd) = opts.cmd {
5529            query = query.arg("cmd", cmd);
5530        }
5531        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
5532            query = query.arg(
5533                "experimentalPrivilegedNesting",
5534                experimental_privileged_nesting,
5535            );
5536        }
5537        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
5538            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
5539        }
5540        Directory {
5541            proc: self.proc.clone(),
5542            selection: query,
5543            graphql_client: self.graphql_client.clone(),
5544        }
5545    }
5546    /// Return a directory with changes from another directory applied to it.
5547    ///
5548    /// # Arguments
5549    ///
5550    /// * `changes` - Changes to apply to the directory
5551    pub fn with_changes(&self, changes: impl IntoID<ChangesetId>) -> Directory {
5552        let mut query = self.selection.select("withChanges");
5553        query = query.arg_lazy(
5554            "changes",
5555            Box::new(move || {
5556                let changes = changes.clone();
5557                Box::pin(async move { changes.into_id().await.unwrap().quote() })
5558            }),
5559        );
5560        Directory {
5561            proc: self.proc.clone(),
5562            selection: query,
5563            graphql_client: self.graphql_client.clone(),
5564        }
5565    }
5566    /// Return a snapshot with a directory added
5567    ///
5568    /// # Arguments
5569    ///
5570    /// * `path` - Location of the written directory (e.g., "/src/").
5571    /// * `source` - Identifier of the directory to copy.
5572    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5573    pub fn with_directory(
5574        &self,
5575        path: impl Into<String>,
5576        source: impl IntoID<DirectoryId>,
5577    ) -> Directory {
5578        let mut query = self.selection.select("withDirectory");
5579        query = query.arg("path", path.into());
5580        query = query.arg_lazy(
5581            "source",
5582            Box::new(move || {
5583                let source = source.clone();
5584                Box::pin(async move { source.into_id().await.unwrap().quote() })
5585            }),
5586        );
5587        Directory {
5588            proc: self.proc.clone(),
5589            selection: query,
5590            graphql_client: self.graphql_client.clone(),
5591        }
5592    }
5593    /// Return a snapshot with a directory added
5594    ///
5595    /// # Arguments
5596    ///
5597    /// * `path` - Location of the written directory (e.g., "/src/").
5598    /// * `source` - Identifier of the directory to copy.
5599    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5600    pub fn with_directory_opts<'a>(
5601        &self,
5602        path: impl Into<String>,
5603        source: impl IntoID<DirectoryId>,
5604        opts: DirectoryWithDirectoryOpts<'a>,
5605    ) -> Directory {
5606        let mut query = self.selection.select("withDirectory");
5607        query = query.arg("path", path.into());
5608        query = query.arg_lazy(
5609            "source",
5610            Box::new(move || {
5611                let source = source.clone();
5612                Box::pin(async move { source.into_id().await.unwrap().quote() })
5613            }),
5614        );
5615        if let Some(exclude) = opts.exclude {
5616            query = query.arg("exclude", exclude);
5617        }
5618        if let Some(include) = opts.include {
5619            query = query.arg("include", include);
5620        }
5621        if let Some(owner) = opts.owner {
5622            query = query.arg("owner", owner);
5623        }
5624        Directory {
5625            proc: self.proc.clone(),
5626            selection: query,
5627            graphql_client: self.graphql_client.clone(),
5628        }
5629    }
5630    /// Raise an error.
5631    ///
5632    /// # Arguments
5633    ///
5634    /// * `err` - Message of the error to raise. If empty, the error will be ignored.
5635    pub fn with_error(&self, err: impl Into<String>) -> Directory {
5636        let mut query = self.selection.select("withError");
5637        query = query.arg("err", err.into());
5638        Directory {
5639            proc: self.proc.clone(),
5640            selection: query,
5641            graphql_client: self.graphql_client.clone(),
5642        }
5643    }
5644    /// Retrieves this directory plus the contents of the given file copied to the given path.
5645    ///
5646    /// # Arguments
5647    ///
5648    /// * `path` - Location of the copied file (e.g., "/file.txt").
5649    /// * `source` - Identifier of the file to copy.
5650    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5651    pub fn with_file(&self, path: impl Into<String>, source: impl IntoID<FileId>) -> Directory {
5652        let mut query = self.selection.select("withFile");
5653        query = query.arg("path", path.into());
5654        query = query.arg_lazy(
5655            "source",
5656            Box::new(move || {
5657                let source = source.clone();
5658                Box::pin(async move { source.into_id().await.unwrap().quote() })
5659            }),
5660        );
5661        Directory {
5662            proc: self.proc.clone(),
5663            selection: query,
5664            graphql_client: self.graphql_client.clone(),
5665        }
5666    }
5667    /// Retrieves this directory plus the contents of the given file copied to the given path.
5668    ///
5669    /// # Arguments
5670    ///
5671    /// * `path` - Location of the copied file (e.g., "/file.txt").
5672    /// * `source` - Identifier of the file to copy.
5673    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5674    pub fn with_file_opts<'a>(
5675        &self,
5676        path: impl Into<String>,
5677        source: impl IntoID<FileId>,
5678        opts: DirectoryWithFileOpts<'a>,
5679    ) -> Directory {
5680        let mut query = self.selection.select("withFile");
5681        query = query.arg("path", path.into());
5682        query = query.arg_lazy(
5683            "source",
5684            Box::new(move || {
5685                let source = source.clone();
5686                Box::pin(async move { source.into_id().await.unwrap().quote() })
5687            }),
5688        );
5689        if let Some(permissions) = opts.permissions {
5690            query = query.arg("permissions", permissions);
5691        }
5692        if let Some(owner) = opts.owner {
5693            query = query.arg("owner", owner);
5694        }
5695        Directory {
5696            proc: self.proc.clone(),
5697            selection: query,
5698            graphql_client: self.graphql_client.clone(),
5699        }
5700    }
5701    /// Retrieves this directory plus the contents of the given files copied to the given path.
5702    ///
5703    /// # Arguments
5704    ///
5705    /// * `path` - Location where copied files should be placed (e.g., "/src").
5706    /// * `sources` - Identifiers of the files to copy.
5707    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5708    pub fn with_files(&self, path: impl Into<String>, sources: Vec<FileId>) -> Directory {
5709        let mut query = self.selection.select("withFiles");
5710        query = query.arg("path", path.into());
5711        query = query.arg("sources", sources);
5712        Directory {
5713            proc: self.proc.clone(),
5714            selection: query,
5715            graphql_client: self.graphql_client.clone(),
5716        }
5717    }
5718    /// Retrieves this directory plus the contents of the given files copied to the given path.
5719    ///
5720    /// # Arguments
5721    ///
5722    /// * `path` - Location where copied files should be placed (e.g., "/src").
5723    /// * `sources` - Identifiers of the files to copy.
5724    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5725    pub fn with_files_opts(
5726        &self,
5727        path: impl Into<String>,
5728        sources: Vec<FileId>,
5729        opts: DirectoryWithFilesOpts,
5730    ) -> Directory {
5731        let mut query = self.selection.select("withFiles");
5732        query = query.arg("path", path.into());
5733        query = query.arg("sources", sources);
5734        if let Some(permissions) = opts.permissions {
5735            query = query.arg("permissions", permissions);
5736        }
5737        Directory {
5738            proc: self.proc.clone(),
5739            selection: query,
5740            graphql_client: self.graphql_client.clone(),
5741        }
5742    }
5743    /// Retrieves this directory plus a new directory created at the given path.
5744    ///
5745    /// # Arguments
5746    ///
5747    /// * `path` - Location of the directory created (e.g., "/logs").
5748    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5749    pub fn with_new_directory(&self, path: impl Into<String>) -> Directory {
5750        let mut query = self.selection.select("withNewDirectory");
5751        query = query.arg("path", path.into());
5752        Directory {
5753            proc: self.proc.clone(),
5754            selection: query,
5755            graphql_client: self.graphql_client.clone(),
5756        }
5757    }
5758    /// Retrieves this directory plus a new directory created at the given path.
5759    ///
5760    /// # Arguments
5761    ///
5762    /// * `path` - Location of the directory created (e.g., "/logs").
5763    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5764    pub fn with_new_directory_opts(
5765        &self,
5766        path: impl Into<String>,
5767        opts: DirectoryWithNewDirectoryOpts,
5768    ) -> Directory {
5769        let mut query = self.selection.select("withNewDirectory");
5770        query = query.arg("path", path.into());
5771        if let Some(permissions) = opts.permissions {
5772            query = query.arg("permissions", permissions);
5773        }
5774        Directory {
5775            proc: self.proc.clone(),
5776            selection: query,
5777            graphql_client: self.graphql_client.clone(),
5778        }
5779    }
5780    /// Return a snapshot with a new file added
5781    ///
5782    /// # Arguments
5783    ///
5784    /// * `path` - Path of the new file. Example: "foo/bar.txt"
5785    /// * `contents` - Contents of the new file. Example: "Hello world!"
5786    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5787    pub fn with_new_file(&self, path: impl Into<String>, contents: impl Into<String>) -> Directory {
5788        let mut query = self.selection.select("withNewFile");
5789        query = query.arg("path", path.into());
5790        query = query.arg("contents", contents.into());
5791        Directory {
5792            proc: self.proc.clone(),
5793            selection: query,
5794            graphql_client: self.graphql_client.clone(),
5795        }
5796    }
5797    /// Return a snapshot with a new file added
5798    ///
5799    /// # Arguments
5800    ///
5801    /// * `path` - Path of the new file. Example: "foo/bar.txt"
5802    /// * `contents` - Contents of the new file. Example: "Hello world!"
5803    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5804    pub fn with_new_file_opts(
5805        &self,
5806        path: impl Into<String>,
5807        contents: impl Into<String>,
5808        opts: DirectoryWithNewFileOpts,
5809    ) -> Directory {
5810        let mut query = self.selection.select("withNewFile");
5811        query = query.arg("path", path.into());
5812        query = query.arg("contents", contents.into());
5813        if let Some(permissions) = opts.permissions {
5814            query = query.arg("permissions", permissions);
5815        }
5816        Directory {
5817            proc: self.proc.clone(),
5818            selection: query,
5819            graphql_client: self.graphql_client.clone(),
5820        }
5821    }
5822    /// Retrieves this directory with the given Git-compatible patch applied.
5823    ///
5824    /// # Arguments
5825    ///
5826    /// * `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").
5827    pub fn with_patch(&self, patch: impl Into<String>) -> Directory {
5828        let mut query = self.selection.select("withPatch");
5829        query = query.arg("patch", patch.into());
5830        Directory {
5831            proc: self.proc.clone(),
5832            selection: query,
5833            graphql_client: self.graphql_client.clone(),
5834        }
5835    }
5836    /// Retrieves this directory with the given Git-compatible patch file applied.
5837    ///
5838    /// # Arguments
5839    ///
5840    /// * `patch` - File containing the patch to apply
5841    pub fn with_patch_file(&self, patch: impl IntoID<FileId>) -> Directory {
5842        let mut query = self.selection.select("withPatchFile");
5843        query = query.arg_lazy(
5844            "patch",
5845            Box::new(move || {
5846                let patch = patch.clone();
5847                Box::pin(async move { patch.into_id().await.unwrap().quote() })
5848            }),
5849        );
5850        Directory {
5851            proc: self.proc.clone(),
5852            selection: query,
5853            graphql_client: self.graphql_client.clone(),
5854        }
5855    }
5856    /// Return a snapshot with a symlink
5857    ///
5858    /// # Arguments
5859    ///
5860    /// * `target` - Location of the file or directory to link to (e.g., "/existing/file").
5861    /// * `link_name` - Location where the symbolic link will be created (e.g., "/new-file-link").
5862    pub fn with_symlink(
5863        &self,
5864        target: impl Into<String>,
5865        link_name: impl Into<String>,
5866    ) -> Directory {
5867        let mut query = self.selection.select("withSymlink");
5868        query = query.arg("target", target.into());
5869        query = query.arg("linkName", link_name.into());
5870        Directory {
5871            proc: self.proc.clone(),
5872            selection: query,
5873            graphql_client: self.graphql_client.clone(),
5874        }
5875    }
5876    /// Retrieves this directory with all file/dir timestamps set to the given time.
5877    ///
5878    /// # Arguments
5879    ///
5880    /// * `timestamp` - Timestamp to set dir/files in.
5881    ///
5882    /// Formatted in seconds following Unix epoch (e.g., 1672531199).
5883    pub fn with_timestamps(&self, timestamp: isize) -> Directory {
5884        let mut query = self.selection.select("withTimestamps");
5885        query = query.arg("timestamp", timestamp);
5886        Directory {
5887            proc: self.proc.clone(),
5888            selection: query,
5889            graphql_client: self.graphql_client.clone(),
5890        }
5891    }
5892    /// Return a snapshot with a subdirectory removed
5893    ///
5894    /// # Arguments
5895    ///
5896    /// * `path` - Path of the subdirectory to remove. Example: ".github/workflows"
5897    pub fn without_directory(&self, path: impl Into<String>) -> Directory {
5898        let mut query = self.selection.select("withoutDirectory");
5899        query = query.arg("path", path.into());
5900        Directory {
5901            proc: self.proc.clone(),
5902            selection: query,
5903            graphql_client: self.graphql_client.clone(),
5904        }
5905    }
5906    /// Return a snapshot with a file removed
5907    ///
5908    /// # Arguments
5909    ///
5910    /// * `path` - Path of the file to remove (e.g., "/file.txt").
5911    pub fn without_file(&self, path: impl Into<String>) -> Directory {
5912        let mut query = self.selection.select("withoutFile");
5913        query = query.arg("path", path.into());
5914        Directory {
5915            proc: self.proc.clone(),
5916            selection: query,
5917            graphql_client: self.graphql_client.clone(),
5918        }
5919    }
5920    /// Return a snapshot with files removed
5921    ///
5922    /// # Arguments
5923    ///
5924    /// * `paths` - Paths of the files to remove (e.g., ["/file.txt"]).
5925    pub fn without_files(&self, paths: Vec<impl Into<String>>) -> Directory {
5926        let mut query = self.selection.select("withoutFiles");
5927        query = query.arg(
5928            "paths",
5929            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
5930        );
5931        Directory {
5932            proc: self.proc.clone(),
5933            selection: query,
5934            graphql_client: self.graphql_client.clone(),
5935        }
5936    }
5937}
5938#[derive(Clone)]
5939pub struct Engine {
5940    pub proc: Option<Arc<DaggerSessionProc>>,
5941    pub selection: Selection,
5942    pub graphql_client: DynGraphQLClient,
5943}
5944impl Engine {
5945    /// A unique identifier for this Engine.
5946    pub async fn id(&self) -> Result<EngineId, DaggerError> {
5947        let query = self.selection.select("id");
5948        query.execute(self.graphql_client.clone()).await
5949    }
5950    /// The local (on-disk) cache for the Dagger engine
5951    pub fn local_cache(&self) -> EngineCache {
5952        let query = self.selection.select("localCache");
5953        EngineCache {
5954            proc: self.proc.clone(),
5955            selection: query,
5956            graphql_client: self.graphql_client.clone(),
5957        }
5958    }
5959    /// The name of the engine instance.
5960    pub async fn name(&self) -> Result<String, DaggerError> {
5961        let query = self.selection.select("name");
5962        query.execute(self.graphql_client.clone()).await
5963    }
5964}
5965#[derive(Clone)]
5966pub struct EngineCache {
5967    pub proc: Option<Arc<DaggerSessionProc>>,
5968    pub selection: Selection,
5969    pub graphql_client: DynGraphQLClient,
5970}
5971#[derive(Builder, Debug, PartialEq)]
5972pub struct EngineCacheEntrySetOpts<'a> {
5973    #[builder(setter(into, strip_option), default)]
5974    pub key: Option<&'a str>,
5975}
5976#[derive(Builder, Debug, PartialEq)]
5977pub struct EngineCachePruneOpts {
5978    /// Use the engine-wide default pruning policy if true, otherwise prune the whole cache of any releasable entries.
5979    #[builder(setter(into, strip_option), default)]
5980    pub use_default_policy: Option<bool>,
5981}
5982impl EngineCache {
5983    /// The current set of entries in the cache
5984    ///
5985    /// # Arguments
5986    ///
5987    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5988    pub fn entry_set(&self) -> EngineCacheEntrySet {
5989        let query = self.selection.select("entrySet");
5990        EngineCacheEntrySet {
5991            proc: self.proc.clone(),
5992            selection: query,
5993            graphql_client: self.graphql_client.clone(),
5994        }
5995    }
5996    /// The current set of entries in the cache
5997    ///
5998    /// # Arguments
5999    ///
6000    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6001    pub fn entry_set_opts<'a>(&self, opts: EngineCacheEntrySetOpts<'a>) -> EngineCacheEntrySet {
6002        let mut query = self.selection.select("entrySet");
6003        if let Some(key) = opts.key {
6004            query = query.arg("key", key);
6005        }
6006        EngineCacheEntrySet {
6007            proc: self.proc.clone(),
6008            selection: query,
6009            graphql_client: self.graphql_client.clone(),
6010        }
6011    }
6012    /// A unique identifier for this EngineCache.
6013    pub async fn id(&self) -> Result<EngineCacheId, DaggerError> {
6014        let query = self.selection.select("id");
6015        query.execute(self.graphql_client.clone()).await
6016    }
6017    /// The maximum bytes to keep in the cache without pruning.
6018    pub async fn max_used_space(&self) -> Result<isize, DaggerError> {
6019        let query = self.selection.select("maxUsedSpace");
6020        query.execute(self.graphql_client.clone()).await
6021    }
6022    /// The target amount of free disk space the garbage collector will attempt to leave.
6023    pub async fn min_free_space(&self) -> Result<isize, DaggerError> {
6024        let query = self.selection.select("minFreeSpace");
6025        query.execute(self.graphql_client.clone()).await
6026    }
6027    /// Prune the cache of releaseable entries
6028    ///
6029    /// # Arguments
6030    ///
6031    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6032    pub async fn prune(&self) -> Result<Void, DaggerError> {
6033        let query = self.selection.select("prune");
6034        query.execute(self.graphql_client.clone()).await
6035    }
6036    /// Prune the cache of releaseable entries
6037    ///
6038    /// # Arguments
6039    ///
6040    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6041    pub async fn prune_opts(&self, opts: EngineCachePruneOpts) -> Result<Void, DaggerError> {
6042        let mut query = self.selection.select("prune");
6043        if let Some(use_default_policy) = opts.use_default_policy {
6044            query = query.arg("useDefaultPolicy", use_default_policy);
6045        }
6046        query.execute(self.graphql_client.clone()).await
6047    }
6048    /// The minimum amount of disk space this policy is guaranteed to retain.
6049    pub async fn reserved_space(&self) -> Result<isize, DaggerError> {
6050        let query = self.selection.select("reservedSpace");
6051        query.execute(self.graphql_client.clone()).await
6052    }
6053    /// The target number of bytes to keep when pruning.
6054    pub async fn target_space(&self) -> Result<isize, DaggerError> {
6055        let query = self.selection.select("targetSpace");
6056        query.execute(self.graphql_client.clone()).await
6057    }
6058}
6059#[derive(Clone)]
6060pub struct EngineCacheEntry {
6061    pub proc: Option<Arc<DaggerSessionProc>>,
6062    pub selection: Selection,
6063    pub graphql_client: DynGraphQLClient,
6064}
6065impl EngineCacheEntry {
6066    /// Whether the cache entry is actively being used.
6067    pub async fn actively_used(&self) -> Result<bool, DaggerError> {
6068        let query = self.selection.select("activelyUsed");
6069        query.execute(self.graphql_client.clone()).await
6070    }
6071    /// The time the cache entry was created, in Unix nanoseconds.
6072    pub async fn created_time_unix_nano(&self) -> Result<isize, DaggerError> {
6073        let query = self.selection.select("createdTimeUnixNano");
6074        query.execute(self.graphql_client.clone()).await
6075    }
6076    /// The description of the cache entry.
6077    pub async fn description(&self) -> Result<String, DaggerError> {
6078        let query = self.selection.select("description");
6079        query.execute(self.graphql_client.clone()).await
6080    }
6081    /// The disk space used by the cache entry.
6082    pub async fn disk_space_bytes(&self) -> Result<isize, DaggerError> {
6083        let query = self.selection.select("diskSpaceBytes");
6084        query.execute(self.graphql_client.clone()).await
6085    }
6086    /// A unique identifier for this EngineCacheEntry.
6087    pub async fn id(&self) -> Result<EngineCacheEntryId, DaggerError> {
6088        let query = self.selection.select("id");
6089        query.execute(self.graphql_client.clone()).await
6090    }
6091    /// The most recent time the cache entry was used, in Unix nanoseconds.
6092    pub async fn most_recent_use_time_unix_nano(&self) -> Result<isize, DaggerError> {
6093        let query = self.selection.select("mostRecentUseTimeUnixNano");
6094        query.execute(self.graphql_client.clone()).await
6095    }
6096}
6097#[derive(Clone)]
6098pub struct EngineCacheEntrySet {
6099    pub proc: Option<Arc<DaggerSessionProc>>,
6100    pub selection: Selection,
6101    pub graphql_client: DynGraphQLClient,
6102}
6103impl EngineCacheEntrySet {
6104    /// The total disk space used by the cache entries in this set.
6105    pub async fn disk_space_bytes(&self) -> Result<isize, DaggerError> {
6106        let query = self.selection.select("diskSpaceBytes");
6107        query.execute(self.graphql_client.clone()).await
6108    }
6109    /// The list of individual cache entries in the set
6110    pub fn entries(&self) -> Vec<EngineCacheEntry> {
6111        let query = self.selection.select("entries");
6112        vec![EngineCacheEntry {
6113            proc: self.proc.clone(),
6114            selection: query,
6115            graphql_client: self.graphql_client.clone(),
6116        }]
6117    }
6118    /// The number of cache entries in this set.
6119    pub async fn entry_count(&self) -> Result<isize, DaggerError> {
6120        let query = self.selection.select("entryCount");
6121        query.execute(self.graphql_client.clone()).await
6122    }
6123    /// A unique identifier for this EngineCacheEntrySet.
6124    pub async fn id(&self) -> Result<EngineCacheEntrySetId, DaggerError> {
6125        let query = self.selection.select("id");
6126        query.execute(self.graphql_client.clone()).await
6127    }
6128}
6129#[derive(Clone)]
6130pub struct EnumTypeDef {
6131    pub proc: Option<Arc<DaggerSessionProc>>,
6132    pub selection: Selection,
6133    pub graphql_client: DynGraphQLClient,
6134}
6135impl EnumTypeDef {
6136    /// A doc string for the enum, if any.
6137    pub async fn description(&self) -> Result<String, DaggerError> {
6138        let query = self.selection.select("description");
6139        query.execute(self.graphql_client.clone()).await
6140    }
6141    /// A unique identifier for this EnumTypeDef.
6142    pub async fn id(&self) -> Result<EnumTypeDefId, DaggerError> {
6143        let query = self.selection.select("id");
6144        query.execute(self.graphql_client.clone()).await
6145    }
6146    /// The members of the enum.
6147    pub fn members(&self) -> Vec<EnumValueTypeDef> {
6148        let query = self.selection.select("members");
6149        vec![EnumValueTypeDef {
6150            proc: self.proc.clone(),
6151            selection: query,
6152            graphql_client: self.graphql_client.clone(),
6153        }]
6154    }
6155    /// The name of the enum.
6156    pub async fn name(&self) -> Result<String, DaggerError> {
6157        let query = self.selection.select("name");
6158        query.execute(self.graphql_client.clone()).await
6159    }
6160    /// The location of this enum declaration.
6161    pub fn source_map(&self) -> SourceMap {
6162        let query = self.selection.select("sourceMap");
6163        SourceMap {
6164            proc: self.proc.clone(),
6165            selection: query,
6166            graphql_client: self.graphql_client.clone(),
6167        }
6168    }
6169    /// If this EnumTypeDef is associated with a Module, the name of the module. Unset otherwise.
6170    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
6171        let query = self.selection.select("sourceModuleName");
6172        query.execute(self.graphql_client.clone()).await
6173    }
6174    pub fn values(&self) -> Vec<EnumValueTypeDef> {
6175        let query = self.selection.select("values");
6176        vec![EnumValueTypeDef {
6177            proc: self.proc.clone(),
6178            selection: query,
6179            graphql_client: self.graphql_client.clone(),
6180        }]
6181    }
6182}
6183#[derive(Clone)]
6184pub struct EnumValueTypeDef {
6185    pub proc: Option<Arc<DaggerSessionProc>>,
6186    pub selection: Selection,
6187    pub graphql_client: DynGraphQLClient,
6188}
6189impl EnumValueTypeDef {
6190    /// A doc string for the enum member, if any.
6191    pub async fn description(&self) -> Result<String, DaggerError> {
6192        let query = self.selection.select("description");
6193        query.execute(self.graphql_client.clone()).await
6194    }
6195    /// A unique identifier for this EnumValueTypeDef.
6196    pub async fn id(&self) -> Result<EnumValueTypeDefId, DaggerError> {
6197        let query = self.selection.select("id");
6198        query.execute(self.graphql_client.clone()).await
6199    }
6200    /// The name of the enum member.
6201    pub async fn name(&self) -> Result<String, DaggerError> {
6202        let query = self.selection.select("name");
6203        query.execute(self.graphql_client.clone()).await
6204    }
6205    /// The location of this enum member declaration.
6206    pub fn source_map(&self) -> SourceMap {
6207        let query = self.selection.select("sourceMap");
6208        SourceMap {
6209            proc: self.proc.clone(),
6210            selection: query,
6211            graphql_client: self.graphql_client.clone(),
6212        }
6213    }
6214    /// The value of the enum member
6215    pub async fn value(&self) -> Result<String, DaggerError> {
6216        let query = self.selection.select("value");
6217        query.execute(self.graphql_client.clone()).await
6218    }
6219}
6220#[derive(Clone)]
6221pub struct Env {
6222    pub proc: Option<Arc<DaggerSessionProc>>,
6223    pub selection: Selection,
6224    pub graphql_client: DynGraphQLClient,
6225}
6226impl Env {
6227    /// A unique identifier for this Env.
6228    pub async fn id(&self) -> Result<EnvId, DaggerError> {
6229        let query = self.selection.select("id");
6230        query.execute(self.graphql_client.clone()).await
6231    }
6232    /// Retrieves an input binding by name
6233    pub fn input(&self, name: impl Into<String>) -> Binding {
6234        let mut query = self.selection.select("input");
6235        query = query.arg("name", name.into());
6236        Binding {
6237            proc: self.proc.clone(),
6238            selection: query,
6239            graphql_client: self.graphql_client.clone(),
6240        }
6241    }
6242    /// Returns all input bindings provided to the environment
6243    pub fn inputs(&self) -> Vec<Binding> {
6244        let query = self.selection.select("inputs");
6245        vec![Binding {
6246            proc: self.proc.clone(),
6247            selection: query,
6248            graphql_client: self.graphql_client.clone(),
6249        }]
6250    }
6251    /// Retrieves an output binding by name
6252    pub fn output(&self, name: impl Into<String>) -> Binding {
6253        let mut query = self.selection.select("output");
6254        query = query.arg("name", name.into());
6255        Binding {
6256            proc: self.proc.clone(),
6257            selection: query,
6258            graphql_client: self.graphql_client.clone(),
6259        }
6260    }
6261    /// Returns all declared output bindings for the environment
6262    pub fn outputs(&self) -> Vec<Binding> {
6263        let query = self.selection.select("outputs");
6264        vec![Binding {
6265            proc: self.proc.clone(),
6266            selection: query,
6267            graphql_client: self.graphql_client.clone(),
6268        }]
6269    }
6270    /// Create or update a binding of type Address in the environment
6271    ///
6272    /// # Arguments
6273    ///
6274    /// * `name` - The name of the binding
6275    /// * `value` - The Address value to assign to the binding
6276    /// * `description` - The purpose of the input
6277    pub fn with_address_input(
6278        &self,
6279        name: impl Into<String>,
6280        value: impl IntoID<AddressId>,
6281        description: impl Into<String>,
6282    ) -> Env {
6283        let mut query = self.selection.select("withAddressInput");
6284        query = query.arg("name", name.into());
6285        query = query.arg_lazy(
6286            "value",
6287            Box::new(move || {
6288                let value = value.clone();
6289                Box::pin(async move { value.into_id().await.unwrap().quote() })
6290            }),
6291        );
6292        query = query.arg("description", description.into());
6293        Env {
6294            proc: self.proc.clone(),
6295            selection: query,
6296            graphql_client: self.graphql_client.clone(),
6297        }
6298    }
6299    /// Declare a desired Address output to be assigned in the environment
6300    ///
6301    /// # Arguments
6302    ///
6303    /// * `name` - The name of the binding
6304    /// * `description` - A description of the desired value of the binding
6305    pub fn with_address_output(
6306        &self,
6307        name: impl Into<String>,
6308        description: impl Into<String>,
6309    ) -> Env {
6310        let mut query = self.selection.select("withAddressOutput");
6311        query = query.arg("name", name.into());
6312        query = query.arg("description", description.into());
6313        Env {
6314            proc: self.proc.clone(),
6315            selection: query,
6316            graphql_client: self.graphql_client.clone(),
6317        }
6318    }
6319    /// Create or update a binding of type CacheVolume in the environment
6320    ///
6321    /// # Arguments
6322    ///
6323    /// * `name` - The name of the binding
6324    /// * `value` - The CacheVolume value to assign to the binding
6325    /// * `description` - The purpose of the input
6326    pub fn with_cache_volume_input(
6327        &self,
6328        name: impl Into<String>,
6329        value: impl IntoID<CacheVolumeId>,
6330        description: impl Into<String>,
6331    ) -> Env {
6332        let mut query = self.selection.select("withCacheVolumeInput");
6333        query = query.arg("name", name.into());
6334        query = query.arg_lazy(
6335            "value",
6336            Box::new(move || {
6337                let value = value.clone();
6338                Box::pin(async move { value.into_id().await.unwrap().quote() })
6339            }),
6340        );
6341        query = query.arg("description", description.into());
6342        Env {
6343            proc: self.proc.clone(),
6344            selection: query,
6345            graphql_client: self.graphql_client.clone(),
6346        }
6347    }
6348    /// Declare a desired CacheVolume output to be assigned in the environment
6349    ///
6350    /// # Arguments
6351    ///
6352    /// * `name` - The name of the binding
6353    /// * `description` - A description of the desired value of the binding
6354    pub fn with_cache_volume_output(
6355        &self,
6356        name: impl Into<String>,
6357        description: impl Into<String>,
6358    ) -> Env {
6359        let mut query = self.selection.select("withCacheVolumeOutput");
6360        query = query.arg("name", name.into());
6361        query = query.arg("description", description.into());
6362        Env {
6363            proc: self.proc.clone(),
6364            selection: query,
6365            graphql_client: self.graphql_client.clone(),
6366        }
6367    }
6368    /// Create or update a binding of type Changeset in the environment
6369    ///
6370    /// # Arguments
6371    ///
6372    /// * `name` - The name of the binding
6373    /// * `value` - The Changeset value to assign to the binding
6374    /// * `description` - The purpose of the input
6375    pub fn with_changeset_input(
6376        &self,
6377        name: impl Into<String>,
6378        value: impl IntoID<ChangesetId>,
6379        description: impl Into<String>,
6380    ) -> Env {
6381        let mut query = self.selection.select("withChangesetInput");
6382        query = query.arg("name", name.into());
6383        query = query.arg_lazy(
6384            "value",
6385            Box::new(move || {
6386                let value = value.clone();
6387                Box::pin(async move { value.into_id().await.unwrap().quote() })
6388            }),
6389        );
6390        query = query.arg("description", description.into());
6391        Env {
6392            proc: self.proc.clone(),
6393            selection: query,
6394            graphql_client: self.graphql_client.clone(),
6395        }
6396    }
6397    /// Declare a desired Changeset output to be assigned in the environment
6398    ///
6399    /// # Arguments
6400    ///
6401    /// * `name` - The name of the binding
6402    /// * `description` - A description of the desired value of the binding
6403    pub fn with_changeset_output(
6404        &self,
6405        name: impl Into<String>,
6406        description: impl Into<String>,
6407    ) -> Env {
6408        let mut query = self.selection.select("withChangesetOutput");
6409        query = query.arg("name", name.into());
6410        query = query.arg("description", description.into());
6411        Env {
6412            proc: self.proc.clone(),
6413            selection: query,
6414            graphql_client: self.graphql_client.clone(),
6415        }
6416    }
6417    /// Create or update a binding of type Cloud in the environment
6418    ///
6419    /// # Arguments
6420    ///
6421    /// * `name` - The name of the binding
6422    /// * `value` - The Cloud value to assign to the binding
6423    /// * `description` - The purpose of the input
6424    pub fn with_cloud_input(
6425        &self,
6426        name: impl Into<String>,
6427        value: impl IntoID<CloudId>,
6428        description: impl Into<String>,
6429    ) -> Env {
6430        let mut query = self.selection.select("withCloudInput");
6431        query = query.arg("name", name.into());
6432        query = query.arg_lazy(
6433            "value",
6434            Box::new(move || {
6435                let value = value.clone();
6436                Box::pin(async move { value.into_id().await.unwrap().quote() })
6437            }),
6438        );
6439        query = query.arg("description", description.into());
6440        Env {
6441            proc: self.proc.clone(),
6442            selection: query,
6443            graphql_client: self.graphql_client.clone(),
6444        }
6445    }
6446    /// Declare a desired Cloud output to be assigned in the environment
6447    ///
6448    /// # Arguments
6449    ///
6450    /// * `name` - The name of the binding
6451    /// * `description` - A description of the desired value of the binding
6452    pub fn with_cloud_output(
6453        &self,
6454        name: impl Into<String>,
6455        description: impl Into<String>,
6456    ) -> Env {
6457        let mut query = self.selection.select("withCloudOutput");
6458        query = query.arg("name", name.into());
6459        query = query.arg("description", description.into());
6460        Env {
6461            proc: self.proc.clone(),
6462            selection: query,
6463            graphql_client: self.graphql_client.clone(),
6464        }
6465    }
6466    /// Create or update a binding of type Container in the environment
6467    ///
6468    /// # Arguments
6469    ///
6470    /// * `name` - The name of the binding
6471    /// * `value` - The Container value to assign to the binding
6472    /// * `description` - The purpose of the input
6473    pub fn with_container_input(
6474        &self,
6475        name: impl Into<String>,
6476        value: impl IntoID<ContainerId>,
6477        description: impl Into<String>,
6478    ) -> Env {
6479        let mut query = self.selection.select("withContainerInput");
6480        query = query.arg("name", name.into());
6481        query = query.arg_lazy(
6482            "value",
6483            Box::new(move || {
6484                let value = value.clone();
6485                Box::pin(async move { value.into_id().await.unwrap().quote() })
6486            }),
6487        );
6488        query = query.arg("description", description.into());
6489        Env {
6490            proc: self.proc.clone(),
6491            selection: query,
6492            graphql_client: self.graphql_client.clone(),
6493        }
6494    }
6495    /// Declare a desired Container output to be assigned in the environment
6496    ///
6497    /// # Arguments
6498    ///
6499    /// * `name` - The name of the binding
6500    /// * `description` - A description of the desired value of the binding
6501    pub fn with_container_output(
6502        &self,
6503        name: impl Into<String>,
6504        description: impl Into<String>,
6505    ) -> Env {
6506        let mut query = self.selection.select("withContainerOutput");
6507        query = query.arg("name", name.into());
6508        query = query.arg("description", description.into());
6509        Env {
6510            proc: self.proc.clone(),
6511            selection: query,
6512            graphql_client: self.graphql_client.clone(),
6513        }
6514    }
6515    /// Installs the current module into the environment, exposing its functions to the model
6516    /// Contextual path arguments will be populated using the environment's workspace.
6517    pub fn with_current_module(&self) -> Env {
6518        let query = self.selection.select("withCurrentModule");
6519        Env {
6520            proc: self.proc.clone(),
6521            selection: query,
6522            graphql_client: self.graphql_client.clone(),
6523        }
6524    }
6525    /// Create or update a binding of type Directory in the environment
6526    ///
6527    /// # Arguments
6528    ///
6529    /// * `name` - The name of the binding
6530    /// * `value` - The Directory value to assign to the binding
6531    /// * `description` - The purpose of the input
6532    pub fn with_directory_input(
6533        &self,
6534        name: impl Into<String>,
6535        value: impl IntoID<DirectoryId>,
6536        description: impl Into<String>,
6537    ) -> Env {
6538        let mut query = self.selection.select("withDirectoryInput");
6539        query = query.arg("name", name.into());
6540        query = query.arg_lazy(
6541            "value",
6542            Box::new(move || {
6543                let value = value.clone();
6544                Box::pin(async move { value.into_id().await.unwrap().quote() })
6545            }),
6546        );
6547        query = query.arg("description", description.into());
6548        Env {
6549            proc: self.proc.clone(),
6550            selection: query,
6551            graphql_client: self.graphql_client.clone(),
6552        }
6553    }
6554    /// Declare a desired Directory output to be assigned in the environment
6555    ///
6556    /// # Arguments
6557    ///
6558    /// * `name` - The name of the binding
6559    /// * `description` - A description of the desired value of the binding
6560    pub fn with_directory_output(
6561        &self,
6562        name: impl Into<String>,
6563        description: impl Into<String>,
6564    ) -> Env {
6565        let mut query = self.selection.select("withDirectoryOutput");
6566        query = query.arg("name", name.into());
6567        query = query.arg("description", description.into());
6568        Env {
6569            proc: self.proc.clone(),
6570            selection: query,
6571            graphql_client: self.graphql_client.clone(),
6572        }
6573    }
6574    /// Create or update a binding of type EnvFile in the environment
6575    ///
6576    /// # Arguments
6577    ///
6578    /// * `name` - The name of the binding
6579    /// * `value` - The EnvFile value to assign to the binding
6580    /// * `description` - The purpose of the input
6581    pub fn with_env_file_input(
6582        &self,
6583        name: impl Into<String>,
6584        value: impl IntoID<EnvFileId>,
6585        description: impl Into<String>,
6586    ) -> Env {
6587        let mut query = self.selection.select("withEnvFileInput");
6588        query = query.arg("name", name.into());
6589        query = query.arg_lazy(
6590            "value",
6591            Box::new(move || {
6592                let value = value.clone();
6593                Box::pin(async move { value.into_id().await.unwrap().quote() })
6594            }),
6595        );
6596        query = query.arg("description", description.into());
6597        Env {
6598            proc: self.proc.clone(),
6599            selection: query,
6600            graphql_client: self.graphql_client.clone(),
6601        }
6602    }
6603    /// Declare a desired EnvFile output to be assigned in the environment
6604    ///
6605    /// # Arguments
6606    ///
6607    /// * `name` - The name of the binding
6608    /// * `description` - A description of the desired value of the binding
6609    pub fn with_env_file_output(
6610        &self,
6611        name: impl Into<String>,
6612        description: impl Into<String>,
6613    ) -> Env {
6614        let mut query = self.selection.select("withEnvFileOutput");
6615        query = query.arg("name", name.into());
6616        query = query.arg("description", description.into());
6617        Env {
6618            proc: self.proc.clone(),
6619            selection: query,
6620            graphql_client: self.graphql_client.clone(),
6621        }
6622    }
6623    /// Create or update a binding of type Env in the environment
6624    ///
6625    /// # Arguments
6626    ///
6627    /// * `name` - The name of the binding
6628    /// * `value` - The Env value to assign to the binding
6629    /// * `description` - The purpose of the input
6630    pub fn with_env_input(
6631        &self,
6632        name: impl Into<String>,
6633        value: impl IntoID<EnvId>,
6634        description: impl Into<String>,
6635    ) -> Env {
6636        let mut query = self.selection.select("withEnvInput");
6637        query = query.arg("name", name.into());
6638        query = query.arg_lazy(
6639            "value",
6640            Box::new(move || {
6641                let value = value.clone();
6642                Box::pin(async move { value.into_id().await.unwrap().quote() })
6643            }),
6644        );
6645        query = query.arg("description", description.into());
6646        Env {
6647            proc: self.proc.clone(),
6648            selection: query,
6649            graphql_client: self.graphql_client.clone(),
6650        }
6651    }
6652    /// Declare a desired Env output to be assigned in the environment
6653    ///
6654    /// # Arguments
6655    ///
6656    /// * `name` - The name of the binding
6657    /// * `description` - A description of the desired value of the binding
6658    pub fn with_env_output(&self, name: impl Into<String>, description: impl Into<String>) -> Env {
6659        let mut query = self.selection.select("withEnvOutput");
6660        query = query.arg("name", name.into());
6661        query = query.arg("description", description.into());
6662        Env {
6663            proc: self.proc.clone(),
6664            selection: query,
6665            graphql_client: self.graphql_client.clone(),
6666        }
6667    }
6668    /// Create or update a binding of type File in the environment
6669    ///
6670    /// # Arguments
6671    ///
6672    /// * `name` - The name of the binding
6673    /// * `value` - The File value to assign to the binding
6674    /// * `description` - The purpose of the input
6675    pub fn with_file_input(
6676        &self,
6677        name: impl Into<String>,
6678        value: impl IntoID<FileId>,
6679        description: impl Into<String>,
6680    ) -> Env {
6681        let mut query = self.selection.select("withFileInput");
6682        query = query.arg("name", name.into());
6683        query = query.arg_lazy(
6684            "value",
6685            Box::new(move || {
6686                let value = value.clone();
6687                Box::pin(async move { value.into_id().await.unwrap().quote() })
6688            }),
6689        );
6690        query = query.arg("description", description.into());
6691        Env {
6692            proc: self.proc.clone(),
6693            selection: query,
6694            graphql_client: self.graphql_client.clone(),
6695        }
6696    }
6697    /// Declare a desired File output to be assigned in the environment
6698    ///
6699    /// # Arguments
6700    ///
6701    /// * `name` - The name of the binding
6702    /// * `description` - A description of the desired value of the binding
6703    pub fn with_file_output(&self, name: impl Into<String>, description: impl Into<String>) -> Env {
6704        let mut query = self.selection.select("withFileOutput");
6705        query = query.arg("name", name.into());
6706        query = query.arg("description", description.into());
6707        Env {
6708            proc: self.proc.clone(),
6709            selection: query,
6710            graphql_client: self.graphql_client.clone(),
6711        }
6712    }
6713    /// Create or update a binding of type GitRef in the environment
6714    ///
6715    /// # Arguments
6716    ///
6717    /// * `name` - The name of the binding
6718    /// * `value` - The GitRef value to assign to the binding
6719    /// * `description` - The purpose of the input
6720    pub fn with_git_ref_input(
6721        &self,
6722        name: impl Into<String>,
6723        value: impl IntoID<GitRefId>,
6724        description: impl Into<String>,
6725    ) -> Env {
6726        let mut query = self.selection.select("withGitRefInput");
6727        query = query.arg("name", name.into());
6728        query = query.arg_lazy(
6729            "value",
6730            Box::new(move || {
6731                let value = value.clone();
6732                Box::pin(async move { value.into_id().await.unwrap().quote() })
6733            }),
6734        );
6735        query = query.arg("description", description.into());
6736        Env {
6737            proc: self.proc.clone(),
6738            selection: query,
6739            graphql_client: self.graphql_client.clone(),
6740        }
6741    }
6742    /// Declare a desired GitRef output to be assigned in the environment
6743    ///
6744    /// # Arguments
6745    ///
6746    /// * `name` - The name of the binding
6747    /// * `description` - A description of the desired value of the binding
6748    pub fn with_git_ref_output(
6749        &self,
6750        name: impl Into<String>,
6751        description: impl Into<String>,
6752    ) -> Env {
6753        let mut query = self.selection.select("withGitRefOutput");
6754        query = query.arg("name", name.into());
6755        query = query.arg("description", description.into());
6756        Env {
6757            proc: self.proc.clone(),
6758            selection: query,
6759            graphql_client: self.graphql_client.clone(),
6760        }
6761    }
6762    /// Create or update a binding of type GitRepository in the environment
6763    ///
6764    /// # Arguments
6765    ///
6766    /// * `name` - The name of the binding
6767    /// * `value` - The GitRepository value to assign to the binding
6768    /// * `description` - The purpose of the input
6769    pub fn with_git_repository_input(
6770        &self,
6771        name: impl Into<String>,
6772        value: impl IntoID<GitRepositoryId>,
6773        description: impl Into<String>,
6774    ) -> Env {
6775        let mut query = self.selection.select("withGitRepositoryInput");
6776        query = query.arg("name", name.into());
6777        query = query.arg_lazy(
6778            "value",
6779            Box::new(move || {
6780                let value = value.clone();
6781                Box::pin(async move { value.into_id().await.unwrap().quote() })
6782            }),
6783        );
6784        query = query.arg("description", description.into());
6785        Env {
6786            proc: self.proc.clone(),
6787            selection: query,
6788            graphql_client: self.graphql_client.clone(),
6789        }
6790    }
6791    /// Declare a desired GitRepository output to be assigned in the environment
6792    ///
6793    /// # Arguments
6794    ///
6795    /// * `name` - The name of the binding
6796    /// * `description` - A description of the desired value of the binding
6797    pub fn with_git_repository_output(
6798        &self,
6799        name: impl Into<String>,
6800        description: impl Into<String>,
6801    ) -> Env {
6802        let mut query = self.selection.select("withGitRepositoryOutput");
6803        query = query.arg("name", name.into());
6804        query = query.arg("description", description.into());
6805        Env {
6806            proc: self.proc.clone(),
6807            selection: query,
6808            graphql_client: self.graphql_client.clone(),
6809        }
6810    }
6811    /// Create or update a binding of type JSONValue in the environment
6812    ///
6813    /// # Arguments
6814    ///
6815    /// * `name` - The name of the binding
6816    /// * `value` - The JSONValue value to assign to the binding
6817    /// * `description` - The purpose of the input
6818    pub fn with_json_value_input(
6819        &self,
6820        name: impl Into<String>,
6821        value: impl IntoID<JsonValueId>,
6822        description: impl Into<String>,
6823    ) -> Env {
6824        let mut query = self.selection.select("withJSONValueInput");
6825        query = query.arg("name", name.into());
6826        query = query.arg_lazy(
6827            "value",
6828            Box::new(move || {
6829                let value = value.clone();
6830                Box::pin(async move { value.into_id().await.unwrap().quote() })
6831            }),
6832        );
6833        query = query.arg("description", description.into());
6834        Env {
6835            proc: self.proc.clone(),
6836            selection: query,
6837            graphql_client: self.graphql_client.clone(),
6838        }
6839    }
6840    /// Declare a desired JSONValue output to be assigned in the environment
6841    ///
6842    /// # Arguments
6843    ///
6844    /// * `name` - The name of the binding
6845    /// * `description` - A description of the desired value of the binding
6846    pub fn with_json_value_output(
6847        &self,
6848        name: impl Into<String>,
6849        description: impl Into<String>,
6850    ) -> Env {
6851        let mut query = self.selection.select("withJSONValueOutput");
6852        query = query.arg("name", name.into());
6853        query = query.arg("description", description.into());
6854        Env {
6855            proc: self.proc.clone(),
6856            selection: query,
6857            graphql_client: self.graphql_client.clone(),
6858        }
6859    }
6860    /// Installs a module into the environment, exposing its functions to the model
6861    /// Contextual path arguments will be populated using the environment's workspace.
6862    pub fn with_module(&self, module: impl IntoID<ModuleId>) -> Env {
6863        let mut query = self.selection.select("withModule");
6864        query = query.arg_lazy(
6865            "module",
6866            Box::new(move || {
6867                let module = module.clone();
6868                Box::pin(async move { module.into_id().await.unwrap().quote() })
6869            }),
6870        );
6871        Env {
6872            proc: self.proc.clone(),
6873            selection: query,
6874            graphql_client: self.graphql_client.clone(),
6875        }
6876    }
6877    /// Create or update a binding of type ModuleConfigClient in the environment
6878    ///
6879    /// # Arguments
6880    ///
6881    /// * `name` - The name of the binding
6882    /// * `value` - The ModuleConfigClient value to assign to the binding
6883    /// * `description` - The purpose of the input
6884    pub fn with_module_config_client_input(
6885        &self,
6886        name: impl Into<String>,
6887        value: impl IntoID<ModuleConfigClientId>,
6888        description: impl Into<String>,
6889    ) -> Env {
6890        let mut query = self.selection.select("withModuleConfigClientInput");
6891        query = query.arg("name", name.into());
6892        query = query.arg_lazy(
6893            "value",
6894            Box::new(move || {
6895                let value = value.clone();
6896                Box::pin(async move { value.into_id().await.unwrap().quote() })
6897            }),
6898        );
6899        query = query.arg("description", description.into());
6900        Env {
6901            proc: self.proc.clone(),
6902            selection: query,
6903            graphql_client: self.graphql_client.clone(),
6904        }
6905    }
6906    /// Declare a desired ModuleConfigClient output to be assigned in the environment
6907    ///
6908    /// # Arguments
6909    ///
6910    /// * `name` - The name of the binding
6911    /// * `description` - A description of the desired value of the binding
6912    pub fn with_module_config_client_output(
6913        &self,
6914        name: impl Into<String>,
6915        description: impl Into<String>,
6916    ) -> Env {
6917        let mut query = self.selection.select("withModuleConfigClientOutput");
6918        query = query.arg("name", name.into());
6919        query = query.arg("description", description.into());
6920        Env {
6921            proc: self.proc.clone(),
6922            selection: query,
6923            graphql_client: self.graphql_client.clone(),
6924        }
6925    }
6926    /// Create or update a binding of type Module in the environment
6927    ///
6928    /// # Arguments
6929    ///
6930    /// * `name` - The name of the binding
6931    /// * `value` - The Module value to assign to the binding
6932    /// * `description` - The purpose of the input
6933    pub fn with_module_input(
6934        &self,
6935        name: impl Into<String>,
6936        value: impl IntoID<ModuleId>,
6937        description: impl Into<String>,
6938    ) -> Env {
6939        let mut query = self.selection.select("withModuleInput");
6940        query = query.arg("name", name.into());
6941        query = query.arg_lazy(
6942            "value",
6943            Box::new(move || {
6944                let value = value.clone();
6945                Box::pin(async move { value.into_id().await.unwrap().quote() })
6946            }),
6947        );
6948        query = query.arg("description", description.into());
6949        Env {
6950            proc: self.proc.clone(),
6951            selection: query,
6952            graphql_client: self.graphql_client.clone(),
6953        }
6954    }
6955    /// Declare a desired Module output to be assigned in the environment
6956    ///
6957    /// # Arguments
6958    ///
6959    /// * `name` - The name of the binding
6960    /// * `description` - A description of the desired value of the binding
6961    pub fn with_module_output(
6962        &self,
6963        name: impl Into<String>,
6964        description: impl Into<String>,
6965    ) -> Env {
6966        let mut query = self.selection.select("withModuleOutput");
6967        query = query.arg("name", name.into());
6968        query = query.arg("description", description.into());
6969        Env {
6970            proc: self.proc.clone(),
6971            selection: query,
6972            graphql_client: self.graphql_client.clone(),
6973        }
6974    }
6975    /// Create or update a binding of type ModuleSource in the environment
6976    ///
6977    /// # Arguments
6978    ///
6979    /// * `name` - The name of the binding
6980    /// * `value` - The ModuleSource value to assign to the binding
6981    /// * `description` - The purpose of the input
6982    pub fn with_module_source_input(
6983        &self,
6984        name: impl Into<String>,
6985        value: impl IntoID<ModuleSourceId>,
6986        description: impl Into<String>,
6987    ) -> Env {
6988        let mut query = self.selection.select("withModuleSourceInput");
6989        query = query.arg("name", name.into());
6990        query = query.arg_lazy(
6991            "value",
6992            Box::new(move || {
6993                let value = value.clone();
6994                Box::pin(async move { value.into_id().await.unwrap().quote() })
6995            }),
6996        );
6997        query = query.arg("description", description.into());
6998        Env {
6999            proc: self.proc.clone(),
7000            selection: query,
7001            graphql_client: self.graphql_client.clone(),
7002        }
7003    }
7004    /// Declare a desired ModuleSource output to be assigned in the environment
7005    ///
7006    /// # Arguments
7007    ///
7008    /// * `name` - The name of the binding
7009    /// * `description` - A description of the desired value of the binding
7010    pub fn with_module_source_output(
7011        &self,
7012        name: impl Into<String>,
7013        description: impl Into<String>,
7014    ) -> Env {
7015        let mut query = self.selection.select("withModuleSourceOutput");
7016        query = query.arg("name", name.into());
7017        query = query.arg("description", description.into());
7018        Env {
7019            proc: self.proc.clone(),
7020            selection: query,
7021            graphql_client: self.graphql_client.clone(),
7022        }
7023    }
7024    /// Create or update a binding of type SearchResult in the environment
7025    ///
7026    /// # Arguments
7027    ///
7028    /// * `name` - The name of the binding
7029    /// * `value` - The SearchResult value to assign to the binding
7030    /// * `description` - The purpose of the input
7031    pub fn with_search_result_input(
7032        &self,
7033        name: impl Into<String>,
7034        value: impl IntoID<SearchResultId>,
7035        description: impl Into<String>,
7036    ) -> Env {
7037        let mut query = self.selection.select("withSearchResultInput");
7038        query = query.arg("name", name.into());
7039        query = query.arg_lazy(
7040            "value",
7041            Box::new(move || {
7042                let value = value.clone();
7043                Box::pin(async move { value.into_id().await.unwrap().quote() })
7044            }),
7045        );
7046        query = query.arg("description", description.into());
7047        Env {
7048            proc: self.proc.clone(),
7049            selection: query,
7050            graphql_client: self.graphql_client.clone(),
7051        }
7052    }
7053    /// Declare a desired SearchResult output to be assigned in the environment
7054    ///
7055    /// # Arguments
7056    ///
7057    /// * `name` - The name of the binding
7058    /// * `description` - A description of the desired value of the binding
7059    pub fn with_search_result_output(
7060        &self,
7061        name: impl Into<String>,
7062        description: impl Into<String>,
7063    ) -> Env {
7064        let mut query = self.selection.select("withSearchResultOutput");
7065        query = query.arg("name", name.into());
7066        query = query.arg("description", description.into());
7067        Env {
7068            proc: self.proc.clone(),
7069            selection: query,
7070            graphql_client: self.graphql_client.clone(),
7071        }
7072    }
7073    /// Create or update a binding of type SearchSubmatch in the environment
7074    ///
7075    /// # Arguments
7076    ///
7077    /// * `name` - The name of the binding
7078    /// * `value` - The SearchSubmatch value to assign to the binding
7079    /// * `description` - The purpose of the input
7080    pub fn with_search_submatch_input(
7081        &self,
7082        name: impl Into<String>,
7083        value: impl IntoID<SearchSubmatchId>,
7084        description: impl Into<String>,
7085    ) -> Env {
7086        let mut query = self.selection.select("withSearchSubmatchInput");
7087        query = query.arg("name", name.into());
7088        query = query.arg_lazy(
7089            "value",
7090            Box::new(move || {
7091                let value = value.clone();
7092                Box::pin(async move { value.into_id().await.unwrap().quote() })
7093            }),
7094        );
7095        query = query.arg("description", description.into());
7096        Env {
7097            proc: self.proc.clone(),
7098            selection: query,
7099            graphql_client: self.graphql_client.clone(),
7100        }
7101    }
7102    /// Declare a desired SearchSubmatch output to be assigned in the environment
7103    ///
7104    /// # Arguments
7105    ///
7106    /// * `name` - The name of the binding
7107    /// * `description` - A description of the desired value of the binding
7108    pub fn with_search_submatch_output(
7109        &self,
7110        name: impl Into<String>,
7111        description: impl Into<String>,
7112    ) -> Env {
7113        let mut query = self.selection.select("withSearchSubmatchOutput");
7114        query = query.arg("name", name.into());
7115        query = query.arg("description", description.into());
7116        Env {
7117            proc: self.proc.clone(),
7118            selection: query,
7119            graphql_client: self.graphql_client.clone(),
7120        }
7121    }
7122    /// Create or update a binding of type Secret in the environment
7123    ///
7124    /// # Arguments
7125    ///
7126    /// * `name` - The name of the binding
7127    /// * `value` - The Secret value to assign to the binding
7128    /// * `description` - The purpose of the input
7129    pub fn with_secret_input(
7130        &self,
7131        name: impl Into<String>,
7132        value: impl IntoID<SecretId>,
7133        description: impl Into<String>,
7134    ) -> Env {
7135        let mut query = self.selection.select("withSecretInput");
7136        query = query.arg("name", name.into());
7137        query = query.arg_lazy(
7138            "value",
7139            Box::new(move || {
7140                let value = value.clone();
7141                Box::pin(async move { value.into_id().await.unwrap().quote() })
7142            }),
7143        );
7144        query = query.arg("description", description.into());
7145        Env {
7146            proc: self.proc.clone(),
7147            selection: query,
7148            graphql_client: self.graphql_client.clone(),
7149        }
7150    }
7151    /// Declare a desired Secret output to be assigned in the environment
7152    ///
7153    /// # Arguments
7154    ///
7155    /// * `name` - The name of the binding
7156    /// * `description` - A description of the desired value of the binding
7157    pub fn with_secret_output(
7158        &self,
7159        name: impl Into<String>,
7160        description: impl Into<String>,
7161    ) -> Env {
7162        let mut query = self.selection.select("withSecretOutput");
7163        query = query.arg("name", name.into());
7164        query = query.arg("description", description.into());
7165        Env {
7166            proc: self.proc.clone(),
7167            selection: query,
7168            graphql_client: self.graphql_client.clone(),
7169        }
7170    }
7171    /// Create or update a binding of type Service in the environment
7172    ///
7173    /// # Arguments
7174    ///
7175    /// * `name` - The name of the binding
7176    /// * `value` - The Service value to assign to the binding
7177    /// * `description` - The purpose of the input
7178    pub fn with_service_input(
7179        &self,
7180        name: impl Into<String>,
7181        value: impl IntoID<ServiceId>,
7182        description: impl Into<String>,
7183    ) -> Env {
7184        let mut query = self.selection.select("withServiceInput");
7185        query = query.arg("name", name.into());
7186        query = query.arg_lazy(
7187            "value",
7188            Box::new(move || {
7189                let value = value.clone();
7190                Box::pin(async move { value.into_id().await.unwrap().quote() })
7191            }),
7192        );
7193        query = query.arg("description", description.into());
7194        Env {
7195            proc: self.proc.clone(),
7196            selection: query,
7197            graphql_client: self.graphql_client.clone(),
7198        }
7199    }
7200    /// Declare a desired Service output to be assigned in the environment
7201    ///
7202    /// # Arguments
7203    ///
7204    /// * `name` - The name of the binding
7205    /// * `description` - A description of the desired value of the binding
7206    pub fn with_service_output(
7207        &self,
7208        name: impl Into<String>,
7209        description: impl Into<String>,
7210    ) -> Env {
7211        let mut query = self.selection.select("withServiceOutput");
7212        query = query.arg("name", name.into());
7213        query = query.arg("description", description.into());
7214        Env {
7215            proc: self.proc.clone(),
7216            selection: query,
7217            graphql_client: self.graphql_client.clone(),
7218        }
7219    }
7220    /// Create or update a binding of type Socket in the environment
7221    ///
7222    /// # Arguments
7223    ///
7224    /// * `name` - The name of the binding
7225    /// * `value` - The Socket value to assign to the binding
7226    /// * `description` - The purpose of the input
7227    pub fn with_socket_input(
7228        &self,
7229        name: impl Into<String>,
7230        value: impl IntoID<SocketId>,
7231        description: impl Into<String>,
7232    ) -> Env {
7233        let mut query = self.selection.select("withSocketInput");
7234        query = query.arg("name", name.into());
7235        query = query.arg_lazy(
7236            "value",
7237            Box::new(move || {
7238                let value = value.clone();
7239                Box::pin(async move { value.into_id().await.unwrap().quote() })
7240            }),
7241        );
7242        query = query.arg("description", description.into());
7243        Env {
7244            proc: self.proc.clone(),
7245            selection: query,
7246            graphql_client: self.graphql_client.clone(),
7247        }
7248    }
7249    /// Declare a desired Socket output to be assigned in the environment
7250    ///
7251    /// # Arguments
7252    ///
7253    /// * `name` - The name of the binding
7254    /// * `description` - A description of the desired value of the binding
7255    pub fn with_socket_output(
7256        &self,
7257        name: impl Into<String>,
7258        description: impl Into<String>,
7259    ) -> Env {
7260        let mut query = self.selection.select("withSocketOutput");
7261        query = query.arg("name", name.into());
7262        query = query.arg("description", description.into());
7263        Env {
7264            proc: self.proc.clone(),
7265            selection: query,
7266            graphql_client: self.graphql_client.clone(),
7267        }
7268    }
7269    /// Provides a string input binding to the environment
7270    ///
7271    /// # Arguments
7272    ///
7273    /// * `name` - The name of the binding
7274    /// * `value` - The string value to assign to the binding
7275    /// * `description` - The description of the input
7276    pub fn with_string_input(
7277        &self,
7278        name: impl Into<String>,
7279        value: impl Into<String>,
7280        description: impl Into<String>,
7281    ) -> Env {
7282        let mut query = self.selection.select("withStringInput");
7283        query = query.arg("name", name.into());
7284        query = query.arg("value", value.into());
7285        query = query.arg("description", description.into());
7286        Env {
7287            proc: self.proc.clone(),
7288            selection: query,
7289            graphql_client: self.graphql_client.clone(),
7290        }
7291    }
7292    /// Declares a desired string output binding
7293    ///
7294    /// # Arguments
7295    ///
7296    /// * `name` - The name of the binding
7297    /// * `description` - The description of the output
7298    pub fn with_string_output(
7299        &self,
7300        name: impl Into<String>,
7301        description: impl Into<String>,
7302    ) -> Env {
7303        let mut query = self.selection.select("withStringOutput");
7304        query = query.arg("name", name.into());
7305        query = query.arg("description", description.into());
7306        Env {
7307            proc: self.proc.clone(),
7308            selection: query,
7309            graphql_client: self.graphql_client.clone(),
7310        }
7311    }
7312    /// Returns a new environment with the provided workspace
7313    ///
7314    /// # Arguments
7315    ///
7316    /// * `workspace` - The directory to set as the host filesystem
7317    pub fn with_workspace(&self, workspace: impl IntoID<DirectoryId>) -> Env {
7318        let mut query = self.selection.select("withWorkspace");
7319        query = query.arg_lazy(
7320            "workspace",
7321            Box::new(move || {
7322                let workspace = workspace.clone();
7323                Box::pin(async move { workspace.into_id().await.unwrap().quote() })
7324            }),
7325        );
7326        Env {
7327            proc: self.proc.clone(),
7328            selection: query,
7329            graphql_client: self.graphql_client.clone(),
7330        }
7331    }
7332    /// Returns a new environment without any outputs
7333    pub fn without_outputs(&self) -> Env {
7334        let query = self.selection.select("withoutOutputs");
7335        Env {
7336            proc: self.proc.clone(),
7337            selection: query,
7338            graphql_client: self.graphql_client.clone(),
7339        }
7340    }
7341    pub fn workspace(&self) -> Directory {
7342        let query = self.selection.select("workspace");
7343        Directory {
7344            proc: self.proc.clone(),
7345            selection: query,
7346            graphql_client: self.graphql_client.clone(),
7347        }
7348    }
7349}
7350#[derive(Clone)]
7351pub struct EnvFile {
7352    pub proc: Option<Arc<DaggerSessionProc>>,
7353    pub selection: Selection,
7354    pub graphql_client: DynGraphQLClient,
7355}
7356#[derive(Builder, Debug, PartialEq)]
7357pub struct EnvFileGetOpts {
7358    /// Return the value exactly as written to the file. No quote removal or variable expansion
7359    #[builder(setter(into, strip_option), default)]
7360    pub raw: Option<bool>,
7361}
7362#[derive(Builder, Debug, PartialEq)]
7363pub struct EnvFileVariablesOpts {
7364    /// Return values exactly as written to the file. No quote removal or variable expansion
7365    #[builder(setter(into, strip_option), default)]
7366    pub raw: Option<bool>,
7367}
7368impl EnvFile {
7369    /// Return as a file
7370    pub fn as_file(&self) -> File {
7371        let query = self.selection.select("asFile");
7372        File {
7373            proc: self.proc.clone(),
7374            selection: query,
7375            graphql_client: self.graphql_client.clone(),
7376        }
7377    }
7378    /// Check if a variable exists
7379    ///
7380    /// # Arguments
7381    ///
7382    /// * `name` - Variable name
7383    pub async fn exists(&self, name: impl Into<String>) -> Result<bool, DaggerError> {
7384        let mut query = self.selection.select("exists");
7385        query = query.arg("name", name.into());
7386        query.execute(self.graphql_client.clone()).await
7387    }
7388    /// Lookup a variable (last occurrence wins) and return its value, or an empty string
7389    ///
7390    /// # Arguments
7391    ///
7392    /// * `name` - Variable name
7393    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7394    pub async fn get(&self, name: impl Into<String>) -> Result<String, DaggerError> {
7395        let mut query = self.selection.select("get");
7396        query = query.arg("name", name.into());
7397        query.execute(self.graphql_client.clone()).await
7398    }
7399    /// Lookup a variable (last occurrence wins) and return its value, or an empty string
7400    ///
7401    /// # Arguments
7402    ///
7403    /// * `name` - Variable name
7404    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7405    pub async fn get_opts(
7406        &self,
7407        name: impl Into<String>,
7408        opts: EnvFileGetOpts,
7409    ) -> Result<String, DaggerError> {
7410        let mut query = self.selection.select("get");
7411        query = query.arg("name", name.into());
7412        if let Some(raw) = opts.raw {
7413            query = query.arg("raw", raw);
7414        }
7415        query.execute(self.graphql_client.clone()).await
7416    }
7417    /// A unique identifier for this EnvFile.
7418    pub async fn id(&self) -> Result<EnvFileId, DaggerError> {
7419        let query = self.selection.select("id");
7420        query.execute(self.graphql_client.clone()).await
7421    }
7422    /// Filters variables by prefix and removes the pref from keys. Variables without the prefix are excluded. For example, with the prefix "MY_APP_" and variables: MY_APP_TOKEN=topsecret MY_APP_NAME=hello FOO=bar the resulting environment will contain: TOKEN=topsecret NAME=hello
7423    ///
7424    /// # Arguments
7425    ///
7426    /// * `prefix` - The prefix to filter by
7427    pub fn namespace(&self, prefix: impl Into<String>) -> EnvFile {
7428        let mut query = self.selection.select("namespace");
7429        query = query.arg("prefix", prefix.into());
7430        EnvFile {
7431            proc: self.proc.clone(),
7432            selection: query,
7433            graphql_client: self.graphql_client.clone(),
7434        }
7435    }
7436    /// Return all variables
7437    ///
7438    /// # Arguments
7439    ///
7440    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7441    pub fn variables(&self) -> Vec<EnvVariable> {
7442        let query = self.selection.select("variables");
7443        vec![EnvVariable {
7444            proc: self.proc.clone(),
7445            selection: query,
7446            graphql_client: self.graphql_client.clone(),
7447        }]
7448    }
7449    /// Return all variables
7450    ///
7451    /// # Arguments
7452    ///
7453    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7454    pub fn variables_opts(&self, opts: EnvFileVariablesOpts) -> Vec<EnvVariable> {
7455        let mut query = self.selection.select("variables");
7456        if let Some(raw) = opts.raw {
7457            query = query.arg("raw", raw);
7458        }
7459        vec![EnvVariable {
7460            proc: self.proc.clone(),
7461            selection: query,
7462            graphql_client: self.graphql_client.clone(),
7463        }]
7464    }
7465    /// Add a variable
7466    ///
7467    /// # Arguments
7468    ///
7469    /// * `name` - Variable name
7470    /// * `value` - Variable value
7471    pub fn with_variable(&self, name: impl Into<String>, value: impl Into<String>) -> EnvFile {
7472        let mut query = self.selection.select("withVariable");
7473        query = query.arg("name", name.into());
7474        query = query.arg("value", value.into());
7475        EnvFile {
7476            proc: self.proc.clone(),
7477            selection: query,
7478            graphql_client: self.graphql_client.clone(),
7479        }
7480    }
7481    /// Remove all occurrences of the named variable
7482    ///
7483    /// # Arguments
7484    ///
7485    /// * `name` - Variable name
7486    pub fn without_variable(&self, name: impl Into<String>) -> EnvFile {
7487        let mut query = self.selection.select("withoutVariable");
7488        query = query.arg("name", name.into());
7489        EnvFile {
7490            proc: self.proc.clone(),
7491            selection: query,
7492            graphql_client: self.graphql_client.clone(),
7493        }
7494    }
7495}
7496#[derive(Clone)]
7497pub struct EnvVariable {
7498    pub proc: Option<Arc<DaggerSessionProc>>,
7499    pub selection: Selection,
7500    pub graphql_client: DynGraphQLClient,
7501}
7502impl EnvVariable {
7503    /// A unique identifier for this EnvVariable.
7504    pub async fn id(&self) -> Result<EnvVariableId, DaggerError> {
7505        let query = self.selection.select("id");
7506        query.execute(self.graphql_client.clone()).await
7507    }
7508    /// The environment variable name.
7509    pub async fn name(&self) -> Result<String, DaggerError> {
7510        let query = self.selection.select("name");
7511        query.execute(self.graphql_client.clone()).await
7512    }
7513    /// The environment variable value.
7514    pub async fn value(&self) -> Result<String, DaggerError> {
7515        let query = self.selection.select("value");
7516        query.execute(self.graphql_client.clone()).await
7517    }
7518}
7519#[derive(Clone)]
7520pub struct Error {
7521    pub proc: Option<Arc<DaggerSessionProc>>,
7522    pub selection: Selection,
7523    pub graphql_client: DynGraphQLClient,
7524}
7525impl Error {
7526    /// A unique identifier for this Error.
7527    pub async fn id(&self) -> Result<ErrorId, DaggerError> {
7528        let query = self.selection.select("id");
7529        query.execute(self.graphql_client.clone()).await
7530    }
7531    /// A description of the error.
7532    pub async fn message(&self) -> Result<String, DaggerError> {
7533        let query = self.selection.select("message");
7534        query.execute(self.graphql_client.clone()).await
7535    }
7536    /// The extensions of the error.
7537    pub fn values(&self) -> Vec<ErrorValue> {
7538        let query = self.selection.select("values");
7539        vec![ErrorValue {
7540            proc: self.proc.clone(),
7541            selection: query,
7542            graphql_client: self.graphql_client.clone(),
7543        }]
7544    }
7545    /// Add a value to the error.
7546    ///
7547    /// # Arguments
7548    ///
7549    /// * `name` - The name of the value.
7550    /// * `value` - The value to store on the error.
7551    pub fn with_value(&self, name: impl Into<String>, value: Json) -> Error {
7552        let mut query = self.selection.select("withValue");
7553        query = query.arg("name", name.into());
7554        query = query.arg("value", value);
7555        Error {
7556            proc: self.proc.clone(),
7557            selection: query,
7558            graphql_client: self.graphql_client.clone(),
7559        }
7560    }
7561}
7562#[derive(Clone)]
7563pub struct ErrorValue {
7564    pub proc: Option<Arc<DaggerSessionProc>>,
7565    pub selection: Selection,
7566    pub graphql_client: DynGraphQLClient,
7567}
7568impl ErrorValue {
7569    /// A unique identifier for this ErrorValue.
7570    pub async fn id(&self) -> Result<ErrorValueId, DaggerError> {
7571        let query = self.selection.select("id");
7572        query.execute(self.graphql_client.clone()).await
7573    }
7574    /// The name of the value.
7575    pub async fn name(&self) -> Result<String, DaggerError> {
7576        let query = self.selection.select("name");
7577        query.execute(self.graphql_client.clone()).await
7578    }
7579    /// The value.
7580    pub async fn value(&self) -> Result<Json, DaggerError> {
7581        let query = self.selection.select("value");
7582        query.execute(self.graphql_client.clone()).await
7583    }
7584}
7585#[derive(Clone)]
7586pub struct FieldTypeDef {
7587    pub proc: Option<Arc<DaggerSessionProc>>,
7588    pub selection: Selection,
7589    pub graphql_client: DynGraphQLClient,
7590}
7591impl FieldTypeDef {
7592    /// A doc string for the field, if any.
7593    pub async fn description(&self) -> Result<String, DaggerError> {
7594        let query = self.selection.select("description");
7595        query.execute(self.graphql_client.clone()).await
7596    }
7597    /// A unique identifier for this FieldTypeDef.
7598    pub async fn id(&self) -> Result<FieldTypeDefId, DaggerError> {
7599        let query = self.selection.select("id");
7600        query.execute(self.graphql_client.clone()).await
7601    }
7602    /// The name of the field in lowerCamelCase format.
7603    pub async fn name(&self) -> Result<String, DaggerError> {
7604        let query = self.selection.select("name");
7605        query.execute(self.graphql_client.clone()).await
7606    }
7607    /// The location of this field declaration.
7608    pub fn source_map(&self) -> SourceMap {
7609        let query = self.selection.select("sourceMap");
7610        SourceMap {
7611            proc: self.proc.clone(),
7612            selection: query,
7613            graphql_client: self.graphql_client.clone(),
7614        }
7615    }
7616    /// The type of the field.
7617    pub fn type_def(&self) -> TypeDef {
7618        let query = self.selection.select("typeDef");
7619        TypeDef {
7620            proc: self.proc.clone(),
7621            selection: query,
7622            graphql_client: self.graphql_client.clone(),
7623        }
7624    }
7625}
7626#[derive(Clone)]
7627pub struct File {
7628    pub proc: Option<Arc<DaggerSessionProc>>,
7629    pub selection: Selection,
7630    pub graphql_client: DynGraphQLClient,
7631}
7632#[derive(Builder, Debug, PartialEq)]
7633pub struct FileAsEnvFileOpts {
7634    /// Replace "${VAR}" or "$VAR" with the value of other vars
7635    #[builder(setter(into, strip_option), default)]
7636    pub expand: Option<bool>,
7637}
7638#[derive(Builder, Debug, PartialEq)]
7639pub struct FileContentsOpts {
7640    /// Maximum number of lines to read
7641    #[builder(setter(into, strip_option), default)]
7642    pub limit_lines: Option<isize>,
7643    /// Start reading after this line
7644    #[builder(setter(into, strip_option), default)]
7645    pub offset_lines: Option<isize>,
7646}
7647#[derive(Builder, Debug, PartialEq)]
7648pub struct FileDigestOpts {
7649    /// If true, exclude metadata from the digest.
7650    #[builder(setter(into, strip_option), default)]
7651    pub exclude_metadata: Option<bool>,
7652}
7653#[derive(Builder, Debug, PartialEq)]
7654pub struct FileExportOpts {
7655    /// If allowParentDirPath is true, the path argument can be a directory path, in which case the file will be created in that directory.
7656    #[builder(setter(into, strip_option), default)]
7657    pub allow_parent_dir_path: Option<bool>,
7658}
7659#[derive(Builder, Debug, PartialEq)]
7660pub struct FileSearchOpts<'a> {
7661    /// Allow the . pattern to match newlines in multiline mode.
7662    #[builder(setter(into, strip_option), default)]
7663    pub dotall: Option<bool>,
7664    /// Only return matching files, not lines and content
7665    #[builder(setter(into, strip_option), default)]
7666    pub files_only: Option<bool>,
7667    #[builder(setter(into, strip_option), default)]
7668    pub globs: Option<Vec<&'a str>>,
7669    /// Enable case-insensitive matching.
7670    #[builder(setter(into, strip_option), default)]
7671    pub insensitive: Option<bool>,
7672    /// Limit the number of results to return
7673    #[builder(setter(into, strip_option), default)]
7674    pub limit: Option<isize>,
7675    /// Interpret the pattern as a literal string instead of a regular expression.
7676    #[builder(setter(into, strip_option), default)]
7677    pub literal: Option<bool>,
7678    /// Enable searching across multiple lines.
7679    #[builder(setter(into, strip_option), default)]
7680    pub multiline: Option<bool>,
7681    #[builder(setter(into, strip_option), default)]
7682    pub paths: Option<Vec<&'a str>>,
7683    /// Skip hidden files (files starting with .).
7684    #[builder(setter(into, strip_option), default)]
7685    pub skip_hidden: Option<bool>,
7686    /// Honor .gitignore, .ignore, and .rgignore files.
7687    #[builder(setter(into, strip_option), default)]
7688    pub skip_ignored: Option<bool>,
7689}
7690#[derive(Builder, Debug, PartialEq)]
7691pub struct FileWithReplacedOpts {
7692    /// Replace all occurrences of the pattern.
7693    #[builder(setter(into, strip_option), default)]
7694    pub all: Option<bool>,
7695    /// Replace the first match starting from the specified line.
7696    #[builder(setter(into, strip_option), default)]
7697    pub first_from: Option<isize>,
7698}
7699impl File {
7700    /// Parse as an env file
7701    ///
7702    /// # Arguments
7703    ///
7704    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7705    pub fn as_env_file(&self) -> EnvFile {
7706        let query = self.selection.select("asEnvFile");
7707        EnvFile {
7708            proc: self.proc.clone(),
7709            selection: query,
7710            graphql_client: self.graphql_client.clone(),
7711        }
7712    }
7713    /// Parse as an env file
7714    ///
7715    /// # Arguments
7716    ///
7717    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7718    pub fn as_env_file_opts(&self, opts: FileAsEnvFileOpts) -> EnvFile {
7719        let mut query = self.selection.select("asEnvFile");
7720        if let Some(expand) = opts.expand {
7721            query = query.arg("expand", expand);
7722        }
7723        EnvFile {
7724            proc: self.proc.clone(),
7725            selection: query,
7726            graphql_client: self.graphql_client.clone(),
7727        }
7728    }
7729    /// Change the owner of the file recursively.
7730    ///
7731    /// # Arguments
7732    ///
7733    /// * `owner` - A user:group to set for the file.
7734    ///
7735    /// The user and group must be an ID (1000:1000), not a name (foo:bar).
7736    ///
7737    /// If the group is omitted, it defaults to the same as the user.
7738    pub fn chown(&self, owner: impl Into<String>) -> File {
7739        let mut query = self.selection.select("chown");
7740        query = query.arg("owner", owner.into());
7741        File {
7742            proc: self.proc.clone(),
7743            selection: query,
7744            graphql_client: self.graphql_client.clone(),
7745        }
7746    }
7747    /// Retrieves the contents of the file.
7748    ///
7749    /// # Arguments
7750    ///
7751    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7752    pub async fn contents(&self) -> Result<String, DaggerError> {
7753        let query = self.selection.select("contents");
7754        query.execute(self.graphql_client.clone()).await
7755    }
7756    /// Retrieves the contents of the file.
7757    ///
7758    /// # Arguments
7759    ///
7760    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7761    pub async fn contents_opts(&self, opts: FileContentsOpts) -> Result<String, DaggerError> {
7762        let mut query = self.selection.select("contents");
7763        if let Some(offset_lines) = opts.offset_lines {
7764            query = query.arg("offsetLines", offset_lines);
7765        }
7766        if let Some(limit_lines) = opts.limit_lines {
7767            query = query.arg("limitLines", limit_lines);
7768        }
7769        query.execute(self.graphql_client.clone()).await
7770    }
7771    /// 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.
7772    ///
7773    /// # Arguments
7774    ///
7775    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7776    pub async fn digest(&self) -> Result<String, DaggerError> {
7777        let query = self.selection.select("digest");
7778        query.execute(self.graphql_client.clone()).await
7779    }
7780    /// 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.
7781    ///
7782    /// # Arguments
7783    ///
7784    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7785    pub async fn digest_opts(&self, opts: FileDigestOpts) -> Result<String, DaggerError> {
7786        let mut query = self.selection.select("digest");
7787        if let Some(exclude_metadata) = opts.exclude_metadata {
7788            query = query.arg("excludeMetadata", exclude_metadata);
7789        }
7790        query.execute(self.graphql_client.clone()).await
7791    }
7792    /// Writes the file to a file path on the host.
7793    ///
7794    /// # Arguments
7795    ///
7796    /// * `path` - Location of the written directory (e.g., "output.txt").
7797    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7798    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
7799        let mut query = self.selection.select("export");
7800        query = query.arg("path", path.into());
7801        query.execute(self.graphql_client.clone()).await
7802    }
7803    /// Writes the file to a file path on the host.
7804    ///
7805    /// # Arguments
7806    ///
7807    /// * `path` - Location of the written directory (e.g., "output.txt").
7808    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7809    pub async fn export_opts(
7810        &self,
7811        path: impl Into<String>,
7812        opts: FileExportOpts,
7813    ) -> Result<String, DaggerError> {
7814        let mut query = self.selection.select("export");
7815        query = query.arg("path", path.into());
7816        if let Some(allow_parent_dir_path) = opts.allow_parent_dir_path {
7817            query = query.arg("allowParentDirPath", allow_parent_dir_path);
7818        }
7819        query.execute(self.graphql_client.clone()).await
7820    }
7821    /// A unique identifier for this File.
7822    pub async fn id(&self) -> Result<FileId, DaggerError> {
7823        let query = self.selection.select("id");
7824        query.execute(self.graphql_client.clone()).await
7825    }
7826    /// Retrieves the name of the file.
7827    pub async fn name(&self) -> Result<String, DaggerError> {
7828        let query = self.selection.select("name");
7829        query.execute(self.graphql_client.clone()).await
7830    }
7831    /// Searches for content matching the given regular expression or literal string.
7832    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
7833    ///
7834    /// # Arguments
7835    ///
7836    /// * `pattern` - The text to match.
7837    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7838    pub fn search(&self, pattern: impl Into<String>) -> Vec<SearchResult> {
7839        let mut query = self.selection.select("search");
7840        query = query.arg("pattern", pattern.into());
7841        vec![SearchResult {
7842            proc: self.proc.clone(),
7843            selection: query,
7844            graphql_client: self.graphql_client.clone(),
7845        }]
7846    }
7847    /// Searches for content matching the given regular expression or literal string.
7848    /// Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.
7849    ///
7850    /// # Arguments
7851    ///
7852    /// * `pattern` - The text to match.
7853    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7854    pub fn search_opts<'a>(
7855        &self,
7856        pattern: impl Into<String>,
7857        opts: FileSearchOpts<'a>,
7858    ) -> Vec<SearchResult> {
7859        let mut query = self.selection.select("search");
7860        query = query.arg("pattern", pattern.into());
7861        if let Some(literal) = opts.literal {
7862            query = query.arg("literal", literal);
7863        }
7864        if let Some(multiline) = opts.multiline {
7865            query = query.arg("multiline", multiline);
7866        }
7867        if let Some(dotall) = opts.dotall {
7868            query = query.arg("dotall", dotall);
7869        }
7870        if let Some(insensitive) = opts.insensitive {
7871            query = query.arg("insensitive", insensitive);
7872        }
7873        if let Some(skip_ignored) = opts.skip_ignored {
7874            query = query.arg("skipIgnored", skip_ignored);
7875        }
7876        if let Some(skip_hidden) = opts.skip_hidden {
7877            query = query.arg("skipHidden", skip_hidden);
7878        }
7879        if let Some(files_only) = opts.files_only {
7880            query = query.arg("filesOnly", files_only);
7881        }
7882        if let Some(limit) = opts.limit {
7883            query = query.arg("limit", limit);
7884        }
7885        if let Some(paths) = opts.paths {
7886            query = query.arg("paths", paths);
7887        }
7888        if let Some(globs) = opts.globs {
7889            query = query.arg("globs", globs);
7890        }
7891        vec![SearchResult {
7892            proc: self.proc.clone(),
7893            selection: query,
7894            graphql_client: self.graphql_client.clone(),
7895        }]
7896    }
7897    /// Retrieves the size of the file, in bytes.
7898    pub async fn size(&self) -> Result<isize, DaggerError> {
7899        let query = self.selection.select("size");
7900        query.execute(self.graphql_client.clone()).await
7901    }
7902    /// Force evaluation in the engine.
7903    pub async fn sync(&self) -> Result<FileId, DaggerError> {
7904        let query = self.selection.select("sync");
7905        query.execute(self.graphql_client.clone()).await
7906    }
7907    /// Retrieves this file with its name set to the given name.
7908    ///
7909    /// # Arguments
7910    ///
7911    /// * `name` - Name to set file to.
7912    pub fn with_name(&self, name: impl Into<String>) -> File {
7913        let mut query = self.selection.select("withName");
7914        query = query.arg("name", name.into());
7915        File {
7916            proc: self.proc.clone(),
7917            selection: query,
7918            graphql_client: self.graphql_client.clone(),
7919        }
7920    }
7921    /// Retrieves the file with content replaced with the given text.
7922    /// If 'all' is true, all occurrences of the pattern will be replaced.
7923    /// If 'firstAfter' is specified, only the first match starting at the specified line will be replaced.
7924    /// If neither are specified, and there are multiple matches for the pattern, this will error.
7925    /// If there are no matches for the pattern, this will error.
7926    ///
7927    /// # Arguments
7928    ///
7929    /// * `search` - The text to match.
7930    /// * `replacement` - The text to match.
7931    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7932    pub fn with_replaced(&self, search: impl Into<String>, replacement: impl Into<String>) -> File {
7933        let mut query = self.selection.select("withReplaced");
7934        query = query.arg("search", search.into());
7935        query = query.arg("replacement", replacement.into());
7936        File {
7937            proc: self.proc.clone(),
7938            selection: query,
7939            graphql_client: self.graphql_client.clone(),
7940        }
7941    }
7942    /// Retrieves the file with content replaced with the given text.
7943    /// If 'all' is true, all occurrences of the pattern will be replaced.
7944    /// If 'firstAfter' is specified, only the first match starting at the specified line will be replaced.
7945    /// If neither are specified, and there are multiple matches for the pattern, this will error.
7946    /// If there are no matches for the pattern, this will error.
7947    ///
7948    /// # Arguments
7949    ///
7950    /// * `search` - The text to match.
7951    /// * `replacement` - The text to match.
7952    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
7953    pub fn with_replaced_opts(
7954        &self,
7955        search: impl Into<String>,
7956        replacement: impl Into<String>,
7957        opts: FileWithReplacedOpts,
7958    ) -> File {
7959        let mut query = self.selection.select("withReplaced");
7960        query = query.arg("search", search.into());
7961        query = query.arg("replacement", replacement.into());
7962        if let Some(all) = opts.all {
7963            query = query.arg("all", all);
7964        }
7965        if let Some(first_from) = opts.first_from {
7966            query = query.arg("firstFrom", first_from);
7967        }
7968        File {
7969            proc: self.proc.clone(),
7970            selection: query,
7971            graphql_client: self.graphql_client.clone(),
7972        }
7973    }
7974    /// Retrieves this file with its created/modified timestamps set to the given time.
7975    ///
7976    /// # Arguments
7977    ///
7978    /// * `timestamp` - Timestamp to set dir/files in.
7979    ///
7980    /// Formatted in seconds following Unix epoch (e.g., 1672531199).
7981    pub fn with_timestamps(&self, timestamp: isize) -> File {
7982        let mut query = self.selection.select("withTimestamps");
7983        query = query.arg("timestamp", timestamp);
7984        File {
7985            proc: self.proc.clone(),
7986            selection: query,
7987            graphql_client: self.graphql_client.clone(),
7988        }
7989    }
7990}
7991#[derive(Clone)]
7992pub struct Function {
7993    pub proc: Option<Arc<DaggerSessionProc>>,
7994    pub selection: Selection,
7995    pub graphql_client: DynGraphQLClient,
7996}
7997#[derive(Builder, Debug, PartialEq)]
7998pub struct FunctionWithArgOpts<'a> {
7999    /// If the argument is a Directory or File type, default to load path from context directory, relative to root directory.
8000    #[builder(setter(into, strip_option), default)]
8001    pub default_path: Option<&'a str>,
8002    /// A default value to use for this argument if not explicitly set by the caller, if any
8003    #[builder(setter(into, strip_option), default)]
8004    pub default_value: Option<Json>,
8005    /// A doc string for the argument, if any
8006    #[builder(setter(into, strip_option), default)]
8007    pub description: Option<&'a str>,
8008    /// Patterns to ignore when loading the contextual argument value.
8009    #[builder(setter(into, strip_option), default)]
8010    pub ignore: Option<Vec<&'a str>>,
8011    /// The source map for the argument definition.
8012    #[builder(setter(into, strip_option), default)]
8013    pub source_map: Option<SourceMapId>,
8014}
8015impl Function {
8016    /// Arguments accepted by the function, if any.
8017    pub fn args(&self) -> Vec<FunctionArg> {
8018        let query = self.selection.select("args");
8019        vec![FunctionArg {
8020            proc: self.proc.clone(),
8021            selection: query,
8022            graphql_client: self.graphql_client.clone(),
8023        }]
8024    }
8025    /// A doc string for the function, if any.
8026    pub async fn description(&self) -> Result<String, DaggerError> {
8027        let query = self.selection.select("description");
8028        query.execute(self.graphql_client.clone()).await
8029    }
8030    /// A unique identifier for this Function.
8031    pub async fn id(&self) -> Result<FunctionId, DaggerError> {
8032        let query = self.selection.select("id");
8033        query.execute(self.graphql_client.clone()).await
8034    }
8035    /// The name of the function.
8036    pub async fn name(&self) -> Result<String, DaggerError> {
8037        let query = self.selection.select("name");
8038        query.execute(self.graphql_client.clone()).await
8039    }
8040    /// The type returned by the function.
8041    pub fn return_type(&self) -> TypeDef {
8042        let query = self.selection.select("returnType");
8043        TypeDef {
8044            proc: self.proc.clone(),
8045            selection: query,
8046            graphql_client: self.graphql_client.clone(),
8047        }
8048    }
8049    /// The location of this function declaration.
8050    pub fn source_map(&self) -> SourceMap {
8051        let query = self.selection.select("sourceMap");
8052        SourceMap {
8053            proc: self.proc.clone(),
8054            selection: query,
8055            graphql_client: self.graphql_client.clone(),
8056        }
8057    }
8058    /// Returns the function with the provided argument
8059    ///
8060    /// # Arguments
8061    ///
8062    /// * `name` - The name of the argument
8063    /// * `type_def` - The type of the argument
8064    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8065    pub fn with_arg(&self, name: impl Into<String>, type_def: impl IntoID<TypeDefId>) -> Function {
8066        let mut query = self.selection.select("withArg");
8067        query = query.arg("name", name.into());
8068        query = query.arg_lazy(
8069            "typeDef",
8070            Box::new(move || {
8071                let type_def = type_def.clone();
8072                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
8073            }),
8074        );
8075        Function {
8076            proc: self.proc.clone(),
8077            selection: query,
8078            graphql_client: self.graphql_client.clone(),
8079        }
8080    }
8081    /// Returns the function with the provided argument
8082    ///
8083    /// # Arguments
8084    ///
8085    /// * `name` - The name of the argument
8086    /// * `type_def` - The type of the argument
8087    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8088    pub fn with_arg_opts<'a>(
8089        &self,
8090        name: impl Into<String>,
8091        type_def: impl IntoID<TypeDefId>,
8092        opts: FunctionWithArgOpts<'a>,
8093    ) -> Function {
8094        let mut query = self.selection.select("withArg");
8095        query = query.arg("name", name.into());
8096        query = query.arg_lazy(
8097            "typeDef",
8098            Box::new(move || {
8099                let type_def = type_def.clone();
8100                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
8101            }),
8102        );
8103        if let Some(description) = opts.description {
8104            query = query.arg("description", description);
8105        }
8106        if let Some(default_value) = opts.default_value {
8107            query = query.arg("defaultValue", default_value);
8108        }
8109        if let Some(default_path) = opts.default_path {
8110            query = query.arg("defaultPath", default_path);
8111        }
8112        if let Some(ignore) = opts.ignore {
8113            query = query.arg("ignore", ignore);
8114        }
8115        if let Some(source_map) = opts.source_map {
8116            query = query.arg("sourceMap", source_map);
8117        }
8118        Function {
8119            proc: self.proc.clone(),
8120            selection: query,
8121            graphql_client: self.graphql_client.clone(),
8122        }
8123    }
8124    /// Returns the function with the given doc string.
8125    ///
8126    /// # Arguments
8127    ///
8128    /// * `description` - The doc string to set.
8129    pub fn with_description(&self, description: impl Into<String>) -> Function {
8130        let mut query = self.selection.select("withDescription");
8131        query = query.arg("description", description.into());
8132        Function {
8133            proc: self.proc.clone(),
8134            selection: query,
8135            graphql_client: self.graphql_client.clone(),
8136        }
8137    }
8138    /// Returns the function with the given source map.
8139    ///
8140    /// # Arguments
8141    ///
8142    /// * `source_map` - The source map for the function definition.
8143    pub fn with_source_map(&self, source_map: impl IntoID<SourceMapId>) -> Function {
8144        let mut query = self.selection.select("withSourceMap");
8145        query = query.arg_lazy(
8146            "sourceMap",
8147            Box::new(move || {
8148                let source_map = source_map.clone();
8149                Box::pin(async move { source_map.into_id().await.unwrap().quote() })
8150            }),
8151        );
8152        Function {
8153            proc: self.proc.clone(),
8154            selection: query,
8155            graphql_client: self.graphql_client.clone(),
8156        }
8157    }
8158}
8159#[derive(Clone)]
8160pub struct FunctionArg {
8161    pub proc: Option<Arc<DaggerSessionProc>>,
8162    pub selection: Selection,
8163    pub graphql_client: DynGraphQLClient,
8164}
8165impl FunctionArg {
8166    /// 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
8167    pub async fn default_path(&self) -> Result<String, DaggerError> {
8168        let query = self.selection.select("defaultPath");
8169        query.execute(self.graphql_client.clone()).await
8170    }
8171    /// A default value to use for this argument when not explicitly set by the caller, if any.
8172    pub async fn default_value(&self) -> Result<Json, DaggerError> {
8173        let query = self.selection.select("defaultValue");
8174        query.execute(self.graphql_client.clone()).await
8175    }
8176    /// A doc string for the argument, if any.
8177    pub async fn description(&self) -> Result<String, DaggerError> {
8178        let query = self.selection.select("description");
8179        query.execute(self.graphql_client.clone()).await
8180    }
8181    /// A unique identifier for this FunctionArg.
8182    pub async fn id(&self) -> Result<FunctionArgId, DaggerError> {
8183        let query = self.selection.select("id");
8184        query.execute(self.graphql_client.clone()).await
8185    }
8186    /// 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.
8187    pub async fn ignore(&self) -> Result<Vec<String>, DaggerError> {
8188        let query = self.selection.select("ignore");
8189        query.execute(self.graphql_client.clone()).await
8190    }
8191    /// The name of the argument in lowerCamelCase format.
8192    pub async fn name(&self) -> Result<String, DaggerError> {
8193        let query = self.selection.select("name");
8194        query.execute(self.graphql_client.clone()).await
8195    }
8196    /// The location of this arg declaration.
8197    pub fn source_map(&self) -> SourceMap {
8198        let query = self.selection.select("sourceMap");
8199        SourceMap {
8200            proc: self.proc.clone(),
8201            selection: query,
8202            graphql_client: self.graphql_client.clone(),
8203        }
8204    }
8205    /// The type of the argument.
8206    pub fn type_def(&self) -> TypeDef {
8207        let query = self.selection.select("typeDef");
8208        TypeDef {
8209            proc: self.proc.clone(),
8210            selection: query,
8211            graphql_client: self.graphql_client.clone(),
8212        }
8213    }
8214}
8215#[derive(Clone)]
8216pub struct FunctionCall {
8217    pub proc: Option<Arc<DaggerSessionProc>>,
8218    pub selection: Selection,
8219    pub graphql_client: DynGraphQLClient,
8220}
8221impl FunctionCall {
8222    /// A unique identifier for this FunctionCall.
8223    pub async fn id(&self) -> Result<FunctionCallId, DaggerError> {
8224        let query = self.selection.select("id");
8225        query.execute(self.graphql_client.clone()).await
8226    }
8227    /// The argument values the function is being invoked with.
8228    pub fn input_args(&self) -> Vec<FunctionCallArgValue> {
8229        let query = self.selection.select("inputArgs");
8230        vec![FunctionCallArgValue {
8231            proc: self.proc.clone(),
8232            selection: query,
8233            graphql_client: self.graphql_client.clone(),
8234        }]
8235    }
8236    /// The name of the function being called.
8237    pub async fn name(&self) -> Result<String, DaggerError> {
8238        let query = self.selection.select("name");
8239        query.execute(self.graphql_client.clone()).await
8240    }
8241    /// 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.
8242    pub async fn parent(&self) -> Result<Json, DaggerError> {
8243        let query = self.selection.select("parent");
8244        query.execute(self.graphql_client.clone()).await
8245    }
8246    /// 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.
8247    pub async fn parent_name(&self) -> Result<String, DaggerError> {
8248        let query = self.selection.select("parentName");
8249        query.execute(self.graphql_client.clone()).await
8250    }
8251    /// Return an error from the function.
8252    ///
8253    /// # Arguments
8254    ///
8255    /// * `error` - The error to return.
8256    pub async fn return_error(&self, error: impl IntoID<ErrorId>) -> Result<Void, DaggerError> {
8257        let mut query = self.selection.select("returnError");
8258        query = query.arg_lazy(
8259            "error",
8260            Box::new(move || {
8261                let error = error.clone();
8262                Box::pin(async move { error.into_id().await.unwrap().quote() })
8263            }),
8264        );
8265        query.execute(self.graphql_client.clone()).await
8266    }
8267    /// Set the return value of the function call to the provided value.
8268    ///
8269    /// # Arguments
8270    ///
8271    /// * `value` - JSON serialization of the return value.
8272    pub async fn return_value(&self, value: Json) -> Result<Void, DaggerError> {
8273        let mut query = self.selection.select("returnValue");
8274        query = query.arg("value", value);
8275        query.execute(self.graphql_client.clone()).await
8276    }
8277}
8278#[derive(Clone)]
8279pub struct FunctionCallArgValue {
8280    pub proc: Option<Arc<DaggerSessionProc>>,
8281    pub selection: Selection,
8282    pub graphql_client: DynGraphQLClient,
8283}
8284impl FunctionCallArgValue {
8285    /// A unique identifier for this FunctionCallArgValue.
8286    pub async fn id(&self) -> Result<FunctionCallArgValueId, DaggerError> {
8287        let query = self.selection.select("id");
8288        query.execute(self.graphql_client.clone()).await
8289    }
8290    /// The name of the argument.
8291    pub async fn name(&self) -> Result<String, DaggerError> {
8292        let query = self.selection.select("name");
8293        query.execute(self.graphql_client.clone()).await
8294    }
8295    /// The value of the argument represented as a JSON serialized string.
8296    pub async fn value(&self) -> Result<Json, DaggerError> {
8297        let query = self.selection.select("value");
8298        query.execute(self.graphql_client.clone()).await
8299    }
8300}
8301#[derive(Clone)]
8302pub struct GeneratedCode {
8303    pub proc: Option<Arc<DaggerSessionProc>>,
8304    pub selection: Selection,
8305    pub graphql_client: DynGraphQLClient,
8306}
8307impl GeneratedCode {
8308    /// The directory containing the generated code.
8309    pub fn code(&self) -> Directory {
8310        let query = self.selection.select("code");
8311        Directory {
8312            proc: self.proc.clone(),
8313            selection: query,
8314            graphql_client: self.graphql_client.clone(),
8315        }
8316    }
8317    /// A unique identifier for this GeneratedCode.
8318    pub async fn id(&self) -> Result<GeneratedCodeId, DaggerError> {
8319        let query = self.selection.select("id");
8320        query.execute(self.graphql_client.clone()).await
8321    }
8322    /// List of paths to mark generated in version control (i.e. .gitattributes).
8323    pub async fn vcs_generated_paths(&self) -> Result<Vec<String>, DaggerError> {
8324        let query = self.selection.select("vcsGeneratedPaths");
8325        query.execute(self.graphql_client.clone()).await
8326    }
8327    /// List of paths to ignore in version control (i.e. .gitignore).
8328    pub async fn vcs_ignored_paths(&self) -> Result<Vec<String>, DaggerError> {
8329        let query = self.selection.select("vcsIgnoredPaths");
8330        query.execute(self.graphql_client.clone()).await
8331    }
8332    /// Set the list of paths to mark generated in version control.
8333    pub fn with_vcs_generated_paths(&self, paths: Vec<impl Into<String>>) -> GeneratedCode {
8334        let mut query = self.selection.select("withVCSGeneratedPaths");
8335        query = query.arg(
8336            "paths",
8337            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
8338        );
8339        GeneratedCode {
8340            proc: self.proc.clone(),
8341            selection: query,
8342            graphql_client: self.graphql_client.clone(),
8343        }
8344    }
8345    /// Set the list of paths to ignore in version control.
8346    pub fn with_vcs_ignored_paths(&self, paths: Vec<impl Into<String>>) -> GeneratedCode {
8347        let mut query = self.selection.select("withVCSIgnoredPaths");
8348        query = query.arg(
8349            "paths",
8350            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
8351        );
8352        GeneratedCode {
8353            proc: self.proc.clone(),
8354            selection: query,
8355            graphql_client: self.graphql_client.clone(),
8356        }
8357    }
8358}
8359#[derive(Clone)]
8360pub struct GitRef {
8361    pub proc: Option<Arc<DaggerSessionProc>>,
8362    pub selection: Selection,
8363    pub graphql_client: DynGraphQLClient,
8364}
8365#[derive(Builder, Debug, PartialEq)]
8366pub struct GitRefTreeOpts {
8367    /// The depth of the tree to fetch.
8368    #[builder(setter(into, strip_option), default)]
8369    pub depth: Option<isize>,
8370    /// Set to true to discard .git directory.
8371    #[builder(setter(into, strip_option), default)]
8372    pub discard_git_dir: Option<bool>,
8373}
8374impl GitRef {
8375    /// The resolved commit id at this ref.
8376    pub async fn commit(&self) -> Result<String, DaggerError> {
8377        let query = self.selection.select("commit");
8378        query.execute(self.graphql_client.clone()).await
8379    }
8380    /// Find the best common ancestor between this ref and another ref.
8381    ///
8382    /// # Arguments
8383    ///
8384    /// * `other` - The other ref to compare against.
8385    pub fn common_ancestor(&self, other: impl IntoID<GitRefId>) -> GitRef {
8386        let mut query = self.selection.select("commonAncestor");
8387        query = query.arg_lazy(
8388            "other",
8389            Box::new(move || {
8390                let other = other.clone();
8391                Box::pin(async move { other.into_id().await.unwrap().quote() })
8392            }),
8393        );
8394        GitRef {
8395            proc: self.proc.clone(),
8396            selection: query,
8397            graphql_client: self.graphql_client.clone(),
8398        }
8399    }
8400    /// A unique identifier for this GitRef.
8401    pub async fn id(&self) -> Result<GitRefId, DaggerError> {
8402        let query = self.selection.select("id");
8403        query.execute(self.graphql_client.clone()).await
8404    }
8405    /// The resolved ref name at this ref.
8406    pub async fn r#ref(&self) -> Result<String, DaggerError> {
8407        let query = self.selection.select("ref");
8408        query.execute(self.graphql_client.clone()).await
8409    }
8410    /// The filesystem tree at this ref.
8411    ///
8412    /// # Arguments
8413    ///
8414    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8415    pub fn tree(&self) -> Directory {
8416        let query = self.selection.select("tree");
8417        Directory {
8418            proc: self.proc.clone(),
8419            selection: query,
8420            graphql_client: self.graphql_client.clone(),
8421        }
8422    }
8423    /// The filesystem tree at this ref.
8424    ///
8425    /// # Arguments
8426    ///
8427    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8428    pub fn tree_opts(&self, opts: GitRefTreeOpts) -> Directory {
8429        let mut query = self.selection.select("tree");
8430        if let Some(discard_git_dir) = opts.discard_git_dir {
8431            query = query.arg("discardGitDir", discard_git_dir);
8432        }
8433        if let Some(depth) = opts.depth {
8434            query = query.arg("depth", depth);
8435        }
8436        Directory {
8437            proc: self.proc.clone(),
8438            selection: query,
8439            graphql_client: self.graphql_client.clone(),
8440        }
8441    }
8442}
8443#[derive(Clone)]
8444pub struct GitRepository {
8445    pub proc: Option<Arc<DaggerSessionProc>>,
8446    pub selection: Selection,
8447    pub graphql_client: DynGraphQLClient,
8448}
8449#[derive(Builder, Debug, PartialEq)]
8450pub struct GitRepositoryBranchesOpts<'a> {
8451    /// Glob patterns (e.g., "refs/tags/v*").
8452    #[builder(setter(into, strip_option), default)]
8453    pub patterns: Option<Vec<&'a str>>,
8454}
8455#[derive(Builder, Debug, PartialEq)]
8456pub struct GitRepositoryTagsOpts<'a> {
8457    /// Glob patterns (e.g., "refs/tags/v*").
8458    #[builder(setter(into, strip_option), default)]
8459    pub patterns: Option<Vec<&'a str>>,
8460}
8461impl GitRepository {
8462    /// Returns details of a branch.
8463    ///
8464    /// # Arguments
8465    ///
8466    /// * `name` - Branch's name (e.g., "main").
8467    pub fn branch(&self, name: impl Into<String>) -> GitRef {
8468        let mut query = self.selection.select("branch");
8469        query = query.arg("name", name.into());
8470        GitRef {
8471            proc: self.proc.clone(),
8472            selection: query,
8473            graphql_client: self.graphql_client.clone(),
8474        }
8475    }
8476    /// branches that match any of the given glob patterns.
8477    ///
8478    /// # Arguments
8479    ///
8480    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8481    pub async fn branches(&self) -> Result<Vec<String>, DaggerError> {
8482        let query = self.selection.select("branches");
8483        query.execute(self.graphql_client.clone()).await
8484    }
8485    /// branches that match any of the given glob patterns.
8486    ///
8487    /// # Arguments
8488    ///
8489    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8490    pub async fn branches_opts<'a>(
8491        &self,
8492        opts: GitRepositoryBranchesOpts<'a>,
8493    ) -> Result<Vec<String>, DaggerError> {
8494        let mut query = self.selection.select("branches");
8495        if let Some(patterns) = opts.patterns {
8496            query = query.arg("patterns", patterns);
8497        }
8498        query.execute(self.graphql_client.clone()).await
8499    }
8500    /// Returns details of a commit.
8501    ///
8502    /// # Arguments
8503    ///
8504    /// * `id` - Identifier of the commit (e.g., "b6315d8f2810962c601af73f86831f6866ea798b").
8505    pub fn commit(&self, id: impl Into<String>) -> GitRef {
8506        let mut query = self.selection.select("commit");
8507        query = query.arg("id", id.into());
8508        GitRef {
8509            proc: self.proc.clone(),
8510            selection: query,
8511            graphql_client: self.graphql_client.clone(),
8512        }
8513    }
8514    /// Returns details for HEAD.
8515    pub fn head(&self) -> GitRef {
8516        let query = self.selection.select("head");
8517        GitRef {
8518            proc: self.proc.clone(),
8519            selection: query,
8520            graphql_client: self.graphql_client.clone(),
8521        }
8522    }
8523    /// A unique identifier for this GitRepository.
8524    pub async fn id(&self) -> Result<GitRepositoryId, DaggerError> {
8525        let query = self.selection.select("id");
8526        query.execute(self.graphql_client.clone()).await
8527    }
8528    /// Returns details for the latest semver tag.
8529    pub fn latest_version(&self) -> GitRef {
8530        let query = self.selection.select("latestVersion");
8531        GitRef {
8532            proc: self.proc.clone(),
8533            selection: query,
8534            graphql_client: self.graphql_client.clone(),
8535        }
8536    }
8537    /// Returns details of a ref.
8538    ///
8539    /// # Arguments
8540    ///
8541    /// * `name` - Ref's name (can be a commit identifier, a tag name, a branch name, or a fully-qualified ref).
8542    pub fn r#ref(&self, name: impl Into<String>) -> GitRef {
8543        let mut query = self.selection.select("ref");
8544        query = query.arg("name", name.into());
8545        GitRef {
8546            proc: self.proc.clone(),
8547            selection: query,
8548            graphql_client: self.graphql_client.clone(),
8549        }
8550    }
8551    /// Returns details of a tag.
8552    ///
8553    /// # Arguments
8554    ///
8555    /// * `name` - Tag's name (e.g., "v0.3.9").
8556    pub fn tag(&self, name: impl Into<String>) -> GitRef {
8557        let mut query = self.selection.select("tag");
8558        query = query.arg("name", name.into());
8559        GitRef {
8560            proc: self.proc.clone(),
8561            selection: query,
8562            graphql_client: self.graphql_client.clone(),
8563        }
8564    }
8565    /// tags that match any of the given glob patterns.
8566    ///
8567    /// # Arguments
8568    ///
8569    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8570    pub async fn tags(&self) -> Result<Vec<String>, DaggerError> {
8571        let query = self.selection.select("tags");
8572        query.execute(self.graphql_client.clone()).await
8573    }
8574    /// tags that match any of the given glob patterns.
8575    ///
8576    /// # Arguments
8577    ///
8578    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8579    pub async fn tags_opts<'a>(
8580        &self,
8581        opts: GitRepositoryTagsOpts<'a>,
8582    ) -> Result<Vec<String>, DaggerError> {
8583        let mut query = self.selection.select("tags");
8584        if let Some(patterns) = opts.patterns {
8585            query = query.arg("patterns", patterns);
8586        }
8587        query.execute(self.graphql_client.clone()).await
8588    }
8589    /// The URL of the git repository.
8590    pub async fn url(&self) -> Result<String, DaggerError> {
8591        let query = self.selection.select("url");
8592        query.execute(self.graphql_client.clone()).await
8593    }
8594}
8595#[derive(Clone)]
8596pub struct Host {
8597    pub proc: Option<Arc<DaggerSessionProc>>,
8598    pub selection: Selection,
8599    pub graphql_client: DynGraphQLClient,
8600}
8601#[derive(Builder, Debug, PartialEq)]
8602pub struct HostDirectoryOpts<'a> {
8603    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
8604    #[builder(setter(into, strip_option), default)]
8605    pub exclude: Option<Vec<&'a str>>,
8606    /// Apply .gitignore filter rules inside the directory
8607    #[builder(setter(into, strip_option), default)]
8608    pub gitignore: Option<bool>,
8609    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
8610    #[builder(setter(into, strip_option), default)]
8611    pub include: Option<Vec<&'a str>>,
8612    /// If true, the directory will always be reloaded from the host.
8613    #[builder(setter(into, strip_option), default)]
8614    pub no_cache: Option<bool>,
8615}
8616#[derive(Builder, Debug, PartialEq)]
8617pub struct HostFileOpts {
8618    /// If true, the file will always be reloaded from the host.
8619    #[builder(setter(into, strip_option), default)]
8620    pub no_cache: Option<bool>,
8621}
8622#[derive(Builder, Debug, PartialEq)]
8623pub struct HostFindUpOpts {
8624    #[builder(setter(into, strip_option), default)]
8625    pub no_cache: Option<bool>,
8626}
8627#[derive(Builder, Debug, PartialEq)]
8628pub struct HostServiceOpts<'a> {
8629    /// Upstream host to forward traffic to.
8630    #[builder(setter(into, strip_option), default)]
8631    pub host: Option<&'a str>,
8632}
8633#[derive(Builder, Debug, PartialEq)]
8634pub struct HostTunnelOpts {
8635    /// Map each service port to the same port on the host, as if the service were running natively.
8636    /// Note: enabling may result in port conflicts.
8637    #[builder(setter(into, strip_option), default)]
8638    pub native: Option<bool>,
8639    /// Configure explicit port forwarding rules for the tunnel.
8640    /// If a port's frontend is unspecified or 0, a random port will be chosen by the host.
8641    /// 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.
8642    /// If ports are given and native is true, the ports are additive.
8643    #[builder(setter(into, strip_option), default)]
8644    pub ports: Option<Vec<PortForward>>,
8645}
8646impl Host {
8647    /// Accesses a container image on the host.
8648    ///
8649    /// # Arguments
8650    ///
8651    /// * `name` - Name of the image to access.
8652    pub fn container_image(&self, name: impl Into<String>) -> Container {
8653        let mut query = self.selection.select("containerImage");
8654        query = query.arg("name", name.into());
8655        Container {
8656            proc: self.proc.clone(),
8657            selection: query,
8658            graphql_client: self.graphql_client.clone(),
8659        }
8660    }
8661    /// Accesses a directory on the host.
8662    ///
8663    /// # Arguments
8664    ///
8665    /// * `path` - Location of the directory to access (e.g., ".").
8666    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8667    pub fn directory(&self, path: impl Into<String>) -> Directory {
8668        let mut query = self.selection.select("directory");
8669        query = query.arg("path", path.into());
8670        Directory {
8671            proc: self.proc.clone(),
8672            selection: query,
8673            graphql_client: self.graphql_client.clone(),
8674        }
8675    }
8676    /// Accesses a directory on the host.
8677    ///
8678    /// # Arguments
8679    ///
8680    /// * `path` - Location of the directory to access (e.g., ".").
8681    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8682    pub fn directory_opts<'a>(
8683        &self,
8684        path: impl Into<String>,
8685        opts: HostDirectoryOpts<'a>,
8686    ) -> Directory {
8687        let mut query = self.selection.select("directory");
8688        query = query.arg("path", path.into());
8689        if let Some(exclude) = opts.exclude {
8690            query = query.arg("exclude", exclude);
8691        }
8692        if let Some(include) = opts.include {
8693            query = query.arg("include", include);
8694        }
8695        if let Some(no_cache) = opts.no_cache {
8696            query = query.arg("noCache", no_cache);
8697        }
8698        if let Some(gitignore) = opts.gitignore {
8699            query = query.arg("gitignore", gitignore);
8700        }
8701        Directory {
8702            proc: self.proc.clone(),
8703            selection: query,
8704            graphql_client: self.graphql_client.clone(),
8705        }
8706    }
8707    /// Accesses a file on the host.
8708    ///
8709    /// # Arguments
8710    ///
8711    /// * `path` - Location of the file to retrieve (e.g., "README.md").
8712    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8713    pub fn file(&self, path: impl Into<String>) -> File {
8714        let mut query = self.selection.select("file");
8715        query = query.arg("path", path.into());
8716        File {
8717            proc: self.proc.clone(),
8718            selection: query,
8719            graphql_client: self.graphql_client.clone(),
8720        }
8721    }
8722    /// Accesses a file on the host.
8723    ///
8724    /// # Arguments
8725    ///
8726    /// * `path` - Location of the file to retrieve (e.g., "README.md").
8727    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8728    pub fn file_opts(&self, path: impl Into<String>, opts: HostFileOpts) -> File {
8729        let mut query = self.selection.select("file");
8730        query = query.arg("path", path.into());
8731        if let Some(no_cache) = opts.no_cache {
8732            query = query.arg("noCache", no_cache);
8733        }
8734        File {
8735            proc: self.proc.clone(),
8736            selection: query,
8737            graphql_client: self.graphql_client.clone(),
8738        }
8739    }
8740    /// Search for a file or directory by walking up the tree from system workdir. Return its relative path. If no match, return null
8741    ///
8742    /// # Arguments
8743    ///
8744    /// * `name` - name of the file or directory to search for
8745    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8746    pub async fn find_up(&self, name: impl Into<String>) -> Result<String, DaggerError> {
8747        let mut query = self.selection.select("findUp");
8748        query = query.arg("name", name.into());
8749        query.execute(self.graphql_client.clone()).await
8750    }
8751    /// Search for a file or directory by walking up the tree from system workdir. Return its relative path. If no match, return null
8752    ///
8753    /// # Arguments
8754    ///
8755    /// * `name` - name of the file or directory to search for
8756    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8757    pub async fn find_up_opts(
8758        &self,
8759        name: impl Into<String>,
8760        opts: HostFindUpOpts,
8761    ) -> Result<String, DaggerError> {
8762        let mut query = self.selection.select("findUp");
8763        query = query.arg("name", name.into());
8764        if let Some(no_cache) = opts.no_cache {
8765            query = query.arg("noCache", no_cache);
8766        }
8767        query.execute(self.graphql_client.clone()).await
8768    }
8769    /// A unique identifier for this Host.
8770    pub async fn id(&self) -> Result<HostId, DaggerError> {
8771        let query = self.selection.select("id");
8772        query.execute(self.graphql_client.clone()).await
8773    }
8774    /// Creates a service that forwards traffic to a specified address via the host.
8775    ///
8776    /// # Arguments
8777    ///
8778    /// * `ports` - Ports to expose via the service, forwarding through the host network.
8779    ///
8780    /// If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
8781    ///
8782    /// An empty set of ports is not valid; an error will be returned.
8783    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8784    pub fn service(&self, ports: Vec<PortForward>) -> Service {
8785        let mut query = self.selection.select("service");
8786        query = query.arg("ports", ports);
8787        Service {
8788            proc: self.proc.clone(),
8789            selection: query,
8790            graphql_client: self.graphql_client.clone(),
8791        }
8792    }
8793    /// Creates a service that forwards traffic to a specified address via the host.
8794    ///
8795    /// # Arguments
8796    ///
8797    /// * `ports` - Ports to expose via the service, forwarding through the host network.
8798    ///
8799    /// If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
8800    ///
8801    /// An empty set of ports is not valid; an error will be returned.
8802    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8803    pub fn service_opts<'a>(&self, ports: Vec<PortForward>, opts: HostServiceOpts<'a>) -> Service {
8804        let mut query = self.selection.select("service");
8805        query = query.arg("ports", ports);
8806        if let Some(host) = opts.host {
8807            query = query.arg("host", host);
8808        }
8809        Service {
8810            proc: self.proc.clone(),
8811            selection: query,
8812            graphql_client: self.graphql_client.clone(),
8813        }
8814    }
8815    /// Creates a tunnel that forwards traffic from the host to a service.
8816    ///
8817    /// # Arguments
8818    ///
8819    /// * `service` - Service to send traffic from the tunnel.
8820    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8821    pub fn tunnel(&self, service: impl IntoID<ServiceId>) -> Service {
8822        let mut query = self.selection.select("tunnel");
8823        query = query.arg_lazy(
8824            "service",
8825            Box::new(move || {
8826                let service = service.clone();
8827                Box::pin(async move { service.into_id().await.unwrap().quote() })
8828            }),
8829        );
8830        Service {
8831            proc: self.proc.clone(),
8832            selection: query,
8833            graphql_client: self.graphql_client.clone(),
8834        }
8835    }
8836    /// Creates a tunnel that forwards traffic from the host to a service.
8837    ///
8838    /// # Arguments
8839    ///
8840    /// * `service` - Service to send traffic from the tunnel.
8841    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8842    pub fn tunnel_opts(&self, service: impl IntoID<ServiceId>, opts: HostTunnelOpts) -> Service {
8843        let mut query = self.selection.select("tunnel");
8844        query = query.arg_lazy(
8845            "service",
8846            Box::new(move || {
8847                let service = service.clone();
8848                Box::pin(async move { service.into_id().await.unwrap().quote() })
8849            }),
8850        );
8851        if let Some(native) = opts.native {
8852            query = query.arg("native", native);
8853        }
8854        if let Some(ports) = opts.ports {
8855            query = query.arg("ports", ports);
8856        }
8857        Service {
8858            proc: self.proc.clone(),
8859            selection: query,
8860            graphql_client: self.graphql_client.clone(),
8861        }
8862    }
8863    /// Accesses a Unix socket on the host.
8864    ///
8865    /// # Arguments
8866    ///
8867    /// * `path` - Location of the Unix socket (e.g., "/var/run/docker.sock").
8868    pub fn unix_socket(&self, path: impl Into<String>) -> Socket {
8869        let mut query = self.selection.select("unixSocket");
8870        query = query.arg("path", path.into());
8871        Socket {
8872            proc: self.proc.clone(),
8873            selection: query,
8874            graphql_client: self.graphql_client.clone(),
8875        }
8876    }
8877}
8878#[derive(Clone)]
8879pub struct InputTypeDef {
8880    pub proc: Option<Arc<DaggerSessionProc>>,
8881    pub selection: Selection,
8882    pub graphql_client: DynGraphQLClient,
8883}
8884impl InputTypeDef {
8885    /// Static fields defined on this input object, if any.
8886    pub fn fields(&self) -> Vec<FieldTypeDef> {
8887        let query = self.selection.select("fields");
8888        vec![FieldTypeDef {
8889            proc: self.proc.clone(),
8890            selection: query,
8891            graphql_client: self.graphql_client.clone(),
8892        }]
8893    }
8894    /// A unique identifier for this InputTypeDef.
8895    pub async fn id(&self) -> Result<InputTypeDefId, DaggerError> {
8896        let query = self.selection.select("id");
8897        query.execute(self.graphql_client.clone()).await
8898    }
8899    /// The name of the input object.
8900    pub async fn name(&self) -> Result<String, DaggerError> {
8901        let query = self.selection.select("name");
8902        query.execute(self.graphql_client.clone()).await
8903    }
8904}
8905#[derive(Clone)]
8906pub struct InterfaceTypeDef {
8907    pub proc: Option<Arc<DaggerSessionProc>>,
8908    pub selection: Selection,
8909    pub graphql_client: DynGraphQLClient,
8910}
8911impl InterfaceTypeDef {
8912    /// The doc string for the interface, if any.
8913    pub async fn description(&self) -> Result<String, DaggerError> {
8914        let query = self.selection.select("description");
8915        query.execute(self.graphql_client.clone()).await
8916    }
8917    /// Functions defined on this interface, if any.
8918    pub fn functions(&self) -> Vec<Function> {
8919        let query = self.selection.select("functions");
8920        vec![Function {
8921            proc: self.proc.clone(),
8922            selection: query,
8923            graphql_client: self.graphql_client.clone(),
8924        }]
8925    }
8926    /// A unique identifier for this InterfaceTypeDef.
8927    pub async fn id(&self) -> Result<InterfaceTypeDefId, DaggerError> {
8928        let query = self.selection.select("id");
8929        query.execute(self.graphql_client.clone()).await
8930    }
8931    /// The name of the interface.
8932    pub async fn name(&self) -> Result<String, DaggerError> {
8933        let query = self.selection.select("name");
8934        query.execute(self.graphql_client.clone()).await
8935    }
8936    /// The location of this interface declaration.
8937    pub fn source_map(&self) -> SourceMap {
8938        let query = self.selection.select("sourceMap");
8939        SourceMap {
8940            proc: self.proc.clone(),
8941            selection: query,
8942            graphql_client: self.graphql_client.clone(),
8943        }
8944    }
8945    /// If this InterfaceTypeDef is associated with a Module, the name of the module. Unset otherwise.
8946    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
8947        let query = self.selection.select("sourceModuleName");
8948        query.execute(self.graphql_client.clone()).await
8949    }
8950}
8951#[derive(Clone)]
8952pub struct JsonValue {
8953    pub proc: Option<Arc<DaggerSessionProc>>,
8954    pub selection: Selection,
8955    pub graphql_client: DynGraphQLClient,
8956}
8957#[derive(Builder, Debug, PartialEq)]
8958pub struct JsonValueContentsOpts<'a> {
8959    /// Optional line prefix
8960    #[builder(setter(into, strip_option), default)]
8961    pub indent: Option<&'a str>,
8962    /// Pretty-print
8963    #[builder(setter(into, strip_option), default)]
8964    pub pretty: Option<bool>,
8965}
8966impl JsonValue {
8967    /// Decode an array from json
8968    pub fn as_array(&self) -> Vec<JsonValue> {
8969        let query = self.selection.select("asArray");
8970        vec![JsonValue {
8971            proc: self.proc.clone(),
8972            selection: query,
8973            graphql_client: self.graphql_client.clone(),
8974        }]
8975    }
8976    /// Decode a boolean from json
8977    pub async fn as_boolean(&self) -> Result<bool, DaggerError> {
8978        let query = self.selection.select("asBoolean");
8979        query.execute(self.graphql_client.clone()).await
8980    }
8981    /// Decode an integer from json
8982    pub async fn as_integer(&self) -> Result<isize, DaggerError> {
8983        let query = self.selection.select("asInteger");
8984        query.execute(self.graphql_client.clone()).await
8985    }
8986    /// Decode a string from json
8987    pub async fn as_string(&self) -> Result<String, DaggerError> {
8988        let query = self.selection.select("asString");
8989        query.execute(self.graphql_client.clone()).await
8990    }
8991    /// Return the value encoded as json
8992    ///
8993    /// # Arguments
8994    ///
8995    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8996    pub async fn contents(&self) -> Result<Json, DaggerError> {
8997        let query = self.selection.select("contents");
8998        query.execute(self.graphql_client.clone()).await
8999    }
9000    /// Return the value encoded as json
9001    ///
9002    /// # Arguments
9003    ///
9004    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9005    pub async fn contents_opts<'a>(
9006        &self,
9007        opts: JsonValueContentsOpts<'a>,
9008    ) -> Result<Json, DaggerError> {
9009        let mut query = self.selection.select("contents");
9010        if let Some(pretty) = opts.pretty {
9011            query = query.arg("pretty", pretty);
9012        }
9013        if let Some(indent) = opts.indent {
9014            query = query.arg("indent", indent);
9015        }
9016        query.execute(self.graphql_client.clone()).await
9017    }
9018    /// Lookup the field at the given path, and return its value.
9019    ///
9020    /// # Arguments
9021    ///
9022    /// * `path` - Path of the field to lookup, encoded as an array of field names
9023    pub fn field(&self, path: Vec<impl Into<String>>) -> JsonValue {
9024        let mut query = self.selection.select("field");
9025        query = query.arg(
9026            "path",
9027            path.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
9028        );
9029        JsonValue {
9030            proc: self.proc.clone(),
9031            selection: query,
9032            graphql_client: self.graphql_client.clone(),
9033        }
9034    }
9035    /// List fields of the encoded object
9036    pub async fn fields(&self) -> Result<Vec<String>, DaggerError> {
9037        let query = self.selection.select("fields");
9038        query.execute(self.graphql_client.clone()).await
9039    }
9040    /// A unique identifier for this JSONValue.
9041    pub async fn id(&self) -> Result<JsonValueId, DaggerError> {
9042        let query = self.selection.select("id");
9043        query.execute(self.graphql_client.clone()).await
9044    }
9045    /// Encode a boolean to json
9046    ///
9047    /// # Arguments
9048    ///
9049    /// * `value` - New boolean value
9050    pub fn new_boolean(&self, value: bool) -> JsonValue {
9051        let mut query = self.selection.select("newBoolean");
9052        query = query.arg("value", value);
9053        JsonValue {
9054            proc: self.proc.clone(),
9055            selection: query,
9056            graphql_client: self.graphql_client.clone(),
9057        }
9058    }
9059    /// Encode an integer to json
9060    ///
9061    /// # Arguments
9062    ///
9063    /// * `value` - New integer value
9064    pub fn new_integer(&self, value: isize) -> JsonValue {
9065        let mut query = self.selection.select("newInteger");
9066        query = query.arg("value", value);
9067        JsonValue {
9068            proc: self.proc.clone(),
9069            selection: query,
9070            graphql_client: self.graphql_client.clone(),
9071        }
9072    }
9073    /// Encode a string to json
9074    ///
9075    /// # Arguments
9076    ///
9077    /// * `value` - New string value
9078    pub fn new_string(&self, value: impl Into<String>) -> JsonValue {
9079        let mut query = self.selection.select("newString");
9080        query = query.arg("value", value.into());
9081        JsonValue {
9082            proc: self.proc.clone(),
9083            selection: query,
9084            graphql_client: self.graphql_client.clone(),
9085        }
9086    }
9087    /// Return a new json value, decoded from the given content
9088    ///
9089    /// # Arguments
9090    ///
9091    /// * `contents` - New JSON-encoded contents
9092    pub fn with_contents(&self, contents: Json) -> JsonValue {
9093        let mut query = self.selection.select("withContents");
9094        query = query.arg("contents", contents);
9095        JsonValue {
9096            proc: self.proc.clone(),
9097            selection: query,
9098            graphql_client: self.graphql_client.clone(),
9099        }
9100    }
9101    /// Set a new field at the given path
9102    ///
9103    /// # Arguments
9104    ///
9105    /// * `path` - Path of the field to set, encoded as an array of field names
9106    /// * `value` - The new value of the field
9107    pub fn with_field(
9108        &self,
9109        path: Vec<impl Into<String>>,
9110        value: impl IntoID<JsonValueId>,
9111    ) -> JsonValue {
9112        let mut query = self.selection.select("withField");
9113        query = query.arg(
9114            "path",
9115            path.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
9116        );
9117        query = query.arg_lazy(
9118            "value",
9119            Box::new(move || {
9120                let value = value.clone();
9121                Box::pin(async move { value.into_id().await.unwrap().quote() })
9122            }),
9123        );
9124        JsonValue {
9125            proc: self.proc.clone(),
9126            selection: query,
9127            graphql_client: self.graphql_client.clone(),
9128        }
9129    }
9130}
9131#[derive(Clone)]
9132pub struct Llm {
9133    pub proc: Option<Arc<DaggerSessionProc>>,
9134    pub selection: Selection,
9135    pub graphql_client: DynGraphQLClient,
9136}
9137impl Llm {
9138    /// create a branch in the LLM's history
9139    pub fn attempt(&self, number: isize) -> Llm {
9140        let mut query = self.selection.select("attempt");
9141        query = query.arg("number", number);
9142        Llm {
9143            proc: self.proc.clone(),
9144            selection: query,
9145            graphql_client: self.graphql_client.clone(),
9146        }
9147    }
9148    /// returns the type of the current state
9149    pub fn bind_result(&self, name: impl Into<String>) -> Binding {
9150        let mut query = self.selection.select("bindResult");
9151        query = query.arg("name", name.into());
9152        Binding {
9153            proc: self.proc.clone(),
9154            selection: query,
9155            graphql_client: self.graphql_client.clone(),
9156        }
9157    }
9158    /// return the LLM's current environment
9159    pub fn env(&self) -> Env {
9160        let query = self.selection.select("env");
9161        Env {
9162            proc: self.proc.clone(),
9163            selection: query,
9164            graphql_client: self.graphql_client.clone(),
9165        }
9166    }
9167    /// Indicates whether there are any queued prompts or tool results to send to the model
9168    pub async fn has_prompt(&self) -> Result<bool, DaggerError> {
9169        let query = self.selection.select("hasPrompt");
9170        query.execute(self.graphql_client.clone()).await
9171    }
9172    /// return the llm message history
9173    pub async fn history(&self) -> Result<Vec<String>, DaggerError> {
9174        let query = self.selection.select("history");
9175        query.execute(self.graphql_client.clone()).await
9176    }
9177    /// return the raw llm message history as json
9178    pub async fn history_json(&self) -> Result<Json, DaggerError> {
9179        let query = self.selection.select("historyJSON");
9180        query.execute(self.graphql_client.clone()).await
9181    }
9182    /// A unique identifier for this LLM.
9183    pub async fn id(&self) -> Result<Llmid, DaggerError> {
9184        let query = self.selection.select("id");
9185        query.execute(self.graphql_client.clone()).await
9186    }
9187    /// return the last llm reply from the history
9188    pub async fn last_reply(&self) -> Result<String, DaggerError> {
9189        let query = self.selection.select("lastReply");
9190        query.execute(self.graphql_client.clone()).await
9191    }
9192    /// Submit the queued prompt, evaluate any tool calls, queue their results, and keep going until the model ends its turn
9193    pub fn r#loop(&self) -> Llm {
9194        let query = self.selection.select("loop");
9195        Llm {
9196            proc: self.proc.clone(),
9197            selection: query,
9198            graphql_client: self.graphql_client.clone(),
9199        }
9200    }
9201    /// return the model used by the llm
9202    pub async fn model(&self) -> Result<String, DaggerError> {
9203        let query = self.selection.select("model");
9204        query.execute(self.graphql_client.clone()).await
9205    }
9206    /// return the provider used by the llm
9207    pub async fn provider(&self) -> Result<String, DaggerError> {
9208        let query = self.selection.select("provider");
9209        query.execute(self.graphql_client.clone()).await
9210    }
9211    /// Submit the queued prompt or tool call results, evaluate any tool calls, and queue their results
9212    pub async fn step(&self) -> Result<Llmid, DaggerError> {
9213        let query = self.selection.select("step");
9214        query.execute(self.graphql_client.clone()).await
9215    }
9216    /// synchronize LLM state
9217    pub async fn sync(&self) -> Result<Llmid, DaggerError> {
9218        let query = self.selection.select("sync");
9219        query.execute(self.graphql_client.clone()).await
9220    }
9221    /// returns the token usage of the current state
9222    pub fn token_usage(&self) -> LlmTokenUsage {
9223        let query = self.selection.select("tokenUsage");
9224        LlmTokenUsage {
9225            proc: self.proc.clone(),
9226            selection: query,
9227            graphql_client: self.graphql_client.clone(),
9228        }
9229    }
9230    /// print documentation for available tools
9231    pub async fn tools(&self) -> Result<String, DaggerError> {
9232        let query = self.selection.select("tools");
9233        query.execute(self.graphql_client.clone()).await
9234    }
9235    /// Return a new LLM with the specified function no longer exposed as a tool
9236    ///
9237    /// # Arguments
9238    ///
9239    /// * `type_name` - The type name whose function will be blocked
9240    /// * `function` - The function to block
9241    ///
9242    /// Will be converted to lowerCamelCase if necessary.
9243    pub fn with_blocked_function(
9244        &self,
9245        type_name: impl Into<String>,
9246        function: impl Into<String>,
9247    ) -> Llm {
9248        let mut query = self.selection.select("withBlockedFunction");
9249        query = query.arg("typeName", type_name.into());
9250        query = query.arg("function", function.into());
9251        Llm {
9252            proc: self.proc.clone(),
9253            selection: query,
9254            graphql_client: self.graphql_client.clone(),
9255        }
9256    }
9257    /// allow the LLM to interact with an environment via MCP
9258    pub fn with_env(&self, env: impl IntoID<EnvId>) -> Llm {
9259        let mut query = self.selection.select("withEnv");
9260        query = query.arg_lazy(
9261            "env",
9262            Box::new(move || {
9263                let env = env.clone();
9264                Box::pin(async move { env.into_id().await.unwrap().quote() })
9265            }),
9266        );
9267        Llm {
9268            proc: self.proc.clone(),
9269            selection: query,
9270            graphql_client: self.graphql_client.clone(),
9271        }
9272    }
9273    /// Add an external MCP server to the LLM
9274    ///
9275    /// # Arguments
9276    ///
9277    /// * `name` - The name of the MCP server
9278    /// * `service` - The MCP service to run and communicate with over stdio
9279    pub fn with_mcp_server(&self, name: impl Into<String>, service: impl IntoID<ServiceId>) -> Llm {
9280        let mut query = self.selection.select("withMCPServer");
9281        query = query.arg("name", name.into());
9282        query = query.arg_lazy(
9283            "service",
9284            Box::new(move || {
9285                let service = service.clone();
9286                Box::pin(async move { service.into_id().await.unwrap().quote() })
9287            }),
9288        );
9289        Llm {
9290            proc: self.proc.clone(),
9291            selection: query,
9292            graphql_client: self.graphql_client.clone(),
9293        }
9294    }
9295    /// swap out the llm model
9296    ///
9297    /// # Arguments
9298    ///
9299    /// * `model` - The model to use
9300    pub fn with_model(&self, model: impl Into<String>) -> Llm {
9301        let mut query = self.selection.select("withModel");
9302        query = query.arg("model", model.into());
9303        Llm {
9304            proc: self.proc.clone(),
9305            selection: query,
9306            graphql_client: self.graphql_client.clone(),
9307        }
9308    }
9309    /// append a prompt to the llm context
9310    ///
9311    /// # Arguments
9312    ///
9313    /// * `prompt` - The prompt to send
9314    pub fn with_prompt(&self, prompt: impl Into<String>) -> Llm {
9315        let mut query = self.selection.select("withPrompt");
9316        query = query.arg("prompt", prompt.into());
9317        Llm {
9318            proc: self.proc.clone(),
9319            selection: query,
9320            graphql_client: self.graphql_client.clone(),
9321        }
9322    }
9323    /// append the contents of a file to the llm context
9324    ///
9325    /// # Arguments
9326    ///
9327    /// * `file` - The file to read the prompt from
9328    pub fn with_prompt_file(&self, file: impl IntoID<FileId>) -> Llm {
9329        let mut query = self.selection.select("withPromptFile");
9330        query = query.arg_lazy(
9331            "file",
9332            Box::new(move || {
9333                let file = file.clone();
9334                Box::pin(async move { file.into_id().await.unwrap().quote() })
9335            }),
9336        );
9337        Llm {
9338            proc: self.proc.clone(),
9339            selection: query,
9340            graphql_client: self.graphql_client.clone(),
9341        }
9342    }
9343    /// Use a static set of tools for method calls, e.g. for MCP clients that do not support dynamic tool registration
9344    pub fn with_static_tools(&self) -> Llm {
9345        let query = self.selection.select("withStaticTools");
9346        Llm {
9347            proc: self.proc.clone(),
9348            selection: query,
9349            graphql_client: self.graphql_client.clone(),
9350        }
9351    }
9352    /// Add a system prompt to the LLM's environment
9353    ///
9354    /// # Arguments
9355    ///
9356    /// * `prompt` - The system prompt to send
9357    pub fn with_system_prompt(&self, prompt: impl Into<String>) -> Llm {
9358        let mut query = self.selection.select("withSystemPrompt");
9359        query = query.arg("prompt", prompt.into());
9360        Llm {
9361            proc: self.proc.clone(),
9362            selection: query,
9363            graphql_client: self.graphql_client.clone(),
9364        }
9365    }
9366    /// Disable the default system prompt
9367    pub fn without_default_system_prompt(&self) -> Llm {
9368        let query = self.selection.select("withoutDefaultSystemPrompt");
9369        Llm {
9370            proc: self.proc.clone(),
9371            selection: query,
9372            graphql_client: self.graphql_client.clone(),
9373        }
9374    }
9375}
9376#[derive(Clone)]
9377pub struct LlmTokenUsage {
9378    pub proc: Option<Arc<DaggerSessionProc>>,
9379    pub selection: Selection,
9380    pub graphql_client: DynGraphQLClient,
9381}
9382impl LlmTokenUsage {
9383    pub async fn cached_token_reads(&self) -> Result<isize, DaggerError> {
9384        let query = self.selection.select("cachedTokenReads");
9385        query.execute(self.graphql_client.clone()).await
9386    }
9387    pub async fn cached_token_writes(&self) -> Result<isize, DaggerError> {
9388        let query = self.selection.select("cachedTokenWrites");
9389        query.execute(self.graphql_client.clone()).await
9390    }
9391    /// A unique identifier for this LLMTokenUsage.
9392    pub async fn id(&self) -> Result<LlmTokenUsageId, DaggerError> {
9393        let query = self.selection.select("id");
9394        query.execute(self.graphql_client.clone()).await
9395    }
9396    pub async fn input_tokens(&self) -> Result<isize, DaggerError> {
9397        let query = self.selection.select("inputTokens");
9398        query.execute(self.graphql_client.clone()).await
9399    }
9400    pub async fn output_tokens(&self) -> Result<isize, DaggerError> {
9401        let query = self.selection.select("outputTokens");
9402        query.execute(self.graphql_client.clone()).await
9403    }
9404    pub async fn total_tokens(&self) -> Result<isize, DaggerError> {
9405        let query = self.selection.select("totalTokens");
9406        query.execute(self.graphql_client.clone()).await
9407    }
9408}
9409#[derive(Clone)]
9410pub struct Label {
9411    pub proc: Option<Arc<DaggerSessionProc>>,
9412    pub selection: Selection,
9413    pub graphql_client: DynGraphQLClient,
9414}
9415impl Label {
9416    /// A unique identifier for this Label.
9417    pub async fn id(&self) -> Result<LabelId, DaggerError> {
9418        let query = self.selection.select("id");
9419        query.execute(self.graphql_client.clone()).await
9420    }
9421    /// The label name.
9422    pub async fn name(&self) -> Result<String, DaggerError> {
9423        let query = self.selection.select("name");
9424        query.execute(self.graphql_client.clone()).await
9425    }
9426    /// The label value.
9427    pub async fn value(&self) -> Result<String, DaggerError> {
9428        let query = self.selection.select("value");
9429        query.execute(self.graphql_client.clone()).await
9430    }
9431}
9432#[derive(Clone)]
9433pub struct ListTypeDef {
9434    pub proc: Option<Arc<DaggerSessionProc>>,
9435    pub selection: Selection,
9436    pub graphql_client: DynGraphQLClient,
9437}
9438impl ListTypeDef {
9439    /// The type of the elements in the list.
9440    pub fn element_type_def(&self) -> TypeDef {
9441        let query = self.selection.select("elementTypeDef");
9442        TypeDef {
9443            proc: self.proc.clone(),
9444            selection: query,
9445            graphql_client: self.graphql_client.clone(),
9446        }
9447    }
9448    /// A unique identifier for this ListTypeDef.
9449    pub async fn id(&self) -> Result<ListTypeDefId, DaggerError> {
9450        let query = self.selection.select("id");
9451        query.execute(self.graphql_client.clone()).await
9452    }
9453}
9454#[derive(Clone)]
9455pub struct Module {
9456    pub proc: Option<Arc<DaggerSessionProc>>,
9457    pub selection: Selection,
9458    pub graphql_client: DynGraphQLClient,
9459}
9460#[derive(Builder, Debug, PartialEq)]
9461pub struct ModuleServeOpts {
9462    /// Expose the dependencies of this module to the client
9463    #[builder(setter(into, strip_option), default)]
9464    pub include_dependencies: Option<bool>,
9465}
9466impl Module {
9467    /// The dependencies of the module.
9468    pub fn dependencies(&self) -> Vec<Module> {
9469        let query = self.selection.select("dependencies");
9470        vec![Module {
9471            proc: self.proc.clone(),
9472            selection: query,
9473            graphql_client: self.graphql_client.clone(),
9474        }]
9475    }
9476    /// The doc string of the module, if any
9477    pub async fn description(&self) -> Result<String, DaggerError> {
9478        let query = self.selection.select("description");
9479        query.execute(self.graphql_client.clone()).await
9480    }
9481    /// Enumerations served by this module.
9482    pub fn enums(&self) -> Vec<TypeDef> {
9483        let query = self.selection.select("enums");
9484        vec![TypeDef {
9485            proc: self.proc.clone(),
9486            selection: query,
9487            graphql_client: self.graphql_client.clone(),
9488        }]
9489    }
9490    /// The generated files and directories made on top of the module source's context directory.
9491    pub fn generated_context_directory(&self) -> Directory {
9492        let query = self.selection.select("generatedContextDirectory");
9493        Directory {
9494            proc: self.proc.clone(),
9495            selection: query,
9496            graphql_client: self.graphql_client.clone(),
9497        }
9498    }
9499    /// A unique identifier for this Module.
9500    pub async fn id(&self) -> Result<ModuleId, DaggerError> {
9501        let query = self.selection.select("id");
9502        query.execute(self.graphql_client.clone()).await
9503    }
9504    /// Interfaces served by this module.
9505    pub fn interfaces(&self) -> Vec<TypeDef> {
9506        let query = self.selection.select("interfaces");
9507        vec![TypeDef {
9508            proc: self.proc.clone(),
9509            selection: query,
9510            graphql_client: self.graphql_client.clone(),
9511        }]
9512    }
9513    /// The introspection schema JSON file for this module.
9514    /// This file represents the schema visible to the module's source code, including all core types and those from the dependencies.
9515    /// Note: this is in the context of a module, so some core types may be hidden.
9516    pub fn introspection_schema_json(&self) -> File {
9517        let query = self.selection.select("introspectionSchemaJSON");
9518        File {
9519            proc: self.proc.clone(),
9520            selection: query,
9521            graphql_client: self.graphql_client.clone(),
9522        }
9523    }
9524    /// The name of the module
9525    pub async fn name(&self) -> Result<String, DaggerError> {
9526        let query = self.selection.select("name");
9527        query.execute(self.graphql_client.clone()).await
9528    }
9529    /// Objects served by this module.
9530    pub fn objects(&self) -> Vec<TypeDef> {
9531        let query = self.selection.select("objects");
9532        vec![TypeDef {
9533            proc: self.proc.clone(),
9534            selection: query,
9535            graphql_client: self.graphql_client.clone(),
9536        }]
9537    }
9538    /// The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile.
9539    pub fn runtime(&self) -> Container {
9540        let query = self.selection.select("runtime");
9541        Container {
9542            proc: self.proc.clone(),
9543            selection: query,
9544            graphql_client: self.graphql_client.clone(),
9545        }
9546    }
9547    /// The SDK config used by this module.
9548    pub fn sdk(&self) -> SdkConfig {
9549        let query = self.selection.select("sdk");
9550        SdkConfig {
9551            proc: self.proc.clone(),
9552            selection: query,
9553            graphql_client: self.graphql_client.clone(),
9554        }
9555    }
9556    /// Serve a module's API in the current session.
9557    /// Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
9558    ///
9559    /// # Arguments
9560    ///
9561    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9562    pub async fn serve(&self) -> Result<Void, DaggerError> {
9563        let query = self.selection.select("serve");
9564        query.execute(self.graphql_client.clone()).await
9565    }
9566    /// Serve a module's API in the current session.
9567    /// Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
9568    ///
9569    /// # Arguments
9570    ///
9571    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9572    pub async fn serve_opts(&self, opts: ModuleServeOpts) -> Result<Void, DaggerError> {
9573        let mut query = self.selection.select("serve");
9574        if let Some(include_dependencies) = opts.include_dependencies {
9575            query = query.arg("includeDependencies", include_dependencies);
9576        }
9577        query.execute(self.graphql_client.clone()).await
9578    }
9579    /// The source for the module.
9580    pub fn source(&self) -> ModuleSource {
9581        let query = self.selection.select("source");
9582        ModuleSource {
9583            proc: self.proc.clone(),
9584            selection: query,
9585            graphql_client: self.graphql_client.clone(),
9586        }
9587    }
9588    /// Forces evaluation of the module, including any loading into the engine and associated validation.
9589    pub async fn sync(&self) -> Result<ModuleId, DaggerError> {
9590        let query = self.selection.select("sync");
9591        query.execute(self.graphql_client.clone()).await
9592    }
9593    /// User-defined default values, loaded from local .env files.
9594    pub fn user_defaults(&self) -> EnvFile {
9595        let query = self.selection.select("userDefaults");
9596        EnvFile {
9597            proc: self.proc.clone(),
9598            selection: query,
9599            graphql_client: self.graphql_client.clone(),
9600        }
9601    }
9602    /// Retrieves the module with the given description
9603    ///
9604    /// # Arguments
9605    ///
9606    /// * `description` - The description to set
9607    pub fn with_description(&self, description: impl Into<String>) -> Module {
9608        let mut query = self.selection.select("withDescription");
9609        query = query.arg("description", description.into());
9610        Module {
9611            proc: self.proc.clone(),
9612            selection: query,
9613            graphql_client: self.graphql_client.clone(),
9614        }
9615    }
9616    /// This module plus the given Enum type and associated values
9617    pub fn with_enum(&self, r#enum: impl IntoID<TypeDefId>) -> Module {
9618        let mut query = self.selection.select("withEnum");
9619        query = query.arg_lazy(
9620            "enum",
9621            Box::new(move || {
9622                let r#enum = r#enum.clone();
9623                Box::pin(async move { r#enum.into_id().await.unwrap().quote() })
9624            }),
9625        );
9626        Module {
9627            proc: self.proc.clone(),
9628            selection: query,
9629            graphql_client: self.graphql_client.clone(),
9630        }
9631    }
9632    /// This module plus the given Interface type and associated functions
9633    pub fn with_interface(&self, iface: impl IntoID<TypeDefId>) -> Module {
9634        let mut query = self.selection.select("withInterface");
9635        query = query.arg_lazy(
9636            "iface",
9637            Box::new(move || {
9638                let iface = iface.clone();
9639                Box::pin(async move { iface.into_id().await.unwrap().quote() })
9640            }),
9641        );
9642        Module {
9643            proc: self.proc.clone(),
9644            selection: query,
9645            graphql_client: self.graphql_client.clone(),
9646        }
9647    }
9648    /// This module plus the given Object type and associated functions.
9649    pub fn with_object(&self, object: impl IntoID<TypeDefId>) -> Module {
9650        let mut query = self.selection.select("withObject");
9651        query = query.arg_lazy(
9652            "object",
9653            Box::new(move || {
9654                let object = object.clone();
9655                Box::pin(async move { object.into_id().await.unwrap().quote() })
9656            }),
9657        );
9658        Module {
9659            proc: self.proc.clone(),
9660            selection: query,
9661            graphql_client: self.graphql_client.clone(),
9662        }
9663    }
9664}
9665#[derive(Clone)]
9666pub struct ModuleConfigClient {
9667    pub proc: Option<Arc<DaggerSessionProc>>,
9668    pub selection: Selection,
9669    pub graphql_client: DynGraphQLClient,
9670}
9671impl ModuleConfigClient {
9672    /// The directory the client is generated in.
9673    pub async fn directory(&self) -> Result<String, DaggerError> {
9674        let query = self.selection.select("directory");
9675        query.execute(self.graphql_client.clone()).await
9676    }
9677    /// The generator to use
9678    pub async fn generator(&self) -> Result<String, DaggerError> {
9679        let query = self.selection.select("generator");
9680        query.execute(self.graphql_client.clone()).await
9681    }
9682    /// A unique identifier for this ModuleConfigClient.
9683    pub async fn id(&self) -> Result<ModuleConfigClientId, DaggerError> {
9684        let query = self.selection.select("id");
9685        query.execute(self.graphql_client.clone()).await
9686    }
9687}
9688#[derive(Clone)]
9689pub struct ModuleSource {
9690    pub proc: Option<Arc<DaggerSessionProc>>,
9691    pub selection: Selection,
9692    pub graphql_client: DynGraphQLClient,
9693}
9694impl ModuleSource {
9695    /// Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation
9696    pub fn as_module(&self) -> Module {
9697        let query = self.selection.select("asModule");
9698        Module {
9699            proc: self.proc.clone(),
9700            selection: query,
9701            graphql_client: self.graphql_client.clone(),
9702        }
9703    }
9704    /// A human readable ref string representation of this module source.
9705    pub async fn as_string(&self) -> Result<String, DaggerError> {
9706        let query = self.selection.select("asString");
9707        query.execute(self.graphql_client.clone()).await
9708    }
9709    /// The blueprint referenced by the module source.
9710    pub fn blueprint(&self) -> ModuleSource {
9711        let query = self.selection.select("blueprint");
9712        ModuleSource {
9713            proc: self.proc.clone(),
9714            selection: query,
9715            graphql_client: self.graphql_client.clone(),
9716        }
9717    }
9718    /// The ref to clone the root of the git repo from. Only valid for git sources.
9719    pub async fn clone_ref(&self) -> Result<String, DaggerError> {
9720        let query = self.selection.select("cloneRef");
9721        query.execute(self.graphql_client.clone()).await
9722    }
9723    /// The resolved commit of the git repo this source points to.
9724    pub async fn commit(&self) -> Result<String, DaggerError> {
9725        let query = self.selection.select("commit");
9726        query.execute(self.graphql_client.clone()).await
9727    }
9728    /// The clients generated for the module.
9729    pub fn config_clients(&self) -> Vec<ModuleConfigClient> {
9730        let query = self.selection.select("configClients");
9731        vec![ModuleConfigClient {
9732            proc: self.proc.clone(),
9733            selection: query,
9734            graphql_client: self.graphql_client.clone(),
9735        }]
9736    }
9737    /// Whether an existing dagger.json for the module was found.
9738    pub async fn config_exists(&self) -> Result<bool, DaggerError> {
9739        let query = self.selection.select("configExists");
9740        query.execute(self.graphql_client.clone()).await
9741    }
9742    /// The full directory loaded for the module source, including the source code as a subdirectory.
9743    pub fn context_directory(&self) -> Directory {
9744        let query = self.selection.select("contextDirectory");
9745        Directory {
9746            proc: self.proc.clone(),
9747            selection: query,
9748            graphql_client: self.graphql_client.clone(),
9749        }
9750    }
9751    /// The dependencies of the module source.
9752    pub fn dependencies(&self) -> Vec<ModuleSource> {
9753        let query = self.selection.select("dependencies");
9754        vec![ModuleSource {
9755            proc: self.proc.clone(),
9756            selection: query,
9757            graphql_client: self.graphql_client.clone(),
9758        }]
9759    }
9760    /// 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.
9761    pub async fn digest(&self) -> Result<String, DaggerError> {
9762        let query = self.selection.select("digest");
9763        query.execute(self.graphql_client.clone()).await
9764    }
9765    /// The directory containing the module configuration and source code (source code may be in a subdir).
9766    ///
9767    /// # Arguments
9768    ///
9769    /// * `path` - A subpath from the source directory to select.
9770    pub fn directory(&self, path: impl Into<String>) -> Directory {
9771        let mut query = self.selection.select("directory");
9772        query = query.arg("path", path.into());
9773        Directory {
9774            proc: self.proc.clone(),
9775            selection: query,
9776            graphql_client: self.graphql_client.clone(),
9777        }
9778    }
9779    /// The engine version of the module.
9780    pub async fn engine_version(&self) -> Result<String, DaggerError> {
9781        let query = self.selection.select("engineVersion");
9782        query.execute(self.graphql_client.clone()).await
9783    }
9784    /// The generated files and directories made on top of the module source's context directory.
9785    pub fn generated_context_directory(&self) -> Directory {
9786        let query = self.selection.select("generatedContextDirectory");
9787        Directory {
9788            proc: self.proc.clone(),
9789            selection: query,
9790            graphql_client: self.graphql_client.clone(),
9791        }
9792    }
9793    /// The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket).
9794    pub async fn html_repo_url(&self) -> Result<String, DaggerError> {
9795        let query = self.selection.select("htmlRepoURL");
9796        query.execute(self.graphql_client.clone()).await
9797    }
9798    /// The URL to the source's git repo in a web browser. Only valid for git sources.
9799    pub async fn html_url(&self) -> Result<String, DaggerError> {
9800        let query = self.selection.select("htmlURL");
9801        query.execute(self.graphql_client.clone()).await
9802    }
9803    /// A unique identifier for this ModuleSource.
9804    pub async fn id(&self) -> Result<ModuleSourceId, DaggerError> {
9805        let query = self.selection.select("id");
9806        query.execute(self.graphql_client.clone()).await
9807    }
9808    /// The introspection schema JSON file for this module source.
9809    /// This file represents the schema visible to the module's source code, including all core types and those from the dependencies.
9810    /// Note: this is in the context of a module, so some core types may be hidden.
9811    pub fn introspection_schema_json(&self) -> File {
9812        let query = self.selection.select("introspectionSchemaJSON");
9813        File {
9814            proc: self.proc.clone(),
9815            selection: query,
9816            graphql_client: self.graphql_client.clone(),
9817        }
9818    }
9819    /// The kind of module source (currently local, git or dir).
9820    pub async fn kind(&self) -> Result<ModuleSourceKind, DaggerError> {
9821        let query = self.selection.select("kind");
9822        query.execute(self.graphql_client.clone()).await
9823    }
9824    /// 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.
9825    pub async fn local_context_directory_path(&self) -> Result<String, DaggerError> {
9826        let query = self.selection.select("localContextDirectoryPath");
9827        query.execute(self.graphql_client.clone()).await
9828    }
9829    /// The name of the module, including any setting via the withName API.
9830    pub async fn module_name(&self) -> Result<String, DaggerError> {
9831        let query = self.selection.select("moduleName");
9832        query.execute(self.graphql_client.clone()).await
9833    }
9834    /// The original name of the module as read from the module's dagger.json (or set for the first time with the withName API).
9835    pub async fn module_original_name(&self) -> Result<String, DaggerError> {
9836        let query = self.selection.select("moduleOriginalName");
9837        query.execute(self.graphql_client.clone()).await
9838    }
9839    /// The original subpath used when instantiating this module source, relative to the context directory.
9840    pub async fn original_subpath(&self) -> Result<String, DaggerError> {
9841        let query = self.selection.select("originalSubpath");
9842        query.execute(self.graphql_client.clone()).await
9843    }
9844    /// The pinned version of this module source.
9845    pub async fn pin(&self) -> Result<String, DaggerError> {
9846        let query = self.selection.select("pin");
9847        query.execute(self.graphql_client.clone()).await
9848    }
9849    /// The import path corresponding to the root of the git repo this source points to. Only valid for git sources.
9850    pub async fn repo_root_path(&self) -> Result<String, DaggerError> {
9851        let query = self.selection.select("repoRootPath");
9852        query.execute(self.graphql_client.clone()).await
9853    }
9854    /// The SDK configuration of the module.
9855    pub fn sdk(&self) -> SdkConfig {
9856        let query = self.selection.select("sdk");
9857        SdkConfig {
9858            proc: self.proc.clone(),
9859            selection: query,
9860            graphql_client: self.graphql_client.clone(),
9861        }
9862    }
9863    /// The path, relative to the context directory, that contains the module's dagger.json.
9864    pub async fn source_root_subpath(&self) -> Result<String, DaggerError> {
9865        let query = self.selection.select("sourceRootSubpath");
9866        query.execute(self.graphql_client.clone()).await
9867    }
9868    /// The path to the directory containing the module's source code, relative to the context directory.
9869    pub async fn source_subpath(&self) -> Result<String, DaggerError> {
9870        let query = self.selection.select("sourceSubpath");
9871        query.execute(self.graphql_client.clone()).await
9872    }
9873    /// Forces evaluation of the module source, including any loading into the engine and associated validation.
9874    pub async fn sync(&self) -> Result<ModuleSourceId, DaggerError> {
9875        let query = self.selection.select("sync");
9876        query.execute(self.graphql_client.clone()).await
9877    }
9878    /// User-defined defaults read from local .env files
9879    pub fn user_defaults(&self) -> EnvFile {
9880        let query = self.selection.select("userDefaults");
9881        EnvFile {
9882            proc: self.proc.clone(),
9883            selection: query,
9884            graphql_client: self.graphql_client.clone(),
9885        }
9886    }
9887    /// The specified version of the git repo this source points to.
9888    pub async fn version(&self) -> Result<String, DaggerError> {
9889        let query = self.selection.select("version");
9890        query.execute(self.graphql_client.clone()).await
9891    }
9892    /// Set a blueprint for the module source.
9893    ///
9894    /// # Arguments
9895    ///
9896    /// * `blueprint` - The blueprint module to set.
9897    pub fn with_blueprint(&self, blueprint: impl IntoID<ModuleSourceId>) -> ModuleSource {
9898        let mut query = self.selection.select("withBlueprint");
9899        query = query.arg_lazy(
9900            "blueprint",
9901            Box::new(move || {
9902                let blueprint = blueprint.clone();
9903                Box::pin(async move { blueprint.into_id().await.unwrap().quote() })
9904            }),
9905        );
9906        ModuleSource {
9907            proc: self.proc.clone(),
9908            selection: query,
9909            graphql_client: self.graphql_client.clone(),
9910        }
9911    }
9912    /// Update the module source with a new client to generate.
9913    ///
9914    /// # Arguments
9915    ///
9916    /// * `generator` - The generator to use
9917    /// * `output_dir` - The output directory for the generated client.
9918    pub fn with_client(
9919        &self,
9920        generator: impl Into<String>,
9921        output_dir: impl Into<String>,
9922    ) -> ModuleSource {
9923        let mut query = self.selection.select("withClient");
9924        query = query.arg("generator", generator.into());
9925        query = query.arg("outputDir", output_dir.into());
9926        ModuleSource {
9927            proc: self.proc.clone(),
9928            selection: query,
9929            graphql_client: self.graphql_client.clone(),
9930        }
9931    }
9932    /// Append the provided dependencies to the module source's dependency list.
9933    ///
9934    /// # Arguments
9935    ///
9936    /// * `dependencies` - The dependencies to append.
9937    pub fn with_dependencies(&self, dependencies: Vec<ModuleSourceId>) -> ModuleSource {
9938        let mut query = self.selection.select("withDependencies");
9939        query = query.arg("dependencies", dependencies);
9940        ModuleSource {
9941            proc: self.proc.clone(),
9942            selection: query,
9943            graphql_client: self.graphql_client.clone(),
9944        }
9945    }
9946    /// Upgrade the engine version of the module to the given value.
9947    ///
9948    /// # Arguments
9949    ///
9950    /// * `version` - The engine version to upgrade to.
9951    pub fn with_engine_version(&self, version: impl Into<String>) -> ModuleSource {
9952        let mut query = self.selection.select("withEngineVersion");
9953        query = query.arg("version", version.into());
9954        ModuleSource {
9955            proc: self.proc.clone(),
9956            selection: query,
9957            graphql_client: self.graphql_client.clone(),
9958        }
9959    }
9960    /// Enable the experimental features for the module source.
9961    ///
9962    /// # Arguments
9963    ///
9964    /// * `features` - The experimental features to enable.
9965    pub fn with_experimental_features(
9966        &self,
9967        features: Vec<ModuleSourceExperimentalFeature>,
9968    ) -> ModuleSource {
9969        let mut query = self.selection.select("withExperimentalFeatures");
9970        query = query.arg("features", features);
9971        ModuleSource {
9972            proc: self.proc.clone(),
9973            selection: query,
9974            graphql_client: self.graphql_client.clone(),
9975        }
9976    }
9977    /// Update the module source with additional include patterns for files+directories from its context that are required for building it
9978    ///
9979    /// # Arguments
9980    ///
9981    /// * `patterns` - The new additional include patterns.
9982    pub fn with_includes(&self, patterns: Vec<impl Into<String>>) -> ModuleSource {
9983        let mut query = self.selection.select("withIncludes");
9984        query = query.arg(
9985            "patterns",
9986            patterns
9987                .into_iter()
9988                .map(|i| i.into())
9989                .collect::<Vec<String>>(),
9990        );
9991        ModuleSource {
9992            proc: self.proc.clone(),
9993            selection: query,
9994            graphql_client: self.graphql_client.clone(),
9995        }
9996    }
9997    /// Update the module source with a new name.
9998    ///
9999    /// # Arguments
10000    ///
10001    /// * `name` - The name to set.
10002    pub fn with_name(&self, name: impl Into<String>) -> ModuleSource {
10003        let mut query = self.selection.select("withName");
10004        query = query.arg("name", name.into());
10005        ModuleSource {
10006            proc: self.proc.clone(),
10007            selection: query,
10008            graphql_client: self.graphql_client.clone(),
10009        }
10010    }
10011    /// Update the module source with a new SDK.
10012    ///
10013    /// # Arguments
10014    ///
10015    /// * `source` - The SDK source to set.
10016    pub fn with_sdk(&self, source: impl Into<String>) -> ModuleSource {
10017        let mut query = self.selection.select("withSDK");
10018        query = query.arg("source", source.into());
10019        ModuleSource {
10020            proc: self.proc.clone(),
10021            selection: query,
10022            graphql_client: self.graphql_client.clone(),
10023        }
10024    }
10025    /// Update the module source with a new source subpath.
10026    ///
10027    /// # Arguments
10028    ///
10029    /// * `path` - The path to set as the source subpath. Must be relative to the module source's source root directory.
10030    pub fn with_source_subpath(&self, path: impl Into<String>) -> ModuleSource {
10031        let mut query = self.selection.select("withSourceSubpath");
10032        query = query.arg("path", path.into());
10033        ModuleSource {
10034            proc: self.proc.clone(),
10035            selection: query,
10036            graphql_client: self.graphql_client.clone(),
10037        }
10038    }
10039    /// Update the blueprint module to the latest version.
10040    pub fn with_update_blueprint(&self) -> ModuleSource {
10041        let query = self.selection.select("withUpdateBlueprint");
10042        ModuleSource {
10043            proc: self.proc.clone(),
10044            selection: query,
10045            graphql_client: self.graphql_client.clone(),
10046        }
10047    }
10048    /// Update one or more module dependencies.
10049    ///
10050    /// # Arguments
10051    ///
10052    /// * `dependencies` - The dependencies to update.
10053    pub fn with_update_dependencies(&self, dependencies: Vec<impl Into<String>>) -> ModuleSource {
10054        let mut query = self.selection.select("withUpdateDependencies");
10055        query = query.arg(
10056            "dependencies",
10057            dependencies
10058                .into_iter()
10059                .map(|i| i.into())
10060                .collect::<Vec<String>>(),
10061        );
10062        ModuleSource {
10063            proc: self.proc.clone(),
10064            selection: query,
10065            graphql_client: self.graphql_client.clone(),
10066        }
10067    }
10068    /// Update one or more clients.
10069    ///
10070    /// # Arguments
10071    ///
10072    /// * `clients` - The clients to update
10073    pub fn with_updated_clients(&self, clients: Vec<impl Into<String>>) -> ModuleSource {
10074        let mut query = self.selection.select("withUpdatedClients");
10075        query = query.arg(
10076            "clients",
10077            clients
10078                .into_iter()
10079                .map(|i| i.into())
10080                .collect::<Vec<String>>(),
10081        );
10082        ModuleSource {
10083            proc: self.proc.clone(),
10084            selection: query,
10085            graphql_client: self.graphql_client.clone(),
10086        }
10087    }
10088    /// Remove the current blueprint from the module source.
10089    pub fn without_blueprint(&self) -> ModuleSource {
10090        let query = self.selection.select("withoutBlueprint");
10091        ModuleSource {
10092            proc: self.proc.clone(),
10093            selection: query,
10094            graphql_client: self.graphql_client.clone(),
10095        }
10096    }
10097    /// Remove a client from the module source.
10098    ///
10099    /// # Arguments
10100    ///
10101    /// * `path` - The path of the client to remove.
10102    pub fn without_client(&self, path: impl Into<String>) -> ModuleSource {
10103        let mut query = self.selection.select("withoutClient");
10104        query = query.arg("path", path.into());
10105        ModuleSource {
10106            proc: self.proc.clone(),
10107            selection: query,
10108            graphql_client: self.graphql_client.clone(),
10109        }
10110    }
10111    /// Remove the provided dependencies from the module source's dependency list.
10112    ///
10113    /// # Arguments
10114    ///
10115    /// * `dependencies` - The dependencies to remove.
10116    pub fn without_dependencies(&self, dependencies: Vec<impl Into<String>>) -> ModuleSource {
10117        let mut query = self.selection.select("withoutDependencies");
10118        query = query.arg(
10119            "dependencies",
10120            dependencies
10121                .into_iter()
10122                .map(|i| i.into())
10123                .collect::<Vec<String>>(),
10124        );
10125        ModuleSource {
10126            proc: self.proc.clone(),
10127            selection: query,
10128            graphql_client: self.graphql_client.clone(),
10129        }
10130    }
10131    /// Disable experimental features for the module source.
10132    ///
10133    /// # Arguments
10134    ///
10135    /// * `features` - The experimental features to disable.
10136    pub fn without_experimental_features(
10137        &self,
10138        features: Vec<ModuleSourceExperimentalFeature>,
10139    ) -> ModuleSource {
10140        let mut query = self.selection.select("withoutExperimentalFeatures");
10141        query = query.arg("features", features);
10142        ModuleSource {
10143            proc: self.proc.clone(),
10144            selection: query,
10145            graphql_client: self.graphql_client.clone(),
10146        }
10147    }
10148}
10149#[derive(Clone)]
10150pub struct ObjectTypeDef {
10151    pub proc: Option<Arc<DaggerSessionProc>>,
10152    pub selection: Selection,
10153    pub graphql_client: DynGraphQLClient,
10154}
10155impl ObjectTypeDef {
10156    /// The function used to construct new instances of this object, if any
10157    pub fn constructor(&self) -> Function {
10158        let query = self.selection.select("constructor");
10159        Function {
10160            proc: self.proc.clone(),
10161            selection: query,
10162            graphql_client: self.graphql_client.clone(),
10163        }
10164    }
10165    /// The doc string for the object, if any.
10166    pub async fn description(&self) -> Result<String, DaggerError> {
10167        let query = self.selection.select("description");
10168        query.execute(self.graphql_client.clone()).await
10169    }
10170    /// Static fields defined on this object, if any.
10171    pub fn fields(&self) -> Vec<FieldTypeDef> {
10172        let query = self.selection.select("fields");
10173        vec![FieldTypeDef {
10174            proc: self.proc.clone(),
10175            selection: query,
10176            graphql_client: self.graphql_client.clone(),
10177        }]
10178    }
10179    /// Functions defined on this object, if any.
10180    pub fn functions(&self) -> Vec<Function> {
10181        let query = self.selection.select("functions");
10182        vec![Function {
10183            proc: self.proc.clone(),
10184            selection: query,
10185            graphql_client: self.graphql_client.clone(),
10186        }]
10187    }
10188    /// A unique identifier for this ObjectTypeDef.
10189    pub async fn id(&self) -> Result<ObjectTypeDefId, DaggerError> {
10190        let query = self.selection.select("id");
10191        query.execute(self.graphql_client.clone()).await
10192    }
10193    /// The name of the object.
10194    pub async fn name(&self) -> Result<String, DaggerError> {
10195        let query = self.selection.select("name");
10196        query.execute(self.graphql_client.clone()).await
10197    }
10198    /// The location of this object declaration.
10199    pub fn source_map(&self) -> SourceMap {
10200        let query = self.selection.select("sourceMap");
10201        SourceMap {
10202            proc: self.proc.clone(),
10203            selection: query,
10204            graphql_client: self.graphql_client.clone(),
10205        }
10206    }
10207    /// If this ObjectTypeDef is associated with a Module, the name of the module. Unset otherwise.
10208    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
10209        let query = self.selection.select("sourceModuleName");
10210        query.execute(self.graphql_client.clone()).await
10211    }
10212}
10213#[derive(Clone)]
10214pub struct Port {
10215    pub proc: Option<Arc<DaggerSessionProc>>,
10216    pub selection: Selection,
10217    pub graphql_client: DynGraphQLClient,
10218}
10219impl Port {
10220    /// The port description.
10221    pub async fn description(&self) -> Result<String, DaggerError> {
10222        let query = self.selection.select("description");
10223        query.execute(self.graphql_client.clone()).await
10224    }
10225    /// Skip the health check when run as a service.
10226    pub async fn experimental_skip_healthcheck(&self) -> Result<bool, DaggerError> {
10227        let query = self.selection.select("experimentalSkipHealthcheck");
10228        query.execute(self.graphql_client.clone()).await
10229    }
10230    /// A unique identifier for this Port.
10231    pub async fn id(&self) -> Result<PortId, DaggerError> {
10232        let query = self.selection.select("id");
10233        query.execute(self.graphql_client.clone()).await
10234    }
10235    /// The port number.
10236    pub async fn port(&self) -> Result<isize, DaggerError> {
10237        let query = self.selection.select("port");
10238        query.execute(self.graphql_client.clone()).await
10239    }
10240    /// The transport layer protocol.
10241    pub async fn protocol(&self) -> Result<NetworkProtocol, DaggerError> {
10242        let query = self.selection.select("protocol");
10243        query.execute(self.graphql_client.clone()).await
10244    }
10245}
10246#[derive(Clone)]
10247pub struct Query {
10248    pub proc: Option<Arc<DaggerSessionProc>>,
10249    pub selection: Selection,
10250    pub graphql_client: DynGraphQLClient,
10251}
10252#[derive(Builder, Debug, PartialEq)]
10253pub struct QueryContainerOpts {
10254    /// Platform to initialize the container with. Defaults to the native platform of the current engine
10255    #[builder(setter(into, strip_option), default)]
10256    pub platform: Option<Platform>,
10257}
10258#[derive(Builder, Debug, PartialEq)]
10259pub struct QueryEnvOpts {
10260    /// Give the environment the same privileges as the caller: core API including host access, current module, and dependencies
10261    #[builder(setter(into, strip_option), default)]
10262    pub privileged: Option<bool>,
10263    /// Allow new outputs to be declared and saved in the environment
10264    #[builder(setter(into, strip_option), default)]
10265    pub writable: Option<bool>,
10266}
10267#[derive(Builder, Debug, PartialEq)]
10268pub struct QueryEnvFileOpts {
10269    /// Replace "${VAR}" or "$VAR" with the value of other vars
10270    #[builder(setter(into, strip_option), default)]
10271    pub expand: Option<bool>,
10272}
10273#[derive(Builder, Debug, PartialEq)]
10274pub struct QueryFileOpts {
10275    /// Permissions of the new file. Example: 0600
10276    #[builder(setter(into, strip_option), default)]
10277    pub permissions: Option<isize>,
10278}
10279#[derive(Builder, Debug, PartialEq)]
10280pub struct QueryGitOpts<'a> {
10281    /// A service which must be started before the repo is fetched.
10282    #[builder(setter(into, strip_option), default)]
10283    pub experimental_service_host: Option<ServiceId>,
10284    /// Secret used to populate the Authorization HTTP header
10285    #[builder(setter(into, strip_option), default)]
10286    pub http_auth_header: Option<SecretId>,
10287    /// Secret used to populate the password during basic HTTP Authorization
10288    #[builder(setter(into, strip_option), default)]
10289    pub http_auth_token: Option<SecretId>,
10290    /// Username used to populate the password during basic HTTP Authorization
10291    #[builder(setter(into, strip_option), default)]
10292    pub http_auth_username: Option<&'a str>,
10293    /// DEPRECATED: Set to true to keep .git directory.
10294    #[builder(setter(into, strip_option), default)]
10295    pub keep_git_dir: Option<bool>,
10296    /// Set SSH auth socket
10297    #[builder(setter(into, strip_option), default)]
10298    pub ssh_auth_socket: Option<SocketId>,
10299    /// Set SSH known hosts
10300    #[builder(setter(into, strip_option), default)]
10301    pub ssh_known_hosts: Option<&'a str>,
10302}
10303#[derive(Builder, Debug, PartialEq)]
10304pub struct QueryHttpOpts<'a> {
10305    /// Secret used to populate the Authorization HTTP header
10306    #[builder(setter(into, strip_option), default)]
10307    pub auth_header: Option<SecretId>,
10308    /// A service which must be started before the URL is fetched.
10309    #[builder(setter(into, strip_option), default)]
10310    pub experimental_service_host: Option<ServiceId>,
10311    /// File name to use for the file. Defaults to the last part of the URL.
10312    #[builder(setter(into, strip_option), default)]
10313    pub name: Option<&'a str>,
10314    /// Permissions to set on the file.
10315    #[builder(setter(into, strip_option), default)]
10316    pub permissions: Option<isize>,
10317}
10318#[derive(Builder, Debug, PartialEq)]
10319pub struct QueryLlmOpts<'a> {
10320    /// Cap the number of API calls for this LLM
10321    #[builder(setter(into, strip_option), default)]
10322    pub max_api_calls: Option<isize>,
10323    /// Model to use
10324    #[builder(setter(into, strip_option), default)]
10325    pub model: Option<&'a str>,
10326}
10327#[derive(Builder, Debug, PartialEq)]
10328pub struct QueryModuleSourceOpts<'a> {
10329    /// 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.
10330    #[builder(setter(into, strip_option), default)]
10331    pub allow_not_exists: Option<bool>,
10332    /// If true, do not attempt to find dagger.json in a parent directory of the provided path. Only relevant for local module sources.
10333    #[builder(setter(into, strip_option), default)]
10334    pub disable_find_up: Option<bool>,
10335    /// The pinned version of the module source
10336    #[builder(setter(into, strip_option), default)]
10337    pub ref_pin: Option<&'a str>,
10338    /// If set, error out if the ref string is not of the provided requireKind.
10339    #[builder(setter(into, strip_option), default)]
10340    pub require_kind: Option<ModuleSourceKind>,
10341}
10342#[derive(Builder, Debug, PartialEq)]
10343pub struct QuerySecretOpts<'a> {
10344    /// 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.
10345    /// 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.
10346    /// If not set, the cache key for the secret will be derived from its plaintext value as looked up when the secret is constructed.
10347    #[builder(setter(into, strip_option), default)]
10348    pub cache_key: Option<&'a str>,
10349}
10350impl Query {
10351    /// initialize an address to load directories, containers, secrets or other object types.
10352    pub fn address(&self, value: impl Into<String>) -> Address {
10353        let mut query = self.selection.select("address");
10354        query = query.arg("value", value.into());
10355        Address {
10356            proc: self.proc.clone(),
10357            selection: query,
10358            graphql_client: self.graphql_client.clone(),
10359        }
10360    }
10361    /// Constructs a cache volume for a given cache key.
10362    ///
10363    /// # Arguments
10364    ///
10365    /// * `key` - A string identifier to target this cache volume (e.g., "modules-cache").
10366    pub fn cache_volume(&self, key: impl Into<String>) -> CacheVolume {
10367        let mut query = self.selection.select("cacheVolume");
10368        query = query.arg("key", key.into());
10369        CacheVolume {
10370            proc: self.proc.clone(),
10371            selection: query,
10372            graphql_client: self.graphql_client.clone(),
10373        }
10374    }
10375    /// Dagger Cloud configuration and state
10376    pub fn cloud(&self) -> Cloud {
10377        let query = self.selection.select("cloud");
10378        Cloud {
10379            proc: self.proc.clone(),
10380            selection: query,
10381            graphql_client: self.graphql_client.clone(),
10382        }
10383    }
10384    /// Creates a scratch container, with no image or metadata.
10385    /// To pull an image, follow up with the "from" function.
10386    ///
10387    /// # Arguments
10388    ///
10389    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10390    pub fn container(&self) -> Container {
10391        let query = self.selection.select("container");
10392        Container {
10393            proc: self.proc.clone(),
10394            selection: query,
10395            graphql_client: self.graphql_client.clone(),
10396        }
10397    }
10398    /// Creates a scratch container, with no image or metadata.
10399    /// To pull an image, follow up with the "from" function.
10400    ///
10401    /// # Arguments
10402    ///
10403    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10404    pub fn container_opts(&self, opts: QueryContainerOpts) -> Container {
10405        let mut query = self.selection.select("container");
10406        if let Some(platform) = opts.platform {
10407            query = query.arg("platform", platform);
10408        }
10409        Container {
10410            proc: self.proc.clone(),
10411            selection: query,
10412            graphql_client: self.graphql_client.clone(),
10413        }
10414    }
10415    /// Returns the current environment
10416    /// When called from a function invoked via an LLM tool call, this will be the LLM's current environment, including any modifications made through calling tools. Env values returned by functions become the new environment for subsequent calls, and Changeset values returned by functions are applied to the environment's workspace.
10417    /// When called from a module function outside of an LLM, this returns an Env with the current module installed, and with the current module's source directory as its workspace.
10418    pub fn current_env(&self) -> Env {
10419        let query = self.selection.select("currentEnv");
10420        Env {
10421            proc: self.proc.clone(),
10422            selection: query,
10423            graphql_client: self.graphql_client.clone(),
10424        }
10425    }
10426    /// The FunctionCall context that the SDK caller is currently executing in.
10427    /// If the caller is not currently executing in a function, this will return an error.
10428    pub fn current_function_call(&self) -> FunctionCall {
10429        let query = self.selection.select("currentFunctionCall");
10430        FunctionCall {
10431            proc: self.proc.clone(),
10432            selection: query,
10433            graphql_client: self.graphql_client.clone(),
10434        }
10435    }
10436    /// The module currently being served in the session, if any.
10437    pub fn current_module(&self) -> CurrentModule {
10438        let query = self.selection.select("currentModule");
10439        CurrentModule {
10440            proc: self.proc.clone(),
10441            selection: query,
10442            graphql_client: self.graphql_client.clone(),
10443        }
10444    }
10445    /// The TypeDef representations of the objects currently being served in the session.
10446    pub fn current_type_defs(&self) -> Vec<TypeDef> {
10447        let query = self.selection.select("currentTypeDefs");
10448        vec![TypeDef {
10449            proc: self.proc.clone(),
10450            selection: query,
10451            graphql_client: self.graphql_client.clone(),
10452        }]
10453    }
10454    /// The default platform of the engine.
10455    pub async fn default_platform(&self) -> Result<Platform, DaggerError> {
10456        let query = self.selection.select("defaultPlatform");
10457        query.execute(self.graphql_client.clone()).await
10458    }
10459    /// Creates an empty directory.
10460    pub fn directory(&self) -> Directory {
10461        let query = self.selection.select("directory");
10462        Directory {
10463            proc: self.proc.clone(),
10464            selection: query,
10465            graphql_client: self.graphql_client.clone(),
10466        }
10467    }
10468    /// The Dagger engine container configuration and state
10469    pub fn engine(&self) -> Engine {
10470        let query = self.selection.select("engine");
10471        Engine {
10472            proc: self.proc.clone(),
10473            selection: query,
10474            graphql_client: self.graphql_client.clone(),
10475        }
10476    }
10477    /// Initializes a new environment
10478    ///
10479    /// # Arguments
10480    ///
10481    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10482    pub fn env(&self) -> Env {
10483        let query = self.selection.select("env");
10484        Env {
10485            proc: self.proc.clone(),
10486            selection: query,
10487            graphql_client: self.graphql_client.clone(),
10488        }
10489    }
10490    /// Initializes a new environment
10491    ///
10492    /// # Arguments
10493    ///
10494    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10495    pub fn env_opts(&self, opts: QueryEnvOpts) -> Env {
10496        let mut query = self.selection.select("env");
10497        if let Some(privileged) = opts.privileged {
10498            query = query.arg("privileged", privileged);
10499        }
10500        if let Some(writable) = opts.writable {
10501            query = query.arg("writable", writable);
10502        }
10503        Env {
10504            proc: self.proc.clone(),
10505            selection: query,
10506            graphql_client: self.graphql_client.clone(),
10507        }
10508    }
10509    /// Initialize an environment file
10510    ///
10511    /// # Arguments
10512    ///
10513    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10514    pub fn env_file(&self) -> EnvFile {
10515        let query = self.selection.select("envFile");
10516        EnvFile {
10517            proc: self.proc.clone(),
10518            selection: query,
10519            graphql_client: self.graphql_client.clone(),
10520        }
10521    }
10522    /// Initialize an environment file
10523    ///
10524    /// # Arguments
10525    ///
10526    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10527    pub fn env_file_opts(&self, opts: QueryEnvFileOpts) -> EnvFile {
10528        let mut query = self.selection.select("envFile");
10529        if let Some(expand) = opts.expand {
10530            query = query.arg("expand", expand);
10531        }
10532        EnvFile {
10533            proc: self.proc.clone(),
10534            selection: query,
10535            graphql_client: self.graphql_client.clone(),
10536        }
10537    }
10538    /// Create a new error.
10539    ///
10540    /// # Arguments
10541    ///
10542    /// * `message` - A brief description of the error.
10543    pub fn error(&self, message: impl Into<String>) -> Error {
10544        let mut query = self.selection.select("error");
10545        query = query.arg("message", message.into());
10546        Error {
10547            proc: self.proc.clone(),
10548            selection: query,
10549            graphql_client: self.graphql_client.clone(),
10550        }
10551    }
10552    /// Creates a file with the specified contents.
10553    ///
10554    /// # Arguments
10555    ///
10556    /// * `name` - Name of the new file. Example: "foo.txt"
10557    /// * `contents` - Contents of the new file. Example: "Hello world!"
10558    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10559    pub fn file(&self, name: impl Into<String>, contents: impl Into<String>) -> File {
10560        let mut query = self.selection.select("file");
10561        query = query.arg("name", name.into());
10562        query = query.arg("contents", contents.into());
10563        File {
10564            proc: self.proc.clone(),
10565            selection: query,
10566            graphql_client: self.graphql_client.clone(),
10567        }
10568    }
10569    /// Creates a file with the specified contents.
10570    ///
10571    /// # Arguments
10572    ///
10573    /// * `name` - Name of the new file. Example: "foo.txt"
10574    /// * `contents` - Contents of the new file. Example: "Hello world!"
10575    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10576    pub fn file_opts(
10577        &self,
10578        name: impl Into<String>,
10579        contents: impl Into<String>,
10580        opts: QueryFileOpts,
10581    ) -> File {
10582        let mut query = self.selection.select("file");
10583        query = query.arg("name", name.into());
10584        query = query.arg("contents", contents.into());
10585        if let Some(permissions) = opts.permissions {
10586            query = query.arg("permissions", permissions);
10587        }
10588        File {
10589            proc: self.proc.clone(),
10590            selection: query,
10591            graphql_client: self.graphql_client.clone(),
10592        }
10593    }
10594    /// Creates a function.
10595    ///
10596    /// # Arguments
10597    ///
10598    /// * `name` - Name of the function, in its original format from the implementation language.
10599    /// * `return_type` - Return type of the function.
10600    pub fn function(
10601        &self,
10602        name: impl Into<String>,
10603        return_type: impl IntoID<TypeDefId>,
10604    ) -> Function {
10605        let mut query = self.selection.select("function");
10606        query = query.arg("name", name.into());
10607        query = query.arg_lazy(
10608            "returnType",
10609            Box::new(move || {
10610                let return_type = return_type.clone();
10611                Box::pin(async move { return_type.into_id().await.unwrap().quote() })
10612            }),
10613        );
10614        Function {
10615            proc: self.proc.clone(),
10616            selection: query,
10617            graphql_client: self.graphql_client.clone(),
10618        }
10619    }
10620    /// Create a code generation result, given a directory containing the generated code.
10621    pub fn generated_code(&self, code: impl IntoID<DirectoryId>) -> GeneratedCode {
10622        let mut query = self.selection.select("generatedCode");
10623        query = query.arg_lazy(
10624            "code",
10625            Box::new(move || {
10626                let code = code.clone();
10627                Box::pin(async move { code.into_id().await.unwrap().quote() })
10628            }),
10629        );
10630        GeneratedCode {
10631            proc: self.proc.clone(),
10632            selection: query,
10633            graphql_client: self.graphql_client.clone(),
10634        }
10635    }
10636    /// Queries a Git repository.
10637    ///
10638    /// # Arguments
10639    ///
10640    /// * `url` - URL of the git repository.
10641    ///
10642    /// Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.
10643    ///
10644    /// Suffix ".git" is optional.
10645    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10646    pub fn git(&self, url: impl Into<String>) -> GitRepository {
10647        let mut query = self.selection.select("git");
10648        query = query.arg("url", url.into());
10649        GitRepository {
10650            proc: self.proc.clone(),
10651            selection: query,
10652            graphql_client: self.graphql_client.clone(),
10653        }
10654    }
10655    /// Queries a Git repository.
10656    ///
10657    /// # Arguments
10658    ///
10659    /// * `url` - URL of the git repository.
10660    ///
10661    /// Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.
10662    ///
10663    /// Suffix ".git" is optional.
10664    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10665    pub fn git_opts<'a>(&self, url: impl Into<String>, opts: QueryGitOpts<'a>) -> GitRepository {
10666        let mut query = self.selection.select("git");
10667        query = query.arg("url", url.into());
10668        if let Some(keep_git_dir) = opts.keep_git_dir {
10669            query = query.arg("keepGitDir", keep_git_dir);
10670        }
10671        if let Some(ssh_known_hosts) = opts.ssh_known_hosts {
10672            query = query.arg("sshKnownHosts", ssh_known_hosts);
10673        }
10674        if let Some(ssh_auth_socket) = opts.ssh_auth_socket {
10675            query = query.arg("sshAuthSocket", ssh_auth_socket);
10676        }
10677        if let Some(http_auth_username) = opts.http_auth_username {
10678            query = query.arg("httpAuthUsername", http_auth_username);
10679        }
10680        if let Some(http_auth_token) = opts.http_auth_token {
10681            query = query.arg("httpAuthToken", http_auth_token);
10682        }
10683        if let Some(http_auth_header) = opts.http_auth_header {
10684            query = query.arg("httpAuthHeader", http_auth_header);
10685        }
10686        if let Some(experimental_service_host) = opts.experimental_service_host {
10687            query = query.arg("experimentalServiceHost", experimental_service_host);
10688        }
10689        GitRepository {
10690            proc: self.proc.clone(),
10691            selection: query,
10692            graphql_client: self.graphql_client.clone(),
10693        }
10694    }
10695    /// Queries the host environment.
10696    pub fn host(&self) -> Host {
10697        let query = self.selection.select("host");
10698        Host {
10699            proc: self.proc.clone(),
10700            selection: query,
10701            graphql_client: self.graphql_client.clone(),
10702        }
10703    }
10704    /// Returns a file containing an http remote url content.
10705    ///
10706    /// # Arguments
10707    ///
10708    /// * `url` - HTTP url to get the content from (e.g., "https://docs.dagger.io").
10709    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10710    pub fn http(&self, url: impl Into<String>) -> File {
10711        let mut query = self.selection.select("http");
10712        query = query.arg("url", url.into());
10713        File {
10714            proc: self.proc.clone(),
10715            selection: query,
10716            graphql_client: self.graphql_client.clone(),
10717        }
10718    }
10719    /// Returns a file containing an http remote url content.
10720    ///
10721    /// # Arguments
10722    ///
10723    /// * `url` - HTTP url to get the content from (e.g., "https://docs.dagger.io").
10724    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10725    pub fn http_opts<'a>(&self, url: impl Into<String>, opts: QueryHttpOpts<'a>) -> File {
10726        let mut query = self.selection.select("http");
10727        query = query.arg("url", url.into());
10728        if let Some(name) = opts.name {
10729            query = query.arg("name", name);
10730        }
10731        if let Some(permissions) = opts.permissions {
10732            query = query.arg("permissions", permissions);
10733        }
10734        if let Some(auth_header) = opts.auth_header {
10735            query = query.arg("authHeader", auth_header);
10736        }
10737        if let Some(experimental_service_host) = opts.experimental_service_host {
10738            query = query.arg("experimentalServiceHost", experimental_service_host);
10739        }
10740        File {
10741            proc: self.proc.clone(),
10742            selection: query,
10743            graphql_client: self.graphql_client.clone(),
10744        }
10745    }
10746    /// Initialize a JSON value
10747    pub fn json(&self) -> JsonValue {
10748        let query = self.selection.select("json");
10749        JsonValue {
10750            proc: self.proc.clone(),
10751            selection: query,
10752            graphql_client: self.graphql_client.clone(),
10753        }
10754    }
10755    /// Initialize a Large Language Model (LLM)
10756    ///
10757    /// # Arguments
10758    ///
10759    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10760    pub fn llm(&self) -> Llm {
10761        let query = self.selection.select("llm");
10762        Llm {
10763            proc: self.proc.clone(),
10764            selection: query,
10765            graphql_client: self.graphql_client.clone(),
10766        }
10767    }
10768    /// Initialize a Large Language Model (LLM)
10769    ///
10770    /// # Arguments
10771    ///
10772    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10773    pub fn llm_opts<'a>(&self, opts: QueryLlmOpts<'a>) -> Llm {
10774        let mut query = self.selection.select("llm");
10775        if let Some(model) = opts.model {
10776            query = query.arg("model", model);
10777        }
10778        if let Some(max_api_calls) = opts.max_api_calls {
10779            query = query.arg("maxAPICalls", max_api_calls);
10780        }
10781        Llm {
10782            proc: self.proc.clone(),
10783            selection: query,
10784            graphql_client: self.graphql_client.clone(),
10785        }
10786    }
10787    /// Load a Address from its ID.
10788    pub fn load_address_from_id(&self, id: impl IntoID<AddressId>) -> Address {
10789        let mut query = self.selection.select("loadAddressFromID");
10790        query = query.arg_lazy(
10791            "id",
10792            Box::new(move || {
10793                let id = id.clone();
10794                Box::pin(async move { id.into_id().await.unwrap().quote() })
10795            }),
10796        );
10797        Address {
10798            proc: self.proc.clone(),
10799            selection: query,
10800            graphql_client: self.graphql_client.clone(),
10801        }
10802    }
10803    /// Load a Binding from its ID.
10804    pub fn load_binding_from_id(&self, id: impl IntoID<BindingId>) -> Binding {
10805        let mut query = self.selection.select("loadBindingFromID");
10806        query = query.arg_lazy(
10807            "id",
10808            Box::new(move || {
10809                let id = id.clone();
10810                Box::pin(async move { id.into_id().await.unwrap().quote() })
10811            }),
10812        );
10813        Binding {
10814            proc: self.proc.clone(),
10815            selection: query,
10816            graphql_client: self.graphql_client.clone(),
10817        }
10818    }
10819    /// Load a CacheVolume from its ID.
10820    pub fn load_cache_volume_from_id(&self, id: impl IntoID<CacheVolumeId>) -> CacheVolume {
10821        let mut query = self.selection.select("loadCacheVolumeFromID");
10822        query = query.arg_lazy(
10823            "id",
10824            Box::new(move || {
10825                let id = id.clone();
10826                Box::pin(async move { id.into_id().await.unwrap().quote() })
10827            }),
10828        );
10829        CacheVolume {
10830            proc: self.proc.clone(),
10831            selection: query,
10832            graphql_client: self.graphql_client.clone(),
10833        }
10834    }
10835    /// Load a Changeset from its ID.
10836    pub fn load_changeset_from_id(&self, id: impl IntoID<ChangesetId>) -> Changeset {
10837        let mut query = self.selection.select("loadChangesetFromID");
10838        query = query.arg_lazy(
10839            "id",
10840            Box::new(move || {
10841                let id = id.clone();
10842                Box::pin(async move { id.into_id().await.unwrap().quote() })
10843            }),
10844        );
10845        Changeset {
10846            proc: self.proc.clone(),
10847            selection: query,
10848            graphql_client: self.graphql_client.clone(),
10849        }
10850    }
10851    /// Load a Cloud from its ID.
10852    pub fn load_cloud_from_id(&self, id: impl IntoID<CloudId>) -> Cloud {
10853        let mut query = self.selection.select("loadCloudFromID");
10854        query = query.arg_lazy(
10855            "id",
10856            Box::new(move || {
10857                let id = id.clone();
10858                Box::pin(async move { id.into_id().await.unwrap().quote() })
10859            }),
10860        );
10861        Cloud {
10862            proc: self.proc.clone(),
10863            selection: query,
10864            graphql_client: self.graphql_client.clone(),
10865        }
10866    }
10867    /// Load a Container from its ID.
10868    pub fn load_container_from_id(&self, id: impl IntoID<ContainerId>) -> Container {
10869        let mut query = self.selection.select("loadContainerFromID");
10870        query = query.arg_lazy(
10871            "id",
10872            Box::new(move || {
10873                let id = id.clone();
10874                Box::pin(async move { id.into_id().await.unwrap().quote() })
10875            }),
10876        );
10877        Container {
10878            proc: self.proc.clone(),
10879            selection: query,
10880            graphql_client: self.graphql_client.clone(),
10881        }
10882    }
10883    /// Load a CurrentModule from its ID.
10884    pub fn load_current_module_from_id(&self, id: impl IntoID<CurrentModuleId>) -> CurrentModule {
10885        let mut query = self.selection.select("loadCurrentModuleFromID");
10886        query = query.arg_lazy(
10887            "id",
10888            Box::new(move || {
10889                let id = id.clone();
10890                Box::pin(async move { id.into_id().await.unwrap().quote() })
10891            }),
10892        );
10893        CurrentModule {
10894            proc: self.proc.clone(),
10895            selection: query,
10896            graphql_client: self.graphql_client.clone(),
10897        }
10898    }
10899    /// Load a Directory from its ID.
10900    pub fn load_directory_from_id(&self, id: impl IntoID<DirectoryId>) -> Directory {
10901        let mut query = self.selection.select("loadDirectoryFromID");
10902        query = query.arg_lazy(
10903            "id",
10904            Box::new(move || {
10905                let id = id.clone();
10906                Box::pin(async move { id.into_id().await.unwrap().quote() })
10907            }),
10908        );
10909        Directory {
10910            proc: self.proc.clone(),
10911            selection: query,
10912            graphql_client: self.graphql_client.clone(),
10913        }
10914    }
10915    /// Load a EngineCacheEntry from its ID.
10916    pub fn load_engine_cache_entry_from_id(
10917        &self,
10918        id: impl IntoID<EngineCacheEntryId>,
10919    ) -> EngineCacheEntry {
10920        let mut query = self.selection.select("loadEngineCacheEntryFromID");
10921        query = query.arg_lazy(
10922            "id",
10923            Box::new(move || {
10924                let id = id.clone();
10925                Box::pin(async move { id.into_id().await.unwrap().quote() })
10926            }),
10927        );
10928        EngineCacheEntry {
10929            proc: self.proc.clone(),
10930            selection: query,
10931            graphql_client: self.graphql_client.clone(),
10932        }
10933    }
10934    /// Load a EngineCacheEntrySet from its ID.
10935    pub fn load_engine_cache_entry_set_from_id(
10936        &self,
10937        id: impl IntoID<EngineCacheEntrySetId>,
10938    ) -> EngineCacheEntrySet {
10939        let mut query = self.selection.select("loadEngineCacheEntrySetFromID");
10940        query = query.arg_lazy(
10941            "id",
10942            Box::new(move || {
10943                let id = id.clone();
10944                Box::pin(async move { id.into_id().await.unwrap().quote() })
10945            }),
10946        );
10947        EngineCacheEntrySet {
10948            proc: self.proc.clone(),
10949            selection: query,
10950            graphql_client: self.graphql_client.clone(),
10951        }
10952    }
10953    /// Load a EngineCache from its ID.
10954    pub fn load_engine_cache_from_id(&self, id: impl IntoID<EngineCacheId>) -> EngineCache {
10955        let mut query = self.selection.select("loadEngineCacheFromID");
10956        query = query.arg_lazy(
10957            "id",
10958            Box::new(move || {
10959                let id = id.clone();
10960                Box::pin(async move { id.into_id().await.unwrap().quote() })
10961            }),
10962        );
10963        EngineCache {
10964            proc: self.proc.clone(),
10965            selection: query,
10966            graphql_client: self.graphql_client.clone(),
10967        }
10968    }
10969    /// Load a Engine from its ID.
10970    pub fn load_engine_from_id(&self, id: impl IntoID<EngineId>) -> Engine {
10971        let mut query = self.selection.select("loadEngineFromID");
10972        query = query.arg_lazy(
10973            "id",
10974            Box::new(move || {
10975                let id = id.clone();
10976                Box::pin(async move { id.into_id().await.unwrap().quote() })
10977            }),
10978        );
10979        Engine {
10980            proc: self.proc.clone(),
10981            selection: query,
10982            graphql_client: self.graphql_client.clone(),
10983        }
10984    }
10985    /// Load a EnumTypeDef from its ID.
10986    pub fn load_enum_type_def_from_id(&self, id: impl IntoID<EnumTypeDefId>) -> EnumTypeDef {
10987        let mut query = self.selection.select("loadEnumTypeDefFromID");
10988        query = query.arg_lazy(
10989            "id",
10990            Box::new(move || {
10991                let id = id.clone();
10992                Box::pin(async move { id.into_id().await.unwrap().quote() })
10993            }),
10994        );
10995        EnumTypeDef {
10996            proc: self.proc.clone(),
10997            selection: query,
10998            graphql_client: self.graphql_client.clone(),
10999        }
11000    }
11001    /// Load a EnumValueTypeDef from its ID.
11002    pub fn load_enum_value_type_def_from_id(
11003        &self,
11004        id: impl IntoID<EnumValueTypeDefId>,
11005    ) -> EnumValueTypeDef {
11006        let mut query = self.selection.select("loadEnumValueTypeDefFromID");
11007        query = query.arg_lazy(
11008            "id",
11009            Box::new(move || {
11010                let id = id.clone();
11011                Box::pin(async move { id.into_id().await.unwrap().quote() })
11012            }),
11013        );
11014        EnumValueTypeDef {
11015            proc: self.proc.clone(),
11016            selection: query,
11017            graphql_client: self.graphql_client.clone(),
11018        }
11019    }
11020    /// Load a EnvFile from its ID.
11021    pub fn load_env_file_from_id(&self, id: impl IntoID<EnvFileId>) -> EnvFile {
11022        let mut query = self.selection.select("loadEnvFileFromID");
11023        query = query.arg_lazy(
11024            "id",
11025            Box::new(move || {
11026                let id = id.clone();
11027                Box::pin(async move { id.into_id().await.unwrap().quote() })
11028            }),
11029        );
11030        EnvFile {
11031            proc: self.proc.clone(),
11032            selection: query,
11033            graphql_client: self.graphql_client.clone(),
11034        }
11035    }
11036    /// Load a Env from its ID.
11037    pub fn load_env_from_id(&self, id: impl IntoID<EnvId>) -> Env {
11038        let mut query = self.selection.select("loadEnvFromID");
11039        query = query.arg_lazy(
11040            "id",
11041            Box::new(move || {
11042                let id = id.clone();
11043                Box::pin(async move { id.into_id().await.unwrap().quote() })
11044            }),
11045        );
11046        Env {
11047            proc: self.proc.clone(),
11048            selection: query,
11049            graphql_client: self.graphql_client.clone(),
11050        }
11051    }
11052    /// Load a EnvVariable from its ID.
11053    pub fn load_env_variable_from_id(&self, id: impl IntoID<EnvVariableId>) -> EnvVariable {
11054        let mut query = self.selection.select("loadEnvVariableFromID");
11055        query = query.arg_lazy(
11056            "id",
11057            Box::new(move || {
11058                let id = id.clone();
11059                Box::pin(async move { id.into_id().await.unwrap().quote() })
11060            }),
11061        );
11062        EnvVariable {
11063            proc: self.proc.clone(),
11064            selection: query,
11065            graphql_client: self.graphql_client.clone(),
11066        }
11067    }
11068    /// Load a Error from its ID.
11069    pub fn load_error_from_id(&self, id: impl IntoID<ErrorId>) -> Error {
11070        let mut query = self.selection.select("loadErrorFromID");
11071        query = query.arg_lazy(
11072            "id",
11073            Box::new(move || {
11074                let id = id.clone();
11075                Box::pin(async move { id.into_id().await.unwrap().quote() })
11076            }),
11077        );
11078        Error {
11079            proc: self.proc.clone(),
11080            selection: query,
11081            graphql_client: self.graphql_client.clone(),
11082        }
11083    }
11084    /// Load a ErrorValue from its ID.
11085    pub fn load_error_value_from_id(&self, id: impl IntoID<ErrorValueId>) -> ErrorValue {
11086        let mut query = self.selection.select("loadErrorValueFromID");
11087        query = query.arg_lazy(
11088            "id",
11089            Box::new(move || {
11090                let id = id.clone();
11091                Box::pin(async move { id.into_id().await.unwrap().quote() })
11092            }),
11093        );
11094        ErrorValue {
11095            proc: self.proc.clone(),
11096            selection: query,
11097            graphql_client: self.graphql_client.clone(),
11098        }
11099    }
11100    /// Load a FieldTypeDef from its ID.
11101    pub fn load_field_type_def_from_id(&self, id: impl IntoID<FieldTypeDefId>) -> FieldTypeDef {
11102        let mut query = self.selection.select("loadFieldTypeDefFromID");
11103        query = query.arg_lazy(
11104            "id",
11105            Box::new(move || {
11106                let id = id.clone();
11107                Box::pin(async move { id.into_id().await.unwrap().quote() })
11108            }),
11109        );
11110        FieldTypeDef {
11111            proc: self.proc.clone(),
11112            selection: query,
11113            graphql_client: self.graphql_client.clone(),
11114        }
11115    }
11116    /// Load a File from its ID.
11117    pub fn load_file_from_id(&self, id: impl IntoID<FileId>) -> File {
11118        let mut query = self.selection.select("loadFileFromID");
11119        query = query.arg_lazy(
11120            "id",
11121            Box::new(move || {
11122                let id = id.clone();
11123                Box::pin(async move { id.into_id().await.unwrap().quote() })
11124            }),
11125        );
11126        File {
11127            proc: self.proc.clone(),
11128            selection: query,
11129            graphql_client: self.graphql_client.clone(),
11130        }
11131    }
11132    /// Load a FunctionArg from its ID.
11133    pub fn load_function_arg_from_id(&self, id: impl IntoID<FunctionArgId>) -> FunctionArg {
11134        let mut query = self.selection.select("loadFunctionArgFromID");
11135        query = query.arg_lazy(
11136            "id",
11137            Box::new(move || {
11138                let id = id.clone();
11139                Box::pin(async move { id.into_id().await.unwrap().quote() })
11140            }),
11141        );
11142        FunctionArg {
11143            proc: self.proc.clone(),
11144            selection: query,
11145            graphql_client: self.graphql_client.clone(),
11146        }
11147    }
11148    /// Load a FunctionCallArgValue from its ID.
11149    pub fn load_function_call_arg_value_from_id(
11150        &self,
11151        id: impl IntoID<FunctionCallArgValueId>,
11152    ) -> FunctionCallArgValue {
11153        let mut query = self.selection.select("loadFunctionCallArgValueFromID");
11154        query = query.arg_lazy(
11155            "id",
11156            Box::new(move || {
11157                let id = id.clone();
11158                Box::pin(async move { id.into_id().await.unwrap().quote() })
11159            }),
11160        );
11161        FunctionCallArgValue {
11162            proc: self.proc.clone(),
11163            selection: query,
11164            graphql_client: self.graphql_client.clone(),
11165        }
11166    }
11167    /// Load a FunctionCall from its ID.
11168    pub fn load_function_call_from_id(&self, id: impl IntoID<FunctionCallId>) -> FunctionCall {
11169        let mut query = self.selection.select("loadFunctionCallFromID");
11170        query = query.arg_lazy(
11171            "id",
11172            Box::new(move || {
11173                let id = id.clone();
11174                Box::pin(async move { id.into_id().await.unwrap().quote() })
11175            }),
11176        );
11177        FunctionCall {
11178            proc: self.proc.clone(),
11179            selection: query,
11180            graphql_client: self.graphql_client.clone(),
11181        }
11182    }
11183    /// Load a Function from its ID.
11184    pub fn load_function_from_id(&self, id: impl IntoID<FunctionId>) -> Function {
11185        let mut query = self.selection.select("loadFunctionFromID");
11186        query = query.arg_lazy(
11187            "id",
11188            Box::new(move || {
11189                let id = id.clone();
11190                Box::pin(async move { id.into_id().await.unwrap().quote() })
11191            }),
11192        );
11193        Function {
11194            proc: self.proc.clone(),
11195            selection: query,
11196            graphql_client: self.graphql_client.clone(),
11197        }
11198    }
11199    /// Load a GeneratedCode from its ID.
11200    pub fn load_generated_code_from_id(&self, id: impl IntoID<GeneratedCodeId>) -> GeneratedCode {
11201        let mut query = self.selection.select("loadGeneratedCodeFromID");
11202        query = query.arg_lazy(
11203            "id",
11204            Box::new(move || {
11205                let id = id.clone();
11206                Box::pin(async move { id.into_id().await.unwrap().quote() })
11207            }),
11208        );
11209        GeneratedCode {
11210            proc: self.proc.clone(),
11211            selection: query,
11212            graphql_client: self.graphql_client.clone(),
11213        }
11214    }
11215    /// Load a GitRef from its ID.
11216    pub fn load_git_ref_from_id(&self, id: impl IntoID<GitRefId>) -> GitRef {
11217        let mut query = self.selection.select("loadGitRefFromID");
11218        query = query.arg_lazy(
11219            "id",
11220            Box::new(move || {
11221                let id = id.clone();
11222                Box::pin(async move { id.into_id().await.unwrap().quote() })
11223            }),
11224        );
11225        GitRef {
11226            proc: self.proc.clone(),
11227            selection: query,
11228            graphql_client: self.graphql_client.clone(),
11229        }
11230    }
11231    /// Load a GitRepository from its ID.
11232    pub fn load_git_repository_from_id(&self, id: impl IntoID<GitRepositoryId>) -> GitRepository {
11233        let mut query = self.selection.select("loadGitRepositoryFromID");
11234        query = query.arg_lazy(
11235            "id",
11236            Box::new(move || {
11237                let id = id.clone();
11238                Box::pin(async move { id.into_id().await.unwrap().quote() })
11239            }),
11240        );
11241        GitRepository {
11242            proc: self.proc.clone(),
11243            selection: query,
11244            graphql_client: self.graphql_client.clone(),
11245        }
11246    }
11247    /// Load a Host from its ID.
11248    pub fn load_host_from_id(&self, id: impl IntoID<HostId>) -> Host {
11249        let mut query = self.selection.select("loadHostFromID");
11250        query = query.arg_lazy(
11251            "id",
11252            Box::new(move || {
11253                let id = id.clone();
11254                Box::pin(async move { id.into_id().await.unwrap().quote() })
11255            }),
11256        );
11257        Host {
11258            proc: self.proc.clone(),
11259            selection: query,
11260            graphql_client: self.graphql_client.clone(),
11261        }
11262    }
11263    /// Load a InputTypeDef from its ID.
11264    pub fn load_input_type_def_from_id(&self, id: impl IntoID<InputTypeDefId>) -> InputTypeDef {
11265        let mut query = self.selection.select("loadInputTypeDefFromID");
11266        query = query.arg_lazy(
11267            "id",
11268            Box::new(move || {
11269                let id = id.clone();
11270                Box::pin(async move { id.into_id().await.unwrap().quote() })
11271            }),
11272        );
11273        InputTypeDef {
11274            proc: self.proc.clone(),
11275            selection: query,
11276            graphql_client: self.graphql_client.clone(),
11277        }
11278    }
11279    /// Load a InterfaceTypeDef from its ID.
11280    pub fn load_interface_type_def_from_id(
11281        &self,
11282        id: impl IntoID<InterfaceTypeDefId>,
11283    ) -> InterfaceTypeDef {
11284        let mut query = self.selection.select("loadInterfaceTypeDefFromID");
11285        query = query.arg_lazy(
11286            "id",
11287            Box::new(move || {
11288                let id = id.clone();
11289                Box::pin(async move { id.into_id().await.unwrap().quote() })
11290            }),
11291        );
11292        InterfaceTypeDef {
11293            proc: self.proc.clone(),
11294            selection: query,
11295            graphql_client: self.graphql_client.clone(),
11296        }
11297    }
11298    /// Load a JSONValue from its ID.
11299    pub fn load_json_value_from_id(&self, id: impl IntoID<JsonValueId>) -> JsonValue {
11300        let mut query = self.selection.select("loadJSONValueFromID");
11301        query = query.arg_lazy(
11302            "id",
11303            Box::new(move || {
11304                let id = id.clone();
11305                Box::pin(async move { id.into_id().await.unwrap().quote() })
11306            }),
11307        );
11308        JsonValue {
11309            proc: self.proc.clone(),
11310            selection: query,
11311            graphql_client: self.graphql_client.clone(),
11312        }
11313    }
11314    /// Load a LLM from its ID.
11315    pub fn load_llm_from_id(&self, id: impl IntoID<Llmid>) -> Llm {
11316        let mut query = self.selection.select("loadLLMFromID");
11317        query = query.arg_lazy(
11318            "id",
11319            Box::new(move || {
11320                let id = id.clone();
11321                Box::pin(async move { id.into_id().await.unwrap().quote() })
11322            }),
11323        );
11324        Llm {
11325            proc: self.proc.clone(),
11326            selection: query,
11327            graphql_client: self.graphql_client.clone(),
11328        }
11329    }
11330    /// Load a LLMTokenUsage from its ID.
11331    pub fn load_llm_token_usage_from_id(&self, id: impl IntoID<LlmTokenUsageId>) -> LlmTokenUsage {
11332        let mut query = self.selection.select("loadLLMTokenUsageFromID");
11333        query = query.arg_lazy(
11334            "id",
11335            Box::new(move || {
11336                let id = id.clone();
11337                Box::pin(async move { id.into_id().await.unwrap().quote() })
11338            }),
11339        );
11340        LlmTokenUsage {
11341            proc: self.proc.clone(),
11342            selection: query,
11343            graphql_client: self.graphql_client.clone(),
11344        }
11345    }
11346    /// Load a Label from its ID.
11347    pub fn load_label_from_id(&self, id: impl IntoID<LabelId>) -> Label {
11348        let mut query = self.selection.select("loadLabelFromID");
11349        query = query.arg_lazy(
11350            "id",
11351            Box::new(move || {
11352                let id = id.clone();
11353                Box::pin(async move { id.into_id().await.unwrap().quote() })
11354            }),
11355        );
11356        Label {
11357            proc: self.proc.clone(),
11358            selection: query,
11359            graphql_client: self.graphql_client.clone(),
11360        }
11361    }
11362    /// Load a ListTypeDef from its ID.
11363    pub fn load_list_type_def_from_id(&self, id: impl IntoID<ListTypeDefId>) -> ListTypeDef {
11364        let mut query = self.selection.select("loadListTypeDefFromID");
11365        query = query.arg_lazy(
11366            "id",
11367            Box::new(move || {
11368                let id = id.clone();
11369                Box::pin(async move { id.into_id().await.unwrap().quote() })
11370            }),
11371        );
11372        ListTypeDef {
11373            proc: self.proc.clone(),
11374            selection: query,
11375            graphql_client: self.graphql_client.clone(),
11376        }
11377    }
11378    /// Load a ModuleConfigClient from its ID.
11379    pub fn load_module_config_client_from_id(
11380        &self,
11381        id: impl IntoID<ModuleConfigClientId>,
11382    ) -> ModuleConfigClient {
11383        let mut query = self.selection.select("loadModuleConfigClientFromID");
11384        query = query.arg_lazy(
11385            "id",
11386            Box::new(move || {
11387                let id = id.clone();
11388                Box::pin(async move { id.into_id().await.unwrap().quote() })
11389            }),
11390        );
11391        ModuleConfigClient {
11392            proc: self.proc.clone(),
11393            selection: query,
11394            graphql_client: self.graphql_client.clone(),
11395        }
11396    }
11397    /// Load a Module from its ID.
11398    pub fn load_module_from_id(&self, id: impl IntoID<ModuleId>) -> Module {
11399        let mut query = self.selection.select("loadModuleFromID");
11400        query = query.arg_lazy(
11401            "id",
11402            Box::new(move || {
11403                let id = id.clone();
11404                Box::pin(async move { id.into_id().await.unwrap().quote() })
11405            }),
11406        );
11407        Module {
11408            proc: self.proc.clone(),
11409            selection: query,
11410            graphql_client: self.graphql_client.clone(),
11411        }
11412    }
11413    /// Load a ModuleSource from its ID.
11414    pub fn load_module_source_from_id(&self, id: impl IntoID<ModuleSourceId>) -> ModuleSource {
11415        let mut query = self.selection.select("loadModuleSourceFromID");
11416        query = query.arg_lazy(
11417            "id",
11418            Box::new(move || {
11419                let id = id.clone();
11420                Box::pin(async move { id.into_id().await.unwrap().quote() })
11421            }),
11422        );
11423        ModuleSource {
11424            proc: self.proc.clone(),
11425            selection: query,
11426            graphql_client: self.graphql_client.clone(),
11427        }
11428    }
11429    /// Load a ObjectTypeDef from its ID.
11430    pub fn load_object_type_def_from_id(&self, id: impl IntoID<ObjectTypeDefId>) -> ObjectTypeDef {
11431        let mut query = self.selection.select("loadObjectTypeDefFromID");
11432        query = query.arg_lazy(
11433            "id",
11434            Box::new(move || {
11435                let id = id.clone();
11436                Box::pin(async move { id.into_id().await.unwrap().quote() })
11437            }),
11438        );
11439        ObjectTypeDef {
11440            proc: self.proc.clone(),
11441            selection: query,
11442            graphql_client: self.graphql_client.clone(),
11443        }
11444    }
11445    /// Load a Port from its ID.
11446    pub fn load_port_from_id(&self, id: impl IntoID<PortId>) -> Port {
11447        let mut query = self.selection.select("loadPortFromID");
11448        query = query.arg_lazy(
11449            "id",
11450            Box::new(move || {
11451                let id = id.clone();
11452                Box::pin(async move { id.into_id().await.unwrap().quote() })
11453            }),
11454        );
11455        Port {
11456            proc: self.proc.clone(),
11457            selection: query,
11458            graphql_client: self.graphql_client.clone(),
11459        }
11460    }
11461    /// Load a SDKConfig from its ID.
11462    pub fn load_sdk_config_from_id(&self, id: impl IntoID<SdkConfigId>) -> SdkConfig {
11463        let mut query = self.selection.select("loadSDKConfigFromID");
11464        query = query.arg_lazy(
11465            "id",
11466            Box::new(move || {
11467                let id = id.clone();
11468                Box::pin(async move { id.into_id().await.unwrap().quote() })
11469            }),
11470        );
11471        SdkConfig {
11472            proc: self.proc.clone(),
11473            selection: query,
11474            graphql_client: self.graphql_client.clone(),
11475        }
11476    }
11477    /// Load a ScalarTypeDef from its ID.
11478    pub fn load_scalar_type_def_from_id(&self, id: impl IntoID<ScalarTypeDefId>) -> ScalarTypeDef {
11479        let mut query = self.selection.select("loadScalarTypeDefFromID");
11480        query = query.arg_lazy(
11481            "id",
11482            Box::new(move || {
11483                let id = id.clone();
11484                Box::pin(async move { id.into_id().await.unwrap().quote() })
11485            }),
11486        );
11487        ScalarTypeDef {
11488            proc: self.proc.clone(),
11489            selection: query,
11490            graphql_client: self.graphql_client.clone(),
11491        }
11492    }
11493    /// Load a SearchResult from its ID.
11494    pub fn load_search_result_from_id(&self, id: impl IntoID<SearchResultId>) -> SearchResult {
11495        let mut query = self.selection.select("loadSearchResultFromID");
11496        query = query.arg_lazy(
11497            "id",
11498            Box::new(move || {
11499                let id = id.clone();
11500                Box::pin(async move { id.into_id().await.unwrap().quote() })
11501            }),
11502        );
11503        SearchResult {
11504            proc: self.proc.clone(),
11505            selection: query,
11506            graphql_client: self.graphql_client.clone(),
11507        }
11508    }
11509    /// Load a SearchSubmatch from its ID.
11510    pub fn load_search_submatch_from_id(
11511        &self,
11512        id: impl IntoID<SearchSubmatchId>,
11513    ) -> SearchSubmatch {
11514        let mut query = self.selection.select("loadSearchSubmatchFromID");
11515        query = query.arg_lazy(
11516            "id",
11517            Box::new(move || {
11518                let id = id.clone();
11519                Box::pin(async move { id.into_id().await.unwrap().quote() })
11520            }),
11521        );
11522        SearchSubmatch {
11523            proc: self.proc.clone(),
11524            selection: query,
11525            graphql_client: self.graphql_client.clone(),
11526        }
11527    }
11528    /// Load a Secret from its ID.
11529    pub fn load_secret_from_id(&self, id: impl IntoID<SecretId>) -> Secret {
11530        let mut query = self.selection.select("loadSecretFromID");
11531        query = query.arg_lazy(
11532            "id",
11533            Box::new(move || {
11534                let id = id.clone();
11535                Box::pin(async move { id.into_id().await.unwrap().quote() })
11536            }),
11537        );
11538        Secret {
11539            proc: self.proc.clone(),
11540            selection: query,
11541            graphql_client: self.graphql_client.clone(),
11542        }
11543    }
11544    /// Load a Service from its ID.
11545    pub fn load_service_from_id(&self, id: impl IntoID<ServiceId>) -> Service {
11546        let mut query = self.selection.select("loadServiceFromID");
11547        query = query.arg_lazy(
11548            "id",
11549            Box::new(move || {
11550                let id = id.clone();
11551                Box::pin(async move { id.into_id().await.unwrap().quote() })
11552            }),
11553        );
11554        Service {
11555            proc: self.proc.clone(),
11556            selection: query,
11557            graphql_client: self.graphql_client.clone(),
11558        }
11559    }
11560    /// Load a Socket from its ID.
11561    pub fn load_socket_from_id(&self, id: impl IntoID<SocketId>) -> Socket {
11562        let mut query = self.selection.select("loadSocketFromID");
11563        query = query.arg_lazy(
11564            "id",
11565            Box::new(move || {
11566                let id = id.clone();
11567                Box::pin(async move { id.into_id().await.unwrap().quote() })
11568            }),
11569        );
11570        Socket {
11571            proc: self.proc.clone(),
11572            selection: query,
11573            graphql_client: self.graphql_client.clone(),
11574        }
11575    }
11576    /// Load a SourceMap from its ID.
11577    pub fn load_source_map_from_id(&self, id: impl IntoID<SourceMapId>) -> SourceMap {
11578        let mut query = self.selection.select("loadSourceMapFromID");
11579        query = query.arg_lazy(
11580            "id",
11581            Box::new(move || {
11582                let id = id.clone();
11583                Box::pin(async move { id.into_id().await.unwrap().quote() })
11584            }),
11585        );
11586        SourceMap {
11587            proc: self.proc.clone(),
11588            selection: query,
11589            graphql_client: self.graphql_client.clone(),
11590        }
11591    }
11592    /// Load a Terminal from its ID.
11593    pub fn load_terminal_from_id(&self, id: impl IntoID<TerminalId>) -> Terminal {
11594        let mut query = self.selection.select("loadTerminalFromID");
11595        query = query.arg_lazy(
11596            "id",
11597            Box::new(move || {
11598                let id = id.clone();
11599                Box::pin(async move { id.into_id().await.unwrap().quote() })
11600            }),
11601        );
11602        Terminal {
11603            proc: self.proc.clone(),
11604            selection: query,
11605            graphql_client: self.graphql_client.clone(),
11606        }
11607    }
11608    /// Load a TypeDef from its ID.
11609    pub fn load_type_def_from_id(&self, id: impl IntoID<TypeDefId>) -> TypeDef {
11610        let mut query = self.selection.select("loadTypeDefFromID");
11611        query = query.arg_lazy(
11612            "id",
11613            Box::new(move || {
11614                let id = id.clone();
11615                Box::pin(async move { id.into_id().await.unwrap().quote() })
11616            }),
11617        );
11618        TypeDef {
11619            proc: self.proc.clone(),
11620            selection: query,
11621            graphql_client: self.graphql_client.clone(),
11622        }
11623    }
11624    /// Create a new module.
11625    pub fn module(&self) -> Module {
11626        let query = self.selection.select("module");
11627        Module {
11628            proc: self.proc.clone(),
11629            selection: query,
11630            graphql_client: self.graphql_client.clone(),
11631        }
11632    }
11633    /// Create a new module source instance from a source ref string
11634    ///
11635    /// # Arguments
11636    ///
11637    /// * `ref_string` - The string ref representation of the module source
11638    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11639    pub fn module_source(&self, ref_string: impl Into<String>) -> ModuleSource {
11640        let mut query = self.selection.select("moduleSource");
11641        query = query.arg("refString", ref_string.into());
11642        ModuleSource {
11643            proc: self.proc.clone(),
11644            selection: query,
11645            graphql_client: self.graphql_client.clone(),
11646        }
11647    }
11648    /// Create a new module source instance from a source ref string
11649    ///
11650    /// # Arguments
11651    ///
11652    /// * `ref_string` - The string ref representation of the module source
11653    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11654    pub fn module_source_opts<'a>(
11655        &self,
11656        ref_string: impl Into<String>,
11657        opts: QueryModuleSourceOpts<'a>,
11658    ) -> ModuleSource {
11659        let mut query = self.selection.select("moduleSource");
11660        query = query.arg("refString", ref_string.into());
11661        if let Some(ref_pin) = opts.ref_pin {
11662            query = query.arg("refPin", ref_pin);
11663        }
11664        if let Some(disable_find_up) = opts.disable_find_up {
11665            query = query.arg("disableFindUp", disable_find_up);
11666        }
11667        if let Some(allow_not_exists) = opts.allow_not_exists {
11668            query = query.arg("allowNotExists", allow_not_exists);
11669        }
11670        if let Some(require_kind) = opts.require_kind {
11671            query = query.arg("requireKind", require_kind);
11672        }
11673        ModuleSource {
11674            proc: self.proc.clone(),
11675            selection: query,
11676            graphql_client: self.graphql_client.clone(),
11677        }
11678    }
11679    /// Creates a new secret.
11680    ///
11681    /// # Arguments
11682    ///
11683    /// * `uri` - The URI of the secret store
11684    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11685    pub fn secret(&self, uri: impl Into<String>) -> Secret {
11686        let mut query = self.selection.select("secret");
11687        query = query.arg("uri", uri.into());
11688        Secret {
11689            proc: self.proc.clone(),
11690            selection: query,
11691            graphql_client: self.graphql_client.clone(),
11692        }
11693    }
11694    /// Creates a new secret.
11695    ///
11696    /// # Arguments
11697    ///
11698    /// * `uri` - The URI of the secret store
11699    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11700    pub fn secret_opts<'a>(&self, uri: impl Into<String>, opts: QuerySecretOpts<'a>) -> Secret {
11701        let mut query = self.selection.select("secret");
11702        query = query.arg("uri", uri.into());
11703        if let Some(cache_key) = opts.cache_key {
11704            query = query.arg("cacheKey", cache_key);
11705        }
11706        Secret {
11707            proc: self.proc.clone(),
11708            selection: query,
11709            graphql_client: self.graphql_client.clone(),
11710        }
11711    }
11712    /// Sets a secret given a user defined name to its plaintext and returns the secret.
11713    /// The plaintext value is limited to a size of 128000 bytes.
11714    ///
11715    /// # Arguments
11716    ///
11717    /// * `name` - The user defined name for this secret
11718    /// * `plaintext` - The plaintext of the secret
11719    pub fn set_secret(&self, name: impl Into<String>, plaintext: impl Into<String>) -> Secret {
11720        let mut query = self.selection.select("setSecret");
11721        query = query.arg("name", name.into());
11722        query = query.arg("plaintext", plaintext.into());
11723        Secret {
11724            proc: self.proc.clone(),
11725            selection: query,
11726            graphql_client: self.graphql_client.clone(),
11727        }
11728    }
11729    /// Creates source map metadata.
11730    ///
11731    /// # Arguments
11732    ///
11733    /// * `filename` - The filename from the module source.
11734    /// * `line` - The line number within the filename.
11735    /// * `column` - The column number within the line.
11736    pub fn source_map(&self, filename: impl Into<String>, line: isize, column: isize) -> SourceMap {
11737        let mut query = self.selection.select("sourceMap");
11738        query = query.arg("filename", filename.into());
11739        query = query.arg("line", line);
11740        query = query.arg("column", column);
11741        SourceMap {
11742            proc: self.proc.clone(),
11743            selection: query,
11744            graphql_client: self.graphql_client.clone(),
11745        }
11746    }
11747    /// Create a new TypeDef.
11748    pub fn type_def(&self) -> TypeDef {
11749        let query = self.selection.select("typeDef");
11750        TypeDef {
11751            proc: self.proc.clone(),
11752            selection: query,
11753            graphql_client: self.graphql_client.clone(),
11754        }
11755    }
11756    /// Get the current Dagger Engine version.
11757    pub async fn version(&self) -> Result<String, DaggerError> {
11758        let query = self.selection.select("version");
11759        query.execute(self.graphql_client.clone()).await
11760    }
11761}
11762#[derive(Clone)]
11763pub struct SdkConfig {
11764    pub proc: Option<Arc<DaggerSessionProc>>,
11765    pub selection: Selection,
11766    pub graphql_client: DynGraphQLClient,
11767}
11768impl SdkConfig {
11769    /// A unique identifier for this SDKConfig.
11770    pub async fn id(&self) -> Result<SdkConfigId, DaggerError> {
11771        let query = self.selection.select("id");
11772        query.execute(self.graphql_client.clone()).await
11773    }
11774    /// Source of the SDK. Either a name of a builtin SDK or a module source ref string pointing to the SDK's implementation.
11775    pub async fn source(&self) -> Result<String, DaggerError> {
11776        let query = self.selection.select("source");
11777        query.execute(self.graphql_client.clone()).await
11778    }
11779}
11780#[derive(Clone)]
11781pub struct ScalarTypeDef {
11782    pub proc: Option<Arc<DaggerSessionProc>>,
11783    pub selection: Selection,
11784    pub graphql_client: DynGraphQLClient,
11785}
11786impl ScalarTypeDef {
11787    /// A doc string for the scalar, if any.
11788    pub async fn description(&self) -> Result<String, DaggerError> {
11789        let query = self.selection.select("description");
11790        query.execute(self.graphql_client.clone()).await
11791    }
11792    /// A unique identifier for this ScalarTypeDef.
11793    pub async fn id(&self) -> Result<ScalarTypeDefId, DaggerError> {
11794        let query = self.selection.select("id");
11795        query.execute(self.graphql_client.clone()).await
11796    }
11797    /// The name of the scalar.
11798    pub async fn name(&self) -> Result<String, DaggerError> {
11799        let query = self.selection.select("name");
11800        query.execute(self.graphql_client.clone()).await
11801    }
11802    /// If this ScalarTypeDef is associated with a Module, the name of the module. Unset otherwise.
11803    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
11804        let query = self.selection.select("sourceModuleName");
11805        query.execute(self.graphql_client.clone()).await
11806    }
11807}
11808#[derive(Clone)]
11809pub struct SearchResult {
11810    pub proc: Option<Arc<DaggerSessionProc>>,
11811    pub selection: Selection,
11812    pub graphql_client: DynGraphQLClient,
11813}
11814impl SearchResult {
11815    /// The byte offset of this line within the file.
11816    pub async fn absolute_offset(&self) -> Result<isize, DaggerError> {
11817        let query = self.selection.select("absoluteOffset");
11818        query.execute(self.graphql_client.clone()).await
11819    }
11820    /// The path to the file that matched.
11821    pub async fn file_path(&self) -> Result<String, DaggerError> {
11822        let query = self.selection.select("filePath");
11823        query.execute(self.graphql_client.clone()).await
11824    }
11825    /// A unique identifier for this SearchResult.
11826    pub async fn id(&self) -> Result<SearchResultId, DaggerError> {
11827        let query = self.selection.select("id");
11828        query.execute(self.graphql_client.clone()).await
11829    }
11830    /// The first line that matched.
11831    pub async fn line_number(&self) -> Result<isize, DaggerError> {
11832        let query = self.selection.select("lineNumber");
11833        query.execute(self.graphql_client.clone()).await
11834    }
11835    /// The line content that matched.
11836    pub async fn matched_lines(&self) -> Result<String, DaggerError> {
11837        let query = self.selection.select("matchedLines");
11838        query.execute(self.graphql_client.clone()).await
11839    }
11840    /// Sub-match positions and content within the matched lines.
11841    pub fn submatches(&self) -> Vec<SearchSubmatch> {
11842        let query = self.selection.select("submatches");
11843        vec![SearchSubmatch {
11844            proc: self.proc.clone(),
11845            selection: query,
11846            graphql_client: self.graphql_client.clone(),
11847        }]
11848    }
11849}
11850#[derive(Clone)]
11851pub struct SearchSubmatch {
11852    pub proc: Option<Arc<DaggerSessionProc>>,
11853    pub selection: Selection,
11854    pub graphql_client: DynGraphQLClient,
11855}
11856impl SearchSubmatch {
11857    /// The match's end offset within the matched lines.
11858    pub async fn end(&self) -> Result<isize, DaggerError> {
11859        let query = self.selection.select("end");
11860        query.execute(self.graphql_client.clone()).await
11861    }
11862    /// A unique identifier for this SearchSubmatch.
11863    pub async fn id(&self) -> Result<SearchSubmatchId, DaggerError> {
11864        let query = self.selection.select("id");
11865        query.execute(self.graphql_client.clone()).await
11866    }
11867    /// The match's start offset within the matched lines.
11868    pub async fn start(&self) -> Result<isize, DaggerError> {
11869        let query = self.selection.select("start");
11870        query.execute(self.graphql_client.clone()).await
11871    }
11872    /// The matched text.
11873    pub async fn text(&self) -> Result<String, DaggerError> {
11874        let query = self.selection.select("text");
11875        query.execute(self.graphql_client.clone()).await
11876    }
11877}
11878#[derive(Clone)]
11879pub struct Secret {
11880    pub proc: Option<Arc<DaggerSessionProc>>,
11881    pub selection: Selection,
11882    pub graphql_client: DynGraphQLClient,
11883}
11884impl Secret {
11885    /// A unique identifier for this Secret.
11886    pub async fn id(&self) -> Result<SecretId, DaggerError> {
11887        let query = self.selection.select("id");
11888        query.execute(self.graphql_client.clone()).await
11889    }
11890    /// The name of this secret.
11891    pub async fn name(&self) -> Result<String, DaggerError> {
11892        let query = self.selection.select("name");
11893        query.execute(self.graphql_client.clone()).await
11894    }
11895    /// The value of this secret.
11896    pub async fn plaintext(&self) -> Result<String, DaggerError> {
11897        let query = self.selection.select("plaintext");
11898        query.execute(self.graphql_client.clone()).await
11899    }
11900    /// The URI of this secret.
11901    pub async fn uri(&self) -> Result<String, DaggerError> {
11902        let query = self.selection.select("uri");
11903        query.execute(self.graphql_client.clone()).await
11904    }
11905}
11906#[derive(Clone)]
11907pub struct Service {
11908    pub proc: Option<Arc<DaggerSessionProc>>,
11909    pub selection: Selection,
11910    pub graphql_client: DynGraphQLClient,
11911}
11912#[derive(Builder, Debug, PartialEq)]
11913pub struct ServiceEndpointOpts<'a> {
11914    /// The exposed port number for the endpoint
11915    #[builder(setter(into, strip_option), default)]
11916    pub port: Option<isize>,
11917    /// Return a URL with the given scheme, eg. http for http://
11918    #[builder(setter(into, strip_option), default)]
11919    pub scheme: Option<&'a str>,
11920}
11921#[derive(Builder, Debug, PartialEq)]
11922pub struct ServiceStopOpts {
11923    /// Immediately kill the service without waiting for a graceful exit
11924    #[builder(setter(into, strip_option), default)]
11925    pub kill: Option<bool>,
11926}
11927#[derive(Builder, Debug, PartialEq)]
11928pub struct ServiceTerminalOpts<'a> {
11929    #[builder(setter(into, strip_option), default)]
11930    pub cmd: Option<Vec<&'a str>>,
11931}
11932#[derive(Builder, Debug, PartialEq)]
11933pub struct ServiceUpOpts {
11934    /// List of frontend/backend port mappings to forward.
11935    /// Frontend is the port accepting traffic on the host, backend is the service port.
11936    #[builder(setter(into, strip_option), default)]
11937    pub ports: Option<Vec<PortForward>>,
11938    /// Bind each tunnel port to a random port on the host.
11939    #[builder(setter(into, strip_option), default)]
11940    pub random: Option<bool>,
11941}
11942impl Service {
11943    /// Retrieves an endpoint that clients can use to reach this container.
11944    /// If no port is specified, the first exposed port is used. If none exist an error is returned.
11945    /// If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.
11946    ///
11947    /// # Arguments
11948    ///
11949    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11950    pub async fn endpoint(&self) -> Result<String, DaggerError> {
11951        let query = self.selection.select("endpoint");
11952        query.execute(self.graphql_client.clone()).await
11953    }
11954    /// Retrieves an endpoint that clients can use to reach this container.
11955    /// If no port is specified, the first exposed port is used. If none exist an error is returned.
11956    /// If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.
11957    ///
11958    /// # Arguments
11959    ///
11960    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11961    pub async fn endpoint_opts<'a>(
11962        &self,
11963        opts: ServiceEndpointOpts<'a>,
11964    ) -> Result<String, DaggerError> {
11965        let mut query = self.selection.select("endpoint");
11966        if let Some(port) = opts.port {
11967            query = query.arg("port", port);
11968        }
11969        if let Some(scheme) = opts.scheme {
11970            query = query.arg("scheme", scheme);
11971        }
11972        query.execute(self.graphql_client.clone()).await
11973    }
11974    /// Retrieves a hostname which can be used by clients to reach this container.
11975    pub async fn hostname(&self) -> Result<String, DaggerError> {
11976        let query = self.selection.select("hostname");
11977        query.execute(self.graphql_client.clone()).await
11978    }
11979    /// A unique identifier for this Service.
11980    pub async fn id(&self) -> Result<ServiceId, DaggerError> {
11981        let query = self.selection.select("id");
11982        query.execute(self.graphql_client.clone()).await
11983    }
11984    /// Retrieves the list of ports provided by the service.
11985    pub fn ports(&self) -> Vec<Port> {
11986        let query = self.selection.select("ports");
11987        vec![Port {
11988            proc: self.proc.clone(),
11989            selection: query,
11990            graphql_client: self.graphql_client.clone(),
11991        }]
11992    }
11993    /// Start the service and wait for its health checks to succeed.
11994    /// Services bound to a Container do not need to be manually started.
11995    pub async fn start(&self) -> Result<ServiceId, DaggerError> {
11996        let query = self.selection.select("start");
11997        query.execute(self.graphql_client.clone()).await
11998    }
11999    /// Stop the service.
12000    ///
12001    /// # Arguments
12002    ///
12003    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12004    pub async fn stop(&self) -> Result<ServiceId, DaggerError> {
12005        let query = self.selection.select("stop");
12006        query.execute(self.graphql_client.clone()).await
12007    }
12008    /// Stop the service.
12009    ///
12010    /// # Arguments
12011    ///
12012    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12013    pub async fn stop_opts(&self, opts: ServiceStopOpts) -> Result<ServiceId, DaggerError> {
12014        let mut query = self.selection.select("stop");
12015        if let Some(kill) = opts.kill {
12016            query = query.arg("kill", kill);
12017        }
12018        query.execute(self.graphql_client.clone()).await
12019    }
12020    /// Forces evaluation of the pipeline in the engine.
12021    pub async fn sync(&self) -> Result<ServiceId, DaggerError> {
12022        let query = self.selection.select("sync");
12023        query.execute(self.graphql_client.clone()).await
12024    }
12025    ///
12026    /// # Arguments
12027    ///
12028    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12029    pub fn terminal(&self) -> Service {
12030        let query = self.selection.select("terminal");
12031        Service {
12032            proc: self.proc.clone(),
12033            selection: query,
12034            graphql_client: self.graphql_client.clone(),
12035        }
12036    }
12037    ///
12038    /// # Arguments
12039    ///
12040    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12041    pub fn terminal_opts<'a>(&self, opts: ServiceTerminalOpts<'a>) -> Service {
12042        let mut query = self.selection.select("terminal");
12043        if let Some(cmd) = opts.cmd {
12044            query = query.arg("cmd", cmd);
12045        }
12046        Service {
12047            proc: self.proc.clone(),
12048            selection: query,
12049            graphql_client: self.graphql_client.clone(),
12050        }
12051    }
12052    /// Creates a tunnel that forwards traffic from the caller's network to this service.
12053    ///
12054    /// # Arguments
12055    ///
12056    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12057    pub async fn up(&self) -> Result<Void, DaggerError> {
12058        let query = self.selection.select("up");
12059        query.execute(self.graphql_client.clone()).await
12060    }
12061    /// Creates a tunnel that forwards traffic from the caller's network to this service.
12062    ///
12063    /// # Arguments
12064    ///
12065    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12066    pub async fn up_opts(&self, opts: ServiceUpOpts) -> Result<Void, DaggerError> {
12067        let mut query = self.selection.select("up");
12068        if let Some(ports) = opts.ports {
12069            query = query.arg("ports", ports);
12070        }
12071        if let Some(random) = opts.random {
12072            query = query.arg("random", random);
12073        }
12074        query.execute(self.graphql_client.clone()).await
12075    }
12076    /// Configures a hostname which can be used by clients within the session to reach this container.
12077    ///
12078    /// # Arguments
12079    ///
12080    /// * `hostname` - The hostname to use.
12081    pub fn with_hostname(&self, hostname: impl Into<String>) -> Service {
12082        let mut query = self.selection.select("withHostname");
12083        query = query.arg("hostname", hostname.into());
12084        Service {
12085            proc: self.proc.clone(),
12086            selection: query,
12087            graphql_client: self.graphql_client.clone(),
12088        }
12089    }
12090}
12091#[derive(Clone)]
12092pub struct Socket {
12093    pub proc: Option<Arc<DaggerSessionProc>>,
12094    pub selection: Selection,
12095    pub graphql_client: DynGraphQLClient,
12096}
12097impl Socket {
12098    /// A unique identifier for this Socket.
12099    pub async fn id(&self) -> Result<SocketId, DaggerError> {
12100        let query = self.selection.select("id");
12101        query.execute(self.graphql_client.clone()).await
12102    }
12103}
12104#[derive(Clone)]
12105pub struct SourceMap {
12106    pub proc: Option<Arc<DaggerSessionProc>>,
12107    pub selection: Selection,
12108    pub graphql_client: DynGraphQLClient,
12109}
12110impl SourceMap {
12111    /// The column number within the line.
12112    pub async fn column(&self) -> Result<isize, DaggerError> {
12113        let query = self.selection.select("column");
12114        query.execute(self.graphql_client.clone()).await
12115    }
12116    /// The filename from the module source.
12117    pub async fn filename(&self) -> Result<String, DaggerError> {
12118        let query = self.selection.select("filename");
12119        query.execute(self.graphql_client.clone()).await
12120    }
12121    /// A unique identifier for this SourceMap.
12122    pub async fn id(&self) -> Result<SourceMapId, DaggerError> {
12123        let query = self.selection.select("id");
12124        query.execute(self.graphql_client.clone()).await
12125    }
12126    /// The line number within the filename.
12127    pub async fn line(&self) -> Result<isize, DaggerError> {
12128        let query = self.selection.select("line");
12129        query.execute(self.graphql_client.clone()).await
12130    }
12131    /// The module dependency this was declared in.
12132    pub async fn module(&self) -> Result<String, DaggerError> {
12133        let query = self.selection.select("module");
12134        query.execute(self.graphql_client.clone()).await
12135    }
12136    /// The URL to the file, if any. This can be used to link to the source map in the browser.
12137    pub async fn url(&self) -> Result<String, DaggerError> {
12138        let query = self.selection.select("url");
12139        query.execute(self.graphql_client.clone()).await
12140    }
12141}
12142#[derive(Clone)]
12143pub struct Terminal {
12144    pub proc: Option<Arc<DaggerSessionProc>>,
12145    pub selection: Selection,
12146    pub graphql_client: DynGraphQLClient,
12147}
12148impl Terminal {
12149    /// A unique identifier for this Terminal.
12150    pub async fn id(&self) -> Result<TerminalId, DaggerError> {
12151        let query = self.selection.select("id");
12152        query.execute(self.graphql_client.clone()).await
12153    }
12154    /// Forces evaluation of the pipeline in the engine.
12155    /// It doesn't run the default command if no exec has been set.
12156    pub async fn sync(&self) -> Result<TerminalId, DaggerError> {
12157        let query = self.selection.select("sync");
12158        query.execute(self.graphql_client.clone()).await
12159    }
12160}
12161#[derive(Clone)]
12162pub struct TypeDef {
12163    pub proc: Option<Arc<DaggerSessionProc>>,
12164    pub selection: Selection,
12165    pub graphql_client: DynGraphQLClient,
12166}
12167#[derive(Builder, Debug, PartialEq)]
12168pub struct TypeDefWithEnumOpts<'a> {
12169    /// A doc string for the enum, if any
12170    #[builder(setter(into, strip_option), default)]
12171    pub description: Option<&'a str>,
12172    /// The source map for the enum definition.
12173    #[builder(setter(into, strip_option), default)]
12174    pub source_map: Option<SourceMapId>,
12175}
12176#[derive(Builder, Debug, PartialEq)]
12177pub struct TypeDefWithEnumMemberOpts<'a> {
12178    /// A doc string for the member, if any
12179    #[builder(setter(into, strip_option), default)]
12180    pub description: Option<&'a str>,
12181    /// The source map for the enum member definition.
12182    #[builder(setter(into, strip_option), default)]
12183    pub source_map: Option<SourceMapId>,
12184    /// The value of the member in the enum
12185    #[builder(setter(into, strip_option), default)]
12186    pub value: Option<&'a str>,
12187}
12188#[derive(Builder, Debug, PartialEq)]
12189pub struct TypeDefWithEnumValueOpts<'a> {
12190    /// A doc string for the value, if any
12191    #[builder(setter(into, strip_option), default)]
12192    pub description: Option<&'a str>,
12193    /// The source map for the enum value definition.
12194    #[builder(setter(into, strip_option), default)]
12195    pub source_map: Option<SourceMapId>,
12196}
12197#[derive(Builder, Debug, PartialEq)]
12198pub struct TypeDefWithFieldOpts<'a> {
12199    /// A doc string for the field, if any
12200    #[builder(setter(into, strip_option), default)]
12201    pub description: Option<&'a str>,
12202    /// The source map for the field definition.
12203    #[builder(setter(into, strip_option), default)]
12204    pub source_map: Option<SourceMapId>,
12205}
12206#[derive(Builder, Debug, PartialEq)]
12207pub struct TypeDefWithInterfaceOpts<'a> {
12208    #[builder(setter(into, strip_option), default)]
12209    pub description: Option<&'a str>,
12210    #[builder(setter(into, strip_option), default)]
12211    pub source_map: Option<SourceMapId>,
12212}
12213#[derive(Builder, Debug, PartialEq)]
12214pub struct TypeDefWithObjectOpts<'a> {
12215    #[builder(setter(into, strip_option), default)]
12216    pub description: Option<&'a str>,
12217    #[builder(setter(into, strip_option), default)]
12218    pub source_map: Option<SourceMapId>,
12219}
12220#[derive(Builder, Debug, PartialEq)]
12221pub struct TypeDefWithScalarOpts<'a> {
12222    #[builder(setter(into, strip_option), default)]
12223    pub description: Option<&'a str>,
12224}
12225impl TypeDef {
12226    /// If kind is ENUM, the enum-specific type definition. If kind is not ENUM, this will be null.
12227    pub fn as_enum(&self) -> EnumTypeDef {
12228        let query = self.selection.select("asEnum");
12229        EnumTypeDef {
12230            proc: self.proc.clone(),
12231            selection: query,
12232            graphql_client: self.graphql_client.clone(),
12233        }
12234    }
12235    /// If kind is INPUT, the input-specific type definition. If kind is not INPUT, this will be null.
12236    pub fn as_input(&self) -> InputTypeDef {
12237        let query = self.selection.select("asInput");
12238        InputTypeDef {
12239            proc: self.proc.clone(),
12240            selection: query,
12241            graphql_client: self.graphql_client.clone(),
12242        }
12243    }
12244    /// If kind is INTERFACE, the interface-specific type definition. If kind is not INTERFACE, this will be null.
12245    pub fn as_interface(&self) -> InterfaceTypeDef {
12246        let query = self.selection.select("asInterface");
12247        InterfaceTypeDef {
12248            proc: self.proc.clone(),
12249            selection: query,
12250            graphql_client: self.graphql_client.clone(),
12251        }
12252    }
12253    /// If kind is LIST, the list-specific type definition. If kind is not LIST, this will be null.
12254    pub fn as_list(&self) -> ListTypeDef {
12255        let query = self.selection.select("asList");
12256        ListTypeDef {
12257            proc: self.proc.clone(),
12258            selection: query,
12259            graphql_client: self.graphql_client.clone(),
12260        }
12261    }
12262    /// If kind is OBJECT, the object-specific type definition. If kind is not OBJECT, this will be null.
12263    pub fn as_object(&self) -> ObjectTypeDef {
12264        let query = self.selection.select("asObject");
12265        ObjectTypeDef {
12266            proc: self.proc.clone(),
12267            selection: query,
12268            graphql_client: self.graphql_client.clone(),
12269        }
12270    }
12271    /// If kind is SCALAR, the scalar-specific type definition. If kind is not SCALAR, this will be null.
12272    pub fn as_scalar(&self) -> ScalarTypeDef {
12273        let query = self.selection.select("asScalar");
12274        ScalarTypeDef {
12275            proc: self.proc.clone(),
12276            selection: query,
12277            graphql_client: self.graphql_client.clone(),
12278        }
12279    }
12280    /// A unique identifier for this TypeDef.
12281    pub async fn id(&self) -> Result<TypeDefId, DaggerError> {
12282        let query = self.selection.select("id");
12283        query.execute(self.graphql_client.clone()).await
12284    }
12285    /// The kind of type this is (e.g. primitive, list, object).
12286    pub async fn kind(&self) -> Result<TypeDefKind, DaggerError> {
12287        let query = self.selection.select("kind");
12288        query.execute(self.graphql_client.clone()).await
12289    }
12290    /// Whether this type can be set to null. Defaults to false.
12291    pub async fn optional(&self) -> Result<bool, DaggerError> {
12292        let query = self.selection.select("optional");
12293        query.execute(self.graphql_client.clone()).await
12294    }
12295    /// Adds a function for constructing a new instance of an Object TypeDef, failing if the type is not an object.
12296    pub fn with_constructor(&self, function: impl IntoID<FunctionId>) -> TypeDef {
12297        let mut query = self.selection.select("withConstructor");
12298        query = query.arg_lazy(
12299            "function",
12300            Box::new(move || {
12301                let function = function.clone();
12302                Box::pin(async move { function.into_id().await.unwrap().quote() })
12303            }),
12304        );
12305        TypeDef {
12306            proc: self.proc.clone(),
12307            selection: query,
12308            graphql_client: self.graphql_client.clone(),
12309        }
12310    }
12311    /// Returns a TypeDef of kind Enum with the provided name.
12312    /// 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.
12313    ///
12314    /// # Arguments
12315    ///
12316    /// * `name` - The name of the enum
12317    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12318    pub fn with_enum(&self, name: impl Into<String>) -> TypeDef {
12319        let mut query = self.selection.select("withEnum");
12320        query = query.arg("name", name.into());
12321        TypeDef {
12322            proc: self.proc.clone(),
12323            selection: query,
12324            graphql_client: self.graphql_client.clone(),
12325        }
12326    }
12327    /// Returns a TypeDef of kind Enum with the provided name.
12328    /// 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.
12329    ///
12330    /// # Arguments
12331    ///
12332    /// * `name` - The name of the enum
12333    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12334    pub fn with_enum_opts<'a>(
12335        &self,
12336        name: impl Into<String>,
12337        opts: TypeDefWithEnumOpts<'a>,
12338    ) -> TypeDef {
12339        let mut query = self.selection.select("withEnum");
12340        query = query.arg("name", name.into());
12341        if let Some(description) = opts.description {
12342            query = query.arg("description", description);
12343        }
12344        if let Some(source_map) = opts.source_map {
12345            query = query.arg("sourceMap", source_map);
12346        }
12347        TypeDef {
12348            proc: self.proc.clone(),
12349            selection: query,
12350            graphql_client: self.graphql_client.clone(),
12351        }
12352    }
12353    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
12354    ///
12355    /// # Arguments
12356    ///
12357    /// * `name` - The name of the member in the enum
12358    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12359    pub fn with_enum_member(&self, name: impl Into<String>) -> TypeDef {
12360        let mut query = self.selection.select("withEnumMember");
12361        query = query.arg("name", name.into());
12362        TypeDef {
12363            proc: self.proc.clone(),
12364            selection: query,
12365            graphql_client: self.graphql_client.clone(),
12366        }
12367    }
12368    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
12369    ///
12370    /// # Arguments
12371    ///
12372    /// * `name` - The name of the member in the enum
12373    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12374    pub fn with_enum_member_opts<'a>(
12375        &self,
12376        name: impl Into<String>,
12377        opts: TypeDefWithEnumMemberOpts<'a>,
12378    ) -> TypeDef {
12379        let mut query = self.selection.select("withEnumMember");
12380        query = query.arg("name", name.into());
12381        if let Some(value) = opts.value {
12382            query = query.arg("value", value);
12383        }
12384        if let Some(description) = opts.description {
12385            query = query.arg("description", description);
12386        }
12387        if let Some(source_map) = opts.source_map {
12388            query = query.arg("sourceMap", source_map);
12389        }
12390        TypeDef {
12391            proc: self.proc.clone(),
12392            selection: query,
12393            graphql_client: self.graphql_client.clone(),
12394        }
12395    }
12396    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
12397    ///
12398    /// # Arguments
12399    ///
12400    /// * `value` - The name of the value in the enum
12401    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12402    pub fn with_enum_value(&self, value: impl Into<String>) -> TypeDef {
12403        let mut query = self.selection.select("withEnumValue");
12404        query = query.arg("value", value.into());
12405        TypeDef {
12406            proc: self.proc.clone(),
12407            selection: query,
12408            graphql_client: self.graphql_client.clone(),
12409        }
12410    }
12411    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
12412    ///
12413    /// # Arguments
12414    ///
12415    /// * `value` - The name of the value in the enum
12416    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12417    pub fn with_enum_value_opts<'a>(
12418        &self,
12419        value: impl Into<String>,
12420        opts: TypeDefWithEnumValueOpts<'a>,
12421    ) -> TypeDef {
12422        let mut query = self.selection.select("withEnumValue");
12423        query = query.arg("value", value.into());
12424        if let Some(description) = opts.description {
12425            query = query.arg("description", description);
12426        }
12427        if let Some(source_map) = opts.source_map {
12428            query = query.arg("sourceMap", source_map);
12429        }
12430        TypeDef {
12431            proc: self.proc.clone(),
12432            selection: query,
12433            graphql_client: self.graphql_client.clone(),
12434        }
12435    }
12436    /// Adds a static field for an Object TypeDef, failing if the type is not an object.
12437    ///
12438    /// # Arguments
12439    ///
12440    /// * `name` - The name of the field in the object
12441    /// * `type_def` - The type of the field
12442    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12443    pub fn with_field(&self, name: impl Into<String>, type_def: impl IntoID<TypeDefId>) -> TypeDef {
12444        let mut query = self.selection.select("withField");
12445        query = query.arg("name", name.into());
12446        query = query.arg_lazy(
12447            "typeDef",
12448            Box::new(move || {
12449                let type_def = type_def.clone();
12450                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
12451            }),
12452        );
12453        TypeDef {
12454            proc: self.proc.clone(),
12455            selection: query,
12456            graphql_client: self.graphql_client.clone(),
12457        }
12458    }
12459    /// Adds a static field for an Object TypeDef, failing if the type is not an object.
12460    ///
12461    /// # Arguments
12462    ///
12463    /// * `name` - The name of the field in the object
12464    /// * `type_def` - The type of the field
12465    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12466    pub fn with_field_opts<'a>(
12467        &self,
12468        name: impl Into<String>,
12469        type_def: impl IntoID<TypeDefId>,
12470        opts: TypeDefWithFieldOpts<'a>,
12471    ) -> TypeDef {
12472        let mut query = self.selection.select("withField");
12473        query = query.arg("name", name.into());
12474        query = query.arg_lazy(
12475            "typeDef",
12476            Box::new(move || {
12477                let type_def = type_def.clone();
12478                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
12479            }),
12480        );
12481        if let Some(description) = opts.description {
12482            query = query.arg("description", description);
12483        }
12484        if let Some(source_map) = opts.source_map {
12485            query = query.arg("sourceMap", source_map);
12486        }
12487        TypeDef {
12488            proc: self.proc.clone(),
12489            selection: query,
12490            graphql_client: self.graphql_client.clone(),
12491        }
12492    }
12493    /// Adds a function for an Object or Interface TypeDef, failing if the type is not one of those kinds.
12494    pub fn with_function(&self, function: impl IntoID<FunctionId>) -> TypeDef {
12495        let mut query = self.selection.select("withFunction");
12496        query = query.arg_lazy(
12497            "function",
12498            Box::new(move || {
12499                let function = function.clone();
12500                Box::pin(async move { function.into_id().await.unwrap().quote() })
12501            }),
12502        );
12503        TypeDef {
12504            proc: self.proc.clone(),
12505            selection: query,
12506            graphql_client: self.graphql_client.clone(),
12507        }
12508    }
12509    /// Returns a TypeDef of kind Interface with the provided name.
12510    ///
12511    /// # Arguments
12512    ///
12513    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12514    pub fn with_interface(&self, name: impl Into<String>) -> TypeDef {
12515        let mut query = self.selection.select("withInterface");
12516        query = query.arg("name", name.into());
12517        TypeDef {
12518            proc: self.proc.clone(),
12519            selection: query,
12520            graphql_client: self.graphql_client.clone(),
12521        }
12522    }
12523    /// Returns a TypeDef of kind Interface with the provided name.
12524    ///
12525    /// # Arguments
12526    ///
12527    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12528    pub fn with_interface_opts<'a>(
12529        &self,
12530        name: impl Into<String>,
12531        opts: TypeDefWithInterfaceOpts<'a>,
12532    ) -> TypeDef {
12533        let mut query = self.selection.select("withInterface");
12534        query = query.arg("name", name.into());
12535        if let Some(description) = opts.description {
12536            query = query.arg("description", description);
12537        }
12538        if let Some(source_map) = opts.source_map {
12539            query = query.arg("sourceMap", source_map);
12540        }
12541        TypeDef {
12542            proc: self.proc.clone(),
12543            selection: query,
12544            graphql_client: self.graphql_client.clone(),
12545        }
12546    }
12547    /// Sets the kind of the type.
12548    pub fn with_kind(&self, kind: TypeDefKind) -> TypeDef {
12549        let mut query = self.selection.select("withKind");
12550        query = query.arg("kind", kind);
12551        TypeDef {
12552            proc: self.proc.clone(),
12553            selection: query,
12554            graphql_client: self.graphql_client.clone(),
12555        }
12556    }
12557    /// Returns a TypeDef of kind List with the provided type for its elements.
12558    pub fn with_list_of(&self, element_type: impl IntoID<TypeDefId>) -> TypeDef {
12559        let mut query = self.selection.select("withListOf");
12560        query = query.arg_lazy(
12561            "elementType",
12562            Box::new(move || {
12563                let element_type = element_type.clone();
12564                Box::pin(async move { element_type.into_id().await.unwrap().quote() })
12565            }),
12566        );
12567        TypeDef {
12568            proc: self.proc.clone(),
12569            selection: query,
12570            graphql_client: self.graphql_client.clone(),
12571        }
12572    }
12573    /// Returns a TypeDef of kind Object with the provided name.
12574    /// 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.
12575    ///
12576    /// # Arguments
12577    ///
12578    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12579    pub fn with_object(&self, name: impl Into<String>) -> TypeDef {
12580        let mut query = self.selection.select("withObject");
12581        query = query.arg("name", name.into());
12582        TypeDef {
12583            proc: self.proc.clone(),
12584            selection: query,
12585            graphql_client: self.graphql_client.clone(),
12586        }
12587    }
12588    /// Returns a TypeDef of kind Object with the provided name.
12589    /// 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.
12590    ///
12591    /// # Arguments
12592    ///
12593    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12594    pub fn with_object_opts<'a>(
12595        &self,
12596        name: impl Into<String>,
12597        opts: TypeDefWithObjectOpts<'a>,
12598    ) -> TypeDef {
12599        let mut query = self.selection.select("withObject");
12600        query = query.arg("name", name.into());
12601        if let Some(description) = opts.description {
12602            query = query.arg("description", description);
12603        }
12604        if let Some(source_map) = opts.source_map {
12605            query = query.arg("sourceMap", source_map);
12606        }
12607        TypeDef {
12608            proc: self.proc.clone(),
12609            selection: query,
12610            graphql_client: self.graphql_client.clone(),
12611        }
12612    }
12613    /// Sets whether this type can be set to null.
12614    pub fn with_optional(&self, optional: bool) -> TypeDef {
12615        let mut query = self.selection.select("withOptional");
12616        query = query.arg("optional", optional);
12617        TypeDef {
12618            proc: self.proc.clone(),
12619            selection: query,
12620            graphql_client: self.graphql_client.clone(),
12621        }
12622    }
12623    /// Returns a TypeDef of kind Scalar with the provided name.
12624    ///
12625    /// # Arguments
12626    ///
12627    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12628    pub fn with_scalar(&self, name: impl Into<String>) -> TypeDef {
12629        let mut query = self.selection.select("withScalar");
12630        query = query.arg("name", name.into());
12631        TypeDef {
12632            proc: self.proc.clone(),
12633            selection: query,
12634            graphql_client: self.graphql_client.clone(),
12635        }
12636    }
12637    /// Returns a TypeDef of kind Scalar with the provided name.
12638    ///
12639    /// # Arguments
12640    ///
12641    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
12642    pub fn with_scalar_opts<'a>(
12643        &self,
12644        name: impl Into<String>,
12645        opts: TypeDefWithScalarOpts<'a>,
12646    ) -> TypeDef {
12647        let mut query = self.selection.select("withScalar");
12648        query = query.arg("name", name.into());
12649        if let Some(description) = opts.description {
12650            query = query.arg("description", description);
12651        }
12652        TypeDef {
12653            proc: self.proc.clone(),
12654            selection: query,
12655            graphql_client: self.graphql_client.clone(),
12656        }
12657    }
12658}
12659#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
12660pub enum CacheSharingMode {
12661    #[serde(rename = "LOCKED")]
12662    Locked,
12663    #[serde(rename = "PRIVATE")]
12664    Private,
12665    #[serde(rename = "SHARED")]
12666    Shared,
12667}
12668#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
12669pub enum ExistsType {
12670    #[serde(rename = "DIRECTORY_TYPE")]
12671    DirectoryType,
12672    #[serde(rename = "REGULAR_TYPE")]
12673    RegularType,
12674    #[serde(rename = "SYMLINK_TYPE")]
12675    SymlinkType,
12676}
12677#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
12678pub enum ImageLayerCompression {
12679    #[serde(rename = "EStarGZ")]
12680    EStarGz,
12681    #[serde(rename = "ESTARGZ")]
12682    Estargz,
12683    #[serde(rename = "Gzip")]
12684    Gzip,
12685    #[serde(rename = "Uncompressed")]
12686    Uncompressed,
12687    #[serde(rename = "Zstd")]
12688    Zstd,
12689}
12690#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
12691pub enum ImageMediaTypes {
12692    #[serde(rename = "DOCKER")]
12693    Docker,
12694    #[serde(rename = "DockerMediaTypes")]
12695    DockerMediaTypes,
12696    #[serde(rename = "OCI")]
12697    Oci,
12698    #[serde(rename = "OCIMediaTypes")]
12699    OciMediaTypes,
12700}
12701#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
12702pub enum ModuleSourceExperimentalFeature {
12703    #[serde(rename = "SELF_CALLS")]
12704    SelfCalls,
12705}
12706#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
12707pub enum ModuleSourceKind {
12708    #[serde(rename = "DIR")]
12709    Dir,
12710    #[serde(rename = "DIR_SOURCE")]
12711    DirSource,
12712    #[serde(rename = "GIT")]
12713    Git,
12714    #[serde(rename = "GIT_SOURCE")]
12715    GitSource,
12716    #[serde(rename = "LOCAL")]
12717    Local,
12718    #[serde(rename = "LOCAL_SOURCE")]
12719    LocalSource,
12720}
12721#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
12722pub enum NetworkProtocol {
12723    #[serde(rename = "TCP")]
12724    Tcp,
12725    #[serde(rename = "UDP")]
12726    Udp,
12727}
12728#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
12729pub enum ReturnType {
12730    #[serde(rename = "ANY")]
12731    Any,
12732    #[serde(rename = "FAILURE")]
12733    Failure,
12734    #[serde(rename = "SUCCESS")]
12735    Success,
12736}
12737#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
12738pub enum TypeDefKind {
12739    #[serde(rename = "BOOLEAN")]
12740    Boolean,
12741    #[serde(rename = "BOOLEAN_KIND")]
12742    BooleanKind,
12743    #[serde(rename = "ENUM")]
12744    Enum,
12745    #[serde(rename = "ENUM_KIND")]
12746    EnumKind,
12747    #[serde(rename = "FLOAT")]
12748    Float,
12749    #[serde(rename = "FLOAT_KIND")]
12750    FloatKind,
12751    #[serde(rename = "INPUT")]
12752    Input,
12753    #[serde(rename = "INPUT_KIND")]
12754    InputKind,
12755    #[serde(rename = "INTEGER")]
12756    Integer,
12757    #[serde(rename = "INTEGER_KIND")]
12758    IntegerKind,
12759    #[serde(rename = "INTERFACE")]
12760    Interface,
12761    #[serde(rename = "INTERFACE_KIND")]
12762    InterfaceKind,
12763    #[serde(rename = "LIST")]
12764    List,
12765    #[serde(rename = "LIST_KIND")]
12766    ListKind,
12767    #[serde(rename = "OBJECT")]
12768    Object,
12769    #[serde(rename = "OBJECT_KIND")]
12770    ObjectKind,
12771    #[serde(rename = "SCALAR")]
12772    Scalar,
12773    #[serde(rename = "SCALAR_KIND")]
12774    ScalarKind,
12775    #[serde(rename = "STRING")]
12776    String,
12777    #[serde(rename = "STRING_KIND")]
12778    StringKind,
12779    #[serde(rename = "VOID")]
12780    Void,
12781    #[serde(rename = "VOID_KIND")]
12782    VoidKind,
12783}