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 CacheVolumeId(pub String);
14impl From<&str> for CacheVolumeId {
15    fn from(value: &str) -> Self {
16        Self(value.to_string())
17    }
18}
19impl From<String> for CacheVolumeId {
20    fn from(value: String) -> Self {
21        Self(value)
22    }
23}
24impl IntoID<CacheVolumeId> for CacheVolume {
25    fn into_id(
26        self,
27    ) -> std::pin::Pin<
28        Box<dyn core::future::Future<Output = Result<CacheVolumeId, DaggerError>> + Send>,
29    > {
30        Box::pin(async move { self.id().await })
31    }
32}
33impl IntoID<CacheVolumeId> for CacheVolumeId {
34    fn into_id(
35        self,
36    ) -> std::pin::Pin<
37        Box<dyn core::future::Future<Output = Result<CacheVolumeId, DaggerError>> + Send>,
38    > {
39        Box::pin(async move { Ok::<CacheVolumeId, DaggerError>(self) })
40    }
41}
42impl CacheVolumeId {
43    fn quote(&self) -> String {
44        format!("\"{}\"", self.0.clone())
45    }
46}
47#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
48pub struct ContainerId(pub String);
49impl From<&str> for ContainerId {
50    fn from(value: &str) -> Self {
51        Self(value.to_string())
52    }
53}
54impl From<String> for ContainerId {
55    fn from(value: String) -> Self {
56        Self(value)
57    }
58}
59impl IntoID<ContainerId> for Container {
60    fn into_id(
61        self,
62    ) -> std::pin::Pin<
63        Box<dyn core::future::Future<Output = Result<ContainerId, DaggerError>> + Send>,
64    > {
65        Box::pin(async move { self.id().await })
66    }
67}
68impl IntoID<ContainerId> for ContainerId {
69    fn into_id(
70        self,
71    ) -> std::pin::Pin<
72        Box<dyn core::future::Future<Output = Result<ContainerId, DaggerError>> + Send>,
73    > {
74        Box::pin(async move { Ok::<ContainerId, DaggerError>(self) })
75    }
76}
77impl ContainerId {
78    fn quote(&self) -> String {
79        format!("\"{}\"", self.0.clone())
80    }
81}
82#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
83pub struct CurrentModuleId(pub String);
84impl From<&str> for CurrentModuleId {
85    fn from(value: &str) -> Self {
86        Self(value.to_string())
87    }
88}
89impl From<String> for CurrentModuleId {
90    fn from(value: String) -> Self {
91        Self(value)
92    }
93}
94impl IntoID<CurrentModuleId> for CurrentModule {
95    fn into_id(
96        self,
97    ) -> std::pin::Pin<
98        Box<dyn core::future::Future<Output = Result<CurrentModuleId, DaggerError>> + Send>,
99    > {
100        Box::pin(async move { self.id().await })
101    }
102}
103impl IntoID<CurrentModuleId> for CurrentModuleId {
104    fn into_id(
105        self,
106    ) -> std::pin::Pin<
107        Box<dyn core::future::Future<Output = Result<CurrentModuleId, DaggerError>> + Send>,
108    > {
109        Box::pin(async move { Ok::<CurrentModuleId, DaggerError>(self) })
110    }
111}
112impl CurrentModuleId {
113    fn quote(&self) -> String {
114        format!("\"{}\"", self.0.clone())
115    }
116}
117#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
118pub struct DirectoryId(pub String);
119impl From<&str> for DirectoryId {
120    fn from(value: &str) -> Self {
121        Self(value.to_string())
122    }
123}
124impl From<String> for DirectoryId {
125    fn from(value: String) -> Self {
126        Self(value)
127    }
128}
129impl IntoID<DirectoryId> for Directory {
130    fn into_id(
131        self,
132    ) -> std::pin::Pin<
133        Box<dyn core::future::Future<Output = Result<DirectoryId, DaggerError>> + Send>,
134    > {
135        Box::pin(async move { self.id().await })
136    }
137}
138impl IntoID<DirectoryId> for DirectoryId {
139    fn into_id(
140        self,
141    ) -> std::pin::Pin<
142        Box<dyn core::future::Future<Output = Result<DirectoryId, DaggerError>> + Send>,
143    > {
144        Box::pin(async move { Ok::<DirectoryId, DaggerError>(self) })
145    }
146}
147impl DirectoryId {
148    fn quote(&self) -> String {
149        format!("\"{}\"", self.0.clone())
150    }
151}
152#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
153pub struct EngineCacheEntryId(pub String);
154impl From<&str> for EngineCacheEntryId {
155    fn from(value: &str) -> Self {
156        Self(value.to_string())
157    }
158}
159impl From<String> for EngineCacheEntryId {
160    fn from(value: String) -> Self {
161        Self(value)
162    }
163}
164impl IntoID<EngineCacheEntryId> for EngineCacheEntry {
165    fn into_id(
166        self,
167    ) -> std::pin::Pin<
168        Box<dyn core::future::Future<Output = Result<EngineCacheEntryId, DaggerError>> + Send>,
169    > {
170        Box::pin(async move { self.id().await })
171    }
172}
173impl IntoID<EngineCacheEntryId> for EngineCacheEntryId {
174    fn into_id(
175        self,
176    ) -> std::pin::Pin<
177        Box<dyn core::future::Future<Output = Result<EngineCacheEntryId, DaggerError>> + Send>,
178    > {
179        Box::pin(async move { Ok::<EngineCacheEntryId, DaggerError>(self) })
180    }
181}
182impl EngineCacheEntryId {
183    fn quote(&self) -> String {
184        format!("\"{}\"", self.0.clone())
185    }
186}
187#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
188pub struct EngineCacheEntrySetId(pub String);
189impl From<&str> for EngineCacheEntrySetId {
190    fn from(value: &str) -> Self {
191        Self(value.to_string())
192    }
193}
194impl From<String> for EngineCacheEntrySetId {
195    fn from(value: String) -> Self {
196        Self(value)
197    }
198}
199impl IntoID<EngineCacheEntrySetId> for EngineCacheEntrySet {
200    fn into_id(
201        self,
202    ) -> std::pin::Pin<
203        Box<dyn core::future::Future<Output = Result<EngineCacheEntrySetId, DaggerError>> + Send>,
204    > {
205        Box::pin(async move { self.id().await })
206    }
207}
208impl IntoID<EngineCacheEntrySetId> for EngineCacheEntrySetId {
209    fn into_id(
210        self,
211    ) -> std::pin::Pin<
212        Box<dyn core::future::Future<Output = Result<EngineCacheEntrySetId, DaggerError>> + Send>,
213    > {
214        Box::pin(async move { Ok::<EngineCacheEntrySetId, DaggerError>(self) })
215    }
216}
217impl EngineCacheEntrySetId {
218    fn quote(&self) -> String {
219        format!("\"{}\"", self.0.clone())
220    }
221}
222#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
223pub struct EngineCacheId(pub String);
224impl From<&str> for EngineCacheId {
225    fn from(value: &str) -> Self {
226        Self(value.to_string())
227    }
228}
229impl From<String> for EngineCacheId {
230    fn from(value: String) -> Self {
231        Self(value)
232    }
233}
234impl IntoID<EngineCacheId> for EngineCache {
235    fn into_id(
236        self,
237    ) -> std::pin::Pin<
238        Box<dyn core::future::Future<Output = Result<EngineCacheId, DaggerError>> + Send>,
239    > {
240        Box::pin(async move { self.id().await })
241    }
242}
243impl IntoID<EngineCacheId> for EngineCacheId {
244    fn into_id(
245        self,
246    ) -> std::pin::Pin<
247        Box<dyn core::future::Future<Output = Result<EngineCacheId, DaggerError>> + Send>,
248    > {
249        Box::pin(async move { Ok::<EngineCacheId, DaggerError>(self) })
250    }
251}
252impl EngineCacheId {
253    fn quote(&self) -> String {
254        format!("\"{}\"", self.0.clone())
255    }
256}
257#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
258pub struct EngineId(pub String);
259impl From<&str> for EngineId {
260    fn from(value: &str) -> Self {
261        Self(value.to_string())
262    }
263}
264impl From<String> for EngineId {
265    fn from(value: String) -> Self {
266        Self(value)
267    }
268}
269impl IntoID<EngineId> for Engine {
270    fn into_id(
271        self,
272    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<EngineId, DaggerError>> + Send>>
273    {
274        Box::pin(async move { self.id().await })
275    }
276}
277impl IntoID<EngineId> for EngineId {
278    fn into_id(
279        self,
280    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<EngineId, DaggerError>> + Send>>
281    {
282        Box::pin(async move { Ok::<EngineId, DaggerError>(self) })
283    }
284}
285impl EngineId {
286    fn quote(&self) -> String {
287        format!("\"{}\"", self.0.clone())
288    }
289}
290#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
291pub struct EnumTypeDefId(pub String);
292impl From<&str> for EnumTypeDefId {
293    fn from(value: &str) -> Self {
294        Self(value.to_string())
295    }
296}
297impl From<String> for EnumTypeDefId {
298    fn from(value: String) -> Self {
299        Self(value)
300    }
301}
302impl IntoID<EnumTypeDefId> for EnumTypeDef {
303    fn into_id(
304        self,
305    ) -> std::pin::Pin<
306        Box<dyn core::future::Future<Output = Result<EnumTypeDefId, DaggerError>> + Send>,
307    > {
308        Box::pin(async move { self.id().await })
309    }
310}
311impl IntoID<EnumTypeDefId> for EnumTypeDefId {
312    fn into_id(
313        self,
314    ) -> std::pin::Pin<
315        Box<dyn core::future::Future<Output = Result<EnumTypeDefId, DaggerError>> + Send>,
316    > {
317        Box::pin(async move { Ok::<EnumTypeDefId, DaggerError>(self) })
318    }
319}
320impl EnumTypeDefId {
321    fn quote(&self) -> String {
322        format!("\"{}\"", self.0.clone())
323    }
324}
325#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
326pub struct EnumValueTypeDefId(pub String);
327impl From<&str> for EnumValueTypeDefId {
328    fn from(value: &str) -> Self {
329        Self(value.to_string())
330    }
331}
332impl From<String> for EnumValueTypeDefId {
333    fn from(value: String) -> Self {
334        Self(value)
335    }
336}
337impl IntoID<EnumValueTypeDefId> for EnumValueTypeDef {
338    fn into_id(
339        self,
340    ) -> std::pin::Pin<
341        Box<dyn core::future::Future<Output = Result<EnumValueTypeDefId, DaggerError>> + Send>,
342    > {
343        Box::pin(async move { self.id().await })
344    }
345}
346impl IntoID<EnumValueTypeDefId> for EnumValueTypeDefId {
347    fn into_id(
348        self,
349    ) -> std::pin::Pin<
350        Box<dyn core::future::Future<Output = Result<EnumValueTypeDefId, DaggerError>> + Send>,
351    > {
352        Box::pin(async move { Ok::<EnumValueTypeDefId, DaggerError>(self) })
353    }
354}
355impl EnumValueTypeDefId {
356    fn quote(&self) -> String {
357        format!("\"{}\"", self.0.clone())
358    }
359}
360#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
361pub struct EnvVariableId(pub String);
362impl From<&str> for EnvVariableId {
363    fn from(value: &str) -> Self {
364        Self(value.to_string())
365    }
366}
367impl From<String> for EnvVariableId {
368    fn from(value: String) -> Self {
369        Self(value)
370    }
371}
372impl IntoID<EnvVariableId> for EnvVariable {
373    fn into_id(
374        self,
375    ) -> std::pin::Pin<
376        Box<dyn core::future::Future<Output = Result<EnvVariableId, DaggerError>> + Send>,
377    > {
378        Box::pin(async move { self.id().await })
379    }
380}
381impl IntoID<EnvVariableId> for EnvVariableId {
382    fn into_id(
383        self,
384    ) -> std::pin::Pin<
385        Box<dyn core::future::Future<Output = Result<EnvVariableId, DaggerError>> + Send>,
386    > {
387        Box::pin(async move { Ok::<EnvVariableId, DaggerError>(self) })
388    }
389}
390impl EnvVariableId {
391    fn quote(&self) -> String {
392        format!("\"{}\"", self.0.clone())
393    }
394}
395#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
396pub struct ErrorId(pub String);
397impl From<&str> for ErrorId {
398    fn from(value: &str) -> Self {
399        Self(value.to_string())
400    }
401}
402impl From<String> for ErrorId {
403    fn from(value: String) -> Self {
404        Self(value)
405    }
406}
407impl IntoID<ErrorId> for Error {
408    fn into_id(
409        self,
410    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ErrorId, DaggerError>> + Send>>
411    {
412        Box::pin(async move { self.id().await })
413    }
414}
415impl IntoID<ErrorId> for ErrorId {
416    fn into_id(
417        self,
418    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ErrorId, DaggerError>> + Send>>
419    {
420        Box::pin(async move { Ok::<ErrorId, DaggerError>(self) })
421    }
422}
423impl ErrorId {
424    fn quote(&self) -> String {
425        format!("\"{}\"", self.0.clone())
426    }
427}
428#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
429pub struct ErrorValueId(pub String);
430impl From<&str> for ErrorValueId {
431    fn from(value: &str) -> Self {
432        Self(value.to_string())
433    }
434}
435impl From<String> for ErrorValueId {
436    fn from(value: String) -> Self {
437        Self(value)
438    }
439}
440impl IntoID<ErrorValueId> for ErrorValue {
441    fn into_id(
442        self,
443    ) -> std::pin::Pin<
444        Box<dyn core::future::Future<Output = Result<ErrorValueId, DaggerError>> + Send>,
445    > {
446        Box::pin(async move { self.id().await })
447    }
448}
449impl IntoID<ErrorValueId> for ErrorValueId {
450    fn into_id(
451        self,
452    ) -> std::pin::Pin<
453        Box<dyn core::future::Future<Output = Result<ErrorValueId, DaggerError>> + Send>,
454    > {
455        Box::pin(async move { Ok::<ErrorValueId, DaggerError>(self) })
456    }
457}
458impl ErrorValueId {
459    fn quote(&self) -> String {
460        format!("\"{}\"", self.0.clone())
461    }
462}
463#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
464pub struct FieldTypeDefId(pub String);
465impl From<&str> for FieldTypeDefId {
466    fn from(value: &str) -> Self {
467        Self(value.to_string())
468    }
469}
470impl From<String> for FieldTypeDefId {
471    fn from(value: String) -> Self {
472        Self(value)
473    }
474}
475impl IntoID<FieldTypeDefId> for FieldTypeDef {
476    fn into_id(
477        self,
478    ) -> std::pin::Pin<
479        Box<dyn core::future::Future<Output = Result<FieldTypeDefId, DaggerError>> + Send>,
480    > {
481        Box::pin(async move { self.id().await })
482    }
483}
484impl IntoID<FieldTypeDefId> for FieldTypeDefId {
485    fn into_id(
486        self,
487    ) -> std::pin::Pin<
488        Box<dyn core::future::Future<Output = Result<FieldTypeDefId, DaggerError>> + Send>,
489    > {
490        Box::pin(async move { Ok::<FieldTypeDefId, DaggerError>(self) })
491    }
492}
493impl FieldTypeDefId {
494    fn quote(&self) -> String {
495        format!("\"{}\"", self.0.clone())
496    }
497}
498#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
499pub struct FileId(pub String);
500impl From<&str> for FileId {
501    fn from(value: &str) -> Self {
502        Self(value.to_string())
503    }
504}
505impl From<String> for FileId {
506    fn from(value: String) -> Self {
507        Self(value)
508    }
509}
510impl IntoID<FileId> for File {
511    fn into_id(
512        self,
513    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<FileId, DaggerError>> + Send>>
514    {
515        Box::pin(async move { self.id().await })
516    }
517}
518impl IntoID<FileId> for FileId {
519    fn into_id(
520        self,
521    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<FileId, DaggerError>> + Send>>
522    {
523        Box::pin(async move { Ok::<FileId, DaggerError>(self) })
524    }
525}
526impl FileId {
527    fn quote(&self) -> String {
528        format!("\"{}\"", self.0.clone())
529    }
530}
531#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
532pub struct FunctionArgId(pub String);
533impl From<&str> for FunctionArgId {
534    fn from(value: &str) -> Self {
535        Self(value.to_string())
536    }
537}
538impl From<String> for FunctionArgId {
539    fn from(value: String) -> Self {
540        Self(value)
541    }
542}
543impl IntoID<FunctionArgId> for FunctionArg {
544    fn into_id(
545        self,
546    ) -> std::pin::Pin<
547        Box<dyn core::future::Future<Output = Result<FunctionArgId, DaggerError>> + Send>,
548    > {
549        Box::pin(async move { self.id().await })
550    }
551}
552impl IntoID<FunctionArgId> for FunctionArgId {
553    fn into_id(
554        self,
555    ) -> std::pin::Pin<
556        Box<dyn core::future::Future<Output = Result<FunctionArgId, DaggerError>> + Send>,
557    > {
558        Box::pin(async move { Ok::<FunctionArgId, DaggerError>(self) })
559    }
560}
561impl FunctionArgId {
562    fn quote(&self) -> String {
563        format!("\"{}\"", self.0.clone())
564    }
565}
566#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
567pub struct FunctionCallArgValueId(pub String);
568impl From<&str> for FunctionCallArgValueId {
569    fn from(value: &str) -> Self {
570        Self(value.to_string())
571    }
572}
573impl From<String> for FunctionCallArgValueId {
574    fn from(value: String) -> Self {
575        Self(value)
576    }
577}
578impl IntoID<FunctionCallArgValueId> for FunctionCallArgValue {
579    fn into_id(
580        self,
581    ) -> std::pin::Pin<
582        Box<dyn core::future::Future<Output = Result<FunctionCallArgValueId, DaggerError>> + Send>,
583    > {
584        Box::pin(async move { self.id().await })
585    }
586}
587impl IntoID<FunctionCallArgValueId> for FunctionCallArgValueId {
588    fn into_id(
589        self,
590    ) -> std::pin::Pin<
591        Box<dyn core::future::Future<Output = Result<FunctionCallArgValueId, DaggerError>> + Send>,
592    > {
593        Box::pin(async move { Ok::<FunctionCallArgValueId, DaggerError>(self) })
594    }
595}
596impl FunctionCallArgValueId {
597    fn quote(&self) -> String {
598        format!("\"{}\"", self.0.clone())
599    }
600}
601#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
602pub struct FunctionCallId(pub String);
603impl From<&str> for FunctionCallId {
604    fn from(value: &str) -> Self {
605        Self(value.to_string())
606    }
607}
608impl From<String> for FunctionCallId {
609    fn from(value: String) -> Self {
610        Self(value)
611    }
612}
613impl IntoID<FunctionCallId> for FunctionCall {
614    fn into_id(
615        self,
616    ) -> std::pin::Pin<
617        Box<dyn core::future::Future<Output = Result<FunctionCallId, DaggerError>> + Send>,
618    > {
619        Box::pin(async move { self.id().await })
620    }
621}
622impl IntoID<FunctionCallId> for FunctionCallId {
623    fn into_id(
624        self,
625    ) -> std::pin::Pin<
626        Box<dyn core::future::Future<Output = Result<FunctionCallId, DaggerError>> + Send>,
627    > {
628        Box::pin(async move { Ok::<FunctionCallId, DaggerError>(self) })
629    }
630}
631impl FunctionCallId {
632    fn quote(&self) -> String {
633        format!("\"{}\"", self.0.clone())
634    }
635}
636#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
637pub struct FunctionId(pub String);
638impl From<&str> for FunctionId {
639    fn from(value: &str) -> Self {
640        Self(value.to_string())
641    }
642}
643impl From<String> for FunctionId {
644    fn from(value: String) -> Self {
645        Self(value)
646    }
647}
648impl IntoID<FunctionId> for Function {
649    fn into_id(
650        self,
651    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<FunctionId, DaggerError>> + Send>>
652    {
653        Box::pin(async move { self.id().await })
654    }
655}
656impl IntoID<FunctionId> for FunctionId {
657    fn into_id(
658        self,
659    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<FunctionId, DaggerError>> + Send>>
660    {
661        Box::pin(async move { Ok::<FunctionId, DaggerError>(self) })
662    }
663}
664impl FunctionId {
665    fn quote(&self) -> String {
666        format!("\"{}\"", self.0.clone())
667    }
668}
669#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
670pub struct GeneratedCodeId(pub String);
671impl From<&str> for GeneratedCodeId {
672    fn from(value: &str) -> Self {
673        Self(value.to_string())
674    }
675}
676impl From<String> for GeneratedCodeId {
677    fn from(value: String) -> Self {
678        Self(value)
679    }
680}
681impl IntoID<GeneratedCodeId> for GeneratedCode {
682    fn into_id(
683        self,
684    ) -> std::pin::Pin<
685        Box<dyn core::future::Future<Output = Result<GeneratedCodeId, DaggerError>> + Send>,
686    > {
687        Box::pin(async move { self.id().await })
688    }
689}
690impl IntoID<GeneratedCodeId> for GeneratedCodeId {
691    fn into_id(
692        self,
693    ) -> std::pin::Pin<
694        Box<dyn core::future::Future<Output = Result<GeneratedCodeId, DaggerError>> + Send>,
695    > {
696        Box::pin(async move { Ok::<GeneratedCodeId, DaggerError>(self) })
697    }
698}
699impl GeneratedCodeId {
700    fn quote(&self) -> String {
701        format!("\"{}\"", self.0.clone())
702    }
703}
704#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
705pub struct GitRefId(pub String);
706impl From<&str> for GitRefId {
707    fn from(value: &str) -> Self {
708        Self(value.to_string())
709    }
710}
711impl From<String> for GitRefId {
712    fn from(value: String) -> Self {
713        Self(value)
714    }
715}
716impl IntoID<GitRefId> for GitRef {
717    fn into_id(
718        self,
719    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<GitRefId, DaggerError>> + Send>>
720    {
721        Box::pin(async move { self.id().await })
722    }
723}
724impl IntoID<GitRefId> for GitRefId {
725    fn into_id(
726        self,
727    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<GitRefId, DaggerError>> + Send>>
728    {
729        Box::pin(async move { Ok::<GitRefId, DaggerError>(self) })
730    }
731}
732impl GitRefId {
733    fn quote(&self) -> String {
734        format!("\"{}\"", self.0.clone())
735    }
736}
737#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
738pub struct GitRepositoryId(pub String);
739impl From<&str> for GitRepositoryId {
740    fn from(value: &str) -> Self {
741        Self(value.to_string())
742    }
743}
744impl From<String> for GitRepositoryId {
745    fn from(value: String) -> Self {
746        Self(value)
747    }
748}
749impl IntoID<GitRepositoryId> for GitRepository {
750    fn into_id(
751        self,
752    ) -> std::pin::Pin<
753        Box<dyn core::future::Future<Output = Result<GitRepositoryId, DaggerError>> + Send>,
754    > {
755        Box::pin(async move { self.id().await })
756    }
757}
758impl IntoID<GitRepositoryId> for GitRepositoryId {
759    fn into_id(
760        self,
761    ) -> std::pin::Pin<
762        Box<dyn core::future::Future<Output = Result<GitRepositoryId, DaggerError>> + Send>,
763    > {
764        Box::pin(async move { Ok::<GitRepositoryId, DaggerError>(self) })
765    }
766}
767impl GitRepositoryId {
768    fn quote(&self) -> String {
769        format!("\"{}\"", self.0.clone())
770    }
771}
772#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
773pub struct HostId(pub String);
774impl From<&str> for HostId {
775    fn from(value: &str) -> Self {
776        Self(value.to_string())
777    }
778}
779impl From<String> for HostId {
780    fn from(value: String) -> Self {
781        Self(value)
782    }
783}
784impl IntoID<HostId> for Host {
785    fn into_id(
786        self,
787    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<HostId, DaggerError>> + Send>>
788    {
789        Box::pin(async move { self.id().await })
790    }
791}
792impl IntoID<HostId> for HostId {
793    fn into_id(
794        self,
795    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<HostId, DaggerError>> + Send>>
796    {
797        Box::pin(async move { Ok::<HostId, DaggerError>(self) })
798    }
799}
800impl HostId {
801    fn quote(&self) -> String {
802        format!("\"{}\"", self.0.clone())
803    }
804}
805#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
806pub struct InputTypeDefId(pub String);
807impl From<&str> for InputTypeDefId {
808    fn from(value: &str) -> Self {
809        Self(value.to_string())
810    }
811}
812impl From<String> for InputTypeDefId {
813    fn from(value: String) -> Self {
814        Self(value)
815    }
816}
817impl IntoID<InputTypeDefId> for InputTypeDef {
818    fn into_id(
819        self,
820    ) -> std::pin::Pin<
821        Box<dyn core::future::Future<Output = Result<InputTypeDefId, DaggerError>> + Send>,
822    > {
823        Box::pin(async move { self.id().await })
824    }
825}
826impl IntoID<InputTypeDefId> for InputTypeDefId {
827    fn into_id(
828        self,
829    ) -> std::pin::Pin<
830        Box<dyn core::future::Future<Output = Result<InputTypeDefId, DaggerError>> + Send>,
831    > {
832        Box::pin(async move { Ok::<InputTypeDefId, DaggerError>(self) })
833    }
834}
835impl InputTypeDefId {
836    fn quote(&self) -> String {
837        format!("\"{}\"", self.0.clone())
838    }
839}
840#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
841pub struct InterfaceTypeDefId(pub String);
842impl From<&str> for InterfaceTypeDefId {
843    fn from(value: &str) -> Self {
844        Self(value.to_string())
845    }
846}
847impl From<String> for InterfaceTypeDefId {
848    fn from(value: String) -> Self {
849        Self(value)
850    }
851}
852impl IntoID<InterfaceTypeDefId> for InterfaceTypeDef {
853    fn into_id(
854        self,
855    ) -> std::pin::Pin<
856        Box<dyn core::future::Future<Output = Result<InterfaceTypeDefId, DaggerError>> + Send>,
857    > {
858        Box::pin(async move { self.id().await })
859    }
860}
861impl IntoID<InterfaceTypeDefId> for InterfaceTypeDefId {
862    fn into_id(
863        self,
864    ) -> std::pin::Pin<
865        Box<dyn core::future::Future<Output = Result<InterfaceTypeDefId, DaggerError>> + Send>,
866    > {
867        Box::pin(async move { Ok::<InterfaceTypeDefId, DaggerError>(self) })
868    }
869}
870impl InterfaceTypeDefId {
871    fn quote(&self) -> String {
872        format!("\"{}\"", self.0.clone())
873    }
874}
875#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
876pub struct Json(pub String);
877impl From<&str> for Json {
878    fn from(value: &str) -> Self {
879        Self(value.to_string())
880    }
881}
882impl From<String> for Json {
883    fn from(value: String) -> Self {
884        Self(value)
885    }
886}
887impl Json {
888    fn quote(&self) -> String {
889        format!("\"{}\"", self.0.clone())
890    }
891}
892#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
893pub struct Llmid(pub String);
894impl From<&str> for Llmid {
895    fn from(value: &str) -> Self {
896        Self(value.to_string())
897    }
898}
899impl From<String> for Llmid {
900    fn from(value: String) -> Self {
901        Self(value)
902    }
903}
904impl IntoID<Llmid> for Llm {
905    fn into_id(
906        self,
907    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Llmid, DaggerError>> + Send>>
908    {
909        Box::pin(async move { self.id().await })
910    }
911}
912impl IntoID<Llmid> for Llmid {
913    fn into_id(
914        self,
915    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Llmid, DaggerError>> + Send>>
916    {
917        Box::pin(async move { Ok::<Llmid, DaggerError>(self) })
918    }
919}
920impl Llmid {
921    fn quote(&self) -> String {
922        format!("\"{}\"", self.0.clone())
923    }
924}
925#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
926pub struct LlmVariableId(pub String);
927impl From<&str> for LlmVariableId {
928    fn from(value: &str) -> Self {
929        Self(value.to_string())
930    }
931}
932impl From<String> for LlmVariableId {
933    fn from(value: String) -> Self {
934        Self(value)
935    }
936}
937impl IntoID<LlmVariableId> for LlmVariable {
938    fn into_id(
939        self,
940    ) -> std::pin::Pin<
941        Box<dyn core::future::Future<Output = Result<LlmVariableId, DaggerError>> + Send>,
942    > {
943        Box::pin(async move { self.id().await })
944    }
945}
946impl IntoID<LlmVariableId> for LlmVariableId {
947    fn into_id(
948        self,
949    ) -> std::pin::Pin<
950        Box<dyn core::future::Future<Output = Result<LlmVariableId, DaggerError>> + Send>,
951    > {
952        Box::pin(async move { Ok::<LlmVariableId, DaggerError>(self) })
953    }
954}
955impl LlmVariableId {
956    fn quote(&self) -> String {
957        format!("\"{}\"", self.0.clone())
958    }
959}
960#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
961pub struct LabelId(pub String);
962impl From<&str> for LabelId {
963    fn from(value: &str) -> Self {
964        Self(value.to_string())
965    }
966}
967impl From<String> for LabelId {
968    fn from(value: String) -> Self {
969        Self(value)
970    }
971}
972impl IntoID<LabelId> for Label {
973    fn into_id(
974        self,
975    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<LabelId, DaggerError>> + Send>>
976    {
977        Box::pin(async move { self.id().await })
978    }
979}
980impl IntoID<LabelId> for LabelId {
981    fn into_id(
982        self,
983    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<LabelId, DaggerError>> + Send>>
984    {
985        Box::pin(async move { Ok::<LabelId, DaggerError>(self) })
986    }
987}
988impl LabelId {
989    fn quote(&self) -> String {
990        format!("\"{}\"", self.0.clone())
991    }
992}
993#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
994pub struct ListTypeDefId(pub String);
995impl From<&str> for ListTypeDefId {
996    fn from(value: &str) -> Self {
997        Self(value.to_string())
998    }
999}
1000impl From<String> for ListTypeDefId {
1001    fn from(value: String) -> Self {
1002        Self(value)
1003    }
1004}
1005impl IntoID<ListTypeDefId> for ListTypeDef {
1006    fn into_id(
1007        self,
1008    ) -> std::pin::Pin<
1009        Box<dyn core::future::Future<Output = Result<ListTypeDefId, DaggerError>> + Send>,
1010    > {
1011        Box::pin(async move { self.id().await })
1012    }
1013}
1014impl IntoID<ListTypeDefId> for ListTypeDefId {
1015    fn into_id(
1016        self,
1017    ) -> std::pin::Pin<
1018        Box<dyn core::future::Future<Output = Result<ListTypeDefId, DaggerError>> + Send>,
1019    > {
1020        Box::pin(async move { Ok::<ListTypeDefId, DaggerError>(self) })
1021    }
1022}
1023impl ListTypeDefId {
1024    fn quote(&self) -> String {
1025        format!("\"{}\"", self.0.clone())
1026    }
1027}
1028#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1029pub struct ModuleConfigClientId(pub String);
1030impl From<&str> for ModuleConfigClientId {
1031    fn from(value: &str) -> Self {
1032        Self(value.to_string())
1033    }
1034}
1035impl From<String> for ModuleConfigClientId {
1036    fn from(value: String) -> Self {
1037        Self(value)
1038    }
1039}
1040impl IntoID<ModuleConfigClientId> for ModuleConfigClient {
1041    fn into_id(
1042        self,
1043    ) -> std::pin::Pin<
1044        Box<dyn core::future::Future<Output = Result<ModuleConfigClientId, DaggerError>> + Send>,
1045    > {
1046        Box::pin(async move { self.id().await })
1047    }
1048}
1049impl IntoID<ModuleConfigClientId> for ModuleConfigClientId {
1050    fn into_id(
1051        self,
1052    ) -> std::pin::Pin<
1053        Box<dyn core::future::Future<Output = Result<ModuleConfigClientId, DaggerError>> + Send>,
1054    > {
1055        Box::pin(async move { Ok::<ModuleConfigClientId, DaggerError>(self) })
1056    }
1057}
1058impl ModuleConfigClientId {
1059    fn quote(&self) -> String {
1060        format!("\"{}\"", self.0.clone())
1061    }
1062}
1063#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1064pub struct ModuleId(pub String);
1065impl From<&str> for ModuleId {
1066    fn from(value: &str) -> Self {
1067        Self(value.to_string())
1068    }
1069}
1070impl From<String> for ModuleId {
1071    fn from(value: String) -> Self {
1072        Self(value)
1073    }
1074}
1075impl IntoID<ModuleId> for Module {
1076    fn into_id(
1077        self,
1078    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ModuleId, DaggerError>> + Send>>
1079    {
1080        Box::pin(async move { self.id().await })
1081    }
1082}
1083impl IntoID<ModuleId> for ModuleId {
1084    fn into_id(
1085        self,
1086    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ModuleId, DaggerError>> + Send>>
1087    {
1088        Box::pin(async move { Ok::<ModuleId, DaggerError>(self) })
1089    }
1090}
1091impl ModuleId {
1092    fn quote(&self) -> String {
1093        format!("\"{}\"", self.0.clone())
1094    }
1095}
1096#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1097pub struct ModuleSourceId(pub String);
1098impl From<&str> for ModuleSourceId {
1099    fn from(value: &str) -> Self {
1100        Self(value.to_string())
1101    }
1102}
1103impl From<String> for ModuleSourceId {
1104    fn from(value: String) -> Self {
1105        Self(value)
1106    }
1107}
1108impl IntoID<ModuleSourceId> for ModuleSource {
1109    fn into_id(
1110        self,
1111    ) -> std::pin::Pin<
1112        Box<dyn core::future::Future<Output = Result<ModuleSourceId, DaggerError>> + Send>,
1113    > {
1114        Box::pin(async move { self.id().await })
1115    }
1116}
1117impl IntoID<ModuleSourceId> for ModuleSourceId {
1118    fn into_id(
1119        self,
1120    ) -> std::pin::Pin<
1121        Box<dyn core::future::Future<Output = Result<ModuleSourceId, DaggerError>> + Send>,
1122    > {
1123        Box::pin(async move { Ok::<ModuleSourceId, DaggerError>(self) })
1124    }
1125}
1126impl ModuleSourceId {
1127    fn quote(&self) -> String {
1128        format!("\"{}\"", self.0.clone())
1129    }
1130}
1131#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1132pub struct ObjectTypeDefId(pub String);
1133impl From<&str> for ObjectTypeDefId {
1134    fn from(value: &str) -> Self {
1135        Self(value.to_string())
1136    }
1137}
1138impl From<String> for ObjectTypeDefId {
1139    fn from(value: String) -> Self {
1140        Self(value)
1141    }
1142}
1143impl IntoID<ObjectTypeDefId> for ObjectTypeDef {
1144    fn into_id(
1145        self,
1146    ) -> std::pin::Pin<
1147        Box<dyn core::future::Future<Output = Result<ObjectTypeDefId, DaggerError>> + Send>,
1148    > {
1149        Box::pin(async move { self.id().await })
1150    }
1151}
1152impl IntoID<ObjectTypeDefId> for ObjectTypeDefId {
1153    fn into_id(
1154        self,
1155    ) -> std::pin::Pin<
1156        Box<dyn core::future::Future<Output = Result<ObjectTypeDefId, DaggerError>> + Send>,
1157    > {
1158        Box::pin(async move { Ok::<ObjectTypeDefId, DaggerError>(self) })
1159    }
1160}
1161impl ObjectTypeDefId {
1162    fn quote(&self) -> String {
1163        format!("\"{}\"", self.0.clone())
1164    }
1165}
1166#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1167pub struct Platform(pub String);
1168impl From<&str> for Platform {
1169    fn from(value: &str) -> Self {
1170        Self(value.to_string())
1171    }
1172}
1173impl From<String> for Platform {
1174    fn from(value: String) -> Self {
1175        Self(value)
1176    }
1177}
1178impl Platform {
1179    fn quote(&self) -> String {
1180        format!("\"{}\"", self.0.clone())
1181    }
1182}
1183#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1184pub struct PortId(pub String);
1185impl From<&str> for PortId {
1186    fn from(value: &str) -> Self {
1187        Self(value.to_string())
1188    }
1189}
1190impl From<String> for PortId {
1191    fn from(value: String) -> Self {
1192        Self(value)
1193    }
1194}
1195impl IntoID<PortId> for Port {
1196    fn into_id(
1197        self,
1198    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<PortId, DaggerError>> + Send>>
1199    {
1200        Box::pin(async move { self.id().await })
1201    }
1202}
1203impl IntoID<PortId> for PortId {
1204    fn into_id(
1205        self,
1206    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<PortId, DaggerError>> + Send>>
1207    {
1208        Box::pin(async move { Ok::<PortId, DaggerError>(self) })
1209    }
1210}
1211impl PortId {
1212    fn quote(&self) -> String {
1213        format!("\"{}\"", self.0.clone())
1214    }
1215}
1216#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1217pub struct SdkConfigId(pub String);
1218impl From<&str> for SdkConfigId {
1219    fn from(value: &str) -> Self {
1220        Self(value.to_string())
1221    }
1222}
1223impl From<String> for SdkConfigId {
1224    fn from(value: String) -> Self {
1225        Self(value)
1226    }
1227}
1228impl IntoID<SdkConfigId> for SdkConfig {
1229    fn into_id(
1230        self,
1231    ) -> std::pin::Pin<
1232        Box<dyn core::future::Future<Output = Result<SdkConfigId, DaggerError>> + Send>,
1233    > {
1234        Box::pin(async move { self.id().await })
1235    }
1236}
1237impl IntoID<SdkConfigId> for SdkConfigId {
1238    fn into_id(
1239        self,
1240    ) -> std::pin::Pin<
1241        Box<dyn core::future::Future<Output = Result<SdkConfigId, DaggerError>> + Send>,
1242    > {
1243        Box::pin(async move { Ok::<SdkConfigId, DaggerError>(self) })
1244    }
1245}
1246impl SdkConfigId {
1247    fn quote(&self) -> String {
1248        format!("\"{}\"", self.0.clone())
1249    }
1250}
1251#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1252pub struct ScalarTypeDefId(pub String);
1253impl From<&str> for ScalarTypeDefId {
1254    fn from(value: &str) -> Self {
1255        Self(value.to_string())
1256    }
1257}
1258impl From<String> for ScalarTypeDefId {
1259    fn from(value: String) -> Self {
1260        Self(value)
1261    }
1262}
1263impl IntoID<ScalarTypeDefId> for ScalarTypeDef {
1264    fn into_id(
1265        self,
1266    ) -> std::pin::Pin<
1267        Box<dyn core::future::Future<Output = Result<ScalarTypeDefId, DaggerError>> + Send>,
1268    > {
1269        Box::pin(async move { self.id().await })
1270    }
1271}
1272impl IntoID<ScalarTypeDefId> for ScalarTypeDefId {
1273    fn into_id(
1274        self,
1275    ) -> std::pin::Pin<
1276        Box<dyn core::future::Future<Output = Result<ScalarTypeDefId, DaggerError>> + Send>,
1277    > {
1278        Box::pin(async move { Ok::<ScalarTypeDefId, DaggerError>(self) })
1279    }
1280}
1281impl ScalarTypeDefId {
1282    fn quote(&self) -> String {
1283        format!("\"{}\"", self.0.clone())
1284    }
1285}
1286#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1287pub struct SecretId(pub String);
1288impl From<&str> for SecretId {
1289    fn from(value: &str) -> Self {
1290        Self(value.to_string())
1291    }
1292}
1293impl From<String> for SecretId {
1294    fn from(value: String) -> Self {
1295        Self(value)
1296    }
1297}
1298impl IntoID<SecretId> for Secret {
1299    fn into_id(
1300        self,
1301    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SecretId, DaggerError>> + Send>>
1302    {
1303        Box::pin(async move { self.id().await })
1304    }
1305}
1306impl IntoID<SecretId> for SecretId {
1307    fn into_id(
1308        self,
1309    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SecretId, DaggerError>> + Send>>
1310    {
1311        Box::pin(async move { Ok::<SecretId, DaggerError>(self) })
1312    }
1313}
1314impl SecretId {
1315    fn quote(&self) -> String {
1316        format!("\"{}\"", self.0.clone())
1317    }
1318}
1319#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1320pub struct ServiceId(pub String);
1321impl From<&str> for ServiceId {
1322    fn from(value: &str) -> Self {
1323        Self(value.to_string())
1324    }
1325}
1326impl From<String> for ServiceId {
1327    fn from(value: String) -> Self {
1328        Self(value)
1329    }
1330}
1331impl IntoID<ServiceId> for Service {
1332    fn into_id(
1333        self,
1334    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ServiceId, DaggerError>> + Send>>
1335    {
1336        Box::pin(async move { self.id().await })
1337    }
1338}
1339impl IntoID<ServiceId> for ServiceId {
1340    fn into_id(
1341        self,
1342    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ServiceId, DaggerError>> + Send>>
1343    {
1344        Box::pin(async move { Ok::<ServiceId, DaggerError>(self) })
1345    }
1346}
1347impl ServiceId {
1348    fn quote(&self) -> String {
1349        format!("\"{}\"", self.0.clone())
1350    }
1351}
1352#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1353pub struct SocketId(pub String);
1354impl From<&str> for SocketId {
1355    fn from(value: &str) -> Self {
1356        Self(value.to_string())
1357    }
1358}
1359impl From<String> for SocketId {
1360    fn from(value: String) -> Self {
1361        Self(value)
1362    }
1363}
1364impl IntoID<SocketId> for Socket {
1365    fn into_id(
1366        self,
1367    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SocketId, DaggerError>> + Send>>
1368    {
1369        Box::pin(async move { self.id().await })
1370    }
1371}
1372impl IntoID<SocketId> for SocketId {
1373    fn into_id(
1374        self,
1375    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SocketId, DaggerError>> + Send>>
1376    {
1377        Box::pin(async move { Ok::<SocketId, DaggerError>(self) })
1378    }
1379}
1380impl SocketId {
1381    fn quote(&self) -> String {
1382        format!("\"{}\"", self.0.clone())
1383    }
1384}
1385#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1386pub struct SourceMapId(pub String);
1387impl From<&str> for SourceMapId {
1388    fn from(value: &str) -> Self {
1389        Self(value.to_string())
1390    }
1391}
1392impl From<String> for SourceMapId {
1393    fn from(value: String) -> Self {
1394        Self(value)
1395    }
1396}
1397impl IntoID<SourceMapId> for SourceMap {
1398    fn into_id(
1399        self,
1400    ) -> std::pin::Pin<
1401        Box<dyn core::future::Future<Output = Result<SourceMapId, DaggerError>> + Send>,
1402    > {
1403        Box::pin(async move { self.id().await })
1404    }
1405}
1406impl IntoID<SourceMapId> for SourceMapId {
1407    fn into_id(
1408        self,
1409    ) -> std::pin::Pin<
1410        Box<dyn core::future::Future<Output = Result<SourceMapId, DaggerError>> + Send>,
1411    > {
1412        Box::pin(async move { Ok::<SourceMapId, DaggerError>(self) })
1413    }
1414}
1415impl SourceMapId {
1416    fn quote(&self) -> String {
1417        format!("\"{}\"", self.0.clone())
1418    }
1419}
1420#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1421pub struct TerminalId(pub String);
1422impl From<&str> for TerminalId {
1423    fn from(value: &str) -> Self {
1424        Self(value.to_string())
1425    }
1426}
1427impl From<String> for TerminalId {
1428    fn from(value: String) -> Self {
1429        Self(value)
1430    }
1431}
1432impl IntoID<TerminalId> for Terminal {
1433    fn into_id(
1434        self,
1435    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TerminalId, DaggerError>> + Send>>
1436    {
1437        Box::pin(async move { self.id().await })
1438    }
1439}
1440impl IntoID<TerminalId> for TerminalId {
1441    fn into_id(
1442        self,
1443    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TerminalId, DaggerError>> + Send>>
1444    {
1445        Box::pin(async move { Ok::<TerminalId, DaggerError>(self) })
1446    }
1447}
1448impl TerminalId {
1449    fn quote(&self) -> String {
1450        format!("\"{}\"", self.0.clone())
1451    }
1452}
1453#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1454pub struct TypeDefId(pub String);
1455impl From<&str> for TypeDefId {
1456    fn from(value: &str) -> Self {
1457        Self(value.to_string())
1458    }
1459}
1460impl From<String> for TypeDefId {
1461    fn from(value: String) -> Self {
1462        Self(value)
1463    }
1464}
1465impl IntoID<TypeDefId> for TypeDef {
1466    fn into_id(
1467        self,
1468    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TypeDefId, DaggerError>> + Send>>
1469    {
1470        Box::pin(async move { self.id().await })
1471    }
1472}
1473impl IntoID<TypeDefId> for TypeDefId {
1474    fn into_id(
1475        self,
1476    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TypeDefId, DaggerError>> + Send>>
1477    {
1478        Box::pin(async move { Ok::<TypeDefId, DaggerError>(self) })
1479    }
1480}
1481impl TypeDefId {
1482    fn quote(&self) -> String {
1483        format!("\"{}\"", self.0.clone())
1484    }
1485}
1486#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1487pub struct Void(pub String);
1488impl From<&str> for Void {
1489    fn from(value: &str) -> Self {
1490        Self(value.to_string())
1491    }
1492}
1493impl From<String> for Void {
1494    fn from(value: String) -> Self {
1495        Self(value)
1496    }
1497}
1498impl Void {
1499    fn quote(&self) -> String {
1500        format!("\"{}\"", self.0.clone())
1501    }
1502}
1503#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
1504pub struct BuildArg {
1505    pub name: String,
1506    pub value: String,
1507}
1508#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
1509pub struct PipelineLabel {
1510    pub name: String,
1511    pub value: String,
1512}
1513#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
1514pub struct PortForward {
1515    pub backend: isize,
1516    pub frontend: isize,
1517    pub protocol: NetworkProtocol,
1518}
1519#[derive(Clone)]
1520pub struct CacheVolume {
1521    pub proc: Option<Arc<DaggerSessionProc>>,
1522    pub selection: Selection,
1523    pub graphql_client: DynGraphQLClient,
1524}
1525impl CacheVolume {
1526    /// A unique identifier for this CacheVolume.
1527    pub async fn id(&self) -> Result<CacheVolumeId, DaggerError> {
1528        let query = self.selection.select("id");
1529        query.execute(self.graphql_client.clone()).await
1530    }
1531}
1532#[derive(Clone)]
1533pub struct Container {
1534    pub proc: Option<Arc<DaggerSessionProc>>,
1535    pub selection: Selection,
1536    pub graphql_client: DynGraphQLClient,
1537}
1538#[derive(Builder, Debug, PartialEq)]
1539pub struct ContainerAsServiceOpts<'a> {
1540    /// Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).
1541    /// If empty, the container's default command is used.
1542    #[builder(setter(into, strip_option), default)]
1543    pub args: Option<Vec<&'a str>>,
1544    /// Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1545    #[builder(setter(into, strip_option), default)]
1546    pub expand: Option<bool>,
1547    /// Provides Dagger access to the executed command.
1548    /// Do not use this option unless you trust the command being executed; the command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.
1549    #[builder(setter(into, strip_option), default)]
1550    pub experimental_privileged_nesting: Option<bool>,
1551    /// 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.
1552    #[builder(setter(into, strip_option), default)]
1553    pub insecure_root_capabilities: Option<bool>,
1554    /// If set, skip the automatic init process injected into containers by default.
1555    /// 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.
1556    #[builder(setter(into, strip_option), default)]
1557    pub no_init: Option<bool>,
1558    /// If the container has an entrypoint, prepend it to the args.
1559    #[builder(setter(into, strip_option), default)]
1560    pub use_entrypoint: Option<bool>,
1561}
1562#[derive(Builder, Debug, PartialEq)]
1563pub struct ContainerAsTarballOpts {
1564    /// Force each layer of the image to use the specified compression algorithm.
1565    /// 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.
1566    #[builder(setter(into, strip_option), default)]
1567    pub forced_compression: Option<ImageLayerCompression>,
1568    /// Use the specified media types for the image's layers.
1569    /// Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
1570    #[builder(setter(into, strip_option), default)]
1571    pub media_types: Option<ImageMediaTypes>,
1572    /// Identifiers for other platform specific containers.
1573    /// Used for multi-platform images.
1574    #[builder(setter(into, strip_option), default)]
1575    pub platform_variants: Option<Vec<ContainerId>>,
1576}
1577#[derive(Builder, Debug, PartialEq)]
1578pub struct ContainerBuildOpts<'a> {
1579    /// Additional build arguments.
1580    #[builder(setter(into, strip_option), default)]
1581    pub build_args: Option<Vec<BuildArg>>,
1582    /// Path to the Dockerfile to use.
1583    #[builder(setter(into, strip_option), default)]
1584    pub dockerfile: Option<&'a str>,
1585    /// Secrets to pass to the build.
1586    /// They will be mounted at /run/secrets/[secret-name] in the build container
1587    /// They can be accessed in the Dockerfile using the "secret" mount type and mount path /run/secrets/[secret-name], e.g. RUN --mount=type=secret,id=my-secret curl [http://example.com?token=$(cat /run/secrets/my-secret)](http://example.com?token=$(cat /run/secrets/my-secret))
1588    #[builder(setter(into, strip_option), default)]
1589    pub secrets: Option<Vec<SecretId>>,
1590    /// Target build stage to build.
1591    #[builder(setter(into, strip_option), default)]
1592    pub target: Option<&'a str>,
1593}
1594#[derive(Builder, Debug, PartialEq)]
1595pub struct ContainerDirectoryOpts {
1596    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1597    #[builder(setter(into, strip_option), default)]
1598    pub expand: Option<bool>,
1599}
1600#[derive(Builder, Debug, PartialEq)]
1601pub struct ContainerExportOpts {
1602    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1603    #[builder(setter(into, strip_option), default)]
1604    pub expand: Option<bool>,
1605    /// Force each layer of the exported image to use the specified compression algorithm.
1606    /// 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.
1607    #[builder(setter(into, strip_option), default)]
1608    pub forced_compression: Option<ImageLayerCompression>,
1609    /// Use the specified media types for the exported image's layers.
1610    /// Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
1611    #[builder(setter(into, strip_option), default)]
1612    pub media_types: Option<ImageMediaTypes>,
1613    /// Identifiers for other platform specific containers.
1614    /// Used for multi-platform image.
1615    #[builder(setter(into, strip_option), default)]
1616    pub platform_variants: Option<Vec<ContainerId>>,
1617}
1618#[derive(Builder, Debug, PartialEq)]
1619pub struct ContainerFileOpts {
1620    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
1621    #[builder(setter(into, strip_option), default)]
1622    pub expand: Option<bool>,
1623}
1624#[derive(Builder, Debug, PartialEq)]
1625pub struct ContainerImportOpts<'a> {
1626    /// Identifies the tag to import from the archive, if the archive bundles multiple tags.
1627    #[builder(setter(into, strip_option), default)]
1628    pub tag: Option<&'a str>,
1629}
1630#[derive(Builder, Debug, PartialEq)]
1631pub struct ContainerPublishOpts {
1632    /// Force each layer of the published image to use the specified compression algorithm.
1633    /// 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.
1634    #[builder(setter(into, strip_option), default)]
1635    pub forced_compression: Option<ImageLayerCompression>,
1636    /// Use the specified media types for the published image's layers.
1637    /// Defaults to OCI, which is largely compatible with most recent registries, but Docker may be needed for older registries without OCI support.
1638    #[builder(setter(into, strip_option), default)]
1639    pub media_types: Option<ImageMediaTypes>,
1640    /// Identifiers for other platform specific containers.
1641    /// Used for multi-platform image.
1642    #[builder(setter(into, strip_option), default)]
1643    pub platform_variants: Option<Vec<ContainerId>>,
1644}
1645#[derive(Builder, Debug, PartialEq)]
1646pub struct ContainerTerminalOpts<'a> {
1647    /// If set, override the container's default terminal command and invoke these command arguments instead.
1648    #[builder(setter(into, strip_option), default)]
1649    pub cmd: Option<Vec<&'a str>>,
1650    /// Provides Dagger access to the executed command.
1651    /// Do not use this option unless you trust the command being executed; the command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.
1652    #[builder(setter(into, strip_option), default)]
1653    pub experimental_privileged_nesting: Option<bool>,
1654    /// 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.
1655    #[builder(setter(into, strip_option), default)]
1656    pub insecure_root_capabilities: Option<bool>,
1657}
1658#[derive(Builder, Debug, PartialEq)]
1659pub struct ContainerUpOpts<'a> {
1660    /// Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).
1661    /// If empty, the container's default command is used.
1662    #[builder(setter(into, strip_option), default)]
1663    pub args: Option<Vec<&'a str>>,
1664    /// Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1665    #[builder(setter(into, strip_option), default)]
1666    pub expand: Option<bool>,
1667    /// Provides Dagger access to the executed command.
1668    /// Do not use this option unless you trust the command being executed; the command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.
1669    #[builder(setter(into, strip_option), default)]
1670    pub experimental_privileged_nesting: Option<bool>,
1671    /// 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.
1672    #[builder(setter(into, strip_option), default)]
1673    pub insecure_root_capabilities: Option<bool>,
1674    /// If set, skip the automatic init process injected into containers by default.
1675    /// 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.
1676    #[builder(setter(into, strip_option), default)]
1677    pub no_init: Option<bool>,
1678    /// List of frontend/backend port mappings to forward.
1679    /// Frontend is the port accepting traffic on the host, backend is the service port.
1680    #[builder(setter(into, strip_option), default)]
1681    pub ports: Option<Vec<PortForward>>,
1682    /// Bind each tunnel port to a random port on the host.
1683    #[builder(setter(into, strip_option), default)]
1684    pub random: Option<bool>,
1685    /// If the container has an entrypoint, prepend it to the args.
1686    #[builder(setter(into, strip_option), default)]
1687    pub use_entrypoint: Option<bool>,
1688}
1689#[derive(Builder, Debug, PartialEq)]
1690pub struct ContainerWithDefaultTerminalCmdOpts {
1691    /// Provides Dagger access to the executed command.
1692    /// Do not use this option unless you trust the command being executed; the command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.
1693    #[builder(setter(into, strip_option), default)]
1694    pub experimental_privileged_nesting: Option<bool>,
1695    /// 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.
1696    #[builder(setter(into, strip_option), default)]
1697    pub insecure_root_capabilities: Option<bool>,
1698}
1699#[derive(Builder, Debug, PartialEq)]
1700pub struct ContainerWithDirectoryOpts<'a> {
1701    /// Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]).
1702    #[builder(setter(into, strip_option), default)]
1703    pub exclude: Option<Vec<&'a str>>,
1704    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1705    #[builder(setter(into, strip_option), default)]
1706    pub expand: Option<bool>,
1707    /// Patterns to include in the written directory (e.g. ["*.go", "go.mod", "go.sum"]).
1708    #[builder(setter(into, strip_option), default)]
1709    pub include: Option<Vec<&'a str>>,
1710    /// A user:group to set for the directory and its contents.
1711    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1712    /// If the group is omitted, it defaults to the same as the user.
1713    #[builder(setter(into, strip_option), default)]
1714    pub owner: Option<&'a str>,
1715}
1716#[derive(Builder, Debug, PartialEq)]
1717pub struct ContainerWithEntrypointOpts {
1718    /// Don't remove the default arguments when setting the entrypoint.
1719    #[builder(setter(into, strip_option), default)]
1720    pub keep_default_args: Option<bool>,
1721}
1722#[derive(Builder, Debug, PartialEq)]
1723pub struct ContainerWithEnvVariableOpts {
1724    /// Replace "${VAR}" or "$VAR" in the value according to the current environment variables defined in the container (e.g. "/opt/bin:$PATH").
1725    #[builder(setter(into, strip_option), default)]
1726    pub expand: Option<bool>,
1727}
1728#[derive(Builder, Debug, PartialEq)]
1729pub struct ContainerWithExecOpts<'a> {
1730    /// Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1731    #[builder(setter(into, strip_option), default)]
1732    pub expand: Option<bool>,
1733    /// Exit codes this command is allowed to exit with without error
1734    #[builder(setter(into, strip_option), default)]
1735    pub expect: Option<ReturnType>,
1736    /// Provides Dagger access to the executed command.
1737    /// Do not use this option unless you trust the command being executed; the command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.
1738    #[builder(setter(into, strip_option), default)]
1739    pub experimental_privileged_nesting: Option<bool>,
1740    /// 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.
1741    #[builder(setter(into, strip_option), default)]
1742    pub insecure_root_capabilities: Option<bool>,
1743    /// If set, skip the automatic init process injected into containers by default.
1744    /// 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.
1745    #[builder(setter(into, strip_option), default)]
1746    pub no_init: Option<bool>,
1747    /// Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr").
1748    #[builder(setter(into, strip_option), default)]
1749    pub redirect_stderr: Option<&'a str>,
1750    /// Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout").
1751    #[builder(setter(into, strip_option), default)]
1752    pub redirect_stdout: Option<&'a str>,
1753    /// Content to write to the command's standard input before closing (e.g., "Hello world").
1754    #[builder(setter(into, strip_option), default)]
1755    pub stdin: Option<&'a str>,
1756    /// If the container has an entrypoint, prepend it to the args.
1757    #[builder(setter(into, strip_option), default)]
1758    pub use_entrypoint: Option<bool>,
1759}
1760#[derive(Builder, Debug, PartialEq)]
1761pub struct ContainerWithExposedPortOpts<'a> {
1762    /// Optional port description
1763    #[builder(setter(into, strip_option), default)]
1764    pub description: Option<&'a str>,
1765    /// Skip the health check when run as a service.
1766    #[builder(setter(into, strip_option), default)]
1767    pub experimental_skip_healthcheck: Option<bool>,
1768    /// Transport layer network protocol
1769    #[builder(setter(into, strip_option), default)]
1770    pub protocol: Option<NetworkProtocol>,
1771}
1772#[derive(Builder, Debug, PartialEq)]
1773pub struct ContainerWithFileOpts<'a> {
1774    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
1775    #[builder(setter(into, strip_option), default)]
1776    pub expand: Option<bool>,
1777    /// A user:group to set for the file.
1778    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1779    /// If the group is omitted, it defaults to the same as the user.
1780    #[builder(setter(into, strip_option), default)]
1781    pub owner: Option<&'a str>,
1782    /// Permission given to the copied file (e.g., 0600).
1783    #[builder(setter(into, strip_option), default)]
1784    pub permissions: Option<isize>,
1785}
1786#[derive(Builder, Debug, PartialEq)]
1787pub struct ContainerWithFilesOpts<'a> {
1788    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
1789    #[builder(setter(into, strip_option), default)]
1790    pub expand: Option<bool>,
1791    /// A user:group to set for the files.
1792    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1793    /// If the group is omitted, it defaults to the same as the user.
1794    #[builder(setter(into, strip_option), default)]
1795    pub owner: Option<&'a str>,
1796    /// Permission given to the copied files (e.g., 0600).
1797    #[builder(setter(into, strip_option), default)]
1798    pub permissions: Option<isize>,
1799}
1800#[derive(Builder, Debug, PartialEq)]
1801pub struct ContainerWithMountedCacheOpts<'a> {
1802    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1803    #[builder(setter(into, strip_option), default)]
1804    pub expand: Option<bool>,
1805    /// A user:group to set for the mounted cache directory.
1806    /// 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.
1807    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1808    /// If the group is omitted, it defaults to the same as the user.
1809    #[builder(setter(into, strip_option), default)]
1810    pub owner: Option<&'a str>,
1811    /// Sharing mode of the cache volume.
1812    #[builder(setter(into, strip_option), default)]
1813    pub sharing: Option<CacheSharingMode>,
1814    /// Identifier of the directory to use as the cache volume's root.
1815    #[builder(setter(into, strip_option), default)]
1816    pub source: Option<DirectoryId>,
1817}
1818#[derive(Builder, Debug, PartialEq)]
1819pub struct ContainerWithMountedDirectoryOpts<'a> {
1820    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1821    #[builder(setter(into, strip_option), default)]
1822    pub expand: Option<bool>,
1823    /// A user:group to set for the mounted directory and its contents.
1824    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1825    /// If the group is omitted, it defaults to the same as the user.
1826    #[builder(setter(into, strip_option), default)]
1827    pub owner: Option<&'a str>,
1828}
1829#[derive(Builder, Debug, PartialEq)]
1830pub struct ContainerWithMountedFileOpts<'a> {
1831    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
1832    #[builder(setter(into, strip_option), default)]
1833    pub expand: Option<bool>,
1834    /// A user or user:group to set for the mounted file.
1835    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1836    /// If the group is omitted, it defaults to the same as the user.
1837    #[builder(setter(into, strip_option), default)]
1838    pub owner: Option<&'a str>,
1839}
1840#[derive(Builder, Debug, PartialEq)]
1841pub struct ContainerWithMountedSecretOpts<'a> {
1842    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1843    #[builder(setter(into, strip_option), default)]
1844    pub expand: Option<bool>,
1845    /// Permission given to the mounted secret (e.g., 0600).
1846    /// This option requires an owner to be set to be active.
1847    #[builder(setter(into, strip_option), default)]
1848    pub mode: Option<isize>,
1849    /// A user:group to set for the mounted secret.
1850    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1851    /// If the group is omitted, it defaults to the same as the user.
1852    #[builder(setter(into, strip_option), default)]
1853    pub owner: Option<&'a str>,
1854}
1855#[derive(Builder, Debug, PartialEq)]
1856pub struct ContainerWithMountedTempOpts {
1857    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1858    #[builder(setter(into, strip_option), default)]
1859    pub expand: Option<bool>,
1860    /// Size of the temporary directory in bytes.
1861    #[builder(setter(into, strip_option), default)]
1862    pub size: Option<isize>,
1863}
1864#[derive(Builder, Debug, PartialEq)]
1865pub struct ContainerWithNewFileOpts<'a> {
1866    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
1867    #[builder(setter(into, strip_option), default)]
1868    pub expand: Option<bool>,
1869    /// A user:group to set for the file.
1870    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1871    /// If the group is omitted, it defaults to the same as the user.
1872    #[builder(setter(into, strip_option), default)]
1873    pub owner: Option<&'a str>,
1874    /// Permission given to the written file (e.g., 0600).
1875    #[builder(setter(into, strip_option), default)]
1876    pub permissions: Option<isize>,
1877}
1878#[derive(Builder, Debug, PartialEq)]
1879pub struct ContainerWithUnixSocketOpts<'a> {
1880    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1881    #[builder(setter(into, strip_option), default)]
1882    pub expand: Option<bool>,
1883    /// A user:group to set for the mounted socket.
1884    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1885    /// If the group is omitted, it defaults to the same as the user.
1886    #[builder(setter(into, strip_option), default)]
1887    pub owner: Option<&'a str>,
1888}
1889#[derive(Builder, Debug, PartialEq)]
1890pub struct ContainerWithWorkdirOpts {
1891    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1892    #[builder(setter(into, strip_option), default)]
1893    pub expand: Option<bool>,
1894}
1895#[derive(Builder, Debug, PartialEq)]
1896pub struct ContainerWithoutDirectoryOpts {
1897    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1898    #[builder(setter(into, strip_option), default)]
1899    pub expand: Option<bool>,
1900}
1901#[derive(Builder, Debug, PartialEq)]
1902pub struct ContainerWithoutEntrypointOpts {
1903    /// Don't remove the default arguments when unsetting the entrypoint.
1904    #[builder(setter(into, strip_option), default)]
1905    pub keep_default_args: Option<bool>,
1906}
1907#[derive(Builder, Debug, PartialEq)]
1908pub struct ContainerWithoutExposedPortOpts {
1909    /// Port protocol to unexpose
1910    #[builder(setter(into, strip_option), default)]
1911    pub protocol: Option<NetworkProtocol>,
1912}
1913#[derive(Builder, Debug, PartialEq)]
1914pub struct ContainerWithoutFileOpts {
1915    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
1916    #[builder(setter(into, strip_option), default)]
1917    pub expand: Option<bool>,
1918}
1919#[derive(Builder, Debug, PartialEq)]
1920pub struct ContainerWithoutFilesOpts {
1921    /// Replace "${VAR}" or "$VAR" in the value of paths according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
1922    #[builder(setter(into, strip_option), default)]
1923    pub expand: Option<bool>,
1924}
1925#[derive(Builder, Debug, PartialEq)]
1926pub struct ContainerWithoutMountOpts {
1927    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1928    #[builder(setter(into, strip_option), default)]
1929    pub expand: Option<bool>,
1930}
1931#[derive(Builder, Debug, PartialEq)]
1932pub struct ContainerWithoutUnixSocketOpts {
1933    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1934    #[builder(setter(into, strip_option), default)]
1935    pub expand: Option<bool>,
1936}
1937impl Container {
1938    /// Turn the container into a Service.
1939    /// Be sure to set any exposed ports before this conversion.
1940    ///
1941    /// # Arguments
1942    ///
1943    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
1944    pub fn as_service(&self) -> Service {
1945        let query = self.selection.select("asService");
1946        Service {
1947            proc: self.proc.clone(),
1948            selection: query,
1949            graphql_client: self.graphql_client.clone(),
1950        }
1951    }
1952    /// Turn the container into a Service.
1953    /// Be sure to set any exposed ports before this conversion.
1954    ///
1955    /// # Arguments
1956    ///
1957    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
1958    pub fn as_service_opts<'a>(&self, opts: ContainerAsServiceOpts<'a>) -> Service {
1959        let mut query = self.selection.select("asService");
1960        if let Some(args) = opts.args {
1961            query = query.arg("args", args);
1962        }
1963        if let Some(use_entrypoint) = opts.use_entrypoint {
1964            query = query.arg("useEntrypoint", use_entrypoint);
1965        }
1966        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
1967            query = query.arg(
1968                "experimentalPrivilegedNesting",
1969                experimental_privileged_nesting,
1970            );
1971        }
1972        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
1973            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
1974        }
1975        if let Some(expand) = opts.expand {
1976            query = query.arg("expand", expand);
1977        }
1978        if let Some(no_init) = opts.no_init {
1979            query = query.arg("noInit", no_init);
1980        }
1981        Service {
1982            proc: self.proc.clone(),
1983            selection: query,
1984            graphql_client: self.graphql_client.clone(),
1985        }
1986    }
1987    /// Returns a File representing the container serialized to a tarball.
1988    ///
1989    /// # Arguments
1990    ///
1991    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
1992    pub fn as_tarball(&self) -> File {
1993        let query = self.selection.select("asTarball");
1994        File {
1995            proc: self.proc.clone(),
1996            selection: query,
1997            graphql_client: self.graphql_client.clone(),
1998        }
1999    }
2000    /// Returns a File representing the container serialized to a tarball.
2001    ///
2002    /// # Arguments
2003    ///
2004    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2005    pub fn as_tarball_opts(&self, opts: ContainerAsTarballOpts) -> File {
2006        let mut query = self.selection.select("asTarball");
2007        if let Some(platform_variants) = opts.platform_variants {
2008            query = query.arg("platformVariants", platform_variants);
2009        }
2010        if let Some(forced_compression) = opts.forced_compression {
2011            query = query.arg("forcedCompression", forced_compression);
2012        }
2013        if let Some(media_types) = opts.media_types {
2014            query = query.arg("mediaTypes", media_types);
2015        }
2016        File {
2017            proc: self.proc.clone(),
2018            selection: query,
2019            graphql_client: self.graphql_client.clone(),
2020        }
2021    }
2022    /// Initializes this container from a Dockerfile build.
2023    ///
2024    /// # Arguments
2025    ///
2026    /// * `context` - Directory context used by the Dockerfile.
2027    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2028    pub fn build(&self, context: impl IntoID<DirectoryId>) -> Container {
2029        let mut query = self.selection.select("build");
2030        query = query.arg_lazy(
2031            "context",
2032            Box::new(move || {
2033                let context = context.clone();
2034                Box::pin(async move { context.into_id().await.unwrap().quote() })
2035            }),
2036        );
2037        Container {
2038            proc: self.proc.clone(),
2039            selection: query,
2040            graphql_client: self.graphql_client.clone(),
2041        }
2042    }
2043    /// Initializes this container from a Dockerfile build.
2044    ///
2045    /// # Arguments
2046    ///
2047    /// * `context` - Directory context used by the Dockerfile.
2048    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2049    pub fn build_opts<'a>(
2050        &self,
2051        context: impl IntoID<DirectoryId>,
2052        opts: ContainerBuildOpts<'a>,
2053    ) -> Container {
2054        let mut query = self.selection.select("build");
2055        query = query.arg_lazy(
2056            "context",
2057            Box::new(move || {
2058                let context = context.clone();
2059                Box::pin(async move { context.into_id().await.unwrap().quote() })
2060            }),
2061        );
2062        if let Some(dockerfile) = opts.dockerfile {
2063            query = query.arg("dockerfile", dockerfile);
2064        }
2065        if let Some(target) = opts.target {
2066            query = query.arg("target", target);
2067        }
2068        if let Some(build_args) = opts.build_args {
2069            query = query.arg("buildArgs", build_args);
2070        }
2071        if let Some(secrets) = opts.secrets {
2072            query = query.arg("secrets", secrets);
2073        }
2074        Container {
2075            proc: self.proc.clone(),
2076            selection: query,
2077            graphql_client: self.graphql_client.clone(),
2078        }
2079    }
2080    /// Retrieves default arguments for future commands.
2081    pub async fn default_args(&self) -> Result<Vec<String>, DaggerError> {
2082        let query = self.selection.select("defaultArgs");
2083        query.execute(self.graphql_client.clone()).await
2084    }
2085    /// Retrieves a directory at the given path.
2086    /// Mounts are included.
2087    ///
2088    /// # Arguments
2089    ///
2090    /// * `path` - The path of the directory to retrieve (e.g., "./src").
2091    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2092    pub fn directory(&self, path: impl Into<String>) -> Directory {
2093        let mut query = self.selection.select("directory");
2094        query = query.arg("path", path.into());
2095        Directory {
2096            proc: self.proc.clone(),
2097            selection: query,
2098            graphql_client: self.graphql_client.clone(),
2099        }
2100    }
2101    /// Retrieves a directory at the given path.
2102    /// Mounts are included.
2103    ///
2104    /// # Arguments
2105    ///
2106    /// * `path` - The path of the directory to retrieve (e.g., "./src").
2107    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2108    pub fn directory_opts(
2109        &self,
2110        path: impl Into<String>,
2111        opts: ContainerDirectoryOpts,
2112    ) -> Directory {
2113        let mut query = self.selection.select("directory");
2114        query = query.arg("path", path.into());
2115        if let Some(expand) = opts.expand {
2116            query = query.arg("expand", expand);
2117        }
2118        Directory {
2119            proc: self.proc.clone(),
2120            selection: query,
2121            graphql_client: self.graphql_client.clone(),
2122        }
2123    }
2124    /// Retrieves entrypoint to be prepended to the arguments of all commands.
2125    pub async fn entrypoint(&self) -> Result<Vec<String>, DaggerError> {
2126        let query = self.selection.select("entrypoint");
2127        query.execute(self.graphql_client.clone()).await
2128    }
2129    /// Retrieves the value of the specified environment variable.
2130    ///
2131    /// # Arguments
2132    ///
2133    /// * `name` - The name of the environment variable to retrieve (e.g., "PATH").
2134    pub async fn env_variable(&self, name: impl Into<String>) -> Result<String, DaggerError> {
2135        let mut query = self.selection.select("envVariable");
2136        query = query.arg("name", name.into());
2137        query.execute(self.graphql_client.clone()).await
2138    }
2139    /// Retrieves the list of environment variables passed to commands.
2140    pub fn env_variables(&self) -> Vec<EnvVariable> {
2141        let query = self.selection.select("envVariables");
2142        vec![EnvVariable {
2143            proc: self.proc.clone(),
2144            selection: query,
2145            graphql_client: self.graphql_client.clone(),
2146        }]
2147    }
2148    /// The exit code of the last executed command.
2149    /// Returns an error if no command was set.
2150    pub async fn exit_code(&self) -> Result<isize, DaggerError> {
2151        let query = self.selection.select("exitCode");
2152        query.execute(self.graphql_client.clone()).await
2153    }
2154    /// EXPERIMENTAL API! Subject to change/removal at any time.
2155    /// Configures all available GPUs on the host to be accessible to this container.
2156    /// This currently works for Nvidia devices only.
2157    pub fn experimental_with_all_gp_us(&self) -> Container {
2158        let query = self.selection.select("experimentalWithAllGPUs");
2159        Container {
2160            proc: self.proc.clone(),
2161            selection: query,
2162            graphql_client: self.graphql_client.clone(),
2163        }
2164    }
2165    /// EXPERIMENTAL API! Subject to change/removal at any time.
2166    /// Configures the provided list of devices to be accessible to this container.
2167    /// This currently works for Nvidia devices only.
2168    ///
2169    /// # Arguments
2170    ///
2171    /// * `devices` - List of devices to be accessible to this container.
2172    pub fn experimental_with_gpu(&self, devices: Vec<impl Into<String>>) -> Container {
2173        let mut query = self.selection.select("experimentalWithGPU");
2174        query = query.arg(
2175            "devices",
2176            devices
2177                .into_iter()
2178                .map(|i| i.into())
2179                .collect::<Vec<String>>(),
2180        );
2181        Container {
2182            proc: self.proc.clone(),
2183            selection: query,
2184            graphql_client: self.graphql_client.clone(),
2185        }
2186    }
2187    /// Writes the container as an OCI tarball to the destination file path on the host.
2188    /// It can also export platform variants.
2189    ///
2190    /// # Arguments
2191    ///
2192    /// * `path` - Host's destination path (e.g., "./tarball").
2193    ///
2194    /// Path can be relative to the engine's workdir or absolute.
2195    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2196    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
2197        let mut query = self.selection.select("export");
2198        query = query.arg("path", path.into());
2199        query.execute(self.graphql_client.clone()).await
2200    }
2201    /// Writes the container as an OCI tarball to the destination file path on the host.
2202    /// It can also export platform variants.
2203    ///
2204    /// # Arguments
2205    ///
2206    /// * `path` - Host's destination path (e.g., "./tarball").
2207    ///
2208    /// Path can be relative to the engine's workdir or absolute.
2209    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2210    pub async fn export_opts(
2211        &self,
2212        path: impl Into<String>,
2213        opts: ContainerExportOpts,
2214    ) -> Result<String, DaggerError> {
2215        let mut query = self.selection.select("export");
2216        query = query.arg("path", path.into());
2217        if let Some(platform_variants) = opts.platform_variants {
2218            query = query.arg("platformVariants", platform_variants);
2219        }
2220        if let Some(forced_compression) = opts.forced_compression {
2221            query = query.arg("forcedCompression", forced_compression);
2222        }
2223        if let Some(media_types) = opts.media_types {
2224            query = query.arg("mediaTypes", media_types);
2225        }
2226        if let Some(expand) = opts.expand {
2227            query = query.arg("expand", expand);
2228        }
2229        query.execute(self.graphql_client.clone()).await
2230    }
2231    /// Retrieves the list of exposed ports.
2232    /// This includes ports already exposed by the image, even if not explicitly added with dagger.
2233    pub fn exposed_ports(&self) -> Vec<Port> {
2234        let query = self.selection.select("exposedPorts");
2235        vec![Port {
2236            proc: self.proc.clone(),
2237            selection: query,
2238            graphql_client: self.graphql_client.clone(),
2239        }]
2240    }
2241    /// Retrieves a file at the given path.
2242    /// Mounts are included.
2243    ///
2244    /// # Arguments
2245    ///
2246    /// * `path` - The path of the file to retrieve (e.g., "./README.md").
2247    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2248    pub fn file(&self, path: impl Into<String>) -> File {
2249        let mut query = self.selection.select("file");
2250        query = query.arg("path", path.into());
2251        File {
2252            proc: self.proc.clone(),
2253            selection: query,
2254            graphql_client: self.graphql_client.clone(),
2255        }
2256    }
2257    /// Retrieves a file at the given path.
2258    /// Mounts are included.
2259    ///
2260    /// # Arguments
2261    ///
2262    /// * `path` - The path of the file to retrieve (e.g., "./README.md").
2263    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2264    pub fn file_opts(&self, path: impl Into<String>, opts: ContainerFileOpts) -> File {
2265        let mut query = self.selection.select("file");
2266        query = query.arg("path", path.into());
2267        if let Some(expand) = opts.expand {
2268            query = query.arg("expand", expand);
2269        }
2270        File {
2271            proc: self.proc.clone(),
2272            selection: query,
2273            graphql_client: self.graphql_client.clone(),
2274        }
2275    }
2276    /// Initializes this container from a pulled base image.
2277    ///
2278    /// # Arguments
2279    ///
2280    /// * `address` - Image's address from its registry.
2281    ///
2282    /// Formatted as [host]/[user]/[repo]:[tag] (e.g., "docker.io/dagger/dagger:main").
2283    pub fn from(&self, address: impl Into<String>) -> Container {
2284        let mut query = self.selection.select("from");
2285        query = query.arg("address", address.into());
2286        Container {
2287            proc: self.proc.clone(),
2288            selection: query,
2289            graphql_client: self.graphql_client.clone(),
2290        }
2291    }
2292    /// A unique identifier for this Container.
2293    pub async fn id(&self) -> Result<ContainerId, DaggerError> {
2294        let query = self.selection.select("id");
2295        query.execute(self.graphql_client.clone()).await
2296    }
2297    /// The unique image reference which can only be retrieved immediately after the 'Container.From' call.
2298    pub async fn image_ref(&self) -> Result<String, DaggerError> {
2299        let query = self.selection.select("imageRef");
2300        query.execute(self.graphql_client.clone()).await
2301    }
2302    /// Reads the container from an OCI tarball.
2303    ///
2304    /// # Arguments
2305    ///
2306    /// * `source` - File to read the container from.
2307    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2308    pub fn import(&self, source: impl IntoID<FileId>) -> Container {
2309        let mut query = self.selection.select("import");
2310        query = query.arg_lazy(
2311            "source",
2312            Box::new(move || {
2313                let source = source.clone();
2314                Box::pin(async move { source.into_id().await.unwrap().quote() })
2315            }),
2316        );
2317        Container {
2318            proc: self.proc.clone(),
2319            selection: query,
2320            graphql_client: self.graphql_client.clone(),
2321        }
2322    }
2323    /// Reads the container from an OCI tarball.
2324    ///
2325    /// # Arguments
2326    ///
2327    /// * `source` - File to read the container from.
2328    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2329    pub fn import_opts<'a>(
2330        &self,
2331        source: impl IntoID<FileId>,
2332        opts: ContainerImportOpts<'a>,
2333    ) -> Container {
2334        let mut query = self.selection.select("import");
2335        query = query.arg_lazy(
2336            "source",
2337            Box::new(move || {
2338                let source = source.clone();
2339                Box::pin(async move { source.into_id().await.unwrap().quote() })
2340            }),
2341        );
2342        if let Some(tag) = opts.tag {
2343            query = query.arg("tag", tag);
2344        }
2345        Container {
2346            proc: self.proc.clone(),
2347            selection: query,
2348            graphql_client: self.graphql_client.clone(),
2349        }
2350    }
2351    /// Retrieves the value of the specified label.
2352    ///
2353    /// # Arguments
2354    ///
2355    /// * `name` - The name of the label (e.g., "org.opencontainers.artifact.created").
2356    pub async fn label(&self, name: impl Into<String>) -> Result<String, DaggerError> {
2357        let mut query = self.selection.select("label");
2358        query = query.arg("name", name.into());
2359        query.execute(self.graphql_client.clone()).await
2360    }
2361    /// Retrieves the list of labels passed to container.
2362    pub fn labels(&self) -> Vec<Label> {
2363        let query = self.selection.select("labels");
2364        vec![Label {
2365            proc: self.proc.clone(),
2366            selection: query,
2367            graphql_client: self.graphql_client.clone(),
2368        }]
2369    }
2370    /// Retrieves the list of paths where a directory is mounted.
2371    pub async fn mounts(&self) -> Result<Vec<String>, DaggerError> {
2372        let query = self.selection.select("mounts");
2373        query.execute(self.graphql_client.clone()).await
2374    }
2375    /// The platform this container executes and publishes as.
2376    pub async fn platform(&self) -> Result<Platform, DaggerError> {
2377        let query = self.selection.select("platform");
2378        query.execute(self.graphql_client.clone()).await
2379    }
2380    /// Publishes this container as a new image to the specified address.
2381    /// Publish returns a fully qualified ref.
2382    /// It can also publish platform variants.
2383    ///
2384    /// # Arguments
2385    ///
2386    /// * `address` - Registry's address to publish the image to.
2387    ///
2388    /// Formatted as [host]/[user]/[repo]:[tag] (e.g. "docker.io/dagger/dagger:main").
2389    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2390    pub async fn publish(&self, address: impl Into<String>) -> Result<String, DaggerError> {
2391        let mut query = self.selection.select("publish");
2392        query = query.arg("address", address.into());
2393        query.execute(self.graphql_client.clone()).await
2394    }
2395    /// Publishes this container as a new image to the specified address.
2396    /// Publish returns a fully qualified ref.
2397    /// It can also publish platform variants.
2398    ///
2399    /// # Arguments
2400    ///
2401    /// * `address` - Registry's address to publish the image to.
2402    ///
2403    /// Formatted as [host]/[user]/[repo]:[tag] (e.g. "docker.io/dagger/dagger:main").
2404    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2405    pub async fn publish_opts(
2406        &self,
2407        address: impl Into<String>,
2408        opts: ContainerPublishOpts,
2409    ) -> Result<String, DaggerError> {
2410        let mut query = self.selection.select("publish");
2411        query = query.arg("address", address.into());
2412        if let Some(platform_variants) = opts.platform_variants {
2413            query = query.arg("platformVariants", platform_variants);
2414        }
2415        if let Some(forced_compression) = opts.forced_compression {
2416            query = query.arg("forcedCompression", forced_compression);
2417        }
2418        if let Some(media_types) = opts.media_types {
2419            query = query.arg("mediaTypes", media_types);
2420        }
2421        query.execute(self.graphql_client.clone()).await
2422    }
2423    /// Retrieves this container's root filesystem. Mounts are not included.
2424    pub fn rootfs(&self) -> Directory {
2425        let query = self.selection.select("rootfs");
2426        Directory {
2427            proc: self.proc.clone(),
2428            selection: query,
2429            graphql_client: self.graphql_client.clone(),
2430        }
2431    }
2432    /// The error stream of the last executed command.
2433    /// Returns an error if no command was set.
2434    pub async fn stderr(&self) -> Result<String, DaggerError> {
2435        let query = self.selection.select("stderr");
2436        query.execute(self.graphql_client.clone()).await
2437    }
2438    /// The output stream of the last executed command.
2439    /// Returns an error if no command was set.
2440    pub async fn stdout(&self) -> Result<String, DaggerError> {
2441        let query = self.selection.select("stdout");
2442        query.execute(self.graphql_client.clone()).await
2443    }
2444    /// Forces evaluation of the pipeline in the engine.
2445    /// It doesn't run the default command if no exec has been set.
2446    pub async fn sync(&self) -> Result<ContainerId, DaggerError> {
2447        let query = self.selection.select("sync");
2448        query.execute(self.graphql_client.clone()).await
2449    }
2450    /// Opens an interactive terminal for this container using its configured default terminal command if not overridden by args (or sh as a fallback default).
2451    ///
2452    /// # Arguments
2453    ///
2454    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2455    pub fn terminal(&self) -> Container {
2456        let query = self.selection.select("terminal");
2457        Container {
2458            proc: self.proc.clone(),
2459            selection: query,
2460            graphql_client: self.graphql_client.clone(),
2461        }
2462    }
2463    /// Opens an interactive terminal for this container using its configured default terminal command if not overridden by args (or sh as a fallback default).
2464    ///
2465    /// # Arguments
2466    ///
2467    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2468    pub fn terminal_opts<'a>(&self, opts: ContainerTerminalOpts<'a>) -> Container {
2469        let mut query = self.selection.select("terminal");
2470        if let Some(cmd) = opts.cmd {
2471            query = query.arg("cmd", cmd);
2472        }
2473        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
2474            query = query.arg(
2475                "experimentalPrivilegedNesting",
2476                experimental_privileged_nesting,
2477            );
2478        }
2479        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
2480            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
2481        }
2482        Container {
2483            proc: self.proc.clone(),
2484            selection: query,
2485            graphql_client: self.graphql_client.clone(),
2486        }
2487    }
2488    /// Starts a Service and creates a tunnel that forwards traffic from the caller's network to that service.
2489    /// Be sure to set any exposed ports before calling this api.
2490    ///
2491    /// # Arguments
2492    ///
2493    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2494    pub async fn up(&self) -> Result<Void, DaggerError> {
2495        let query = self.selection.select("up");
2496        query.execute(self.graphql_client.clone()).await
2497    }
2498    /// Starts a Service and creates a tunnel that forwards traffic from the caller's network to that service.
2499    /// Be sure to set any exposed ports before calling this api.
2500    ///
2501    /// # Arguments
2502    ///
2503    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2504    pub async fn up_opts<'a>(&self, opts: ContainerUpOpts<'a>) -> Result<Void, DaggerError> {
2505        let mut query = self.selection.select("up");
2506        if let Some(ports) = opts.ports {
2507            query = query.arg("ports", ports);
2508        }
2509        if let Some(random) = opts.random {
2510            query = query.arg("random", random);
2511        }
2512        if let Some(args) = opts.args {
2513            query = query.arg("args", args);
2514        }
2515        if let Some(use_entrypoint) = opts.use_entrypoint {
2516            query = query.arg("useEntrypoint", use_entrypoint);
2517        }
2518        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
2519            query = query.arg(
2520                "experimentalPrivilegedNesting",
2521                experimental_privileged_nesting,
2522            );
2523        }
2524        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
2525            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
2526        }
2527        if let Some(expand) = opts.expand {
2528            query = query.arg("expand", expand);
2529        }
2530        if let Some(no_init) = opts.no_init {
2531            query = query.arg("noInit", no_init);
2532        }
2533        query.execute(self.graphql_client.clone()).await
2534    }
2535    /// Retrieves the user to be set for all commands.
2536    pub async fn user(&self) -> Result<String, DaggerError> {
2537        let query = self.selection.select("user");
2538        query.execute(self.graphql_client.clone()).await
2539    }
2540    /// Retrieves this container plus the given OCI anotation.
2541    ///
2542    /// # Arguments
2543    ///
2544    /// * `name` - The name of the annotation.
2545    /// * `value` - The value of the annotation.
2546    pub fn with_annotation(&self, name: impl Into<String>, value: impl Into<String>) -> Container {
2547        let mut query = self.selection.select("withAnnotation");
2548        query = query.arg("name", name.into());
2549        query = query.arg("value", value.into());
2550        Container {
2551            proc: self.proc.clone(),
2552            selection: query,
2553            graphql_client: self.graphql_client.clone(),
2554        }
2555    }
2556    /// Configures default arguments for future commands.
2557    ///
2558    /// # Arguments
2559    ///
2560    /// * `args` - Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]).
2561    pub fn with_default_args(&self, args: Vec<impl Into<String>>) -> Container {
2562        let mut query = self.selection.select("withDefaultArgs");
2563        query = query.arg(
2564            "args",
2565            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
2566        );
2567        Container {
2568            proc: self.proc.clone(),
2569            selection: query,
2570            graphql_client: self.graphql_client.clone(),
2571        }
2572    }
2573    /// Set the default command to invoke for the container's terminal API.
2574    ///
2575    /// # Arguments
2576    ///
2577    /// * `args` - The args of the command.
2578    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2579    pub fn with_default_terminal_cmd(&self, args: Vec<impl Into<String>>) -> Container {
2580        let mut query = self.selection.select("withDefaultTerminalCmd");
2581        query = query.arg(
2582            "args",
2583            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
2584        );
2585        Container {
2586            proc: self.proc.clone(),
2587            selection: query,
2588            graphql_client: self.graphql_client.clone(),
2589        }
2590    }
2591    /// Set the default command to invoke for the container's terminal API.
2592    ///
2593    /// # Arguments
2594    ///
2595    /// * `args` - The args of the command.
2596    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2597    pub fn with_default_terminal_cmd_opts(
2598        &self,
2599        args: Vec<impl Into<String>>,
2600        opts: ContainerWithDefaultTerminalCmdOpts,
2601    ) -> Container {
2602        let mut query = self.selection.select("withDefaultTerminalCmd");
2603        query = query.arg(
2604            "args",
2605            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
2606        );
2607        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
2608            query = query.arg(
2609                "experimentalPrivilegedNesting",
2610                experimental_privileged_nesting,
2611            );
2612        }
2613        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
2614            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
2615        }
2616        Container {
2617            proc: self.proc.clone(),
2618            selection: query,
2619            graphql_client: self.graphql_client.clone(),
2620        }
2621    }
2622    /// Retrieves this container plus a directory written at the given path.
2623    ///
2624    /// # Arguments
2625    ///
2626    /// * `path` - Location of the written directory (e.g., "/tmp/directory").
2627    /// * `directory` - Identifier of the directory to write
2628    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2629    pub fn with_directory(
2630        &self,
2631        path: impl Into<String>,
2632        directory: impl IntoID<DirectoryId>,
2633    ) -> Container {
2634        let mut query = self.selection.select("withDirectory");
2635        query = query.arg("path", path.into());
2636        query = query.arg_lazy(
2637            "directory",
2638            Box::new(move || {
2639                let directory = directory.clone();
2640                Box::pin(async move { directory.into_id().await.unwrap().quote() })
2641            }),
2642        );
2643        Container {
2644            proc: self.proc.clone(),
2645            selection: query,
2646            graphql_client: self.graphql_client.clone(),
2647        }
2648    }
2649    /// Retrieves this container plus a directory written at the given path.
2650    ///
2651    /// # Arguments
2652    ///
2653    /// * `path` - Location of the written directory (e.g., "/tmp/directory").
2654    /// * `directory` - Identifier of the directory to write
2655    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2656    pub fn with_directory_opts<'a>(
2657        &self,
2658        path: impl Into<String>,
2659        directory: impl IntoID<DirectoryId>,
2660        opts: ContainerWithDirectoryOpts<'a>,
2661    ) -> Container {
2662        let mut query = self.selection.select("withDirectory");
2663        query = query.arg("path", path.into());
2664        query = query.arg_lazy(
2665            "directory",
2666            Box::new(move || {
2667                let directory = directory.clone();
2668                Box::pin(async move { directory.into_id().await.unwrap().quote() })
2669            }),
2670        );
2671        if let Some(exclude) = opts.exclude {
2672            query = query.arg("exclude", exclude);
2673        }
2674        if let Some(include) = opts.include {
2675            query = query.arg("include", include);
2676        }
2677        if let Some(owner) = opts.owner {
2678            query = query.arg("owner", owner);
2679        }
2680        if let Some(expand) = opts.expand {
2681            query = query.arg("expand", expand);
2682        }
2683        Container {
2684            proc: self.proc.clone(),
2685            selection: query,
2686            graphql_client: self.graphql_client.clone(),
2687        }
2688    }
2689    /// Retrieves this container but with a different command entrypoint.
2690    ///
2691    /// # Arguments
2692    ///
2693    /// * `args` - Entrypoint to use for future executions (e.g., ["go", "run"]).
2694    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2695    pub fn with_entrypoint(&self, args: Vec<impl Into<String>>) -> Container {
2696        let mut query = self.selection.select("withEntrypoint");
2697        query = query.arg(
2698            "args",
2699            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
2700        );
2701        Container {
2702            proc: self.proc.clone(),
2703            selection: query,
2704            graphql_client: self.graphql_client.clone(),
2705        }
2706    }
2707    /// Retrieves this container but with a different command entrypoint.
2708    ///
2709    /// # Arguments
2710    ///
2711    /// * `args` - Entrypoint to use for future executions (e.g., ["go", "run"]).
2712    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2713    pub fn with_entrypoint_opts(
2714        &self,
2715        args: Vec<impl Into<String>>,
2716        opts: ContainerWithEntrypointOpts,
2717    ) -> Container {
2718        let mut query = self.selection.select("withEntrypoint");
2719        query = query.arg(
2720            "args",
2721            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
2722        );
2723        if let Some(keep_default_args) = opts.keep_default_args {
2724            query = query.arg("keepDefaultArgs", keep_default_args);
2725        }
2726        Container {
2727            proc: self.proc.clone(),
2728            selection: query,
2729            graphql_client: self.graphql_client.clone(),
2730        }
2731    }
2732    /// Retrieves this container plus the given environment variable.
2733    ///
2734    /// # Arguments
2735    ///
2736    /// * `name` - The name of the environment variable (e.g., "HOST").
2737    /// * `value` - The value of the environment variable. (e.g., "localhost").
2738    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2739    pub fn with_env_variable(
2740        &self,
2741        name: impl Into<String>,
2742        value: impl Into<String>,
2743    ) -> Container {
2744        let mut query = self.selection.select("withEnvVariable");
2745        query = query.arg("name", name.into());
2746        query = query.arg("value", value.into());
2747        Container {
2748            proc: self.proc.clone(),
2749            selection: query,
2750            graphql_client: self.graphql_client.clone(),
2751        }
2752    }
2753    /// Retrieves this container plus the given environment variable.
2754    ///
2755    /// # Arguments
2756    ///
2757    /// * `name` - The name of the environment variable (e.g., "HOST").
2758    /// * `value` - The value of the environment variable. (e.g., "localhost").
2759    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2760    pub fn with_env_variable_opts(
2761        &self,
2762        name: impl Into<String>,
2763        value: impl Into<String>,
2764        opts: ContainerWithEnvVariableOpts,
2765    ) -> Container {
2766        let mut query = self.selection.select("withEnvVariable");
2767        query = query.arg("name", name.into());
2768        query = query.arg("value", value.into());
2769        if let Some(expand) = opts.expand {
2770            query = query.arg("expand", expand);
2771        }
2772        Container {
2773            proc: self.proc.clone(),
2774            selection: query,
2775            graphql_client: self.graphql_client.clone(),
2776        }
2777    }
2778    /// Retrieves this container after executing the specified command inside it.
2779    ///
2780    /// # Arguments
2781    ///
2782    /// * `args` - Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).
2783    ///
2784    /// If empty, the container's default command is used.
2785    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2786    pub fn with_exec(&self, args: Vec<impl Into<String>>) -> Container {
2787        let mut query = self.selection.select("withExec");
2788        query = query.arg(
2789            "args",
2790            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
2791        );
2792        Container {
2793            proc: self.proc.clone(),
2794            selection: query,
2795            graphql_client: self.graphql_client.clone(),
2796        }
2797    }
2798    /// Retrieves this container after executing the specified command inside it.
2799    ///
2800    /// # Arguments
2801    ///
2802    /// * `args` - Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).
2803    ///
2804    /// If empty, the container's default command is used.
2805    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2806    pub fn with_exec_opts<'a>(
2807        &self,
2808        args: Vec<impl Into<String>>,
2809        opts: ContainerWithExecOpts<'a>,
2810    ) -> Container {
2811        let mut query = self.selection.select("withExec");
2812        query = query.arg(
2813            "args",
2814            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
2815        );
2816        if let Some(use_entrypoint) = opts.use_entrypoint {
2817            query = query.arg("useEntrypoint", use_entrypoint);
2818        }
2819        if let Some(stdin) = opts.stdin {
2820            query = query.arg("stdin", stdin);
2821        }
2822        if let Some(redirect_stdout) = opts.redirect_stdout {
2823            query = query.arg("redirectStdout", redirect_stdout);
2824        }
2825        if let Some(redirect_stderr) = opts.redirect_stderr {
2826            query = query.arg("redirectStderr", redirect_stderr);
2827        }
2828        if let Some(expect) = opts.expect {
2829            query = query.arg("expect", expect);
2830        }
2831        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
2832            query = query.arg(
2833                "experimentalPrivilegedNesting",
2834                experimental_privileged_nesting,
2835            );
2836        }
2837        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
2838            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
2839        }
2840        if let Some(expand) = opts.expand {
2841            query = query.arg("expand", expand);
2842        }
2843        if let Some(no_init) = opts.no_init {
2844            query = query.arg("noInit", no_init);
2845        }
2846        Container {
2847            proc: self.proc.clone(),
2848            selection: query,
2849            graphql_client: self.graphql_client.clone(),
2850        }
2851    }
2852    /// Expose a network port.
2853    /// Exposed ports serve two purposes:
2854    /// - For health checks and introspection, when running services
2855    /// - For setting the EXPOSE OCI field when publishing the container
2856    ///
2857    /// # Arguments
2858    ///
2859    /// * `port` - Port number to expose
2860    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2861    pub fn with_exposed_port(&self, port: isize) -> Container {
2862        let mut query = self.selection.select("withExposedPort");
2863        query = query.arg("port", port);
2864        Container {
2865            proc: self.proc.clone(),
2866            selection: query,
2867            graphql_client: self.graphql_client.clone(),
2868        }
2869    }
2870    /// Expose a network port.
2871    /// Exposed ports serve two purposes:
2872    /// - For health checks and introspection, when running services
2873    /// - For setting the EXPOSE OCI field when publishing the container
2874    ///
2875    /// # Arguments
2876    ///
2877    /// * `port` - Port number to expose
2878    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2879    pub fn with_exposed_port_opts<'a>(
2880        &self,
2881        port: isize,
2882        opts: ContainerWithExposedPortOpts<'a>,
2883    ) -> Container {
2884        let mut query = self.selection.select("withExposedPort");
2885        query = query.arg("port", port);
2886        if let Some(protocol) = opts.protocol {
2887            query = query.arg("protocol", protocol);
2888        }
2889        if let Some(description) = opts.description {
2890            query = query.arg("description", description);
2891        }
2892        if let Some(experimental_skip_healthcheck) = opts.experimental_skip_healthcheck {
2893            query = query.arg("experimentalSkipHealthcheck", experimental_skip_healthcheck);
2894        }
2895        Container {
2896            proc: self.proc.clone(),
2897            selection: query,
2898            graphql_client: self.graphql_client.clone(),
2899        }
2900    }
2901    /// Retrieves this container plus the contents of the given file copied to the given path.
2902    ///
2903    /// # Arguments
2904    ///
2905    /// * `path` - Location of the copied file (e.g., "/tmp/file.txt").
2906    /// * `source` - Identifier of the file to copy.
2907    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2908    pub fn with_file(&self, path: impl Into<String>, source: impl IntoID<FileId>) -> Container {
2909        let mut query = self.selection.select("withFile");
2910        query = query.arg("path", path.into());
2911        query = query.arg_lazy(
2912            "source",
2913            Box::new(move || {
2914                let source = source.clone();
2915                Box::pin(async move { source.into_id().await.unwrap().quote() })
2916            }),
2917        );
2918        Container {
2919            proc: self.proc.clone(),
2920            selection: query,
2921            graphql_client: self.graphql_client.clone(),
2922        }
2923    }
2924    /// Retrieves this container plus the contents of the given file copied to the given path.
2925    ///
2926    /// # Arguments
2927    ///
2928    /// * `path` - Location of the copied file (e.g., "/tmp/file.txt").
2929    /// * `source` - Identifier of the file to copy.
2930    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2931    pub fn with_file_opts<'a>(
2932        &self,
2933        path: impl Into<String>,
2934        source: impl IntoID<FileId>,
2935        opts: ContainerWithFileOpts<'a>,
2936    ) -> Container {
2937        let mut query = self.selection.select("withFile");
2938        query = query.arg("path", path.into());
2939        query = query.arg_lazy(
2940            "source",
2941            Box::new(move || {
2942                let source = source.clone();
2943                Box::pin(async move { source.into_id().await.unwrap().quote() })
2944            }),
2945        );
2946        if let Some(permissions) = opts.permissions {
2947            query = query.arg("permissions", permissions);
2948        }
2949        if let Some(owner) = opts.owner {
2950            query = query.arg("owner", owner);
2951        }
2952        if let Some(expand) = opts.expand {
2953            query = query.arg("expand", expand);
2954        }
2955        Container {
2956            proc: self.proc.clone(),
2957            selection: query,
2958            graphql_client: self.graphql_client.clone(),
2959        }
2960    }
2961    /// Retrieves this container plus the contents of the given files copied to the given path.
2962    ///
2963    /// # Arguments
2964    ///
2965    /// * `path` - Location where copied files should be placed (e.g., "/src").
2966    /// * `sources` - Identifiers of the files to copy.
2967    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2968    pub fn with_files(&self, path: impl Into<String>, sources: Vec<FileId>) -> Container {
2969        let mut query = self.selection.select("withFiles");
2970        query = query.arg("path", path.into());
2971        query = query.arg("sources", sources);
2972        Container {
2973            proc: self.proc.clone(),
2974            selection: query,
2975            graphql_client: self.graphql_client.clone(),
2976        }
2977    }
2978    /// Retrieves this container plus the contents of the given files copied to the given path.
2979    ///
2980    /// # Arguments
2981    ///
2982    /// * `path` - Location where copied files should be placed (e.g., "/src").
2983    /// * `sources` - Identifiers of the files to copy.
2984    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2985    pub fn with_files_opts<'a>(
2986        &self,
2987        path: impl Into<String>,
2988        sources: Vec<FileId>,
2989        opts: ContainerWithFilesOpts<'a>,
2990    ) -> Container {
2991        let mut query = self.selection.select("withFiles");
2992        query = query.arg("path", path.into());
2993        query = query.arg("sources", sources);
2994        if let Some(permissions) = opts.permissions {
2995            query = query.arg("permissions", permissions);
2996        }
2997        if let Some(owner) = opts.owner {
2998            query = query.arg("owner", owner);
2999        }
3000        if let Some(expand) = opts.expand {
3001            query = query.arg("expand", expand);
3002        }
3003        Container {
3004            proc: self.proc.clone(),
3005            selection: query,
3006            graphql_client: self.graphql_client.clone(),
3007        }
3008    }
3009    /// Retrieves this container plus the given label.
3010    ///
3011    /// # Arguments
3012    ///
3013    /// * `name` - The name of the label (e.g., "org.opencontainers.artifact.created").
3014    /// * `value` - The value of the label (e.g., "2023-01-01T00:00:00Z").
3015    pub fn with_label(&self, name: impl Into<String>, value: impl Into<String>) -> Container {
3016        let mut query = self.selection.select("withLabel");
3017        query = query.arg("name", name.into());
3018        query = query.arg("value", value.into());
3019        Container {
3020            proc: self.proc.clone(),
3021            selection: query,
3022            graphql_client: self.graphql_client.clone(),
3023        }
3024    }
3025    /// Retrieves this container plus a cache volume mounted at the given path.
3026    ///
3027    /// # Arguments
3028    ///
3029    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
3030    /// * `cache` - Identifier of the cache volume to mount.
3031    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3032    pub fn with_mounted_cache(
3033        &self,
3034        path: impl Into<String>,
3035        cache: impl IntoID<CacheVolumeId>,
3036    ) -> Container {
3037        let mut query = self.selection.select("withMountedCache");
3038        query = query.arg("path", path.into());
3039        query = query.arg_lazy(
3040            "cache",
3041            Box::new(move || {
3042                let cache = cache.clone();
3043                Box::pin(async move { cache.into_id().await.unwrap().quote() })
3044            }),
3045        );
3046        Container {
3047            proc: self.proc.clone(),
3048            selection: query,
3049            graphql_client: self.graphql_client.clone(),
3050        }
3051    }
3052    /// Retrieves this container plus a cache volume mounted at the given path.
3053    ///
3054    /// # Arguments
3055    ///
3056    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
3057    /// * `cache` - Identifier of the cache volume to mount.
3058    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3059    pub fn with_mounted_cache_opts<'a>(
3060        &self,
3061        path: impl Into<String>,
3062        cache: impl IntoID<CacheVolumeId>,
3063        opts: ContainerWithMountedCacheOpts<'a>,
3064    ) -> Container {
3065        let mut query = self.selection.select("withMountedCache");
3066        query = query.arg("path", path.into());
3067        query = query.arg_lazy(
3068            "cache",
3069            Box::new(move || {
3070                let cache = cache.clone();
3071                Box::pin(async move { cache.into_id().await.unwrap().quote() })
3072            }),
3073        );
3074        if let Some(source) = opts.source {
3075            query = query.arg("source", source);
3076        }
3077        if let Some(sharing) = opts.sharing {
3078            query = query.arg("sharing", sharing);
3079        }
3080        if let Some(owner) = opts.owner {
3081            query = query.arg("owner", owner);
3082        }
3083        if let Some(expand) = opts.expand {
3084            query = query.arg("expand", expand);
3085        }
3086        Container {
3087            proc: self.proc.clone(),
3088            selection: query,
3089            graphql_client: self.graphql_client.clone(),
3090        }
3091    }
3092    /// Retrieves this container plus a directory mounted at the given path.
3093    ///
3094    /// # Arguments
3095    ///
3096    /// * `path` - Location of the mounted directory (e.g., "/mnt/directory").
3097    /// * `source` - Identifier of the mounted directory.
3098    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3099    pub fn with_mounted_directory(
3100        &self,
3101        path: impl Into<String>,
3102        source: impl IntoID<DirectoryId>,
3103    ) -> Container {
3104        let mut query = self.selection.select("withMountedDirectory");
3105        query = query.arg("path", path.into());
3106        query = query.arg_lazy(
3107            "source",
3108            Box::new(move || {
3109                let source = source.clone();
3110                Box::pin(async move { source.into_id().await.unwrap().quote() })
3111            }),
3112        );
3113        Container {
3114            proc: self.proc.clone(),
3115            selection: query,
3116            graphql_client: self.graphql_client.clone(),
3117        }
3118    }
3119    /// Retrieves this container plus a directory mounted at the given path.
3120    ///
3121    /// # Arguments
3122    ///
3123    /// * `path` - Location of the mounted directory (e.g., "/mnt/directory").
3124    /// * `source` - Identifier of the mounted directory.
3125    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3126    pub fn with_mounted_directory_opts<'a>(
3127        &self,
3128        path: impl Into<String>,
3129        source: impl IntoID<DirectoryId>,
3130        opts: ContainerWithMountedDirectoryOpts<'a>,
3131    ) -> Container {
3132        let mut query = self.selection.select("withMountedDirectory");
3133        query = query.arg("path", path.into());
3134        query = query.arg_lazy(
3135            "source",
3136            Box::new(move || {
3137                let source = source.clone();
3138                Box::pin(async move { source.into_id().await.unwrap().quote() })
3139            }),
3140        );
3141        if let Some(owner) = opts.owner {
3142            query = query.arg("owner", owner);
3143        }
3144        if let Some(expand) = opts.expand {
3145            query = query.arg("expand", expand);
3146        }
3147        Container {
3148            proc: self.proc.clone(),
3149            selection: query,
3150            graphql_client: self.graphql_client.clone(),
3151        }
3152    }
3153    /// Retrieves this container plus a file mounted at the given path.
3154    ///
3155    /// # Arguments
3156    ///
3157    /// * `path` - Location of the mounted file (e.g., "/tmp/file.txt").
3158    /// * `source` - Identifier of the mounted file.
3159    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3160    pub fn with_mounted_file(
3161        &self,
3162        path: impl Into<String>,
3163        source: impl IntoID<FileId>,
3164    ) -> Container {
3165        let mut query = self.selection.select("withMountedFile");
3166        query = query.arg("path", path.into());
3167        query = query.arg_lazy(
3168            "source",
3169            Box::new(move || {
3170                let source = source.clone();
3171                Box::pin(async move { source.into_id().await.unwrap().quote() })
3172            }),
3173        );
3174        Container {
3175            proc: self.proc.clone(),
3176            selection: query,
3177            graphql_client: self.graphql_client.clone(),
3178        }
3179    }
3180    /// Retrieves this container plus a file mounted at the given path.
3181    ///
3182    /// # Arguments
3183    ///
3184    /// * `path` - Location of the mounted file (e.g., "/tmp/file.txt").
3185    /// * `source` - Identifier of the mounted file.
3186    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3187    pub fn with_mounted_file_opts<'a>(
3188        &self,
3189        path: impl Into<String>,
3190        source: impl IntoID<FileId>,
3191        opts: ContainerWithMountedFileOpts<'a>,
3192    ) -> Container {
3193        let mut query = self.selection.select("withMountedFile");
3194        query = query.arg("path", path.into());
3195        query = query.arg_lazy(
3196            "source",
3197            Box::new(move || {
3198                let source = source.clone();
3199                Box::pin(async move { source.into_id().await.unwrap().quote() })
3200            }),
3201        );
3202        if let Some(owner) = opts.owner {
3203            query = query.arg("owner", owner);
3204        }
3205        if let Some(expand) = opts.expand {
3206            query = query.arg("expand", expand);
3207        }
3208        Container {
3209            proc: self.proc.clone(),
3210            selection: query,
3211            graphql_client: self.graphql_client.clone(),
3212        }
3213    }
3214    /// Retrieves this container plus a secret mounted into a file at the given path.
3215    ///
3216    /// # Arguments
3217    ///
3218    /// * `path` - Location of the secret file (e.g., "/tmp/secret.txt").
3219    /// * `source` - Identifier of the secret to mount.
3220    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3221    pub fn with_mounted_secret(
3222        &self,
3223        path: impl Into<String>,
3224        source: impl IntoID<SecretId>,
3225    ) -> Container {
3226        let mut query = self.selection.select("withMountedSecret");
3227        query = query.arg("path", path.into());
3228        query = query.arg_lazy(
3229            "source",
3230            Box::new(move || {
3231                let source = source.clone();
3232                Box::pin(async move { source.into_id().await.unwrap().quote() })
3233            }),
3234        );
3235        Container {
3236            proc: self.proc.clone(),
3237            selection: query,
3238            graphql_client: self.graphql_client.clone(),
3239        }
3240    }
3241    /// Retrieves this container plus a secret mounted into a file at the given path.
3242    ///
3243    /// # Arguments
3244    ///
3245    /// * `path` - Location of the secret file (e.g., "/tmp/secret.txt").
3246    /// * `source` - Identifier of the secret to mount.
3247    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3248    pub fn with_mounted_secret_opts<'a>(
3249        &self,
3250        path: impl Into<String>,
3251        source: impl IntoID<SecretId>,
3252        opts: ContainerWithMountedSecretOpts<'a>,
3253    ) -> Container {
3254        let mut query = self.selection.select("withMountedSecret");
3255        query = query.arg("path", path.into());
3256        query = query.arg_lazy(
3257            "source",
3258            Box::new(move || {
3259                let source = source.clone();
3260                Box::pin(async move { source.into_id().await.unwrap().quote() })
3261            }),
3262        );
3263        if let Some(owner) = opts.owner {
3264            query = query.arg("owner", owner);
3265        }
3266        if let Some(mode) = opts.mode {
3267            query = query.arg("mode", mode);
3268        }
3269        if let Some(expand) = opts.expand {
3270            query = query.arg("expand", expand);
3271        }
3272        Container {
3273            proc: self.proc.clone(),
3274            selection: query,
3275            graphql_client: self.graphql_client.clone(),
3276        }
3277    }
3278    /// 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.
3279    ///
3280    /// # Arguments
3281    ///
3282    /// * `path` - Location of the temporary directory (e.g., "/tmp/temp_dir").
3283    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3284    pub fn with_mounted_temp(&self, path: impl Into<String>) -> Container {
3285        let mut query = self.selection.select("withMountedTemp");
3286        query = query.arg("path", path.into());
3287        Container {
3288            proc: self.proc.clone(),
3289            selection: query,
3290            graphql_client: self.graphql_client.clone(),
3291        }
3292    }
3293    /// 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.
3294    ///
3295    /// # Arguments
3296    ///
3297    /// * `path` - Location of the temporary directory (e.g., "/tmp/temp_dir").
3298    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3299    pub fn with_mounted_temp_opts(
3300        &self,
3301        path: impl Into<String>,
3302        opts: ContainerWithMountedTempOpts,
3303    ) -> Container {
3304        let mut query = self.selection.select("withMountedTemp");
3305        query = query.arg("path", path.into());
3306        if let Some(size) = opts.size {
3307            query = query.arg("size", size);
3308        }
3309        if let Some(expand) = opts.expand {
3310            query = query.arg("expand", expand);
3311        }
3312        Container {
3313            proc: self.proc.clone(),
3314            selection: query,
3315            graphql_client: self.graphql_client.clone(),
3316        }
3317    }
3318    /// Retrieves this container plus a new file written at the given path.
3319    ///
3320    /// # Arguments
3321    ///
3322    /// * `path` - Location of the written file (e.g., "/tmp/file.txt").
3323    /// * `contents` - Content of the file to write (e.g., "Hello world!").
3324    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3325    pub fn with_new_file(&self, path: impl Into<String>, contents: impl Into<String>) -> Container {
3326        let mut query = self.selection.select("withNewFile");
3327        query = query.arg("path", path.into());
3328        query = query.arg("contents", contents.into());
3329        Container {
3330            proc: self.proc.clone(),
3331            selection: query,
3332            graphql_client: self.graphql_client.clone(),
3333        }
3334    }
3335    /// Retrieves this container plus a new file written at the given path.
3336    ///
3337    /// # Arguments
3338    ///
3339    /// * `path` - Location of the written file (e.g., "/tmp/file.txt").
3340    /// * `contents` - Content of the file to write (e.g., "Hello world!").
3341    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3342    pub fn with_new_file_opts<'a>(
3343        &self,
3344        path: impl Into<String>,
3345        contents: impl Into<String>,
3346        opts: ContainerWithNewFileOpts<'a>,
3347    ) -> Container {
3348        let mut query = self.selection.select("withNewFile");
3349        query = query.arg("path", path.into());
3350        query = query.arg("contents", contents.into());
3351        if let Some(permissions) = opts.permissions {
3352            query = query.arg("permissions", permissions);
3353        }
3354        if let Some(owner) = opts.owner {
3355            query = query.arg("owner", owner);
3356        }
3357        if let Some(expand) = opts.expand {
3358            query = query.arg("expand", expand);
3359        }
3360        Container {
3361            proc: self.proc.clone(),
3362            selection: query,
3363            graphql_client: self.graphql_client.clone(),
3364        }
3365    }
3366    /// Retrieves this container with a registry authentication for a given address.
3367    ///
3368    /// # Arguments
3369    ///
3370    /// * `address` - Registry's address to bind the authentication to.
3371    ///
3372    /// Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
3373    /// * `username` - The username of the registry's account (e.g., "Dagger").
3374    /// * `secret` - The API key, password or token to authenticate to this registry.
3375    pub fn with_registry_auth(
3376        &self,
3377        address: impl Into<String>,
3378        username: impl Into<String>,
3379        secret: impl IntoID<SecretId>,
3380    ) -> Container {
3381        let mut query = self.selection.select("withRegistryAuth");
3382        query = query.arg("address", address.into());
3383        query = query.arg("username", username.into());
3384        query = query.arg_lazy(
3385            "secret",
3386            Box::new(move || {
3387                let secret = secret.clone();
3388                Box::pin(async move { secret.into_id().await.unwrap().quote() })
3389            }),
3390        );
3391        Container {
3392            proc: self.proc.clone(),
3393            selection: query,
3394            graphql_client: self.graphql_client.clone(),
3395        }
3396    }
3397    /// Retrieves the container with the given directory mounted to /.
3398    ///
3399    /// # Arguments
3400    ///
3401    /// * `directory` - Directory to mount.
3402    pub fn with_rootfs(&self, directory: impl IntoID<DirectoryId>) -> Container {
3403        let mut query = self.selection.select("withRootfs");
3404        query = query.arg_lazy(
3405            "directory",
3406            Box::new(move || {
3407                let directory = directory.clone();
3408                Box::pin(async move { directory.into_id().await.unwrap().quote() })
3409            }),
3410        );
3411        Container {
3412            proc: self.proc.clone(),
3413            selection: query,
3414            graphql_client: self.graphql_client.clone(),
3415        }
3416    }
3417    /// Retrieves this container plus an env variable containing the given secret.
3418    ///
3419    /// # Arguments
3420    ///
3421    /// * `name` - The name of the secret variable (e.g., "API_SECRET").
3422    /// * `secret` - The identifier of the secret value.
3423    pub fn with_secret_variable(
3424        &self,
3425        name: impl Into<String>,
3426        secret: impl IntoID<SecretId>,
3427    ) -> Container {
3428        let mut query = self.selection.select("withSecretVariable");
3429        query = query.arg("name", name.into());
3430        query = query.arg_lazy(
3431            "secret",
3432            Box::new(move || {
3433                let secret = secret.clone();
3434                Box::pin(async move { secret.into_id().await.unwrap().quote() })
3435            }),
3436        );
3437        Container {
3438            proc: self.proc.clone(),
3439            selection: query,
3440            graphql_client: self.graphql_client.clone(),
3441        }
3442    }
3443    /// Establish a runtime dependency on a service.
3444    /// The service will be started automatically when needed and detached when it is no longer needed, executing the default command if none is set.
3445    /// The service will be reachable from the container via the provided hostname alias.
3446    /// The service dependency will also convey to any files or directories produced by the container.
3447    ///
3448    /// # Arguments
3449    ///
3450    /// * `alias` - A name that can be used to reach the service from the container
3451    /// * `service` - Identifier of the service container
3452    pub fn with_service_binding(
3453        &self,
3454        alias: impl Into<String>,
3455        service: impl IntoID<ServiceId>,
3456    ) -> Container {
3457        let mut query = self.selection.select("withServiceBinding");
3458        query = query.arg("alias", alias.into());
3459        query = query.arg_lazy(
3460            "service",
3461            Box::new(move || {
3462                let service = service.clone();
3463                Box::pin(async move { service.into_id().await.unwrap().quote() })
3464            }),
3465        );
3466        Container {
3467            proc: self.proc.clone(),
3468            selection: query,
3469            graphql_client: self.graphql_client.clone(),
3470        }
3471    }
3472    /// Retrieves this container plus a socket forwarded to the given Unix socket path.
3473    ///
3474    /// # Arguments
3475    ///
3476    /// * `path` - Location of the forwarded Unix socket (e.g., "/tmp/socket").
3477    /// * `source` - Identifier of the socket to forward.
3478    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3479    pub fn with_unix_socket(
3480        &self,
3481        path: impl Into<String>,
3482        source: impl IntoID<SocketId>,
3483    ) -> Container {
3484        let mut query = self.selection.select("withUnixSocket");
3485        query = query.arg("path", path.into());
3486        query = query.arg_lazy(
3487            "source",
3488            Box::new(move || {
3489                let source = source.clone();
3490                Box::pin(async move { source.into_id().await.unwrap().quote() })
3491            }),
3492        );
3493        Container {
3494            proc: self.proc.clone(),
3495            selection: query,
3496            graphql_client: self.graphql_client.clone(),
3497        }
3498    }
3499    /// Retrieves this container plus a socket forwarded to the given Unix socket path.
3500    ///
3501    /// # Arguments
3502    ///
3503    /// * `path` - Location of the forwarded Unix socket (e.g., "/tmp/socket").
3504    /// * `source` - Identifier of the socket to forward.
3505    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3506    pub fn with_unix_socket_opts<'a>(
3507        &self,
3508        path: impl Into<String>,
3509        source: impl IntoID<SocketId>,
3510        opts: ContainerWithUnixSocketOpts<'a>,
3511    ) -> Container {
3512        let mut query = self.selection.select("withUnixSocket");
3513        query = query.arg("path", path.into());
3514        query = query.arg_lazy(
3515            "source",
3516            Box::new(move || {
3517                let source = source.clone();
3518                Box::pin(async move { source.into_id().await.unwrap().quote() })
3519            }),
3520        );
3521        if let Some(owner) = opts.owner {
3522            query = query.arg("owner", owner);
3523        }
3524        if let Some(expand) = opts.expand {
3525            query = query.arg("expand", expand);
3526        }
3527        Container {
3528            proc: self.proc.clone(),
3529            selection: query,
3530            graphql_client: self.graphql_client.clone(),
3531        }
3532    }
3533    /// Retrieves this container with a different command user.
3534    ///
3535    /// # Arguments
3536    ///
3537    /// * `name` - The user to set (e.g., "root").
3538    pub fn with_user(&self, name: impl Into<String>) -> Container {
3539        let mut query = self.selection.select("withUser");
3540        query = query.arg("name", name.into());
3541        Container {
3542            proc: self.proc.clone(),
3543            selection: query,
3544            graphql_client: self.graphql_client.clone(),
3545        }
3546    }
3547    /// Retrieves this container with a different working directory.
3548    ///
3549    /// # Arguments
3550    ///
3551    /// * `path` - The path to set as the working directory (e.g., "/app").
3552    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3553    pub fn with_workdir(&self, path: impl Into<String>) -> Container {
3554        let mut query = self.selection.select("withWorkdir");
3555        query = query.arg("path", path.into());
3556        Container {
3557            proc: self.proc.clone(),
3558            selection: query,
3559            graphql_client: self.graphql_client.clone(),
3560        }
3561    }
3562    /// Retrieves this container with a different working directory.
3563    ///
3564    /// # Arguments
3565    ///
3566    /// * `path` - The path to set as the working directory (e.g., "/app").
3567    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3568    pub fn with_workdir_opts(
3569        &self,
3570        path: impl Into<String>,
3571        opts: ContainerWithWorkdirOpts,
3572    ) -> Container {
3573        let mut query = self.selection.select("withWorkdir");
3574        query = query.arg("path", path.into());
3575        if let Some(expand) = opts.expand {
3576            query = query.arg("expand", expand);
3577        }
3578        Container {
3579            proc: self.proc.clone(),
3580            selection: query,
3581            graphql_client: self.graphql_client.clone(),
3582        }
3583    }
3584    /// Retrieves this container minus the given OCI annotation.
3585    ///
3586    /// # Arguments
3587    ///
3588    /// * `name` - The name of the annotation.
3589    pub fn without_annotation(&self, name: impl Into<String>) -> Container {
3590        let mut query = self.selection.select("withoutAnnotation");
3591        query = query.arg("name", name.into());
3592        Container {
3593            proc: self.proc.clone(),
3594            selection: query,
3595            graphql_client: self.graphql_client.clone(),
3596        }
3597    }
3598    /// Retrieves this container with unset default arguments for future commands.
3599    pub fn without_default_args(&self) -> Container {
3600        let query = self.selection.select("withoutDefaultArgs");
3601        Container {
3602            proc: self.proc.clone(),
3603            selection: query,
3604            graphql_client: self.graphql_client.clone(),
3605        }
3606    }
3607    /// Retrieves this container with the directory at the given path removed.
3608    ///
3609    /// # Arguments
3610    ///
3611    /// * `path` - Location of the directory to remove (e.g., ".github/").
3612    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3613    pub fn without_directory(&self, path: impl Into<String>) -> Container {
3614        let mut query = self.selection.select("withoutDirectory");
3615        query = query.arg("path", path.into());
3616        Container {
3617            proc: self.proc.clone(),
3618            selection: query,
3619            graphql_client: self.graphql_client.clone(),
3620        }
3621    }
3622    /// Retrieves this container with the directory at the given path removed.
3623    ///
3624    /// # Arguments
3625    ///
3626    /// * `path` - Location of the directory to remove (e.g., ".github/").
3627    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3628    pub fn without_directory_opts(
3629        &self,
3630        path: impl Into<String>,
3631        opts: ContainerWithoutDirectoryOpts,
3632    ) -> Container {
3633        let mut query = self.selection.select("withoutDirectory");
3634        query = query.arg("path", path.into());
3635        if let Some(expand) = opts.expand {
3636            query = query.arg("expand", expand);
3637        }
3638        Container {
3639            proc: self.proc.clone(),
3640            selection: query,
3641            graphql_client: self.graphql_client.clone(),
3642        }
3643    }
3644    /// Retrieves this container with an unset command entrypoint.
3645    ///
3646    /// # Arguments
3647    ///
3648    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3649    pub fn without_entrypoint(&self) -> Container {
3650        let query = self.selection.select("withoutEntrypoint");
3651        Container {
3652            proc: self.proc.clone(),
3653            selection: query,
3654            graphql_client: self.graphql_client.clone(),
3655        }
3656    }
3657    /// Retrieves this container with an unset command entrypoint.
3658    ///
3659    /// # Arguments
3660    ///
3661    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3662    pub fn without_entrypoint_opts(&self, opts: ContainerWithoutEntrypointOpts) -> Container {
3663        let mut query = self.selection.select("withoutEntrypoint");
3664        if let Some(keep_default_args) = opts.keep_default_args {
3665            query = query.arg("keepDefaultArgs", keep_default_args);
3666        }
3667        Container {
3668            proc: self.proc.clone(),
3669            selection: query,
3670            graphql_client: self.graphql_client.clone(),
3671        }
3672    }
3673    /// Retrieves this container minus the given environment variable.
3674    ///
3675    /// # Arguments
3676    ///
3677    /// * `name` - The name of the environment variable (e.g., "HOST").
3678    pub fn without_env_variable(&self, name: impl Into<String>) -> Container {
3679        let mut query = self.selection.select("withoutEnvVariable");
3680        query = query.arg("name", name.into());
3681        Container {
3682            proc: self.proc.clone(),
3683            selection: query,
3684            graphql_client: self.graphql_client.clone(),
3685        }
3686    }
3687    /// Unexpose a previously exposed port.
3688    ///
3689    /// # Arguments
3690    ///
3691    /// * `port` - Port number to unexpose
3692    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3693    pub fn without_exposed_port(&self, port: isize) -> Container {
3694        let mut query = self.selection.select("withoutExposedPort");
3695        query = query.arg("port", port);
3696        Container {
3697            proc: self.proc.clone(),
3698            selection: query,
3699            graphql_client: self.graphql_client.clone(),
3700        }
3701    }
3702    /// Unexpose a previously exposed port.
3703    ///
3704    /// # Arguments
3705    ///
3706    /// * `port` - Port number to unexpose
3707    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3708    pub fn without_exposed_port_opts(
3709        &self,
3710        port: isize,
3711        opts: ContainerWithoutExposedPortOpts,
3712    ) -> Container {
3713        let mut query = self.selection.select("withoutExposedPort");
3714        query = query.arg("port", port);
3715        if let Some(protocol) = opts.protocol {
3716            query = query.arg("protocol", protocol);
3717        }
3718        Container {
3719            proc: self.proc.clone(),
3720            selection: query,
3721            graphql_client: self.graphql_client.clone(),
3722        }
3723    }
3724    /// Retrieves this container with the file at the given path removed.
3725    ///
3726    /// # Arguments
3727    ///
3728    /// * `path` - Location of the file to remove (e.g., "/file.txt").
3729    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3730    pub fn without_file(&self, path: impl Into<String>) -> Container {
3731        let mut query = self.selection.select("withoutFile");
3732        query = query.arg("path", path.into());
3733        Container {
3734            proc: self.proc.clone(),
3735            selection: query,
3736            graphql_client: self.graphql_client.clone(),
3737        }
3738    }
3739    /// Retrieves this container with the file at the given path removed.
3740    ///
3741    /// # Arguments
3742    ///
3743    /// * `path` - Location of the file to remove (e.g., "/file.txt").
3744    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3745    pub fn without_file_opts(
3746        &self,
3747        path: impl Into<String>,
3748        opts: ContainerWithoutFileOpts,
3749    ) -> Container {
3750        let mut query = self.selection.select("withoutFile");
3751        query = query.arg("path", path.into());
3752        if let Some(expand) = opts.expand {
3753            query = query.arg("expand", expand);
3754        }
3755        Container {
3756            proc: self.proc.clone(),
3757            selection: query,
3758            graphql_client: self.graphql_client.clone(),
3759        }
3760    }
3761    /// Retrieves this container with the files at the given paths removed.
3762    ///
3763    /// # Arguments
3764    ///
3765    /// * `paths` - Location of the files to remove (e.g., ["/file.txt"]).
3766    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3767    pub fn without_files(&self, paths: Vec<impl Into<String>>) -> Container {
3768        let mut query = self.selection.select("withoutFiles");
3769        query = query.arg(
3770            "paths",
3771            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3772        );
3773        Container {
3774            proc: self.proc.clone(),
3775            selection: query,
3776            graphql_client: self.graphql_client.clone(),
3777        }
3778    }
3779    /// Retrieves this container with the files at the given paths removed.
3780    ///
3781    /// # Arguments
3782    ///
3783    /// * `paths` - Location of the files to remove (e.g., ["/file.txt"]).
3784    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3785    pub fn without_files_opts(
3786        &self,
3787        paths: Vec<impl Into<String>>,
3788        opts: ContainerWithoutFilesOpts,
3789    ) -> Container {
3790        let mut query = self.selection.select("withoutFiles");
3791        query = query.arg(
3792            "paths",
3793            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3794        );
3795        if let Some(expand) = opts.expand {
3796            query = query.arg("expand", expand);
3797        }
3798        Container {
3799            proc: self.proc.clone(),
3800            selection: query,
3801            graphql_client: self.graphql_client.clone(),
3802        }
3803    }
3804    /// Retrieves this container minus the given environment label.
3805    ///
3806    /// # Arguments
3807    ///
3808    /// * `name` - The name of the label to remove (e.g., "org.opencontainers.artifact.created").
3809    pub fn without_label(&self, name: impl Into<String>) -> Container {
3810        let mut query = self.selection.select("withoutLabel");
3811        query = query.arg("name", name.into());
3812        Container {
3813            proc: self.proc.clone(),
3814            selection: query,
3815            graphql_client: self.graphql_client.clone(),
3816        }
3817    }
3818    /// Retrieves this container after unmounting everything at the given path.
3819    ///
3820    /// # Arguments
3821    ///
3822    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
3823    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3824    pub fn without_mount(&self, path: impl Into<String>) -> Container {
3825        let mut query = self.selection.select("withoutMount");
3826        query = query.arg("path", path.into());
3827        Container {
3828            proc: self.proc.clone(),
3829            selection: query,
3830            graphql_client: self.graphql_client.clone(),
3831        }
3832    }
3833    /// Retrieves this container after unmounting everything at the given path.
3834    ///
3835    /// # Arguments
3836    ///
3837    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
3838    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3839    pub fn without_mount_opts(
3840        &self,
3841        path: impl Into<String>,
3842        opts: ContainerWithoutMountOpts,
3843    ) -> Container {
3844        let mut query = self.selection.select("withoutMount");
3845        query = query.arg("path", path.into());
3846        if let Some(expand) = opts.expand {
3847            query = query.arg("expand", expand);
3848        }
3849        Container {
3850            proc: self.proc.clone(),
3851            selection: query,
3852            graphql_client: self.graphql_client.clone(),
3853        }
3854    }
3855    /// Retrieves this container without the registry authentication of a given address.
3856    ///
3857    /// # Arguments
3858    ///
3859    /// * `address` - Registry's address to remove the authentication from.
3860    ///
3861    /// Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
3862    pub fn without_registry_auth(&self, address: impl Into<String>) -> Container {
3863        let mut query = self.selection.select("withoutRegistryAuth");
3864        query = query.arg("address", address.into());
3865        Container {
3866            proc: self.proc.clone(),
3867            selection: query,
3868            graphql_client: self.graphql_client.clone(),
3869        }
3870    }
3871    /// Retrieves this container minus the given environment variable containing the secret.
3872    ///
3873    /// # Arguments
3874    ///
3875    /// * `name` - The name of the environment variable (e.g., "HOST").
3876    pub fn without_secret_variable(&self, name: impl Into<String>) -> Container {
3877        let mut query = self.selection.select("withoutSecretVariable");
3878        query = query.arg("name", name.into());
3879        Container {
3880            proc: self.proc.clone(),
3881            selection: query,
3882            graphql_client: self.graphql_client.clone(),
3883        }
3884    }
3885    /// Retrieves this container with a previously added Unix socket removed.
3886    ///
3887    /// # Arguments
3888    ///
3889    /// * `path` - Location of the socket to remove (e.g., "/tmp/socket").
3890    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3891    pub fn without_unix_socket(&self, path: impl Into<String>) -> Container {
3892        let mut query = self.selection.select("withoutUnixSocket");
3893        query = query.arg("path", path.into());
3894        Container {
3895            proc: self.proc.clone(),
3896            selection: query,
3897            graphql_client: self.graphql_client.clone(),
3898        }
3899    }
3900    /// Retrieves this container with a previously added Unix socket removed.
3901    ///
3902    /// # Arguments
3903    ///
3904    /// * `path` - Location of the socket to remove (e.g., "/tmp/socket").
3905    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3906    pub fn without_unix_socket_opts(
3907        &self,
3908        path: impl Into<String>,
3909        opts: ContainerWithoutUnixSocketOpts,
3910    ) -> Container {
3911        let mut query = self.selection.select("withoutUnixSocket");
3912        query = query.arg("path", path.into());
3913        if let Some(expand) = opts.expand {
3914            query = query.arg("expand", expand);
3915        }
3916        Container {
3917            proc: self.proc.clone(),
3918            selection: query,
3919            graphql_client: self.graphql_client.clone(),
3920        }
3921    }
3922    /// Retrieves this container with an unset command user.
3923    /// Should default to root.
3924    pub fn without_user(&self) -> Container {
3925        let query = self.selection.select("withoutUser");
3926        Container {
3927            proc: self.proc.clone(),
3928            selection: query,
3929            graphql_client: self.graphql_client.clone(),
3930        }
3931    }
3932    /// Retrieves this container with an unset working directory.
3933    /// Should default to "/".
3934    pub fn without_workdir(&self) -> Container {
3935        let query = self.selection.select("withoutWorkdir");
3936        Container {
3937            proc: self.proc.clone(),
3938            selection: query,
3939            graphql_client: self.graphql_client.clone(),
3940        }
3941    }
3942    /// Retrieves the working directory for all commands.
3943    pub async fn workdir(&self) -> Result<String, DaggerError> {
3944        let query = self.selection.select("workdir");
3945        query.execute(self.graphql_client.clone()).await
3946    }
3947}
3948#[derive(Clone)]
3949pub struct CurrentModule {
3950    pub proc: Option<Arc<DaggerSessionProc>>,
3951    pub selection: Selection,
3952    pub graphql_client: DynGraphQLClient,
3953}
3954#[derive(Builder, Debug, PartialEq)]
3955pub struct CurrentModuleWorkdirOpts<'a> {
3956    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
3957    #[builder(setter(into, strip_option), default)]
3958    pub exclude: Option<Vec<&'a str>>,
3959    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
3960    #[builder(setter(into, strip_option), default)]
3961    pub include: Option<Vec<&'a str>>,
3962}
3963impl CurrentModule {
3964    /// A unique identifier for this CurrentModule.
3965    pub async fn id(&self) -> Result<CurrentModuleId, DaggerError> {
3966        let query = self.selection.select("id");
3967        query.execute(self.graphql_client.clone()).await
3968    }
3969    /// The name of the module being executed in
3970    pub async fn name(&self) -> Result<String, DaggerError> {
3971        let query = self.selection.select("name");
3972        query.execute(self.graphql_client.clone()).await
3973    }
3974    /// The directory containing the module's source code loaded into the engine (plus any generated code that may have been created).
3975    pub fn source(&self) -> Directory {
3976        let query = self.selection.select("source");
3977        Directory {
3978            proc: self.proc.clone(),
3979            selection: query,
3980            graphql_client: self.graphql_client.clone(),
3981        }
3982    }
3983    /// Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.
3984    ///
3985    /// # Arguments
3986    ///
3987    /// * `path` - Location of the directory to access (e.g., ".").
3988    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3989    pub fn workdir(&self, path: impl Into<String>) -> Directory {
3990        let mut query = self.selection.select("workdir");
3991        query = query.arg("path", path.into());
3992        Directory {
3993            proc: self.proc.clone(),
3994            selection: query,
3995            graphql_client: self.graphql_client.clone(),
3996        }
3997    }
3998    /// Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.
3999    ///
4000    /// # Arguments
4001    ///
4002    /// * `path` - Location of the directory to access (e.g., ".").
4003    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4004    pub fn workdir_opts<'a>(
4005        &self,
4006        path: impl Into<String>,
4007        opts: CurrentModuleWorkdirOpts<'a>,
4008    ) -> Directory {
4009        let mut query = self.selection.select("workdir");
4010        query = query.arg("path", path.into());
4011        if let Some(exclude) = opts.exclude {
4012            query = query.arg("exclude", exclude);
4013        }
4014        if let Some(include) = opts.include {
4015            query = query.arg("include", include);
4016        }
4017        Directory {
4018            proc: self.proc.clone(),
4019            selection: query,
4020            graphql_client: self.graphql_client.clone(),
4021        }
4022    }
4023    /// 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.
4024    ///
4025    /// # Arguments
4026    ///
4027    /// * `path` - Location of the file to retrieve (e.g., "README.md").
4028    pub fn workdir_file(&self, path: impl Into<String>) -> File {
4029        let mut query = self.selection.select("workdirFile");
4030        query = query.arg("path", path.into());
4031        File {
4032            proc: self.proc.clone(),
4033            selection: query,
4034            graphql_client: self.graphql_client.clone(),
4035        }
4036    }
4037}
4038#[derive(Clone)]
4039pub struct Directory {
4040    pub proc: Option<Arc<DaggerSessionProc>>,
4041    pub selection: Selection,
4042    pub graphql_client: DynGraphQLClient,
4043}
4044#[derive(Builder, Debug, PartialEq)]
4045pub struct DirectoryAsModuleOpts<'a> {
4046    /// An optional subpath of the directory which contains the module's configuration file.
4047    /// If not set, the module source code is loaded from the root of the directory.
4048    #[builder(setter(into, strip_option), default)]
4049    pub source_root_path: Option<&'a str>,
4050}
4051#[derive(Builder, Debug, PartialEq)]
4052pub struct DirectoryAsModuleSourceOpts<'a> {
4053    /// An optional subpath of the directory which contains the module's configuration file.
4054    /// If not set, the module source code is loaded from the root of the directory.
4055    #[builder(setter(into, strip_option), default)]
4056    pub source_root_path: Option<&'a str>,
4057}
4058#[derive(Builder, Debug, PartialEq)]
4059pub struct DirectoryDockerBuildOpts<'a> {
4060    /// Build arguments to use in the build.
4061    #[builder(setter(into, strip_option), default)]
4062    pub build_args: Option<Vec<BuildArg>>,
4063    /// Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
4064    #[builder(setter(into, strip_option), default)]
4065    pub dockerfile: Option<&'a str>,
4066    /// The platform to build.
4067    #[builder(setter(into, strip_option), default)]
4068    pub platform: Option<Platform>,
4069    /// Secrets to pass to the build.
4070    /// They will be mounted at /run/secrets/[secret-name].
4071    #[builder(setter(into, strip_option), default)]
4072    pub secrets: Option<Vec<SecretId>>,
4073    /// Target build stage to build.
4074    #[builder(setter(into, strip_option), default)]
4075    pub target: Option<&'a str>,
4076}
4077#[derive(Builder, Debug, PartialEq)]
4078pub struct DirectoryEntriesOpts<'a> {
4079    /// Location of the directory to look at (e.g., "/src").
4080    #[builder(setter(into, strip_option), default)]
4081    pub path: Option<&'a str>,
4082}
4083#[derive(Builder, Debug, PartialEq)]
4084pub struct DirectoryExportOpts {
4085    /// 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.
4086    #[builder(setter(into, strip_option), default)]
4087    pub wipe: Option<bool>,
4088}
4089#[derive(Builder, Debug, PartialEq)]
4090pub struct DirectoryTerminalOpts<'a> {
4091    /// If set, override the container's default terminal command and invoke these command arguments instead.
4092    #[builder(setter(into, strip_option), default)]
4093    pub cmd: Option<Vec<&'a str>>,
4094    /// If set, override the default container used for the terminal.
4095    #[builder(setter(into, strip_option), default)]
4096    pub container: Option<ContainerId>,
4097    /// Provides Dagger access to the executed command.
4098    /// Do not use this option unless you trust the command being executed; the command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.
4099    #[builder(setter(into, strip_option), default)]
4100    pub experimental_privileged_nesting: Option<bool>,
4101    /// 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.
4102    #[builder(setter(into, strip_option), default)]
4103    pub insecure_root_capabilities: Option<bool>,
4104}
4105#[derive(Builder, Debug, PartialEq)]
4106pub struct DirectoryWithDirectoryOpts<'a> {
4107    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
4108    #[builder(setter(into, strip_option), default)]
4109    pub exclude: Option<Vec<&'a str>>,
4110    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
4111    #[builder(setter(into, strip_option), default)]
4112    pub include: Option<Vec<&'a str>>,
4113}
4114#[derive(Builder, Debug, PartialEq)]
4115pub struct DirectoryWithFileOpts {
4116    /// Permission given to the copied file (e.g., 0600).
4117    #[builder(setter(into, strip_option), default)]
4118    pub permissions: Option<isize>,
4119}
4120#[derive(Builder, Debug, PartialEq)]
4121pub struct DirectoryWithFilesOpts {
4122    /// Permission given to the copied files (e.g., 0600).
4123    #[builder(setter(into, strip_option), default)]
4124    pub permissions: Option<isize>,
4125}
4126#[derive(Builder, Debug, PartialEq)]
4127pub struct DirectoryWithNewDirectoryOpts {
4128    /// Permission granted to the created directory (e.g., 0777).
4129    #[builder(setter(into, strip_option), default)]
4130    pub permissions: Option<isize>,
4131}
4132#[derive(Builder, Debug, PartialEq)]
4133pub struct DirectoryWithNewFileOpts {
4134    /// Permission given to the copied file (e.g., 0600).
4135    #[builder(setter(into, strip_option), default)]
4136    pub permissions: Option<isize>,
4137}
4138impl Directory {
4139    /// Converts this directory into a git repository
4140    pub fn as_git(&self) -> GitRepository {
4141        let query = self.selection.select("asGit");
4142        GitRepository {
4143            proc: self.proc.clone(),
4144            selection: query,
4145            graphql_client: self.graphql_client.clone(),
4146        }
4147    }
4148    /// Load the directory as a Dagger module source
4149    ///
4150    /// # Arguments
4151    ///
4152    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4153    pub fn as_module(&self) -> Module {
4154        let query = self.selection.select("asModule");
4155        Module {
4156            proc: self.proc.clone(),
4157            selection: query,
4158            graphql_client: self.graphql_client.clone(),
4159        }
4160    }
4161    /// Load the directory as a Dagger module source
4162    ///
4163    /// # Arguments
4164    ///
4165    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4166    pub fn as_module_opts<'a>(&self, opts: DirectoryAsModuleOpts<'a>) -> Module {
4167        let mut query = self.selection.select("asModule");
4168        if let Some(source_root_path) = opts.source_root_path {
4169            query = query.arg("sourceRootPath", source_root_path);
4170        }
4171        Module {
4172            proc: self.proc.clone(),
4173            selection: query,
4174            graphql_client: self.graphql_client.clone(),
4175        }
4176    }
4177    /// Load the directory as a Dagger module source
4178    ///
4179    /// # Arguments
4180    ///
4181    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4182    pub fn as_module_source(&self) -> ModuleSource {
4183        let query = self.selection.select("asModuleSource");
4184        ModuleSource {
4185            proc: self.proc.clone(),
4186            selection: query,
4187            graphql_client: self.graphql_client.clone(),
4188        }
4189    }
4190    /// Load the directory as a Dagger module source
4191    ///
4192    /// # Arguments
4193    ///
4194    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4195    pub fn as_module_source_opts<'a>(&self, opts: DirectoryAsModuleSourceOpts<'a>) -> ModuleSource {
4196        let mut query = self.selection.select("asModuleSource");
4197        if let Some(source_root_path) = opts.source_root_path {
4198            query = query.arg("sourceRootPath", source_root_path);
4199        }
4200        ModuleSource {
4201            proc: self.proc.clone(),
4202            selection: query,
4203            graphql_client: self.graphql_client.clone(),
4204        }
4205    }
4206    /// Gets the difference between this directory and an another directory.
4207    ///
4208    /// # Arguments
4209    ///
4210    /// * `other` - Identifier of the directory to compare.
4211    pub fn diff(&self, other: impl IntoID<DirectoryId>) -> Directory {
4212        let mut query = self.selection.select("diff");
4213        query = query.arg_lazy(
4214            "other",
4215            Box::new(move || {
4216                let other = other.clone();
4217                Box::pin(async move { other.into_id().await.unwrap().quote() })
4218            }),
4219        );
4220        Directory {
4221            proc: self.proc.clone(),
4222            selection: query,
4223            graphql_client: self.graphql_client.clone(),
4224        }
4225    }
4226    /// 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.
4227    pub async fn digest(&self) -> Result<String, DaggerError> {
4228        let query = self.selection.select("digest");
4229        query.execute(self.graphql_client.clone()).await
4230    }
4231    /// Retrieves a directory at the given path.
4232    ///
4233    /// # Arguments
4234    ///
4235    /// * `path` - Location of the directory to retrieve (e.g., "/src").
4236    pub fn directory(&self, path: impl Into<String>) -> Directory {
4237        let mut query = self.selection.select("directory");
4238        query = query.arg("path", path.into());
4239        Directory {
4240            proc: self.proc.clone(),
4241            selection: query,
4242            graphql_client: self.graphql_client.clone(),
4243        }
4244    }
4245    /// Builds a new Docker container from this directory.
4246    ///
4247    /// # Arguments
4248    ///
4249    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4250    pub fn docker_build(&self) -> Container {
4251        let query = self.selection.select("dockerBuild");
4252        Container {
4253            proc: self.proc.clone(),
4254            selection: query,
4255            graphql_client: self.graphql_client.clone(),
4256        }
4257    }
4258    /// Builds a new Docker container from this directory.
4259    ///
4260    /// # Arguments
4261    ///
4262    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4263    pub fn docker_build_opts<'a>(&self, opts: DirectoryDockerBuildOpts<'a>) -> Container {
4264        let mut query = self.selection.select("dockerBuild");
4265        if let Some(platform) = opts.platform {
4266            query = query.arg("platform", platform);
4267        }
4268        if let Some(dockerfile) = opts.dockerfile {
4269            query = query.arg("dockerfile", dockerfile);
4270        }
4271        if let Some(target) = opts.target {
4272            query = query.arg("target", target);
4273        }
4274        if let Some(build_args) = opts.build_args {
4275            query = query.arg("buildArgs", build_args);
4276        }
4277        if let Some(secrets) = opts.secrets {
4278            query = query.arg("secrets", secrets);
4279        }
4280        Container {
4281            proc: self.proc.clone(),
4282            selection: query,
4283            graphql_client: self.graphql_client.clone(),
4284        }
4285    }
4286    /// Returns a list of files and directories at the given path.
4287    ///
4288    /// # Arguments
4289    ///
4290    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4291    pub async fn entries(&self) -> Result<Vec<String>, DaggerError> {
4292        let query = self.selection.select("entries");
4293        query.execute(self.graphql_client.clone()).await
4294    }
4295    /// Returns a list of files and directories at the given path.
4296    ///
4297    /// # Arguments
4298    ///
4299    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4300    pub async fn entries_opts<'a>(
4301        &self,
4302        opts: DirectoryEntriesOpts<'a>,
4303    ) -> Result<Vec<String>, DaggerError> {
4304        let mut query = self.selection.select("entries");
4305        if let Some(path) = opts.path {
4306            query = query.arg("path", path);
4307        }
4308        query.execute(self.graphql_client.clone()).await
4309    }
4310    /// Writes the contents of the directory to a path on the host.
4311    ///
4312    /// # Arguments
4313    ///
4314    /// * `path` - Location of the copied directory (e.g., "logs/").
4315    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4316    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
4317        let mut query = self.selection.select("export");
4318        query = query.arg("path", path.into());
4319        query.execute(self.graphql_client.clone()).await
4320    }
4321    /// Writes the contents of the directory to a path on the host.
4322    ///
4323    /// # Arguments
4324    ///
4325    /// * `path` - Location of the copied directory (e.g., "logs/").
4326    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4327    pub async fn export_opts(
4328        &self,
4329        path: impl Into<String>,
4330        opts: DirectoryExportOpts,
4331    ) -> Result<String, DaggerError> {
4332        let mut query = self.selection.select("export");
4333        query = query.arg("path", path.into());
4334        if let Some(wipe) = opts.wipe {
4335            query = query.arg("wipe", wipe);
4336        }
4337        query.execute(self.graphql_client.clone()).await
4338    }
4339    /// Retrieves a file at the given path.
4340    ///
4341    /// # Arguments
4342    ///
4343    /// * `path` - Location of the file to retrieve (e.g., "README.md").
4344    pub fn file(&self, path: impl Into<String>) -> File {
4345        let mut query = self.selection.select("file");
4346        query = query.arg("path", path.into());
4347        File {
4348            proc: self.proc.clone(),
4349            selection: query,
4350            graphql_client: self.graphql_client.clone(),
4351        }
4352    }
4353    /// Returns a list of files and directories that matche the given pattern.
4354    ///
4355    /// # Arguments
4356    ///
4357    /// * `pattern` - Pattern to match (e.g., "*.md").
4358    pub async fn glob(&self, pattern: impl Into<String>) -> Result<Vec<String>, DaggerError> {
4359        let mut query = self.selection.select("glob");
4360        query = query.arg("pattern", pattern.into());
4361        query.execute(self.graphql_client.clone()).await
4362    }
4363    /// A unique identifier for this Directory.
4364    pub async fn id(&self) -> Result<DirectoryId, DaggerError> {
4365        let query = self.selection.select("id");
4366        query.execute(self.graphql_client.clone()).await
4367    }
4368    /// Returns the name of the directory.
4369    pub async fn name(&self) -> Result<String, DaggerError> {
4370        let query = self.selection.select("name");
4371        query.execute(self.graphql_client.clone()).await
4372    }
4373    /// Force evaluation in the engine.
4374    pub async fn sync(&self) -> Result<DirectoryId, DaggerError> {
4375        let query = self.selection.select("sync");
4376        query.execute(self.graphql_client.clone()).await
4377    }
4378    /// Opens an interactive terminal in new container with this directory mounted inside.
4379    ///
4380    /// # Arguments
4381    ///
4382    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4383    pub fn terminal(&self) -> Directory {
4384        let query = self.selection.select("terminal");
4385        Directory {
4386            proc: self.proc.clone(),
4387            selection: query,
4388            graphql_client: self.graphql_client.clone(),
4389        }
4390    }
4391    /// Opens an interactive terminal in new container with this directory mounted inside.
4392    ///
4393    /// # Arguments
4394    ///
4395    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4396    pub fn terminal_opts<'a>(&self, opts: DirectoryTerminalOpts<'a>) -> Directory {
4397        let mut query = self.selection.select("terminal");
4398        if let Some(cmd) = opts.cmd {
4399            query = query.arg("cmd", cmd);
4400        }
4401        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
4402            query = query.arg(
4403                "experimentalPrivilegedNesting",
4404                experimental_privileged_nesting,
4405            );
4406        }
4407        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
4408            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
4409        }
4410        if let Some(container) = opts.container {
4411            query = query.arg("container", container);
4412        }
4413        Directory {
4414            proc: self.proc.clone(),
4415            selection: query,
4416            graphql_client: self.graphql_client.clone(),
4417        }
4418    }
4419    /// Retrieves this directory plus a directory written at the given path.
4420    ///
4421    /// # Arguments
4422    ///
4423    /// * `path` - Location of the written directory (e.g., "/src/").
4424    /// * `directory` - Identifier of the directory to copy.
4425    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4426    pub fn with_directory(
4427        &self,
4428        path: impl Into<String>,
4429        directory: impl IntoID<DirectoryId>,
4430    ) -> Directory {
4431        let mut query = self.selection.select("withDirectory");
4432        query = query.arg("path", path.into());
4433        query = query.arg_lazy(
4434            "directory",
4435            Box::new(move || {
4436                let directory = directory.clone();
4437                Box::pin(async move { directory.into_id().await.unwrap().quote() })
4438            }),
4439        );
4440        Directory {
4441            proc: self.proc.clone(),
4442            selection: query,
4443            graphql_client: self.graphql_client.clone(),
4444        }
4445    }
4446    /// Retrieves this directory plus a directory written at the given path.
4447    ///
4448    /// # Arguments
4449    ///
4450    /// * `path` - Location of the written directory (e.g., "/src/").
4451    /// * `directory` - Identifier of the directory to copy.
4452    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4453    pub fn with_directory_opts<'a>(
4454        &self,
4455        path: impl Into<String>,
4456        directory: impl IntoID<DirectoryId>,
4457        opts: DirectoryWithDirectoryOpts<'a>,
4458    ) -> Directory {
4459        let mut query = self.selection.select("withDirectory");
4460        query = query.arg("path", path.into());
4461        query = query.arg_lazy(
4462            "directory",
4463            Box::new(move || {
4464                let directory = directory.clone();
4465                Box::pin(async move { directory.into_id().await.unwrap().quote() })
4466            }),
4467        );
4468        if let Some(exclude) = opts.exclude {
4469            query = query.arg("exclude", exclude);
4470        }
4471        if let Some(include) = opts.include {
4472            query = query.arg("include", include);
4473        }
4474        Directory {
4475            proc: self.proc.clone(),
4476            selection: query,
4477            graphql_client: self.graphql_client.clone(),
4478        }
4479    }
4480    /// Retrieves this directory plus the contents of the given file copied to the given path.
4481    ///
4482    /// # Arguments
4483    ///
4484    /// * `path` - Location of the copied file (e.g., "/file.txt").
4485    /// * `source` - Identifier of the file to copy.
4486    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4487    pub fn with_file(&self, path: impl Into<String>, source: impl IntoID<FileId>) -> Directory {
4488        let mut query = self.selection.select("withFile");
4489        query = query.arg("path", path.into());
4490        query = query.arg_lazy(
4491            "source",
4492            Box::new(move || {
4493                let source = source.clone();
4494                Box::pin(async move { source.into_id().await.unwrap().quote() })
4495            }),
4496        );
4497        Directory {
4498            proc: self.proc.clone(),
4499            selection: query,
4500            graphql_client: self.graphql_client.clone(),
4501        }
4502    }
4503    /// Retrieves this directory plus the contents of the given file copied to the given path.
4504    ///
4505    /// # Arguments
4506    ///
4507    /// * `path` - Location of the copied file (e.g., "/file.txt").
4508    /// * `source` - Identifier of the file to copy.
4509    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4510    pub fn with_file_opts(
4511        &self,
4512        path: impl Into<String>,
4513        source: impl IntoID<FileId>,
4514        opts: DirectoryWithFileOpts,
4515    ) -> Directory {
4516        let mut query = self.selection.select("withFile");
4517        query = query.arg("path", path.into());
4518        query = query.arg_lazy(
4519            "source",
4520            Box::new(move || {
4521                let source = source.clone();
4522                Box::pin(async move { source.into_id().await.unwrap().quote() })
4523            }),
4524        );
4525        if let Some(permissions) = opts.permissions {
4526            query = query.arg("permissions", permissions);
4527        }
4528        Directory {
4529            proc: self.proc.clone(),
4530            selection: query,
4531            graphql_client: self.graphql_client.clone(),
4532        }
4533    }
4534    /// Retrieves this directory plus the contents of the given files copied to the given path.
4535    ///
4536    /// # Arguments
4537    ///
4538    /// * `path` - Location where copied files should be placed (e.g., "/src").
4539    /// * `sources` - Identifiers of the files to copy.
4540    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4541    pub fn with_files(&self, path: impl Into<String>, sources: Vec<FileId>) -> Directory {
4542        let mut query = self.selection.select("withFiles");
4543        query = query.arg("path", path.into());
4544        query = query.arg("sources", sources);
4545        Directory {
4546            proc: self.proc.clone(),
4547            selection: query,
4548            graphql_client: self.graphql_client.clone(),
4549        }
4550    }
4551    /// Retrieves this directory plus the contents of the given files copied to the given path.
4552    ///
4553    /// # Arguments
4554    ///
4555    /// * `path` - Location where copied files should be placed (e.g., "/src").
4556    /// * `sources` - Identifiers of the files to copy.
4557    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4558    pub fn with_files_opts(
4559        &self,
4560        path: impl Into<String>,
4561        sources: Vec<FileId>,
4562        opts: DirectoryWithFilesOpts,
4563    ) -> Directory {
4564        let mut query = self.selection.select("withFiles");
4565        query = query.arg("path", path.into());
4566        query = query.arg("sources", sources);
4567        if let Some(permissions) = opts.permissions {
4568            query = query.arg("permissions", permissions);
4569        }
4570        Directory {
4571            proc: self.proc.clone(),
4572            selection: query,
4573            graphql_client: self.graphql_client.clone(),
4574        }
4575    }
4576    /// Retrieves this directory plus a new directory created at the given path.
4577    ///
4578    /// # Arguments
4579    ///
4580    /// * `path` - Location of the directory created (e.g., "/logs").
4581    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4582    pub fn with_new_directory(&self, path: impl Into<String>) -> Directory {
4583        let mut query = self.selection.select("withNewDirectory");
4584        query = query.arg("path", path.into());
4585        Directory {
4586            proc: self.proc.clone(),
4587            selection: query,
4588            graphql_client: self.graphql_client.clone(),
4589        }
4590    }
4591    /// Retrieves this directory plus a new directory created at the given path.
4592    ///
4593    /// # Arguments
4594    ///
4595    /// * `path` - Location of the directory created (e.g., "/logs").
4596    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4597    pub fn with_new_directory_opts(
4598        &self,
4599        path: impl Into<String>,
4600        opts: DirectoryWithNewDirectoryOpts,
4601    ) -> Directory {
4602        let mut query = self.selection.select("withNewDirectory");
4603        query = query.arg("path", path.into());
4604        if let Some(permissions) = opts.permissions {
4605            query = query.arg("permissions", permissions);
4606        }
4607        Directory {
4608            proc: self.proc.clone(),
4609            selection: query,
4610            graphql_client: self.graphql_client.clone(),
4611        }
4612    }
4613    /// Retrieves this directory plus a new file written at the given path.
4614    ///
4615    /// # Arguments
4616    ///
4617    /// * `path` - Location of the written file (e.g., "/file.txt").
4618    /// * `contents` - Content of the written file (e.g., "Hello world!").
4619    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4620    pub fn with_new_file(&self, path: impl Into<String>, contents: impl Into<String>) -> Directory {
4621        let mut query = self.selection.select("withNewFile");
4622        query = query.arg("path", path.into());
4623        query = query.arg("contents", contents.into());
4624        Directory {
4625            proc: self.proc.clone(),
4626            selection: query,
4627            graphql_client: self.graphql_client.clone(),
4628        }
4629    }
4630    /// Retrieves this directory plus a new file written at the given path.
4631    ///
4632    /// # Arguments
4633    ///
4634    /// * `path` - Location of the written file (e.g., "/file.txt").
4635    /// * `contents` - Content of the written file (e.g., "Hello world!").
4636    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4637    pub fn with_new_file_opts(
4638        &self,
4639        path: impl Into<String>,
4640        contents: impl Into<String>,
4641        opts: DirectoryWithNewFileOpts,
4642    ) -> Directory {
4643        let mut query = self.selection.select("withNewFile");
4644        query = query.arg("path", path.into());
4645        query = query.arg("contents", contents.into());
4646        if let Some(permissions) = opts.permissions {
4647            query = query.arg("permissions", permissions);
4648        }
4649        Directory {
4650            proc: self.proc.clone(),
4651            selection: query,
4652            graphql_client: self.graphql_client.clone(),
4653        }
4654    }
4655    /// Retrieves this directory with all file/dir timestamps set to the given time.
4656    ///
4657    /// # Arguments
4658    ///
4659    /// * `timestamp` - Timestamp to set dir/files in.
4660    ///
4661    /// Formatted in seconds following Unix epoch (e.g., 1672531199).
4662    pub fn with_timestamps(&self, timestamp: isize) -> Directory {
4663        let mut query = self.selection.select("withTimestamps");
4664        query = query.arg("timestamp", timestamp);
4665        Directory {
4666            proc: self.proc.clone(),
4667            selection: query,
4668            graphql_client: self.graphql_client.clone(),
4669        }
4670    }
4671    /// Retrieves this directory with the directory at the given path removed.
4672    ///
4673    /// # Arguments
4674    ///
4675    /// * `path` - Location of the directory to remove (e.g., ".github/").
4676    pub fn without_directory(&self, path: impl Into<String>) -> Directory {
4677        let mut query = self.selection.select("withoutDirectory");
4678        query = query.arg("path", path.into());
4679        Directory {
4680            proc: self.proc.clone(),
4681            selection: query,
4682            graphql_client: self.graphql_client.clone(),
4683        }
4684    }
4685    /// Retrieves this directory with the file at the given path removed.
4686    ///
4687    /// # Arguments
4688    ///
4689    /// * `path` - Location of the file to remove (e.g., "/file.txt").
4690    pub fn without_file(&self, path: impl Into<String>) -> Directory {
4691        let mut query = self.selection.select("withoutFile");
4692        query = query.arg("path", path.into());
4693        Directory {
4694            proc: self.proc.clone(),
4695            selection: query,
4696            graphql_client: self.graphql_client.clone(),
4697        }
4698    }
4699    /// Retrieves this directory with the files at the given paths removed.
4700    ///
4701    /// # Arguments
4702    ///
4703    /// * `paths` - Location of the file to remove (e.g., ["/file.txt"]).
4704    pub fn without_files(&self, paths: Vec<impl Into<String>>) -> Directory {
4705        let mut query = self.selection.select("withoutFiles");
4706        query = query.arg(
4707            "paths",
4708            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
4709        );
4710        Directory {
4711            proc: self.proc.clone(),
4712            selection: query,
4713            graphql_client: self.graphql_client.clone(),
4714        }
4715    }
4716}
4717#[derive(Clone)]
4718pub struct Engine {
4719    pub proc: Option<Arc<DaggerSessionProc>>,
4720    pub selection: Selection,
4721    pub graphql_client: DynGraphQLClient,
4722}
4723impl Engine {
4724    /// A unique identifier for this Engine.
4725    pub async fn id(&self) -> Result<EngineId, DaggerError> {
4726        let query = self.selection.select("id");
4727        query.execute(self.graphql_client.clone()).await
4728    }
4729    /// The local (on-disk) cache for the Dagger engine
4730    pub fn local_cache(&self) -> EngineCache {
4731        let query = self.selection.select("localCache");
4732        EngineCache {
4733            proc: self.proc.clone(),
4734            selection: query,
4735            graphql_client: self.graphql_client.clone(),
4736        }
4737    }
4738}
4739#[derive(Clone)]
4740pub struct EngineCache {
4741    pub proc: Option<Arc<DaggerSessionProc>>,
4742    pub selection: Selection,
4743    pub graphql_client: DynGraphQLClient,
4744}
4745#[derive(Builder, Debug, PartialEq)]
4746pub struct EngineCacheEntrySetOpts<'a> {
4747    #[builder(setter(into, strip_option), default)]
4748    pub key: Option<&'a str>,
4749}
4750impl EngineCache {
4751    /// The current set of entries in the cache
4752    ///
4753    /// # Arguments
4754    ///
4755    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4756    pub fn entry_set(&self) -> EngineCacheEntrySet {
4757        let query = self.selection.select("entrySet");
4758        EngineCacheEntrySet {
4759            proc: self.proc.clone(),
4760            selection: query,
4761            graphql_client: self.graphql_client.clone(),
4762        }
4763    }
4764    /// The current set of entries in the cache
4765    ///
4766    /// # Arguments
4767    ///
4768    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4769    pub fn entry_set_opts<'a>(&self, opts: EngineCacheEntrySetOpts<'a>) -> EngineCacheEntrySet {
4770        let mut query = self.selection.select("entrySet");
4771        if let Some(key) = opts.key {
4772            query = query.arg("key", key);
4773        }
4774        EngineCacheEntrySet {
4775            proc: self.proc.clone(),
4776            selection: query,
4777            graphql_client: self.graphql_client.clone(),
4778        }
4779    }
4780    /// A unique identifier for this EngineCache.
4781    pub async fn id(&self) -> Result<EngineCacheId, DaggerError> {
4782        let query = self.selection.select("id");
4783        query.execute(self.graphql_client.clone()).await
4784    }
4785    /// The maximum bytes to keep in the cache without pruning, after which automatic pruning may kick in.
4786    pub async fn keep_bytes(&self) -> Result<isize, DaggerError> {
4787        let query = self.selection.select("keepBytes");
4788        query.execute(self.graphql_client.clone()).await
4789    }
4790    /// The maximum bytes to keep in the cache without pruning.
4791    pub async fn max_used_space(&self) -> Result<isize, DaggerError> {
4792        let query = self.selection.select("maxUsedSpace");
4793        query.execute(self.graphql_client.clone()).await
4794    }
4795    /// The target amount of free disk space the garbage collector will attempt to leave.
4796    pub async fn min_free_space(&self) -> Result<isize, DaggerError> {
4797        let query = self.selection.select("minFreeSpace");
4798        query.execute(self.graphql_client.clone()).await
4799    }
4800    /// Prune the cache of releaseable entries
4801    pub async fn prune(&self) -> Result<Void, DaggerError> {
4802        let query = self.selection.select("prune");
4803        query.execute(self.graphql_client.clone()).await
4804    }
4805    pub async fn reserved_space(&self) -> Result<isize, DaggerError> {
4806        let query = self.selection.select("reservedSpace");
4807        query.execute(self.graphql_client.clone()).await
4808    }
4809}
4810#[derive(Clone)]
4811pub struct EngineCacheEntry {
4812    pub proc: Option<Arc<DaggerSessionProc>>,
4813    pub selection: Selection,
4814    pub graphql_client: DynGraphQLClient,
4815}
4816impl EngineCacheEntry {
4817    /// Whether the cache entry is actively being used.
4818    pub async fn actively_used(&self) -> Result<bool, DaggerError> {
4819        let query = self.selection.select("activelyUsed");
4820        query.execute(self.graphql_client.clone()).await
4821    }
4822    /// The time the cache entry was created, in Unix nanoseconds.
4823    pub async fn created_time_unix_nano(&self) -> Result<isize, DaggerError> {
4824        let query = self.selection.select("createdTimeUnixNano");
4825        query.execute(self.graphql_client.clone()).await
4826    }
4827    /// The description of the cache entry.
4828    pub async fn description(&self) -> Result<String, DaggerError> {
4829        let query = self.selection.select("description");
4830        query.execute(self.graphql_client.clone()).await
4831    }
4832    /// The disk space used by the cache entry.
4833    pub async fn disk_space_bytes(&self) -> Result<isize, DaggerError> {
4834        let query = self.selection.select("diskSpaceBytes");
4835        query.execute(self.graphql_client.clone()).await
4836    }
4837    /// A unique identifier for this EngineCacheEntry.
4838    pub async fn id(&self) -> Result<EngineCacheEntryId, DaggerError> {
4839        let query = self.selection.select("id");
4840        query.execute(self.graphql_client.clone()).await
4841    }
4842    /// The most recent time the cache entry was used, in Unix nanoseconds.
4843    pub async fn most_recent_use_time_unix_nano(&self) -> Result<isize, DaggerError> {
4844        let query = self.selection.select("mostRecentUseTimeUnixNano");
4845        query.execute(self.graphql_client.clone()).await
4846    }
4847}
4848#[derive(Clone)]
4849pub struct EngineCacheEntrySet {
4850    pub proc: Option<Arc<DaggerSessionProc>>,
4851    pub selection: Selection,
4852    pub graphql_client: DynGraphQLClient,
4853}
4854impl EngineCacheEntrySet {
4855    /// The total disk space used by the cache entries in this set.
4856    pub async fn disk_space_bytes(&self) -> Result<isize, DaggerError> {
4857        let query = self.selection.select("diskSpaceBytes");
4858        query.execute(self.graphql_client.clone()).await
4859    }
4860    /// The list of individual cache entries in the set
4861    pub fn entries(&self) -> Vec<EngineCacheEntry> {
4862        let query = self.selection.select("entries");
4863        vec![EngineCacheEntry {
4864            proc: self.proc.clone(),
4865            selection: query,
4866            graphql_client: self.graphql_client.clone(),
4867        }]
4868    }
4869    /// The number of cache entries in this set.
4870    pub async fn entry_count(&self) -> Result<isize, DaggerError> {
4871        let query = self.selection.select("entryCount");
4872        query.execute(self.graphql_client.clone()).await
4873    }
4874    /// A unique identifier for this EngineCacheEntrySet.
4875    pub async fn id(&self) -> Result<EngineCacheEntrySetId, DaggerError> {
4876        let query = self.selection.select("id");
4877        query.execute(self.graphql_client.clone()).await
4878    }
4879}
4880#[derive(Clone)]
4881pub struct EnumTypeDef {
4882    pub proc: Option<Arc<DaggerSessionProc>>,
4883    pub selection: Selection,
4884    pub graphql_client: DynGraphQLClient,
4885}
4886impl EnumTypeDef {
4887    /// A doc string for the enum, if any.
4888    pub async fn description(&self) -> Result<String, DaggerError> {
4889        let query = self.selection.select("description");
4890        query.execute(self.graphql_client.clone()).await
4891    }
4892    /// A unique identifier for this EnumTypeDef.
4893    pub async fn id(&self) -> Result<EnumTypeDefId, DaggerError> {
4894        let query = self.selection.select("id");
4895        query.execute(self.graphql_client.clone()).await
4896    }
4897    /// The name of the enum.
4898    pub async fn name(&self) -> Result<String, DaggerError> {
4899        let query = self.selection.select("name");
4900        query.execute(self.graphql_client.clone()).await
4901    }
4902    /// The location of this enum declaration.
4903    pub fn source_map(&self) -> SourceMap {
4904        let query = self.selection.select("sourceMap");
4905        SourceMap {
4906            proc: self.proc.clone(),
4907            selection: query,
4908            graphql_client: self.graphql_client.clone(),
4909        }
4910    }
4911    /// If this EnumTypeDef is associated with a Module, the name of the module. Unset otherwise.
4912    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
4913        let query = self.selection.select("sourceModuleName");
4914        query.execute(self.graphql_client.clone()).await
4915    }
4916    /// The values of the enum.
4917    pub fn values(&self) -> Vec<EnumValueTypeDef> {
4918        let query = self.selection.select("values");
4919        vec![EnumValueTypeDef {
4920            proc: self.proc.clone(),
4921            selection: query,
4922            graphql_client: self.graphql_client.clone(),
4923        }]
4924    }
4925}
4926#[derive(Clone)]
4927pub struct EnumValueTypeDef {
4928    pub proc: Option<Arc<DaggerSessionProc>>,
4929    pub selection: Selection,
4930    pub graphql_client: DynGraphQLClient,
4931}
4932impl EnumValueTypeDef {
4933    /// A doc string for the enum value, if any.
4934    pub async fn description(&self) -> Result<String, DaggerError> {
4935        let query = self.selection.select("description");
4936        query.execute(self.graphql_client.clone()).await
4937    }
4938    /// A unique identifier for this EnumValueTypeDef.
4939    pub async fn id(&self) -> Result<EnumValueTypeDefId, DaggerError> {
4940        let query = self.selection.select("id");
4941        query.execute(self.graphql_client.clone()).await
4942    }
4943    /// The name of the enum value.
4944    pub async fn name(&self) -> Result<String, DaggerError> {
4945        let query = self.selection.select("name");
4946        query.execute(self.graphql_client.clone()).await
4947    }
4948    /// The location of this enum value declaration.
4949    pub fn source_map(&self) -> SourceMap {
4950        let query = self.selection.select("sourceMap");
4951        SourceMap {
4952            proc: self.proc.clone(),
4953            selection: query,
4954            graphql_client: self.graphql_client.clone(),
4955        }
4956    }
4957}
4958#[derive(Clone)]
4959pub struct EnvVariable {
4960    pub proc: Option<Arc<DaggerSessionProc>>,
4961    pub selection: Selection,
4962    pub graphql_client: DynGraphQLClient,
4963}
4964impl EnvVariable {
4965    /// A unique identifier for this EnvVariable.
4966    pub async fn id(&self) -> Result<EnvVariableId, DaggerError> {
4967        let query = self.selection.select("id");
4968        query.execute(self.graphql_client.clone()).await
4969    }
4970    /// The environment variable name.
4971    pub async fn name(&self) -> Result<String, DaggerError> {
4972        let query = self.selection.select("name");
4973        query.execute(self.graphql_client.clone()).await
4974    }
4975    /// The environment variable value.
4976    pub async fn value(&self) -> Result<String, DaggerError> {
4977        let query = self.selection.select("value");
4978        query.execute(self.graphql_client.clone()).await
4979    }
4980}
4981#[derive(Clone)]
4982pub struct Error {
4983    pub proc: Option<Arc<DaggerSessionProc>>,
4984    pub selection: Selection,
4985    pub graphql_client: DynGraphQLClient,
4986}
4987impl Error {
4988    /// A unique identifier for this Error.
4989    pub async fn id(&self) -> Result<ErrorId, DaggerError> {
4990        let query = self.selection.select("id");
4991        query.execute(self.graphql_client.clone()).await
4992    }
4993    /// A description of the error.
4994    pub async fn message(&self) -> Result<String, DaggerError> {
4995        let query = self.selection.select("message");
4996        query.execute(self.graphql_client.clone()).await
4997    }
4998    /// The extensions of the error.
4999    pub fn values(&self) -> Vec<ErrorValue> {
5000        let query = self.selection.select("values");
5001        vec![ErrorValue {
5002            proc: self.proc.clone(),
5003            selection: query,
5004            graphql_client: self.graphql_client.clone(),
5005        }]
5006    }
5007    /// Add a value to the error.
5008    ///
5009    /// # Arguments
5010    ///
5011    /// * `name` - The name of the value.
5012    /// * `value` - The value to store on the error.
5013    pub fn with_value(&self, name: impl Into<String>, value: Json) -> Error {
5014        let mut query = self.selection.select("withValue");
5015        query = query.arg("name", name.into());
5016        query = query.arg("value", value);
5017        Error {
5018            proc: self.proc.clone(),
5019            selection: query,
5020            graphql_client: self.graphql_client.clone(),
5021        }
5022    }
5023}
5024#[derive(Clone)]
5025pub struct ErrorValue {
5026    pub proc: Option<Arc<DaggerSessionProc>>,
5027    pub selection: Selection,
5028    pub graphql_client: DynGraphQLClient,
5029}
5030impl ErrorValue {
5031    /// A unique identifier for this ErrorValue.
5032    pub async fn id(&self) -> Result<ErrorValueId, DaggerError> {
5033        let query = self.selection.select("id");
5034        query.execute(self.graphql_client.clone()).await
5035    }
5036    /// The name of the value.
5037    pub async fn name(&self) -> Result<String, DaggerError> {
5038        let query = self.selection.select("name");
5039        query.execute(self.graphql_client.clone()).await
5040    }
5041    /// The value.
5042    pub async fn value(&self) -> Result<Json, DaggerError> {
5043        let query = self.selection.select("value");
5044        query.execute(self.graphql_client.clone()).await
5045    }
5046}
5047#[derive(Clone)]
5048pub struct FieldTypeDef {
5049    pub proc: Option<Arc<DaggerSessionProc>>,
5050    pub selection: Selection,
5051    pub graphql_client: DynGraphQLClient,
5052}
5053impl FieldTypeDef {
5054    /// A doc string for the field, if any.
5055    pub async fn description(&self) -> Result<String, DaggerError> {
5056        let query = self.selection.select("description");
5057        query.execute(self.graphql_client.clone()).await
5058    }
5059    /// A unique identifier for this FieldTypeDef.
5060    pub async fn id(&self) -> Result<FieldTypeDefId, DaggerError> {
5061        let query = self.selection.select("id");
5062        query.execute(self.graphql_client.clone()).await
5063    }
5064    /// The name of the field in lowerCamelCase format.
5065    pub async fn name(&self) -> Result<String, DaggerError> {
5066        let query = self.selection.select("name");
5067        query.execute(self.graphql_client.clone()).await
5068    }
5069    /// The location of this field declaration.
5070    pub fn source_map(&self) -> SourceMap {
5071        let query = self.selection.select("sourceMap");
5072        SourceMap {
5073            proc: self.proc.clone(),
5074            selection: query,
5075            graphql_client: self.graphql_client.clone(),
5076        }
5077    }
5078    /// The type of the field.
5079    pub fn type_def(&self) -> TypeDef {
5080        let query = self.selection.select("typeDef");
5081        TypeDef {
5082            proc: self.proc.clone(),
5083            selection: query,
5084            graphql_client: self.graphql_client.clone(),
5085        }
5086    }
5087}
5088#[derive(Clone)]
5089pub struct File {
5090    pub proc: Option<Arc<DaggerSessionProc>>,
5091    pub selection: Selection,
5092    pub graphql_client: DynGraphQLClient,
5093}
5094#[derive(Builder, Debug, PartialEq)]
5095pub struct FileDigestOpts {
5096    /// If true, exclude metadata from the digest.
5097    #[builder(setter(into, strip_option), default)]
5098    pub exclude_metadata: Option<bool>,
5099}
5100#[derive(Builder, Debug, PartialEq)]
5101pub struct FileExportOpts {
5102    /// If allowParentDirPath is true, the path argument can be a directory path, in which case the file will be created in that directory.
5103    #[builder(setter(into, strip_option), default)]
5104    pub allow_parent_dir_path: Option<bool>,
5105}
5106impl File {
5107    /// Retrieves the contents of the file.
5108    pub async fn contents(&self) -> Result<String, DaggerError> {
5109        let query = self.selection.select("contents");
5110        query.execute(self.graphql_client.clone()).await
5111    }
5112    /// 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.
5113    ///
5114    /// # Arguments
5115    ///
5116    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5117    pub async fn digest(&self) -> Result<String, DaggerError> {
5118        let query = self.selection.select("digest");
5119        query.execute(self.graphql_client.clone()).await
5120    }
5121    /// 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.
5122    ///
5123    /// # Arguments
5124    ///
5125    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5126    pub async fn digest_opts(&self, opts: FileDigestOpts) -> Result<String, DaggerError> {
5127        let mut query = self.selection.select("digest");
5128        if let Some(exclude_metadata) = opts.exclude_metadata {
5129            query = query.arg("excludeMetadata", exclude_metadata);
5130        }
5131        query.execute(self.graphql_client.clone()).await
5132    }
5133    /// Writes the file to a file path on the host.
5134    ///
5135    /// # Arguments
5136    ///
5137    /// * `path` - Location of the written directory (e.g., "output.txt").
5138    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5139    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
5140        let mut query = self.selection.select("export");
5141        query = query.arg("path", path.into());
5142        query.execute(self.graphql_client.clone()).await
5143    }
5144    /// Writes the file to a file path on the host.
5145    ///
5146    /// # Arguments
5147    ///
5148    /// * `path` - Location of the written directory (e.g., "output.txt").
5149    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5150    pub async fn export_opts(
5151        &self,
5152        path: impl Into<String>,
5153        opts: FileExportOpts,
5154    ) -> Result<String, DaggerError> {
5155        let mut query = self.selection.select("export");
5156        query = query.arg("path", path.into());
5157        if let Some(allow_parent_dir_path) = opts.allow_parent_dir_path {
5158            query = query.arg("allowParentDirPath", allow_parent_dir_path);
5159        }
5160        query.execute(self.graphql_client.clone()).await
5161    }
5162    /// A unique identifier for this File.
5163    pub async fn id(&self) -> Result<FileId, DaggerError> {
5164        let query = self.selection.select("id");
5165        query.execute(self.graphql_client.clone()).await
5166    }
5167    /// Retrieves the name of the file.
5168    pub async fn name(&self) -> Result<String, DaggerError> {
5169        let query = self.selection.select("name");
5170        query.execute(self.graphql_client.clone()).await
5171    }
5172    /// Retrieves the size of the file, in bytes.
5173    pub async fn size(&self) -> Result<isize, DaggerError> {
5174        let query = self.selection.select("size");
5175        query.execute(self.graphql_client.clone()).await
5176    }
5177    /// Force evaluation in the engine.
5178    pub async fn sync(&self) -> Result<FileId, DaggerError> {
5179        let query = self.selection.select("sync");
5180        query.execute(self.graphql_client.clone()).await
5181    }
5182    /// Retrieves this file with its name set to the given name.
5183    ///
5184    /// # Arguments
5185    ///
5186    /// * `name` - Name to set file to.
5187    pub fn with_name(&self, name: impl Into<String>) -> File {
5188        let mut query = self.selection.select("withName");
5189        query = query.arg("name", name.into());
5190        File {
5191            proc: self.proc.clone(),
5192            selection: query,
5193            graphql_client: self.graphql_client.clone(),
5194        }
5195    }
5196    /// Retrieves this file with its created/modified timestamps set to the given time.
5197    ///
5198    /// # Arguments
5199    ///
5200    /// * `timestamp` - Timestamp to set dir/files in.
5201    ///
5202    /// Formatted in seconds following Unix epoch (e.g., 1672531199).
5203    pub fn with_timestamps(&self, timestamp: isize) -> File {
5204        let mut query = self.selection.select("withTimestamps");
5205        query = query.arg("timestamp", timestamp);
5206        File {
5207            proc: self.proc.clone(),
5208            selection: query,
5209            graphql_client: self.graphql_client.clone(),
5210        }
5211    }
5212}
5213#[derive(Clone)]
5214pub struct Function {
5215    pub proc: Option<Arc<DaggerSessionProc>>,
5216    pub selection: Selection,
5217    pub graphql_client: DynGraphQLClient,
5218}
5219#[derive(Builder, Debug, PartialEq)]
5220pub struct FunctionWithArgOpts<'a> {
5221    /// If the argument is a Directory or File type, default to load path from context directory, relative to root directory.
5222    #[builder(setter(into, strip_option), default)]
5223    pub default_path: Option<&'a str>,
5224    /// A default value to use for this argument if not explicitly set by the caller, if any
5225    #[builder(setter(into, strip_option), default)]
5226    pub default_value: Option<Json>,
5227    /// A doc string for the argument, if any
5228    #[builder(setter(into, strip_option), default)]
5229    pub description: Option<&'a str>,
5230    /// Patterns to ignore when loading the contextual argument value.
5231    #[builder(setter(into, strip_option), default)]
5232    pub ignore: Option<Vec<&'a str>>,
5233    #[builder(setter(into, strip_option), default)]
5234    pub source_map: Option<SourceMapId>,
5235}
5236impl Function {
5237    /// Arguments accepted by the function, if any.
5238    pub fn args(&self) -> Vec<FunctionArg> {
5239        let query = self.selection.select("args");
5240        vec![FunctionArg {
5241            proc: self.proc.clone(),
5242            selection: query,
5243            graphql_client: self.graphql_client.clone(),
5244        }]
5245    }
5246    /// A doc string for the function, if any.
5247    pub async fn description(&self) -> Result<String, DaggerError> {
5248        let query = self.selection.select("description");
5249        query.execute(self.graphql_client.clone()).await
5250    }
5251    /// A unique identifier for this Function.
5252    pub async fn id(&self) -> Result<FunctionId, DaggerError> {
5253        let query = self.selection.select("id");
5254        query.execute(self.graphql_client.clone()).await
5255    }
5256    /// The name of the function.
5257    pub async fn name(&self) -> Result<String, DaggerError> {
5258        let query = self.selection.select("name");
5259        query.execute(self.graphql_client.clone()).await
5260    }
5261    /// The type returned by the function.
5262    pub fn return_type(&self) -> TypeDef {
5263        let query = self.selection.select("returnType");
5264        TypeDef {
5265            proc: self.proc.clone(),
5266            selection: query,
5267            graphql_client: self.graphql_client.clone(),
5268        }
5269    }
5270    /// The location of this function declaration.
5271    pub fn source_map(&self) -> SourceMap {
5272        let query = self.selection.select("sourceMap");
5273        SourceMap {
5274            proc: self.proc.clone(),
5275            selection: query,
5276            graphql_client: self.graphql_client.clone(),
5277        }
5278    }
5279    /// Returns the function with the provided argument
5280    ///
5281    /// # Arguments
5282    ///
5283    /// * `name` - The name of the argument
5284    /// * `type_def` - The type of the argument
5285    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5286    pub fn with_arg(&self, name: impl Into<String>, type_def: impl IntoID<TypeDefId>) -> Function {
5287        let mut query = self.selection.select("withArg");
5288        query = query.arg("name", name.into());
5289        query = query.arg_lazy(
5290            "typeDef",
5291            Box::new(move || {
5292                let type_def = type_def.clone();
5293                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
5294            }),
5295        );
5296        Function {
5297            proc: self.proc.clone(),
5298            selection: query,
5299            graphql_client: self.graphql_client.clone(),
5300        }
5301    }
5302    /// Returns the function with the provided argument
5303    ///
5304    /// # Arguments
5305    ///
5306    /// * `name` - The name of the argument
5307    /// * `type_def` - The type of the argument
5308    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5309    pub fn with_arg_opts<'a>(
5310        &self,
5311        name: impl Into<String>,
5312        type_def: impl IntoID<TypeDefId>,
5313        opts: FunctionWithArgOpts<'a>,
5314    ) -> Function {
5315        let mut query = self.selection.select("withArg");
5316        query = query.arg("name", name.into());
5317        query = query.arg_lazy(
5318            "typeDef",
5319            Box::new(move || {
5320                let type_def = type_def.clone();
5321                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
5322            }),
5323        );
5324        if let Some(description) = opts.description {
5325            query = query.arg("description", description);
5326        }
5327        if let Some(default_value) = opts.default_value {
5328            query = query.arg("defaultValue", default_value);
5329        }
5330        if let Some(default_path) = opts.default_path {
5331            query = query.arg("defaultPath", default_path);
5332        }
5333        if let Some(ignore) = opts.ignore {
5334            query = query.arg("ignore", ignore);
5335        }
5336        if let Some(source_map) = opts.source_map {
5337            query = query.arg("sourceMap", source_map);
5338        }
5339        Function {
5340            proc: self.proc.clone(),
5341            selection: query,
5342            graphql_client: self.graphql_client.clone(),
5343        }
5344    }
5345    /// Returns the function with the given doc string.
5346    ///
5347    /// # Arguments
5348    ///
5349    /// * `description` - The doc string to set.
5350    pub fn with_description(&self, description: impl Into<String>) -> Function {
5351        let mut query = self.selection.select("withDescription");
5352        query = query.arg("description", description.into());
5353        Function {
5354            proc: self.proc.clone(),
5355            selection: query,
5356            graphql_client: self.graphql_client.clone(),
5357        }
5358    }
5359    /// Returns the function with the given source map.
5360    ///
5361    /// # Arguments
5362    ///
5363    /// * `source_map` - The source map for the function definition.
5364    pub fn with_source_map(&self, source_map: impl IntoID<SourceMapId>) -> Function {
5365        let mut query = self.selection.select("withSourceMap");
5366        query = query.arg_lazy(
5367            "sourceMap",
5368            Box::new(move || {
5369                let source_map = source_map.clone();
5370                Box::pin(async move { source_map.into_id().await.unwrap().quote() })
5371            }),
5372        );
5373        Function {
5374            proc: self.proc.clone(),
5375            selection: query,
5376            graphql_client: self.graphql_client.clone(),
5377        }
5378    }
5379}
5380#[derive(Clone)]
5381pub struct FunctionArg {
5382    pub proc: Option<Arc<DaggerSessionProc>>,
5383    pub selection: Selection,
5384    pub graphql_client: DynGraphQLClient,
5385}
5386impl FunctionArg {
5387    /// 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
5388    pub async fn default_path(&self) -> Result<String, DaggerError> {
5389        let query = self.selection.select("defaultPath");
5390        query.execute(self.graphql_client.clone()).await
5391    }
5392    /// A default value to use for this argument when not explicitly set by the caller, if any.
5393    pub async fn default_value(&self) -> Result<Json, DaggerError> {
5394        let query = self.selection.select("defaultValue");
5395        query.execute(self.graphql_client.clone()).await
5396    }
5397    /// A doc string for the argument, if any.
5398    pub async fn description(&self) -> Result<String, DaggerError> {
5399        let query = self.selection.select("description");
5400        query.execute(self.graphql_client.clone()).await
5401    }
5402    /// A unique identifier for this FunctionArg.
5403    pub async fn id(&self) -> Result<FunctionArgId, DaggerError> {
5404        let query = self.selection.select("id");
5405        query.execute(self.graphql_client.clone()).await
5406    }
5407    /// 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.
5408    pub async fn ignore(&self) -> Result<Vec<String>, DaggerError> {
5409        let query = self.selection.select("ignore");
5410        query.execute(self.graphql_client.clone()).await
5411    }
5412    /// The name of the argument in lowerCamelCase format.
5413    pub async fn name(&self) -> Result<String, DaggerError> {
5414        let query = self.selection.select("name");
5415        query.execute(self.graphql_client.clone()).await
5416    }
5417    /// The location of this arg declaration.
5418    pub fn source_map(&self) -> SourceMap {
5419        let query = self.selection.select("sourceMap");
5420        SourceMap {
5421            proc: self.proc.clone(),
5422            selection: query,
5423            graphql_client: self.graphql_client.clone(),
5424        }
5425    }
5426    /// The type of the argument.
5427    pub fn type_def(&self) -> TypeDef {
5428        let query = self.selection.select("typeDef");
5429        TypeDef {
5430            proc: self.proc.clone(),
5431            selection: query,
5432            graphql_client: self.graphql_client.clone(),
5433        }
5434    }
5435}
5436#[derive(Clone)]
5437pub struct FunctionCall {
5438    pub proc: Option<Arc<DaggerSessionProc>>,
5439    pub selection: Selection,
5440    pub graphql_client: DynGraphQLClient,
5441}
5442impl FunctionCall {
5443    /// A unique identifier for this FunctionCall.
5444    pub async fn id(&self) -> Result<FunctionCallId, DaggerError> {
5445        let query = self.selection.select("id");
5446        query.execute(self.graphql_client.clone()).await
5447    }
5448    /// The argument values the function is being invoked with.
5449    pub fn input_args(&self) -> Vec<FunctionCallArgValue> {
5450        let query = self.selection.select("inputArgs");
5451        vec![FunctionCallArgValue {
5452            proc: self.proc.clone(),
5453            selection: query,
5454            graphql_client: self.graphql_client.clone(),
5455        }]
5456    }
5457    /// The name of the function being called.
5458    pub async fn name(&self) -> Result<String, DaggerError> {
5459        let query = self.selection.select("name");
5460        query.execute(self.graphql_client.clone()).await
5461    }
5462    /// 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.
5463    pub async fn parent(&self) -> Result<Json, DaggerError> {
5464        let query = self.selection.select("parent");
5465        query.execute(self.graphql_client.clone()).await
5466    }
5467    /// 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.
5468    pub async fn parent_name(&self) -> Result<String, DaggerError> {
5469        let query = self.selection.select("parentName");
5470        query.execute(self.graphql_client.clone()).await
5471    }
5472    /// Return an error from the function.
5473    ///
5474    /// # Arguments
5475    ///
5476    /// * `error` - The error to return.
5477    pub async fn return_error(&self, error: impl IntoID<ErrorId>) -> Result<Void, DaggerError> {
5478        let mut query = self.selection.select("returnError");
5479        query = query.arg_lazy(
5480            "error",
5481            Box::new(move || {
5482                let error = error.clone();
5483                Box::pin(async move { error.into_id().await.unwrap().quote() })
5484            }),
5485        );
5486        query.execute(self.graphql_client.clone()).await
5487    }
5488    /// Set the return value of the function call to the provided value.
5489    ///
5490    /// # Arguments
5491    ///
5492    /// * `value` - JSON serialization of the return value.
5493    pub async fn return_value(&self, value: Json) -> Result<Void, DaggerError> {
5494        let mut query = self.selection.select("returnValue");
5495        query = query.arg("value", value);
5496        query.execute(self.graphql_client.clone()).await
5497    }
5498}
5499#[derive(Clone)]
5500pub struct FunctionCallArgValue {
5501    pub proc: Option<Arc<DaggerSessionProc>>,
5502    pub selection: Selection,
5503    pub graphql_client: DynGraphQLClient,
5504}
5505impl FunctionCallArgValue {
5506    /// A unique identifier for this FunctionCallArgValue.
5507    pub async fn id(&self) -> Result<FunctionCallArgValueId, DaggerError> {
5508        let query = self.selection.select("id");
5509        query.execute(self.graphql_client.clone()).await
5510    }
5511    /// The name of the argument.
5512    pub async fn name(&self) -> Result<String, DaggerError> {
5513        let query = self.selection.select("name");
5514        query.execute(self.graphql_client.clone()).await
5515    }
5516    /// The value of the argument represented as a JSON serialized string.
5517    pub async fn value(&self) -> Result<Json, DaggerError> {
5518        let query = self.selection.select("value");
5519        query.execute(self.graphql_client.clone()).await
5520    }
5521}
5522#[derive(Clone)]
5523pub struct GeneratedCode {
5524    pub proc: Option<Arc<DaggerSessionProc>>,
5525    pub selection: Selection,
5526    pub graphql_client: DynGraphQLClient,
5527}
5528impl GeneratedCode {
5529    /// The directory containing the generated code.
5530    pub fn code(&self) -> Directory {
5531        let query = self.selection.select("code");
5532        Directory {
5533            proc: self.proc.clone(),
5534            selection: query,
5535            graphql_client: self.graphql_client.clone(),
5536        }
5537    }
5538    /// A unique identifier for this GeneratedCode.
5539    pub async fn id(&self) -> Result<GeneratedCodeId, DaggerError> {
5540        let query = self.selection.select("id");
5541        query.execute(self.graphql_client.clone()).await
5542    }
5543    /// List of paths to mark generated in version control (i.e. .gitattributes).
5544    pub async fn vcs_generated_paths(&self) -> Result<Vec<String>, DaggerError> {
5545        let query = self.selection.select("vcsGeneratedPaths");
5546        query.execute(self.graphql_client.clone()).await
5547    }
5548    /// List of paths to ignore in version control (i.e. .gitignore).
5549    pub async fn vcs_ignored_paths(&self) -> Result<Vec<String>, DaggerError> {
5550        let query = self.selection.select("vcsIgnoredPaths");
5551        query.execute(self.graphql_client.clone()).await
5552    }
5553    /// Set the list of paths to mark generated in version control.
5554    pub fn with_vcs_generated_paths(&self, paths: Vec<impl Into<String>>) -> GeneratedCode {
5555        let mut query = self.selection.select("withVCSGeneratedPaths");
5556        query = query.arg(
5557            "paths",
5558            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
5559        );
5560        GeneratedCode {
5561            proc: self.proc.clone(),
5562            selection: query,
5563            graphql_client: self.graphql_client.clone(),
5564        }
5565    }
5566    /// Set the list of paths to ignore in version control.
5567    pub fn with_vcs_ignored_paths(&self, paths: Vec<impl Into<String>>) -> GeneratedCode {
5568        let mut query = self.selection.select("withVCSIgnoredPaths");
5569        query = query.arg(
5570            "paths",
5571            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
5572        );
5573        GeneratedCode {
5574            proc: self.proc.clone(),
5575            selection: query,
5576            graphql_client: self.graphql_client.clone(),
5577        }
5578    }
5579}
5580#[derive(Clone)]
5581pub struct GitRef {
5582    pub proc: Option<Arc<DaggerSessionProc>>,
5583    pub selection: Selection,
5584    pub graphql_client: DynGraphQLClient,
5585}
5586#[derive(Builder, Debug, PartialEq)]
5587pub struct GitRefTreeOpts {
5588    /// Set to true to discard .git directory.
5589    #[builder(setter(into, strip_option), default)]
5590    pub discard_git_dir: Option<bool>,
5591}
5592impl GitRef {
5593    /// The resolved commit id at this ref.
5594    pub async fn commit(&self) -> Result<String, DaggerError> {
5595        let query = self.selection.select("commit");
5596        query.execute(self.graphql_client.clone()).await
5597    }
5598    /// A unique identifier for this GitRef.
5599    pub async fn id(&self) -> Result<GitRefId, DaggerError> {
5600        let query = self.selection.select("id");
5601        query.execute(self.graphql_client.clone()).await
5602    }
5603    /// The filesystem tree at this ref.
5604    ///
5605    /// # Arguments
5606    ///
5607    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5608    pub fn tree(&self) -> Directory {
5609        let query = self.selection.select("tree");
5610        Directory {
5611            proc: self.proc.clone(),
5612            selection: query,
5613            graphql_client: self.graphql_client.clone(),
5614        }
5615    }
5616    /// The filesystem tree at this ref.
5617    ///
5618    /// # Arguments
5619    ///
5620    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5621    pub fn tree_opts(&self, opts: GitRefTreeOpts) -> Directory {
5622        let mut query = self.selection.select("tree");
5623        if let Some(discard_git_dir) = opts.discard_git_dir {
5624            query = query.arg("discardGitDir", discard_git_dir);
5625        }
5626        Directory {
5627            proc: self.proc.clone(),
5628            selection: query,
5629            graphql_client: self.graphql_client.clone(),
5630        }
5631    }
5632}
5633#[derive(Clone)]
5634pub struct GitRepository {
5635    pub proc: Option<Arc<DaggerSessionProc>>,
5636    pub selection: Selection,
5637    pub graphql_client: DynGraphQLClient,
5638}
5639#[derive(Builder, Debug, PartialEq)]
5640pub struct GitRepositoryTagsOpts<'a> {
5641    /// Glob patterns (e.g., "refs/tags/v*").
5642    #[builder(setter(into, strip_option), default)]
5643    pub patterns: Option<Vec<&'a str>>,
5644}
5645impl GitRepository {
5646    /// Returns details of a branch.
5647    ///
5648    /// # Arguments
5649    ///
5650    /// * `name` - Branch's name (e.g., "main").
5651    pub fn branch(&self, name: impl Into<String>) -> GitRef {
5652        let mut query = self.selection.select("branch");
5653        query = query.arg("name", name.into());
5654        GitRef {
5655            proc: self.proc.clone(),
5656            selection: query,
5657            graphql_client: self.graphql_client.clone(),
5658        }
5659    }
5660    /// Returns details of a commit.
5661    ///
5662    /// # Arguments
5663    ///
5664    /// * `id` - Identifier of the commit (e.g., "b6315d8f2810962c601af73f86831f6866ea798b").
5665    pub fn commit(&self, id: impl Into<String>) -> GitRef {
5666        let mut query = self.selection.select("commit");
5667        query = query.arg("id", id.into());
5668        GitRef {
5669            proc: self.proc.clone(),
5670            selection: query,
5671            graphql_client: self.graphql_client.clone(),
5672        }
5673    }
5674    /// Returns details for HEAD.
5675    pub fn head(&self) -> GitRef {
5676        let query = self.selection.select("head");
5677        GitRef {
5678            proc: self.proc.clone(),
5679            selection: query,
5680            graphql_client: self.graphql_client.clone(),
5681        }
5682    }
5683    /// A unique identifier for this GitRepository.
5684    pub async fn id(&self) -> Result<GitRepositoryId, DaggerError> {
5685        let query = self.selection.select("id");
5686        query.execute(self.graphql_client.clone()).await
5687    }
5688    /// Returns details of a ref.
5689    ///
5690    /// # Arguments
5691    ///
5692    /// * `name` - Ref's name (can be a commit identifier, a tag name, a branch name, or a fully-qualified ref).
5693    pub fn r#ref(&self, name: impl Into<String>) -> GitRef {
5694        let mut query = self.selection.select("ref");
5695        query = query.arg("name", name.into());
5696        GitRef {
5697            proc: self.proc.clone(),
5698            selection: query,
5699            graphql_client: self.graphql_client.clone(),
5700        }
5701    }
5702    /// Returns details of a tag.
5703    ///
5704    /// # Arguments
5705    ///
5706    /// * `name` - Tag's name (e.g., "v0.3.9").
5707    pub fn tag(&self, name: impl Into<String>) -> GitRef {
5708        let mut query = self.selection.select("tag");
5709        query = query.arg("name", name.into());
5710        GitRef {
5711            proc: self.proc.clone(),
5712            selection: query,
5713            graphql_client: self.graphql_client.clone(),
5714        }
5715    }
5716    /// tags that match any of the given glob patterns.
5717    ///
5718    /// # Arguments
5719    ///
5720    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5721    pub async fn tags(&self) -> Result<Vec<String>, DaggerError> {
5722        let query = self.selection.select("tags");
5723        query.execute(self.graphql_client.clone()).await
5724    }
5725    /// tags that match any of the given glob patterns.
5726    ///
5727    /// # Arguments
5728    ///
5729    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5730    pub async fn tags_opts<'a>(
5731        &self,
5732        opts: GitRepositoryTagsOpts<'a>,
5733    ) -> Result<Vec<String>, DaggerError> {
5734        let mut query = self.selection.select("tags");
5735        if let Some(patterns) = opts.patterns {
5736            query = query.arg("patterns", patterns);
5737        }
5738        query.execute(self.graphql_client.clone()).await
5739    }
5740    /// Header to authenticate the remote with.
5741    ///
5742    /// # Arguments
5743    ///
5744    /// * `header` - Secret used to populate the Authorization HTTP header
5745    pub fn with_auth_header(&self, header: impl IntoID<SecretId>) -> GitRepository {
5746        let mut query = self.selection.select("withAuthHeader");
5747        query = query.arg_lazy(
5748            "header",
5749            Box::new(move || {
5750                let header = header.clone();
5751                Box::pin(async move { header.into_id().await.unwrap().quote() })
5752            }),
5753        );
5754        GitRepository {
5755            proc: self.proc.clone(),
5756            selection: query,
5757            graphql_client: self.graphql_client.clone(),
5758        }
5759    }
5760    /// Token to authenticate the remote with.
5761    ///
5762    /// # Arguments
5763    ///
5764    /// * `token` - Secret used to populate the password during basic HTTP Authorization
5765    pub fn with_auth_token(&self, token: impl IntoID<SecretId>) -> GitRepository {
5766        let mut query = self.selection.select("withAuthToken");
5767        query = query.arg_lazy(
5768            "token",
5769            Box::new(move || {
5770                let token = token.clone();
5771                Box::pin(async move { token.into_id().await.unwrap().quote() })
5772            }),
5773        );
5774        GitRepository {
5775            proc: self.proc.clone(),
5776            selection: query,
5777            graphql_client: self.graphql_client.clone(),
5778        }
5779    }
5780}
5781#[derive(Clone)]
5782pub struct Host {
5783    pub proc: Option<Arc<DaggerSessionProc>>,
5784    pub selection: Selection,
5785    pub graphql_client: DynGraphQLClient,
5786}
5787#[derive(Builder, Debug, PartialEq)]
5788pub struct HostDirectoryOpts<'a> {
5789    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
5790    #[builder(setter(into, strip_option), default)]
5791    pub exclude: Option<Vec<&'a str>>,
5792    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
5793    #[builder(setter(into, strip_option), default)]
5794    pub include: Option<Vec<&'a str>>,
5795}
5796#[derive(Builder, Debug, PartialEq)]
5797pub struct HostServiceOpts<'a> {
5798    /// Upstream host to forward traffic to.
5799    #[builder(setter(into, strip_option), default)]
5800    pub host: Option<&'a str>,
5801}
5802#[derive(Builder, Debug, PartialEq)]
5803pub struct HostTunnelOpts {
5804    /// Map each service port to the same port on the host, as if the service were running natively.
5805    /// Note: enabling may result in port conflicts.
5806    #[builder(setter(into, strip_option), default)]
5807    pub native: Option<bool>,
5808    /// Configure explicit port forwarding rules for the tunnel.
5809    /// If a port's frontend is unspecified or 0, a random port will be chosen by the host.
5810    /// 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.
5811    /// If ports are given and native is true, the ports are additive.
5812    #[builder(setter(into, strip_option), default)]
5813    pub ports: Option<Vec<PortForward>>,
5814}
5815impl Host {
5816    /// Accesses a directory on the host.
5817    ///
5818    /// # Arguments
5819    ///
5820    /// * `path` - Location of the directory to access (e.g., ".").
5821    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5822    pub fn directory(&self, path: impl Into<String>) -> Directory {
5823        let mut query = self.selection.select("directory");
5824        query = query.arg("path", path.into());
5825        Directory {
5826            proc: self.proc.clone(),
5827            selection: query,
5828            graphql_client: self.graphql_client.clone(),
5829        }
5830    }
5831    /// Accesses a directory on the host.
5832    ///
5833    /// # Arguments
5834    ///
5835    /// * `path` - Location of the directory to access (e.g., ".").
5836    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5837    pub fn directory_opts<'a>(
5838        &self,
5839        path: impl Into<String>,
5840        opts: HostDirectoryOpts<'a>,
5841    ) -> Directory {
5842        let mut query = self.selection.select("directory");
5843        query = query.arg("path", path.into());
5844        if let Some(exclude) = opts.exclude {
5845            query = query.arg("exclude", exclude);
5846        }
5847        if let Some(include) = opts.include {
5848            query = query.arg("include", include);
5849        }
5850        Directory {
5851            proc: self.proc.clone(),
5852            selection: query,
5853            graphql_client: self.graphql_client.clone(),
5854        }
5855    }
5856    /// Accesses a file on the host.
5857    ///
5858    /// # Arguments
5859    ///
5860    /// * `path` - Location of the file to retrieve (e.g., "README.md").
5861    pub fn file(&self, path: impl Into<String>) -> File {
5862        let mut query = self.selection.select("file");
5863        query = query.arg("path", path.into());
5864        File {
5865            proc: self.proc.clone(),
5866            selection: query,
5867            graphql_client: self.graphql_client.clone(),
5868        }
5869    }
5870    /// A unique identifier for this Host.
5871    pub async fn id(&self) -> Result<HostId, DaggerError> {
5872        let query = self.selection.select("id");
5873        query.execute(self.graphql_client.clone()).await
5874    }
5875    /// Creates a service that forwards traffic to a specified address via the host.
5876    ///
5877    /// # Arguments
5878    ///
5879    /// * `ports` - Ports to expose via the service, forwarding through the host network.
5880    ///
5881    /// If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
5882    ///
5883    /// An empty set of ports is not valid; an error will be returned.
5884    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5885    pub fn service(&self, ports: Vec<PortForward>) -> Service {
5886        let mut query = self.selection.select("service");
5887        query = query.arg("ports", ports);
5888        Service {
5889            proc: self.proc.clone(),
5890            selection: query,
5891            graphql_client: self.graphql_client.clone(),
5892        }
5893    }
5894    /// Creates a service that forwards traffic to a specified address via the host.
5895    ///
5896    /// # Arguments
5897    ///
5898    /// * `ports` - Ports to expose via the service, forwarding through the host network.
5899    ///
5900    /// If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
5901    ///
5902    /// An empty set of ports is not valid; an error will be returned.
5903    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5904    pub fn service_opts<'a>(&self, ports: Vec<PortForward>, opts: HostServiceOpts<'a>) -> Service {
5905        let mut query = self.selection.select("service");
5906        query = query.arg("ports", ports);
5907        if let Some(host) = opts.host {
5908            query = query.arg("host", host);
5909        }
5910        Service {
5911            proc: self.proc.clone(),
5912            selection: query,
5913            graphql_client: self.graphql_client.clone(),
5914        }
5915    }
5916    /// Sets a secret given a user-defined name and the file path on the host, and returns the secret.
5917    /// The file is limited to a size of 512000 bytes.
5918    ///
5919    /// # Arguments
5920    ///
5921    /// * `name` - The user defined name for this secret.
5922    /// * `path` - Location of the file to set as a secret.
5923    pub fn set_secret_file(&self, name: impl Into<String>, path: impl Into<String>) -> Secret {
5924        let mut query = self.selection.select("setSecretFile");
5925        query = query.arg("name", name.into());
5926        query = query.arg("path", path.into());
5927        Secret {
5928            proc: self.proc.clone(),
5929            selection: query,
5930            graphql_client: self.graphql_client.clone(),
5931        }
5932    }
5933    /// Creates a tunnel that forwards traffic from the host to a service.
5934    ///
5935    /// # Arguments
5936    ///
5937    /// * `service` - Service to send traffic from the tunnel.
5938    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5939    pub fn tunnel(&self, service: impl IntoID<ServiceId>) -> Service {
5940        let mut query = self.selection.select("tunnel");
5941        query = query.arg_lazy(
5942            "service",
5943            Box::new(move || {
5944                let service = service.clone();
5945                Box::pin(async move { service.into_id().await.unwrap().quote() })
5946            }),
5947        );
5948        Service {
5949            proc: self.proc.clone(),
5950            selection: query,
5951            graphql_client: self.graphql_client.clone(),
5952        }
5953    }
5954    /// Creates a tunnel that forwards traffic from the host to a service.
5955    ///
5956    /// # Arguments
5957    ///
5958    /// * `service` - Service to send traffic from the tunnel.
5959    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5960    pub fn tunnel_opts(&self, service: impl IntoID<ServiceId>, opts: HostTunnelOpts) -> Service {
5961        let mut query = self.selection.select("tunnel");
5962        query = query.arg_lazy(
5963            "service",
5964            Box::new(move || {
5965                let service = service.clone();
5966                Box::pin(async move { service.into_id().await.unwrap().quote() })
5967            }),
5968        );
5969        if let Some(ports) = opts.ports {
5970            query = query.arg("ports", ports);
5971        }
5972        if let Some(native) = opts.native {
5973            query = query.arg("native", native);
5974        }
5975        Service {
5976            proc: self.proc.clone(),
5977            selection: query,
5978            graphql_client: self.graphql_client.clone(),
5979        }
5980    }
5981    /// Accesses a Unix socket on the host.
5982    ///
5983    /// # Arguments
5984    ///
5985    /// * `path` - Location of the Unix socket (e.g., "/var/run/docker.sock").
5986    pub fn unix_socket(&self, path: impl Into<String>) -> Socket {
5987        let mut query = self.selection.select("unixSocket");
5988        query = query.arg("path", path.into());
5989        Socket {
5990            proc: self.proc.clone(),
5991            selection: query,
5992            graphql_client: self.graphql_client.clone(),
5993        }
5994    }
5995}
5996#[derive(Clone)]
5997pub struct InputTypeDef {
5998    pub proc: Option<Arc<DaggerSessionProc>>,
5999    pub selection: Selection,
6000    pub graphql_client: DynGraphQLClient,
6001}
6002impl InputTypeDef {
6003    /// Static fields defined on this input object, if any.
6004    pub fn fields(&self) -> Vec<FieldTypeDef> {
6005        let query = self.selection.select("fields");
6006        vec![FieldTypeDef {
6007            proc: self.proc.clone(),
6008            selection: query,
6009            graphql_client: self.graphql_client.clone(),
6010        }]
6011    }
6012    /// A unique identifier for this InputTypeDef.
6013    pub async fn id(&self) -> Result<InputTypeDefId, DaggerError> {
6014        let query = self.selection.select("id");
6015        query.execute(self.graphql_client.clone()).await
6016    }
6017    /// The name of the input object.
6018    pub async fn name(&self) -> Result<String, DaggerError> {
6019        let query = self.selection.select("name");
6020        query.execute(self.graphql_client.clone()).await
6021    }
6022}
6023#[derive(Clone)]
6024pub struct InterfaceTypeDef {
6025    pub proc: Option<Arc<DaggerSessionProc>>,
6026    pub selection: Selection,
6027    pub graphql_client: DynGraphQLClient,
6028}
6029impl InterfaceTypeDef {
6030    /// The doc string for the interface, if any.
6031    pub async fn description(&self) -> Result<String, DaggerError> {
6032        let query = self.selection.select("description");
6033        query.execute(self.graphql_client.clone()).await
6034    }
6035    /// Functions defined on this interface, if any.
6036    pub fn functions(&self) -> Vec<Function> {
6037        let query = self.selection.select("functions");
6038        vec![Function {
6039            proc: self.proc.clone(),
6040            selection: query,
6041            graphql_client: self.graphql_client.clone(),
6042        }]
6043    }
6044    /// A unique identifier for this InterfaceTypeDef.
6045    pub async fn id(&self) -> Result<InterfaceTypeDefId, DaggerError> {
6046        let query = self.selection.select("id");
6047        query.execute(self.graphql_client.clone()).await
6048    }
6049    /// The name of the interface.
6050    pub async fn name(&self) -> Result<String, DaggerError> {
6051        let query = self.selection.select("name");
6052        query.execute(self.graphql_client.clone()).await
6053    }
6054    /// The location of this interface declaration.
6055    pub fn source_map(&self) -> SourceMap {
6056        let query = self.selection.select("sourceMap");
6057        SourceMap {
6058            proc: self.proc.clone(),
6059            selection: query,
6060            graphql_client: self.graphql_client.clone(),
6061        }
6062    }
6063    /// If this InterfaceTypeDef is associated with a Module, the name of the module. Unset otherwise.
6064    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
6065        let query = self.selection.select("sourceModuleName");
6066        query.execute(self.graphql_client.clone()).await
6067    }
6068}
6069#[derive(Clone)]
6070pub struct Llm {
6071    pub proc: Option<Arc<DaggerSessionProc>>,
6072    pub selection: Selection,
6073    pub graphql_client: DynGraphQLClient,
6074}
6075impl Llm {
6076    /// Retrieve a the current value in the LLM environment, of type CacheVolume
6077    pub fn cache_volume(&self) -> CacheVolume {
6078        let query = self.selection.select("cacheVolume");
6079        CacheVolume {
6080            proc: self.proc.clone(),
6081            selection: query,
6082            graphql_client: self.graphql_client.clone(),
6083        }
6084    }
6085    /// Retrieve a the current value in the LLM environment, of type Container
6086    pub fn container(&self) -> Container {
6087        let query = self.selection.select("container");
6088        Container {
6089            proc: self.proc.clone(),
6090            selection: query,
6091            graphql_client: self.graphql_client.clone(),
6092        }
6093    }
6094    /// Retrieve a the current value in the LLM environment, of type CurrentModule
6095    pub fn current_module(&self) -> CurrentModule {
6096        let query = self.selection.select("currentModule");
6097        CurrentModule {
6098            proc: self.proc.clone(),
6099            selection: query,
6100            graphql_client: self.graphql_client.clone(),
6101        }
6102    }
6103    /// Retrieve a the current value in the LLM environment, of type Directory
6104    pub fn directory(&self) -> Directory {
6105        let query = self.selection.select("directory");
6106        Directory {
6107            proc: self.proc.clone(),
6108            selection: query,
6109            graphql_client: self.graphql_client.clone(),
6110        }
6111    }
6112    /// Retrieve a the current value in the LLM environment, of type EnumTypeDef
6113    pub fn enum_type_def(&self) -> EnumTypeDef {
6114        let query = self.selection.select("enumTypeDef");
6115        EnumTypeDef {
6116            proc: self.proc.clone(),
6117            selection: query,
6118            graphql_client: self.graphql_client.clone(),
6119        }
6120    }
6121    /// Retrieve a the current value in the LLM environment, of type EnumValueTypeDef
6122    pub fn enum_value_type_def(&self) -> EnumValueTypeDef {
6123        let query = self.selection.select("enumValueTypeDef");
6124        EnumValueTypeDef {
6125            proc: self.proc.clone(),
6126            selection: query,
6127            graphql_client: self.graphql_client.clone(),
6128        }
6129    }
6130    /// Retrieve a the current value in the LLM environment, of type Error
6131    pub fn error(&self) -> Error {
6132        let query = self.selection.select("error");
6133        Error {
6134            proc: self.proc.clone(),
6135            selection: query,
6136            graphql_client: self.graphql_client.clone(),
6137        }
6138    }
6139    /// Retrieve a the current value in the LLM environment, of type ErrorValue
6140    pub fn error_value(&self) -> ErrorValue {
6141        let query = self.selection.select("errorValue");
6142        ErrorValue {
6143            proc: self.proc.clone(),
6144            selection: query,
6145            graphql_client: self.graphql_client.clone(),
6146        }
6147    }
6148    /// Retrieve a the current value in the LLM environment, of type FieldTypeDef
6149    pub fn field_type_def(&self) -> FieldTypeDef {
6150        let query = self.selection.select("fieldTypeDef");
6151        FieldTypeDef {
6152            proc: self.proc.clone(),
6153            selection: query,
6154            graphql_client: self.graphql_client.clone(),
6155        }
6156    }
6157    /// Retrieve a the current value in the LLM environment, of type File
6158    pub fn file(&self) -> File {
6159        let query = self.selection.select("file");
6160        File {
6161            proc: self.proc.clone(),
6162            selection: query,
6163            graphql_client: self.graphql_client.clone(),
6164        }
6165    }
6166    /// Retrieve a the current value in the LLM environment, of type Function
6167    pub fn function(&self) -> Function {
6168        let query = self.selection.select("function");
6169        Function {
6170            proc: self.proc.clone(),
6171            selection: query,
6172            graphql_client: self.graphql_client.clone(),
6173        }
6174    }
6175    /// Retrieve a the current value in the LLM environment, of type FunctionArg
6176    pub fn function_arg(&self) -> FunctionArg {
6177        let query = self.selection.select("functionArg");
6178        FunctionArg {
6179            proc: self.proc.clone(),
6180            selection: query,
6181            graphql_client: self.graphql_client.clone(),
6182        }
6183    }
6184    /// Retrieve a the current value in the LLM environment, of type FunctionCall
6185    pub fn function_call(&self) -> FunctionCall {
6186        let query = self.selection.select("functionCall");
6187        FunctionCall {
6188            proc: self.proc.clone(),
6189            selection: query,
6190            graphql_client: self.graphql_client.clone(),
6191        }
6192    }
6193    /// Retrieve a the current value in the LLM environment, of type FunctionCallArgValue
6194    pub fn function_call_arg_value(&self) -> FunctionCallArgValue {
6195        let query = self.selection.select("functionCallArgValue");
6196        FunctionCallArgValue {
6197            proc: self.proc.clone(),
6198            selection: query,
6199            graphql_client: self.graphql_client.clone(),
6200        }
6201    }
6202    /// Retrieve a the current value in the LLM environment, of type GeneratedCode
6203    pub fn generated_code(&self) -> GeneratedCode {
6204        let query = self.selection.select("generatedCode");
6205        GeneratedCode {
6206            proc: self.proc.clone(),
6207            selection: query,
6208            graphql_client: self.graphql_client.clone(),
6209        }
6210    }
6211    /// Retrieve a variable in the llm environment, of type CacheVolume
6212    ///
6213    /// # Arguments
6214    ///
6215    /// * `name` - The name of the variable
6216    pub fn get_cache_volume(&self, name: impl Into<String>) -> CacheVolume {
6217        let mut query = self.selection.select("getCacheVolume");
6218        query = query.arg("name", name.into());
6219        CacheVolume {
6220            proc: self.proc.clone(),
6221            selection: query,
6222            graphql_client: self.graphql_client.clone(),
6223        }
6224    }
6225    /// Retrieve a variable in the llm environment, of type Container
6226    ///
6227    /// # Arguments
6228    ///
6229    /// * `name` - The name of the variable
6230    pub fn get_container(&self, name: impl Into<String>) -> Container {
6231        let mut query = self.selection.select("getContainer");
6232        query = query.arg("name", name.into());
6233        Container {
6234            proc: self.proc.clone(),
6235            selection: query,
6236            graphql_client: self.graphql_client.clone(),
6237        }
6238    }
6239    /// Retrieve a variable in the llm environment, of type CurrentModule
6240    ///
6241    /// # Arguments
6242    ///
6243    /// * `name` - The name of the variable
6244    pub fn get_current_module(&self, name: impl Into<String>) -> CurrentModule {
6245        let mut query = self.selection.select("getCurrentModule");
6246        query = query.arg("name", name.into());
6247        CurrentModule {
6248            proc: self.proc.clone(),
6249            selection: query,
6250            graphql_client: self.graphql_client.clone(),
6251        }
6252    }
6253    /// Retrieve a variable in the llm environment, of type Directory
6254    ///
6255    /// # Arguments
6256    ///
6257    /// * `name` - The name of the variable
6258    pub fn get_directory(&self, name: impl Into<String>) -> Directory {
6259        let mut query = self.selection.select("getDirectory");
6260        query = query.arg("name", name.into());
6261        Directory {
6262            proc: self.proc.clone(),
6263            selection: query,
6264            graphql_client: self.graphql_client.clone(),
6265        }
6266    }
6267    /// Retrieve a variable in the llm environment, of type EnumTypeDef
6268    ///
6269    /// # Arguments
6270    ///
6271    /// * `name` - The name of the variable
6272    pub fn get_enum_type_def(&self, name: impl Into<String>) -> EnumTypeDef {
6273        let mut query = self.selection.select("getEnumTypeDef");
6274        query = query.arg("name", name.into());
6275        EnumTypeDef {
6276            proc: self.proc.clone(),
6277            selection: query,
6278            graphql_client: self.graphql_client.clone(),
6279        }
6280    }
6281    /// Retrieve a variable in the llm environment, of type EnumValueTypeDef
6282    ///
6283    /// # Arguments
6284    ///
6285    /// * `name` - The name of the variable
6286    pub fn get_enum_value_type_def(&self, name: impl Into<String>) -> EnumValueTypeDef {
6287        let mut query = self.selection.select("getEnumValueTypeDef");
6288        query = query.arg("name", name.into());
6289        EnumValueTypeDef {
6290            proc: self.proc.clone(),
6291            selection: query,
6292            graphql_client: self.graphql_client.clone(),
6293        }
6294    }
6295    /// Retrieve a variable in the llm environment, of type Error
6296    ///
6297    /// # Arguments
6298    ///
6299    /// * `name` - The name of the variable
6300    pub fn get_error(&self, name: impl Into<String>) -> Error {
6301        let mut query = self.selection.select("getError");
6302        query = query.arg("name", name.into());
6303        Error {
6304            proc: self.proc.clone(),
6305            selection: query,
6306            graphql_client: self.graphql_client.clone(),
6307        }
6308    }
6309    /// Retrieve a variable in the llm environment, of type ErrorValue
6310    ///
6311    /// # Arguments
6312    ///
6313    /// * `name` - The name of the variable
6314    pub fn get_error_value(&self, name: impl Into<String>) -> ErrorValue {
6315        let mut query = self.selection.select("getErrorValue");
6316        query = query.arg("name", name.into());
6317        ErrorValue {
6318            proc: self.proc.clone(),
6319            selection: query,
6320            graphql_client: self.graphql_client.clone(),
6321        }
6322    }
6323    /// Retrieve a variable in the llm environment, of type FieldTypeDef
6324    ///
6325    /// # Arguments
6326    ///
6327    /// * `name` - The name of the variable
6328    pub fn get_field_type_def(&self, name: impl Into<String>) -> FieldTypeDef {
6329        let mut query = self.selection.select("getFieldTypeDef");
6330        query = query.arg("name", name.into());
6331        FieldTypeDef {
6332            proc: self.proc.clone(),
6333            selection: query,
6334            graphql_client: self.graphql_client.clone(),
6335        }
6336    }
6337    /// Retrieve a variable in the llm environment, of type File
6338    ///
6339    /// # Arguments
6340    ///
6341    /// * `name` - The name of the variable
6342    pub fn get_file(&self, name: impl Into<String>) -> File {
6343        let mut query = self.selection.select("getFile");
6344        query = query.arg("name", name.into());
6345        File {
6346            proc: self.proc.clone(),
6347            selection: query,
6348            graphql_client: self.graphql_client.clone(),
6349        }
6350    }
6351    /// Retrieve a variable in the llm environment, of type Function
6352    ///
6353    /// # Arguments
6354    ///
6355    /// * `name` - The name of the variable
6356    pub fn get_function(&self, name: impl Into<String>) -> Function {
6357        let mut query = self.selection.select("getFunction");
6358        query = query.arg("name", name.into());
6359        Function {
6360            proc: self.proc.clone(),
6361            selection: query,
6362            graphql_client: self.graphql_client.clone(),
6363        }
6364    }
6365    /// Retrieve a variable in the llm environment, of type FunctionArg
6366    ///
6367    /// # Arguments
6368    ///
6369    /// * `name` - The name of the variable
6370    pub fn get_function_arg(&self, name: impl Into<String>) -> FunctionArg {
6371        let mut query = self.selection.select("getFunctionArg");
6372        query = query.arg("name", name.into());
6373        FunctionArg {
6374            proc: self.proc.clone(),
6375            selection: query,
6376            graphql_client: self.graphql_client.clone(),
6377        }
6378    }
6379    /// Retrieve a variable in the llm environment, of type FunctionCall
6380    ///
6381    /// # Arguments
6382    ///
6383    /// * `name` - The name of the variable
6384    pub fn get_function_call(&self, name: impl Into<String>) -> FunctionCall {
6385        let mut query = self.selection.select("getFunctionCall");
6386        query = query.arg("name", name.into());
6387        FunctionCall {
6388            proc: self.proc.clone(),
6389            selection: query,
6390            graphql_client: self.graphql_client.clone(),
6391        }
6392    }
6393    /// Retrieve a variable in the llm environment, of type FunctionCallArgValue
6394    ///
6395    /// # Arguments
6396    ///
6397    /// * `name` - The name of the variable
6398    pub fn get_function_call_arg_value(&self, name: impl Into<String>) -> FunctionCallArgValue {
6399        let mut query = self.selection.select("getFunctionCallArgValue");
6400        query = query.arg("name", name.into());
6401        FunctionCallArgValue {
6402            proc: self.proc.clone(),
6403            selection: query,
6404            graphql_client: self.graphql_client.clone(),
6405        }
6406    }
6407    /// Retrieve a variable in the llm environment, of type GeneratedCode
6408    ///
6409    /// # Arguments
6410    ///
6411    /// * `name` - The name of the variable
6412    pub fn get_generated_code(&self, name: impl Into<String>) -> GeneratedCode {
6413        let mut query = self.selection.select("getGeneratedCode");
6414        query = query.arg("name", name.into());
6415        GeneratedCode {
6416            proc: self.proc.clone(),
6417            selection: query,
6418            graphql_client: self.graphql_client.clone(),
6419        }
6420    }
6421    /// Retrieve a variable in the llm environment, of type GitRef
6422    ///
6423    /// # Arguments
6424    ///
6425    /// * `name` - The name of the variable
6426    pub fn get_git_ref(&self, name: impl Into<String>) -> GitRef {
6427        let mut query = self.selection.select("getGitRef");
6428        query = query.arg("name", name.into());
6429        GitRef {
6430            proc: self.proc.clone(),
6431            selection: query,
6432            graphql_client: self.graphql_client.clone(),
6433        }
6434    }
6435    /// Retrieve a variable in the llm environment, of type GitRepository
6436    ///
6437    /// # Arguments
6438    ///
6439    /// * `name` - The name of the variable
6440    pub fn get_git_repository(&self, name: impl Into<String>) -> GitRepository {
6441        let mut query = self.selection.select("getGitRepository");
6442        query = query.arg("name", name.into());
6443        GitRepository {
6444            proc: self.proc.clone(),
6445            selection: query,
6446            graphql_client: self.graphql_client.clone(),
6447        }
6448    }
6449    /// Retrieve a variable in the llm environment, of type InputTypeDef
6450    ///
6451    /// # Arguments
6452    ///
6453    /// * `name` - The name of the variable
6454    pub fn get_input_type_def(&self, name: impl Into<String>) -> InputTypeDef {
6455        let mut query = self.selection.select("getInputTypeDef");
6456        query = query.arg("name", name.into());
6457        InputTypeDef {
6458            proc: self.proc.clone(),
6459            selection: query,
6460            graphql_client: self.graphql_client.clone(),
6461        }
6462    }
6463    /// Retrieve a variable in the llm environment, of type InterfaceTypeDef
6464    ///
6465    /// # Arguments
6466    ///
6467    /// * `name` - The name of the variable
6468    pub fn get_interface_type_def(&self, name: impl Into<String>) -> InterfaceTypeDef {
6469        let mut query = self.selection.select("getInterfaceTypeDef");
6470        query = query.arg("name", name.into());
6471        InterfaceTypeDef {
6472            proc: self.proc.clone(),
6473            selection: query,
6474            graphql_client: self.graphql_client.clone(),
6475        }
6476    }
6477    /// Retrieve a variable in the llm environment, of type LLM
6478    ///
6479    /// # Arguments
6480    ///
6481    /// * `name` - The name of the variable
6482    pub fn get_llm(&self, name: impl Into<String>) -> Llm {
6483        let mut query = self.selection.select("getLLM");
6484        query = query.arg("name", name.into());
6485        Llm {
6486            proc: self.proc.clone(),
6487            selection: query,
6488            graphql_client: self.graphql_client.clone(),
6489        }
6490    }
6491    /// Retrieve a variable in the llm environment, of type ListTypeDef
6492    ///
6493    /// # Arguments
6494    ///
6495    /// * `name` - The name of the variable
6496    pub fn get_list_type_def(&self, name: impl Into<String>) -> ListTypeDef {
6497        let mut query = self.selection.select("getListTypeDef");
6498        query = query.arg("name", name.into());
6499        ListTypeDef {
6500            proc: self.proc.clone(),
6501            selection: query,
6502            graphql_client: self.graphql_client.clone(),
6503        }
6504    }
6505    /// Retrieve a variable in the llm environment, of type Module
6506    ///
6507    /// # Arguments
6508    ///
6509    /// * `name` - The name of the variable
6510    pub fn get_module(&self, name: impl Into<String>) -> Module {
6511        let mut query = self.selection.select("getModule");
6512        query = query.arg("name", name.into());
6513        Module {
6514            proc: self.proc.clone(),
6515            selection: query,
6516            graphql_client: self.graphql_client.clone(),
6517        }
6518    }
6519    /// Retrieve a variable in the llm environment, of type ModuleConfigClient
6520    ///
6521    /// # Arguments
6522    ///
6523    /// * `name` - The name of the variable
6524    pub fn get_module_config_client(&self, name: impl Into<String>) -> ModuleConfigClient {
6525        let mut query = self.selection.select("getModuleConfigClient");
6526        query = query.arg("name", name.into());
6527        ModuleConfigClient {
6528            proc: self.proc.clone(),
6529            selection: query,
6530            graphql_client: self.graphql_client.clone(),
6531        }
6532    }
6533    /// Retrieve a variable in the llm environment, of type ModuleSource
6534    ///
6535    /// # Arguments
6536    ///
6537    /// * `name` - The name of the variable
6538    pub fn get_module_source(&self, name: impl Into<String>) -> ModuleSource {
6539        let mut query = self.selection.select("getModuleSource");
6540        query = query.arg("name", name.into());
6541        ModuleSource {
6542            proc: self.proc.clone(),
6543            selection: query,
6544            graphql_client: self.graphql_client.clone(),
6545        }
6546    }
6547    /// Retrieve a variable in the llm environment, of type ObjectTypeDef
6548    ///
6549    /// # Arguments
6550    ///
6551    /// * `name` - The name of the variable
6552    pub fn get_object_type_def(&self, name: impl Into<String>) -> ObjectTypeDef {
6553        let mut query = self.selection.select("getObjectTypeDef");
6554        query = query.arg("name", name.into());
6555        ObjectTypeDef {
6556            proc: self.proc.clone(),
6557            selection: query,
6558            graphql_client: self.graphql_client.clone(),
6559        }
6560    }
6561    /// Retrieve a variable in the llm environment, of type SDKConfig
6562    ///
6563    /// # Arguments
6564    ///
6565    /// * `name` - The name of the variable
6566    pub fn get_sdk_config(&self, name: impl Into<String>) -> SdkConfig {
6567        let mut query = self.selection.select("getSDKConfig");
6568        query = query.arg("name", name.into());
6569        SdkConfig {
6570            proc: self.proc.clone(),
6571            selection: query,
6572            graphql_client: self.graphql_client.clone(),
6573        }
6574    }
6575    /// Retrieve a variable in the llm environment, of type ScalarTypeDef
6576    ///
6577    /// # Arguments
6578    ///
6579    /// * `name` - The name of the variable
6580    pub fn get_scalar_type_def(&self, name: impl Into<String>) -> ScalarTypeDef {
6581        let mut query = self.selection.select("getScalarTypeDef");
6582        query = query.arg("name", name.into());
6583        ScalarTypeDef {
6584            proc: self.proc.clone(),
6585            selection: query,
6586            graphql_client: self.graphql_client.clone(),
6587        }
6588    }
6589    /// Retrieve a variable in the llm environment, of type Secret
6590    ///
6591    /// # Arguments
6592    ///
6593    /// * `name` - The name of the variable
6594    pub fn get_secret(&self, name: impl Into<String>) -> Secret {
6595        let mut query = self.selection.select("getSecret");
6596        query = query.arg("name", name.into());
6597        Secret {
6598            proc: self.proc.clone(),
6599            selection: query,
6600            graphql_client: self.graphql_client.clone(),
6601        }
6602    }
6603    /// Retrieve a variable in the llm environment, of type Service
6604    ///
6605    /// # Arguments
6606    ///
6607    /// * `name` - The name of the variable
6608    pub fn get_service(&self, name: impl Into<String>) -> Service {
6609        let mut query = self.selection.select("getService");
6610        query = query.arg("name", name.into());
6611        Service {
6612            proc: self.proc.clone(),
6613            selection: query,
6614            graphql_client: self.graphql_client.clone(),
6615        }
6616    }
6617    /// Retrieve a variable in the llm environment, of type Socket
6618    ///
6619    /// # Arguments
6620    ///
6621    /// * `name` - The name of the variable
6622    pub fn get_socket(&self, name: impl Into<String>) -> Socket {
6623        let mut query = self.selection.select("getSocket");
6624        query = query.arg("name", name.into());
6625        Socket {
6626            proc: self.proc.clone(),
6627            selection: query,
6628            graphql_client: self.graphql_client.clone(),
6629        }
6630    }
6631    /// Retrieve a variable in the llm environment, of type SourceMap
6632    ///
6633    /// # Arguments
6634    ///
6635    /// * `name` - The name of the variable
6636    pub fn get_source_map(&self, name: impl Into<String>) -> SourceMap {
6637        let mut query = self.selection.select("getSourceMap");
6638        query = query.arg("name", name.into());
6639        SourceMap {
6640            proc: self.proc.clone(),
6641            selection: query,
6642            graphql_client: self.graphql_client.clone(),
6643        }
6644    }
6645    /// Get a string variable from the LLM's environment
6646    ///
6647    /// # Arguments
6648    ///
6649    /// * `name` - The variable name
6650    pub async fn get_string(&self, name: impl Into<String>) -> Result<String, DaggerError> {
6651        let mut query = self.selection.select("getString");
6652        query = query.arg("name", name.into());
6653        query.execute(self.graphql_client.clone()).await
6654    }
6655    /// Retrieve a variable in the llm environment, of type Terminal
6656    ///
6657    /// # Arguments
6658    ///
6659    /// * `name` - The name of the variable
6660    pub fn get_terminal(&self, name: impl Into<String>) -> Terminal {
6661        let mut query = self.selection.select("getTerminal");
6662        query = query.arg("name", name.into());
6663        Terminal {
6664            proc: self.proc.clone(),
6665            selection: query,
6666            graphql_client: self.graphql_client.clone(),
6667        }
6668    }
6669    /// Retrieve a variable in the llm environment, of type TypeDef
6670    ///
6671    /// # Arguments
6672    ///
6673    /// * `name` - The name of the variable
6674    pub fn get_type_def(&self, name: impl Into<String>) -> TypeDef {
6675        let mut query = self.selection.select("getTypeDef");
6676        query = query.arg("name", name.into());
6677        TypeDef {
6678            proc: self.proc.clone(),
6679            selection: query,
6680            graphql_client: self.graphql_client.clone(),
6681        }
6682    }
6683    /// Retrieve a the current value in the LLM environment, of type GitRef
6684    pub fn git_ref(&self) -> GitRef {
6685        let query = self.selection.select("gitRef");
6686        GitRef {
6687            proc: self.proc.clone(),
6688            selection: query,
6689            graphql_client: self.graphql_client.clone(),
6690        }
6691    }
6692    /// Retrieve a the current value in the LLM environment, of type GitRepository
6693    pub fn git_repository(&self) -> GitRepository {
6694        let query = self.selection.select("gitRepository");
6695        GitRepository {
6696            proc: self.proc.clone(),
6697            selection: query,
6698            graphql_client: self.graphql_client.clone(),
6699        }
6700    }
6701    /// return the llm message history
6702    pub async fn history(&self) -> Result<Vec<String>, DaggerError> {
6703        let query = self.selection.select("history");
6704        query.execute(self.graphql_client.clone()).await
6705    }
6706    /// return the raw llm message history as json
6707    pub async fn history_json(&self) -> Result<String, DaggerError> {
6708        let query = self.selection.select("historyJSON");
6709        query.execute(self.graphql_client.clone()).await
6710    }
6711    /// A unique identifier for this LLM.
6712    pub async fn id(&self) -> Result<Llmid, DaggerError> {
6713        let query = self.selection.select("id");
6714        query.execute(self.graphql_client.clone()).await
6715    }
6716    /// Retrieve a the current value in the LLM environment, of type InputTypeDef
6717    pub fn input_type_def(&self) -> InputTypeDef {
6718        let query = self.selection.select("inputTypeDef");
6719        InputTypeDef {
6720            proc: self.proc.clone(),
6721            selection: query,
6722            graphql_client: self.graphql_client.clone(),
6723        }
6724    }
6725    /// Retrieve a the current value in the LLM environment, of type InterfaceTypeDef
6726    pub fn interface_type_def(&self) -> InterfaceTypeDef {
6727        let query = self.selection.select("interfaceTypeDef");
6728        InterfaceTypeDef {
6729            proc: self.proc.clone(),
6730            selection: query,
6731            graphql_client: self.graphql_client.clone(),
6732        }
6733    }
6734    /// Retrieve a the current value in the LLM environment, of type LLM
6735    pub fn l_lm(&self) -> Llm {
6736        let query = self.selection.select("lLM");
6737        Llm {
6738            proc: self.proc.clone(),
6739            selection: query,
6740            graphql_client: self.graphql_client.clone(),
6741        }
6742    }
6743    /// return the last llm reply from the history
6744    pub async fn last_reply(&self) -> Result<String, DaggerError> {
6745        let query = self.selection.select("lastReply");
6746        query.execute(self.graphql_client.clone()).await
6747    }
6748    /// Retrieve a the current value in the LLM environment, of type ListTypeDef
6749    pub fn list_type_def(&self) -> ListTypeDef {
6750        let query = self.selection.select("listTypeDef");
6751        ListTypeDef {
6752            proc: self.proc.clone(),
6753            selection: query,
6754            graphql_client: self.graphql_client.clone(),
6755        }
6756    }
6757    /// synchronize LLM state
6758    pub fn r#loop(&self) -> Llm {
6759        let query = self.selection.select("loop");
6760        Llm {
6761            proc: self.proc.clone(),
6762            selection: query,
6763            graphql_client: self.graphql_client.clone(),
6764        }
6765    }
6766    /// return the model used by the llm
6767    pub async fn model(&self) -> Result<String, DaggerError> {
6768        let query = self.selection.select("model");
6769        query.execute(self.graphql_client.clone()).await
6770    }
6771    /// Retrieve a the current value in the LLM environment, of type Module
6772    pub fn module(&self) -> Module {
6773        let query = self.selection.select("module");
6774        Module {
6775            proc: self.proc.clone(),
6776            selection: query,
6777            graphql_client: self.graphql_client.clone(),
6778        }
6779    }
6780    /// Retrieve a the current value in the LLM environment, of type ModuleConfigClient
6781    pub fn module_config_client(&self) -> ModuleConfigClient {
6782        let query = self.selection.select("moduleConfigClient");
6783        ModuleConfigClient {
6784            proc: self.proc.clone(),
6785            selection: query,
6786            graphql_client: self.graphql_client.clone(),
6787        }
6788    }
6789    /// Retrieve a the current value in the LLM environment, of type ModuleSource
6790    pub fn module_source(&self) -> ModuleSource {
6791        let query = self.selection.select("moduleSource");
6792        ModuleSource {
6793            proc: self.proc.clone(),
6794            selection: query,
6795            graphql_client: self.graphql_client.clone(),
6796        }
6797    }
6798    /// Retrieve a the current value in the LLM environment, of type ObjectTypeDef
6799    pub fn object_type_def(&self) -> ObjectTypeDef {
6800        let query = self.selection.select("objectTypeDef");
6801        ObjectTypeDef {
6802            proc: self.proc.clone(),
6803            selection: query,
6804            graphql_client: self.graphql_client.clone(),
6805        }
6806    }
6807    /// return the provider used by the llm
6808    pub async fn provider(&self) -> Result<String, DaggerError> {
6809        let query = self.selection.select("provider");
6810        query.execute(self.graphql_client.clone()).await
6811    }
6812    /// Retrieve a the current value in the LLM environment, of type ScalarTypeDef
6813    pub fn scalar_type_def(&self) -> ScalarTypeDef {
6814        let query = self.selection.select("scalarTypeDef");
6815        ScalarTypeDef {
6816            proc: self.proc.clone(),
6817            selection: query,
6818            graphql_client: self.graphql_client.clone(),
6819        }
6820    }
6821    /// Retrieve a the current value in the LLM environment, of type SDKConfig
6822    pub fn sdkconfig(&self) -> SdkConfig {
6823        let query = self.selection.select("sdkconfig");
6824        SdkConfig {
6825            proc: self.proc.clone(),
6826            selection: query,
6827            graphql_client: self.graphql_client.clone(),
6828        }
6829    }
6830    /// Retrieve a the current value in the LLM environment, of type Secret
6831    pub fn secret(&self) -> Secret {
6832        let query = self.selection.select("secret");
6833        Secret {
6834            proc: self.proc.clone(),
6835            selection: query,
6836            graphql_client: self.graphql_client.clone(),
6837        }
6838    }
6839    /// Retrieve a the current value in the LLM environment, of type Service
6840    pub fn service(&self) -> Service {
6841        let query = self.selection.select("service");
6842        Service {
6843            proc: self.proc.clone(),
6844            selection: query,
6845            graphql_client: self.graphql_client.clone(),
6846        }
6847    }
6848    /// Set a variable of type CacheVolume in the llm environment
6849    ///
6850    /// # Arguments
6851    ///
6852    /// * `name` - The name of the variable
6853    /// * `value` - The CacheVolume value to assign to the variable
6854    pub fn set_cache_volume(
6855        &self,
6856        name: impl Into<String>,
6857        value: impl IntoID<CacheVolumeId>,
6858    ) -> Llm {
6859        let mut query = self.selection.select("setCacheVolume");
6860        query = query.arg("name", name.into());
6861        query = query.arg_lazy(
6862            "value",
6863            Box::new(move || {
6864                let value = value.clone();
6865                Box::pin(async move { value.into_id().await.unwrap().quote() })
6866            }),
6867        );
6868        Llm {
6869            proc: self.proc.clone(),
6870            selection: query,
6871            graphql_client: self.graphql_client.clone(),
6872        }
6873    }
6874    /// Set a variable of type Container in the llm environment
6875    ///
6876    /// # Arguments
6877    ///
6878    /// * `name` - The name of the variable
6879    /// * `value` - The Container value to assign to the variable
6880    pub fn set_container(&self, name: impl Into<String>, value: impl IntoID<ContainerId>) -> Llm {
6881        let mut query = self.selection.select("setContainer");
6882        query = query.arg("name", name.into());
6883        query = query.arg_lazy(
6884            "value",
6885            Box::new(move || {
6886                let value = value.clone();
6887                Box::pin(async move { value.into_id().await.unwrap().quote() })
6888            }),
6889        );
6890        Llm {
6891            proc: self.proc.clone(),
6892            selection: query,
6893            graphql_client: self.graphql_client.clone(),
6894        }
6895    }
6896    /// Set a variable of type CurrentModule in the llm environment
6897    ///
6898    /// # Arguments
6899    ///
6900    /// * `name` - The name of the variable
6901    /// * `value` - The CurrentModule value to assign to the variable
6902    pub fn set_current_module(
6903        &self,
6904        name: impl Into<String>,
6905        value: impl IntoID<CurrentModuleId>,
6906    ) -> Llm {
6907        let mut query = self.selection.select("setCurrentModule");
6908        query = query.arg("name", name.into());
6909        query = query.arg_lazy(
6910            "value",
6911            Box::new(move || {
6912                let value = value.clone();
6913                Box::pin(async move { value.into_id().await.unwrap().quote() })
6914            }),
6915        );
6916        Llm {
6917            proc: self.proc.clone(),
6918            selection: query,
6919            graphql_client: self.graphql_client.clone(),
6920        }
6921    }
6922    /// Set a variable of type Directory in the llm environment
6923    ///
6924    /// # Arguments
6925    ///
6926    /// * `name` - The name of the variable
6927    /// * `value` - The Directory value to assign to the variable
6928    pub fn set_directory(&self, name: impl Into<String>, value: impl IntoID<DirectoryId>) -> Llm {
6929        let mut query = self.selection.select("setDirectory");
6930        query = query.arg("name", name.into());
6931        query = query.arg_lazy(
6932            "value",
6933            Box::new(move || {
6934                let value = value.clone();
6935                Box::pin(async move { value.into_id().await.unwrap().quote() })
6936            }),
6937        );
6938        Llm {
6939            proc: self.proc.clone(),
6940            selection: query,
6941            graphql_client: self.graphql_client.clone(),
6942        }
6943    }
6944    /// Set a variable of type EnumTypeDef in the llm environment
6945    ///
6946    /// # Arguments
6947    ///
6948    /// * `name` - The name of the variable
6949    /// * `value` - The EnumTypeDef value to assign to the variable
6950    pub fn set_enum_type_def(
6951        &self,
6952        name: impl Into<String>,
6953        value: impl IntoID<EnumTypeDefId>,
6954    ) -> Llm {
6955        let mut query = self.selection.select("setEnumTypeDef");
6956        query = query.arg("name", name.into());
6957        query = query.arg_lazy(
6958            "value",
6959            Box::new(move || {
6960                let value = value.clone();
6961                Box::pin(async move { value.into_id().await.unwrap().quote() })
6962            }),
6963        );
6964        Llm {
6965            proc: self.proc.clone(),
6966            selection: query,
6967            graphql_client: self.graphql_client.clone(),
6968        }
6969    }
6970    /// Set a variable of type EnumValueTypeDef in the llm environment
6971    ///
6972    /// # Arguments
6973    ///
6974    /// * `name` - The name of the variable
6975    /// * `value` - The EnumValueTypeDef value to assign to the variable
6976    pub fn set_enum_value_type_def(
6977        &self,
6978        name: impl Into<String>,
6979        value: impl IntoID<EnumValueTypeDefId>,
6980    ) -> Llm {
6981        let mut query = self.selection.select("setEnumValueTypeDef");
6982        query = query.arg("name", name.into());
6983        query = query.arg_lazy(
6984            "value",
6985            Box::new(move || {
6986                let value = value.clone();
6987                Box::pin(async move { value.into_id().await.unwrap().quote() })
6988            }),
6989        );
6990        Llm {
6991            proc: self.proc.clone(),
6992            selection: query,
6993            graphql_client: self.graphql_client.clone(),
6994        }
6995    }
6996    /// Set a variable of type Error in the llm environment
6997    ///
6998    /// # Arguments
6999    ///
7000    /// * `name` - The name of the variable
7001    /// * `value` - The Error value to assign to the variable
7002    pub fn set_error(&self, name: impl Into<String>, value: impl IntoID<ErrorId>) -> Llm {
7003        let mut query = self.selection.select("setError");
7004        query = query.arg("name", name.into());
7005        query = query.arg_lazy(
7006            "value",
7007            Box::new(move || {
7008                let value = value.clone();
7009                Box::pin(async move { value.into_id().await.unwrap().quote() })
7010            }),
7011        );
7012        Llm {
7013            proc: self.proc.clone(),
7014            selection: query,
7015            graphql_client: self.graphql_client.clone(),
7016        }
7017    }
7018    /// Set a variable of type ErrorValue in the llm environment
7019    ///
7020    /// # Arguments
7021    ///
7022    /// * `name` - The name of the variable
7023    /// * `value` - The ErrorValue value to assign to the variable
7024    pub fn set_error_value(
7025        &self,
7026        name: impl Into<String>,
7027        value: impl IntoID<ErrorValueId>,
7028    ) -> Llm {
7029        let mut query = self.selection.select("setErrorValue");
7030        query = query.arg("name", name.into());
7031        query = query.arg_lazy(
7032            "value",
7033            Box::new(move || {
7034                let value = value.clone();
7035                Box::pin(async move { value.into_id().await.unwrap().quote() })
7036            }),
7037        );
7038        Llm {
7039            proc: self.proc.clone(),
7040            selection: query,
7041            graphql_client: self.graphql_client.clone(),
7042        }
7043    }
7044    /// Set a variable of type FieldTypeDef in the llm environment
7045    ///
7046    /// # Arguments
7047    ///
7048    /// * `name` - The name of the variable
7049    /// * `value` - The FieldTypeDef value to assign to the variable
7050    pub fn set_field_type_def(
7051        &self,
7052        name: impl Into<String>,
7053        value: impl IntoID<FieldTypeDefId>,
7054    ) -> Llm {
7055        let mut query = self.selection.select("setFieldTypeDef");
7056        query = query.arg("name", name.into());
7057        query = query.arg_lazy(
7058            "value",
7059            Box::new(move || {
7060                let value = value.clone();
7061                Box::pin(async move { value.into_id().await.unwrap().quote() })
7062            }),
7063        );
7064        Llm {
7065            proc: self.proc.clone(),
7066            selection: query,
7067            graphql_client: self.graphql_client.clone(),
7068        }
7069    }
7070    /// Set a variable of type File in the llm environment
7071    ///
7072    /// # Arguments
7073    ///
7074    /// * `name` - The name of the variable
7075    /// * `value` - The File value to assign to the variable
7076    pub fn set_file(&self, name: impl Into<String>, value: impl IntoID<FileId>) -> Llm {
7077        let mut query = self.selection.select("setFile");
7078        query = query.arg("name", name.into());
7079        query = query.arg_lazy(
7080            "value",
7081            Box::new(move || {
7082                let value = value.clone();
7083                Box::pin(async move { value.into_id().await.unwrap().quote() })
7084            }),
7085        );
7086        Llm {
7087            proc: self.proc.clone(),
7088            selection: query,
7089            graphql_client: self.graphql_client.clone(),
7090        }
7091    }
7092    /// Set a variable of type Function in the llm environment
7093    ///
7094    /// # Arguments
7095    ///
7096    /// * `name` - The name of the variable
7097    /// * `value` - The Function value to assign to the variable
7098    pub fn set_function(&self, name: impl Into<String>, value: impl IntoID<FunctionId>) -> Llm {
7099        let mut query = self.selection.select("setFunction");
7100        query = query.arg("name", name.into());
7101        query = query.arg_lazy(
7102            "value",
7103            Box::new(move || {
7104                let value = value.clone();
7105                Box::pin(async move { value.into_id().await.unwrap().quote() })
7106            }),
7107        );
7108        Llm {
7109            proc: self.proc.clone(),
7110            selection: query,
7111            graphql_client: self.graphql_client.clone(),
7112        }
7113    }
7114    /// Set a variable of type FunctionArg in the llm environment
7115    ///
7116    /// # Arguments
7117    ///
7118    /// * `name` - The name of the variable
7119    /// * `value` - The FunctionArg value to assign to the variable
7120    pub fn set_function_arg(
7121        &self,
7122        name: impl Into<String>,
7123        value: impl IntoID<FunctionArgId>,
7124    ) -> Llm {
7125        let mut query = self.selection.select("setFunctionArg");
7126        query = query.arg("name", name.into());
7127        query = query.arg_lazy(
7128            "value",
7129            Box::new(move || {
7130                let value = value.clone();
7131                Box::pin(async move { value.into_id().await.unwrap().quote() })
7132            }),
7133        );
7134        Llm {
7135            proc: self.proc.clone(),
7136            selection: query,
7137            graphql_client: self.graphql_client.clone(),
7138        }
7139    }
7140    /// Set a variable of type FunctionCall in the llm environment
7141    ///
7142    /// # Arguments
7143    ///
7144    /// * `name` - The name of the variable
7145    /// * `value` - The FunctionCall value to assign to the variable
7146    pub fn set_function_call(
7147        &self,
7148        name: impl Into<String>,
7149        value: impl IntoID<FunctionCallId>,
7150    ) -> Llm {
7151        let mut query = self.selection.select("setFunctionCall");
7152        query = query.arg("name", name.into());
7153        query = query.arg_lazy(
7154            "value",
7155            Box::new(move || {
7156                let value = value.clone();
7157                Box::pin(async move { value.into_id().await.unwrap().quote() })
7158            }),
7159        );
7160        Llm {
7161            proc: self.proc.clone(),
7162            selection: query,
7163            graphql_client: self.graphql_client.clone(),
7164        }
7165    }
7166    /// Set a variable of type FunctionCallArgValue in the llm environment
7167    ///
7168    /// # Arguments
7169    ///
7170    /// * `name` - The name of the variable
7171    /// * `value` - The FunctionCallArgValue value to assign to the variable
7172    pub fn set_function_call_arg_value(
7173        &self,
7174        name: impl Into<String>,
7175        value: impl IntoID<FunctionCallArgValueId>,
7176    ) -> Llm {
7177        let mut query = self.selection.select("setFunctionCallArgValue");
7178        query = query.arg("name", name.into());
7179        query = query.arg_lazy(
7180            "value",
7181            Box::new(move || {
7182                let value = value.clone();
7183                Box::pin(async move { value.into_id().await.unwrap().quote() })
7184            }),
7185        );
7186        Llm {
7187            proc: self.proc.clone(),
7188            selection: query,
7189            graphql_client: self.graphql_client.clone(),
7190        }
7191    }
7192    /// Set a variable of type GeneratedCode in the llm environment
7193    ///
7194    /// # Arguments
7195    ///
7196    /// * `name` - The name of the variable
7197    /// * `value` - The GeneratedCode value to assign to the variable
7198    pub fn set_generated_code(
7199        &self,
7200        name: impl Into<String>,
7201        value: impl IntoID<GeneratedCodeId>,
7202    ) -> Llm {
7203        let mut query = self.selection.select("setGeneratedCode");
7204        query = query.arg("name", name.into());
7205        query = query.arg_lazy(
7206            "value",
7207            Box::new(move || {
7208                let value = value.clone();
7209                Box::pin(async move { value.into_id().await.unwrap().quote() })
7210            }),
7211        );
7212        Llm {
7213            proc: self.proc.clone(),
7214            selection: query,
7215            graphql_client: self.graphql_client.clone(),
7216        }
7217    }
7218    /// Set a variable of type GitRef in the llm environment
7219    ///
7220    /// # Arguments
7221    ///
7222    /// * `name` - The name of the variable
7223    /// * `value` - The GitRef value to assign to the variable
7224    pub fn set_git_ref(&self, name: impl Into<String>, value: impl IntoID<GitRefId>) -> Llm {
7225        let mut query = self.selection.select("setGitRef");
7226        query = query.arg("name", name.into());
7227        query = query.arg_lazy(
7228            "value",
7229            Box::new(move || {
7230                let value = value.clone();
7231                Box::pin(async move { value.into_id().await.unwrap().quote() })
7232            }),
7233        );
7234        Llm {
7235            proc: self.proc.clone(),
7236            selection: query,
7237            graphql_client: self.graphql_client.clone(),
7238        }
7239    }
7240    /// Set a variable of type GitRepository in the llm environment
7241    ///
7242    /// # Arguments
7243    ///
7244    /// * `name` - The name of the variable
7245    /// * `value` - The GitRepository value to assign to the variable
7246    pub fn set_git_repository(
7247        &self,
7248        name: impl Into<String>,
7249        value: impl IntoID<GitRepositoryId>,
7250    ) -> Llm {
7251        let mut query = self.selection.select("setGitRepository");
7252        query = query.arg("name", name.into());
7253        query = query.arg_lazy(
7254            "value",
7255            Box::new(move || {
7256                let value = value.clone();
7257                Box::pin(async move { value.into_id().await.unwrap().quote() })
7258            }),
7259        );
7260        Llm {
7261            proc: self.proc.clone(),
7262            selection: query,
7263            graphql_client: self.graphql_client.clone(),
7264        }
7265    }
7266    /// Set a variable of type InputTypeDef in the llm environment
7267    ///
7268    /// # Arguments
7269    ///
7270    /// * `name` - The name of the variable
7271    /// * `value` - The InputTypeDef value to assign to the variable
7272    pub fn set_input_type_def(
7273        &self,
7274        name: impl Into<String>,
7275        value: impl IntoID<InputTypeDefId>,
7276    ) -> Llm {
7277        let mut query = self.selection.select("setInputTypeDef");
7278        query = query.arg("name", name.into());
7279        query = query.arg_lazy(
7280            "value",
7281            Box::new(move || {
7282                let value = value.clone();
7283                Box::pin(async move { value.into_id().await.unwrap().quote() })
7284            }),
7285        );
7286        Llm {
7287            proc: self.proc.clone(),
7288            selection: query,
7289            graphql_client: self.graphql_client.clone(),
7290        }
7291    }
7292    /// Set a variable of type InterfaceTypeDef in the llm environment
7293    ///
7294    /// # Arguments
7295    ///
7296    /// * `name` - The name of the variable
7297    /// * `value` - The InterfaceTypeDef value to assign to the variable
7298    pub fn set_interface_type_def(
7299        &self,
7300        name: impl Into<String>,
7301        value: impl IntoID<InterfaceTypeDefId>,
7302    ) -> Llm {
7303        let mut query = self.selection.select("setInterfaceTypeDef");
7304        query = query.arg("name", name.into());
7305        query = query.arg_lazy(
7306            "value",
7307            Box::new(move || {
7308                let value = value.clone();
7309                Box::pin(async move { value.into_id().await.unwrap().quote() })
7310            }),
7311        );
7312        Llm {
7313            proc: self.proc.clone(),
7314            selection: query,
7315            graphql_client: self.graphql_client.clone(),
7316        }
7317    }
7318    /// Set a variable of type LLM in the llm environment
7319    ///
7320    /// # Arguments
7321    ///
7322    /// * `name` - The name of the variable
7323    /// * `value` - The LLM value to assign to the variable
7324    pub fn set_llm(&self, name: impl Into<String>, value: impl IntoID<Llmid>) -> Llm {
7325        let mut query = self.selection.select("setLLM");
7326        query = query.arg("name", name.into());
7327        query = query.arg_lazy(
7328            "value",
7329            Box::new(move || {
7330                let value = value.clone();
7331                Box::pin(async move { value.into_id().await.unwrap().quote() })
7332            }),
7333        );
7334        Llm {
7335            proc: self.proc.clone(),
7336            selection: query,
7337            graphql_client: self.graphql_client.clone(),
7338        }
7339    }
7340    /// Set a variable of type ListTypeDef in the llm environment
7341    ///
7342    /// # Arguments
7343    ///
7344    /// * `name` - The name of the variable
7345    /// * `value` - The ListTypeDef value to assign to the variable
7346    pub fn set_list_type_def(
7347        &self,
7348        name: impl Into<String>,
7349        value: impl IntoID<ListTypeDefId>,
7350    ) -> Llm {
7351        let mut query = self.selection.select("setListTypeDef");
7352        query = query.arg("name", name.into());
7353        query = query.arg_lazy(
7354            "value",
7355            Box::new(move || {
7356                let value = value.clone();
7357                Box::pin(async move { value.into_id().await.unwrap().quote() })
7358            }),
7359        );
7360        Llm {
7361            proc: self.proc.clone(),
7362            selection: query,
7363            graphql_client: self.graphql_client.clone(),
7364        }
7365    }
7366    /// Set a variable of type Module in the llm environment
7367    ///
7368    /// # Arguments
7369    ///
7370    /// * `name` - The name of the variable
7371    /// * `value` - The Module value to assign to the variable
7372    pub fn set_module(&self, name: impl Into<String>, value: impl IntoID<ModuleId>) -> Llm {
7373        let mut query = self.selection.select("setModule");
7374        query = query.arg("name", name.into());
7375        query = query.arg_lazy(
7376            "value",
7377            Box::new(move || {
7378                let value = value.clone();
7379                Box::pin(async move { value.into_id().await.unwrap().quote() })
7380            }),
7381        );
7382        Llm {
7383            proc: self.proc.clone(),
7384            selection: query,
7385            graphql_client: self.graphql_client.clone(),
7386        }
7387    }
7388    /// Set a variable of type ModuleConfigClient in the llm environment
7389    ///
7390    /// # Arguments
7391    ///
7392    /// * `name` - The name of the variable
7393    /// * `value` - The ModuleConfigClient value to assign to the variable
7394    pub fn set_module_config_client(
7395        &self,
7396        name: impl Into<String>,
7397        value: impl IntoID<ModuleConfigClientId>,
7398    ) -> Llm {
7399        let mut query = self.selection.select("setModuleConfigClient");
7400        query = query.arg("name", name.into());
7401        query = query.arg_lazy(
7402            "value",
7403            Box::new(move || {
7404                let value = value.clone();
7405                Box::pin(async move { value.into_id().await.unwrap().quote() })
7406            }),
7407        );
7408        Llm {
7409            proc: self.proc.clone(),
7410            selection: query,
7411            graphql_client: self.graphql_client.clone(),
7412        }
7413    }
7414    /// Set a variable of type ModuleSource in the llm environment
7415    ///
7416    /// # Arguments
7417    ///
7418    /// * `name` - The name of the variable
7419    /// * `value` - The ModuleSource value to assign to the variable
7420    pub fn set_module_source(
7421        &self,
7422        name: impl Into<String>,
7423        value: impl IntoID<ModuleSourceId>,
7424    ) -> Llm {
7425        let mut query = self.selection.select("setModuleSource");
7426        query = query.arg("name", name.into());
7427        query = query.arg_lazy(
7428            "value",
7429            Box::new(move || {
7430                let value = value.clone();
7431                Box::pin(async move { value.into_id().await.unwrap().quote() })
7432            }),
7433        );
7434        Llm {
7435            proc: self.proc.clone(),
7436            selection: query,
7437            graphql_client: self.graphql_client.clone(),
7438        }
7439    }
7440    /// Set a variable of type ObjectTypeDef in the llm environment
7441    ///
7442    /// # Arguments
7443    ///
7444    /// * `name` - The name of the variable
7445    /// * `value` - The ObjectTypeDef value to assign to the variable
7446    pub fn set_object_type_def(
7447        &self,
7448        name: impl Into<String>,
7449        value: impl IntoID<ObjectTypeDefId>,
7450    ) -> Llm {
7451        let mut query = self.selection.select("setObjectTypeDef");
7452        query = query.arg("name", name.into());
7453        query = query.arg_lazy(
7454            "value",
7455            Box::new(move || {
7456                let value = value.clone();
7457                Box::pin(async move { value.into_id().await.unwrap().quote() })
7458            }),
7459        );
7460        Llm {
7461            proc: self.proc.clone(),
7462            selection: query,
7463            graphql_client: self.graphql_client.clone(),
7464        }
7465    }
7466    /// Set a variable of type SDKConfig in the llm environment
7467    ///
7468    /// # Arguments
7469    ///
7470    /// * `name` - The name of the variable
7471    /// * `value` - The SDKConfig value to assign to the variable
7472    pub fn set_sdk_config(&self, name: impl Into<String>, value: impl IntoID<SdkConfigId>) -> Llm {
7473        let mut query = self.selection.select("setSDKConfig");
7474        query = query.arg("name", name.into());
7475        query = query.arg_lazy(
7476            "value",
7477            Box::new(move || {
7478                let value = value.clone();
7479                Box::pin(async move { value.into_id().await.unwrap().quote() })
7480            }),
7481        );
7482        Llm {
7483            proc: self.proc.clone(),
7484            selection: query,
7485            graphql_client: self.graphql_client.clone(),
7486        }
7487    }
7488    /// Set a variable of type ScalarTypeDef in the llm environment
7489    ///
7490    /// # Arguments
7491    ///
7492    /// * `name` - The name of the variable
7493    /// * `value` - The ScalarTypeDef value to assign to the variable
7494    pub fn set_scalar_type_def(
7495        &self,
7496        name: impl Into<String>,
7497        value: impl IntoID<ScalarTypeDefId>,
7498    ) -> Llm {
7499        let mut query = self.selection.select("setScalarTypeDef");
7500        query = query.arg("name", name.into());
7501        query = query.arg_lazy(
7502            "value",
7503            Box::new(move || {
7504                let value = value.clone();
7505                Box::pin(async move { value.into_id().await.unwrap().quote() })
7506            }),
7507        );
7508        Llm {
7509            proc: self.proc.clone(),
7510            selection: query,
7511            graphql_client: self.graphql_client.clone(),
7512        }
7513    }
7514    /// Set a variable of type Secret in the llm environment
7515    ///
7516    /// # Arguments
7517    ///
7518    /// * `name` - The name of the variable
7519    /// * `value` - The Secret value to assign to the variable
7520    pub fn set_secret(&self, name: impl Into<String>, value: impl IntoID<SecretId>) -> Llm {
7521        let mut query = self.selection.select("setSecret");
7522        query = query.arg("name", name.into());
7523        query = query.arg_lazy(
7524            "value",
7525            Box::new(move || {
7526                let value = value.clone();
7527                Box::pin(async move { value.into_id().await.unwrap().quote() })
7528            }),
7529        );
7530        Llm {
7531            proc: self.proc.clone(),
7532            selection: query,
7533            graphql_client: self.graphql_client.clone(),
7534        }
7535    }
7536    /// Set a variable of type Service in the llm environment
7537    ///
7538    /// # Arguments
7539    ///
7540    /// * `name` - The name of the variable
7541    /// * `value` - The Service value to assign to the variable
7542    pub fn set_service(&self, name: impl Into<String>, value: impl IntoID<ServiceId>) -> Llm {
7543        let mut query = self.selection.select("setService");
7544        query = query.arg("name", name.into());
7545        query = query.arg_lazy(
7546            "value",
7547            Box::new(move || {
7548                let value = value.clone();
7549                Box::pin(async move { value.into_id().await.unwrap().quote() })
7550            }),
7551        );
7552        Llm {
7553            proc: self.proc.clone(),
7554            selection: query,
7555            graphql_client: self.graphql_client.clone(),
7556        }
7557    }
7558    /// Set a variable of type Socket in the llm environment
7559    ///
7560    /// # Arguments
7561    ///
7562    /// * `name` - The name of the variable
7563    /// * `value` - The Socket value to assign to the variable
7564    pub fn set_socket(&self, name: impl Into<String>, value: impl IntoID<SocketId>) -> Llm {
7565        let mut query = self.selection.select("setSocket");
7566        query = query.arg("name", name.into());
7567        query = query.arg_lazy(
7568            "value",
7569            Box::new(move || {
7570                let value = value.clone();
7571                Box::pin(async move { value.into_id().await.unwrap().quote() })
7572            }),
7573        );
7574        Llm {
7575            proc: self.proc.clone(),
7576            selection: query,
7577            graphql_client: self.graphql_client.clone(),
7578        }
7579    }
7580    /// Set a variable of type SourceMap in the llm environment
7581    ///
7582    /// # Arguments
7583    ///
7584    /// * `name` - The name of the variable
7585    /// * `value` - The SourceMap value to assign to the variable
7586    pub fn set_source_map(&self, name: impl Into<String>, value: impl IntoID<SourceMapId>) -> Llm {
7587        let mut query = self.selection.select("setSourceMap");
7588        query = query.arg("name", name.into());
7589        query = query.arg_lazy(
7590            "value",
7591            Box::new(move || {
7592                let value = value.clone();
7593                Box::pin(async move { value.into_id().await.unwrap().quote() })
7594            }),
7595        );
7596        Llm {
7597            proc: self.proc.clone(),
7598            selection: query,
7599            graphql_client: self.graphql_client.clone(),
7600        }
7601    }
7602    /// Add a string variable to the LLM's environment
7603    ///
7604    /// # Arguments
7605    ///
7606    /// * `name` - The variable name
7607    /// * `value` - The variable value
7608    pub fn set_string(&self, name: impl Into<String>, value: impl Into<String>) -> Llm {
7609        let mut query = self.selection.select("setString");
7610        query = query.arg("name", name.into());
7611        query = query.arg("value", value.into());
7612        Llm {
7613            proc: self.proc.clone(),
7614            selection: query,
7615            graphql_client: self.graphql_client.clone(),
7616        }
7617    }
7618    /// Set a variable of type Terminal in the llm environment
7619    ///
7620    /// # Arguments
7621    ///
7622    /// * `name` - The name of the variable
7623    /// * `value` - The Terminal value to assign to the variable
7624    pub fn set_terminal(&self, name: impl Into<String>, value: impl IntoID<TerminalId>) -> Llm {
7625        let mut query = self.selection.select("setTerminal");
7626        query = query.arg("name", name.into());
7627        query = query.arg_lazy(
7628            "value",
7629            Box::new(move || {
7630                let value = value.clone();
7631                Box::pin(async move { value.into_id().await.unwrap().quote() })
7632            }),
7633        );
7634        Llm {
7635            proc: self.proc.clone(),
7636            selection: query,
7637            graphql_client: self.graphql_client.clone(),
7638        }
7639    }
7640    /// Set a variable of type TypeDef in the llm environment
7641    ///
7642    /// # Arguments
7643    ///
7644    /// * `name` - The name of the variable
7645    /// * `value` - The TypeDef value to assign to the variable
7646    pub fn set_type_def(&self, name: impl Into<String>, value: impl IntoID<TypeDefId>) -> Llm {
7647        let mut query = self.selection.select("setTypeDef");
7648        query = query.arg("name", name.into());
7649        query = query.arg_lazy(
7650            "value",
7651            Box::new(move || {
7652                let value = value.clone();
7653                Box::pin(async move { value.into_id().await.unwrap().quote() })
7654            }),
7655        );
7656        Llm {
7657            proc: self.proc.clone(),
7658            selection: query,
7659            graphql_client: self.graphql_client.clone(),
7660        }
7661    }
7662    /// Retrieve a the current value in the LLM environment, of type Socket
7663    pub fn socket(&self) -> Socket {
7664        let query = self.selection.select("socket");
7665        Socket {
7666            proc: self.proc.clone(),
7667            selection: query,
7668            graphql_client: self.graphql_client.clone(),
7669        }
7670    }
7671    /// Retrieve a the current value in the LLM environment, of type SourceMap
7672    pub fn source_map(&self) -> SourceMap {
7673        let query = self.selection.select("sourceMap");
7674        SourceMap {
7675            proc: self.proc.clone(),
7676            selection: query,
7677            graphql_client: self.graphql_client.clone(),
7678        }
7679    }
7680    /// synchronize LLM state
7681    pub async fn sync(&self) -> Result<Llmid, DaggerError> {
7682        let query = self.selection.select("sync");
7683        query.execute(self.graphql_client.clone()).await
7684    }
7685    /// Retrieve a the current value in the LLM environment, of type Terminal
7686    pub fn terminal(&self) -> Terminal {
7687        let query = self.selection.select("terminal");
7688        Terminal {
7689            proc: self.proc.clone(),
7690            selection: query,
7691            graphql_client: self.graphql_client.clone(),
7692        }
7693    }
7694    /// print documentation for available tools
7695    pub async fn tools(&self) -> Result<String, DaggerError> {
7696        let query = self.selection.select("tools");
7697        query.execute(self.graphql_client.clone()).await
7698    }
7699    /// Retrieve a the current value in the LLM environment, of type TypeDef
7700    pub fn type_def(&self) -> TypeDef {
7701        let query = self.selection.select("typeDef");
7702        TypeDef {
7703            proc: self.proc.clone(),
7704            selection: query,
7705            graphql_client: self.graphql_client.clone(),
7706        }
7707    }
7708    /// list variables in the LLM environment
7709    pub fn variables(&self) -> Vec<LlmVariable> {
7710        let query = self.selection.select("variables");
7711        vec![LlmVariable {
7712            proc: self.proc.clone(),
7713            selection: query,
7714            graphql_client: self.graphql_client.clone(),
7715        }]
7716    }
7717    /// Set a variable of type CacheVolume in the llm environment
7718    ///
7719    /// # Arguments
7720    ///
7721    /// * `value` - The CacheVolume value to assign to the variable
7722    pub fn with_cache_volume(&self, value: impl IntoID<CacheVolumeId>) -> Llm {
7723        let mut query = self.selection.select("withCacheVolume");
7724        query = query.arg_lazy(
7725            "value",
7726            Box::new(move || {
7727                let value = value.clone();
7728                Box::pin(async move { value.into_id().await.unwrap().quote() })
7729            }),
7730        );
7731        Llm {
7732            proc: self.proc.clone(),
7733            selection: query,
7734            graphql_client: self.graphql_client.clone(),
7735        }
7736    }
7737    /// Set a variable of type Container in the llm environment
7738    ///
7739    /// # Arguments
7740    ///
7741    /// * `value` - The Container value to assign to the variable
7742    pub fn with_container(&self, value: impl IntoID<ContainerId>) -> Llm {
7743        let mut query = self.selection.select("withContainer");
7744        query = query.arg_lazy(
7745            "value",
7746            Box::new(move || {
7747                let value = value.clone();
7748                Box::pin(async move { value.into_id().await.unwrap().quote() })
7749            }),
7750        );
7751        Llm {
7752            proc: self.proc.clone(),
7753            selection: query,
7754            graphql_client: self.graphql_client.clone(),
7755        }
7756    }
7757    /// Set a variable of type CurrentModule in the llm environment
7758    ///
7759    /// # Arguments
7760    ///
7761    /// * `value` - The CurrentModule value to assign to the variable
7762    pub fn with_current_module(&self, value: impl IntoID<CurrentModuleId>) -> Llm {
7763        let mut query = self.selection.select("withCurrentModule");
7764        query = query.arg_lazy(
7765            "value",
7766            Box::new(move || {
7767                let value = value.clone();
7768                Box::pin(async move { value.into_id().await.unwrap().quote() })
7769            }),
7770        );
7771        Llm {
7772            proc: self.proc.clone(),
7773            selection: query,
7774            graphql_client: self.graphql_client.clone(),
7775        }
7776    }
7777    /// Set a variable of type Directory in the llm environment
7778    ///
7779    /// # Arguments
7780    ///
7781    /// * `value` - The Directory value to assign to the variable
7782    pub fn with_directory(&self, value: impl IntoID<DirectoryId>) -> Llm {
7783        let mut query = self.selection.select("withDirectory");
7784        query = query.arg_lazy(
7785            "value",
7786            Box::new(move || {
7787                let value = value.clone();
7788                Box::pin(async move { value.into_id().await.unwrap().quote() })
7789            }),
7790        );
7791        Llm {
7792            proc: self.proc.clone(),
7793            selection: query,
7794            graphql_client: self.graphql_client.clone(),
7795        }
7796    }
7797    /// Set a variable of type EnumTypeDef in the llm environment
7798    ///
7799    /// # Arguments
7800    ///
7801    /// * `value` - The EnumTypeDef value to assign to the variable
7802    pub fn with_enum_type_def(&self, value: impl IntoID<EnumTypeDefId>) -> Llm {
7803        let mut query = self.selection.select("withEnumTypeDef");
7804        query = query.arg_lazy(
7805            "value",
7806            Box::new(move || {
7807                let value = value.clone();
7808                Box::pin(async move { value.into_id().await.unwrap().quote() })
7809            }),
7810        );
7811        Llm {
7812            proc: self.proc.clone(),
7813            selection: query,
7814            graphql_client: self.graphql_client.clone(),
7815        }
7816    }
7817    /// Set a variable of type EnumValueTypeDef in the llm environment
7818    ///
7819    /// # Arguments
7820    ///
7821    /// * `value` - The EnumValueTypeDef value to assign to the variable
7822    pub fn with_enum_value_type_def(&self, value: impl IntoID<EnumValueTypeDefId>) -> Llm {
7823        let mut query = self.selection.select("withEnumValueTypeDef");
7824        query = query.arg_lazy(
7825            "value",
7826            Box::new(move || {
7827                let value = value.clone();
7828                Box::pin(async move { value.into_id().await.unwrap().quote() })
7829            }),
7830        );
7831        Llm {
7832            proc: self.proc.clone(),
7833            selection: query,
7834            graphql_client: self.graphql_client.clone(),
7835        }
7836    }
7837    /// Set a variable of type Error in the llm environment
7838    ///
7839    /// # Arguments
7840    ///
7841    /// * `value` - The Error value to assign to the variable
7842    pub fn with_error(&self, value: impl IntoID<ErrorId>) -> Llm {
7843        let mut query = self.selection.select("withError");
7844        query = query.arg_lazy(
7845            "value",
7846            Box::new(move || {
7847                let value = value.clone();
7848                Box::pin(async move { value.into_id().await.unwrap().quote() })
7849            }),
7850        );
7851        Llm {
7852            proc: self.proc.clone(),
7853            selection: query,
7854            graphql_client: self.graphql_client.clone(),
7855        }
7856    }
7857    /// Set a variable of type ErrorValue in the llm environment
7858    ///
7859    /// # Arguments
7860    ///
7861    /// * `value` - The ErrorValue value to assign to the variable
7862    pub fn with_error_value(&self, value: impl IntoID<ErrorValueId>) -> Llm {
7863        let mut query = self.selection.select("withErrorValue");
7864        query = query.arg_lazy(
7865            "value",
7866            Box::new(move || {
7867                let value = value.clone();
7868                Box::pin(async move { value.into_id().await.unwrap().quote() })
7869            }),
7870        );
7871        Llm {
7872            proc: self.proc.clone(),
7873            selection: query,
7874            graphql_client: self.graphql_client.clone(),
7875        }
7876    }
7877    /// Set a variable of type FieldTypeDef in the llm environment
7878    ///
7879    /// # Arguments
7880    ///
7881    /// * `value` - The FieldTypeDef value to assign to the variable
7882    pub fn with_field_type_def(&self, value: impl IntoID<FieldTypeDefId>) -> Llm {
7883        let mut query = self.selection.select("withFieldTypeDef");
7884        query = query.arg_lazy(
7885            "value",
7886            Box::new(move || {
7887                let value = value.clone();
7888                Box::pin(async move { value.into_id().await.unwrap().quote() })
7889            }),
7890        );
7891        Llm {
7892            proc: self.proc.clone(),
7893            selection: query,
7894            graphql_client: self.graphql_client.clone(),
7895        }
7896    }
7897    /// Set a variable of type File in the llm environment
7898    ///
7899    /// # Arguments
7900    ///
7901    /// * `value` - The File value to assign to the variable
7902    pub fn with_file(&self, value: impl IntoID<FileId>) -> Llm {
7903        let mut query = self.selection.select("withFile");
7904        query = query.arg_lazy(
7905            "value",
7906            Box::new(move || {
7907                let value = value.clone();
7908                Box::pin(async move { value.into_id().await.unwrap().quote() })
7909            }),
7910        );
7911        Llm {
7912            proc: self.proc.clone(),
7913            selection: query,
7914            graphql_client: self.graphql_client.clone(),
7915        }
7916    }
7917    /// Set a variable of type Function in the llm environment
7918    ///
7919    /// # Arguments
7920    ///
7921    /// * `value` - The Function value to assign to the variable
7922    pub fn with_function(&self, value: impl IntoID<FunctionId>) -> Llm {
7923        let mut query = self.selection.select("withFunction");
7924        query = query.arg_lazy(
7925            "value",
7926            Box::new(move || {
7927                let value = value.clone();
7928                Box::pin(async move { value.into_id().await.unwrap().quote() })
7929            }),
7930        );
7931        Llm {
7932            proc: self.proc.clone(),
7933            selection: query,
7934            graphql_client: self.graphql_client.clone(),
7935        }
7936    }
7937    /// Set a variable of type FunctionArg in the llm environment
7938    ///
7939    /// # Arguments
7940    ///
7941    /// * `value` - The FunctionArg value to assign to the variable
7942    pub fn with_function_arg(&self, value: impl IntoID<FunctionArgId>) -> Llm {
7943        let mut query = self.selection.select("withFunctionArg");
7944        query = query.arg_lazy(
7945            "value",
7946            Box::new(move || {
7947                let value = value.clone();
7948                Box::pin(async move { value.into_id().await.unwrap().quote() })
7949            }),
7950        );
7951        Llm {
7952            proc: self.proc.clone(),
7953            selection: query,
7954            graphql_client: self.graphql_client.clone(),
7955        }
7956    }
7957    /// Set a variable of type FunctionCall in the llm environment
7958    ///
7959    /// # Arguments
7960    ///
7961    /// * `value` - The FunctionCall value to assign to the variable
7962    pub fn with_function_call(&self, value: impl IntoID<FunctionCallId>) -> Llm {
7963        let mut query = self.selection.select("withFunctionCall");
7964        query = query.arg_lazy(
7965            "value",
7966            Box::new(move || {
7967                let value = value.clone();
7968                Box::pin(async move { value.into_id().await.unwrap().quote() })
7969            }),
7970        );
7971        Llm {
7972            proc: self.proc.clone(),
7973            selection: query,
7974            graphql_client: self.graphql_client.clone(),
7975        }
7976    }
7977    /// Set a variable of type FunctionCallArgValue in the llm environment
7978    ///
7979    /// # Arguments
7980    ///
7981    /// * `value` - The FunctionCallArgValue value to assign to the variable
7982    pub fn with_function_call_arg_value(&self, value: impl IntoID<FunctionCallArgValueId>) -> Llm {
7983        let mut query = self.selection.select("withFunctionCallArgValue");
7984        query = query.arg_lazy(
7985            "value",
7986            Box::new(move || {
7987                let value = value.clone();
7988                Box::pin(async move { value.into_id().await.unwrap().quote() })
7989            }),
7990        );
7991        Llm {
7992            proc: self.proc.clone(),
7993            selection: query,
7994            graphql_client: self.graphql_client.clone(),
7995        }
7996    }
7997    /// Set a variable of type GeneratedCode in the llm environment
7998    ///
7999    /// # Arguments
8000    ///
8001    /// * `value` - The GeneratedCode value to assign to the variable
8002    pub fn with_generated_code(&self, value: impl IntoID<GeneratedCodeId>) -> Llm {
8003        let mut query = self.selection.select("withGeneratedCode");
8004        query = query.arg_lazy(
8005            "value",
8006            Box::new(move || {
8007                let value = value.clone();
8008                Box::pin(async move { value.into_id().await.unwrap().quote() })
8009            }),
8010        );
8011        Llm {
8012            proc: self.proc.clone(),
8013            selection: query,
8014            graphql_client: self.graphql_client.clone(),
8015        }
8016    }
8017    /// Set a variable of type GitRef in the llm environment
8018    ///
8019    /// # Arguments
8020    ///
8021    /// * `value` - The GitRef value to assign to the variable
8022    pub fn with_git_ref(&self, value: impl IntoID<GitRefId>) -> Llm {
8023        let mut query = self.selection.select("withGitRef");
8024        query = query.arg_lazy(
8025            "value",
8026            Box::new(move || {
8027                let value = value.clone();
8028                Box::pin(async move { value.into_id().await.unwrap().quote() })
8029            }),
8030        );
8031        Llm {
8032            proc: self.proc.clone(),
8033            selection: query,
8034            graphql_client: self.graphql_client.clone(),
8035        }
8036    }
8037    /// Set a variable of type GitRepository in the llm environment
8038    ///
8039    /// # Arguments
8040    ///
8041    /// * `value` - The GitRepository value to assign to the variable
8042    pub fn with_git_repository(&self, value: impl IntoID<GitRepositoryId>) -> Llm {
8043        let mut query = self.selection.select("withGitRepository");
8044        query = query.arg_lazy(
8045            "value",
8046            Box::new(move || {
8047                let value = value.clone();
8048                Box::pin(async move { value.into_id().await.unwrap().quote() })
8049            }),
8050        );
8051        Llm {
8052            proc: self.proc.clone(),
8053            selection: query,
8054            graphql_client: self.graphql_client.clone(),
8055        }
8056    }
8057    /// Set a variable of type InputTypeDef in the llm environment
8058    ///
8059    /// # Arguments
8060    ///
8061    /// * `value` - The InputTypeDef value to assign to the variable
8062    pub fn with_input_type_def(&self, value: impl IntoID<InputTypeDefId>) -> Llm {
8063        let mut query = self.selection.select("withInputTypeDef");
8064        query = query.arg_lazy(
8065            "value",
8066            Box::new(move || {
8067                let value = value.clone();
8068                Box::pin(async move { value.into_id().await.unwrap().quote() })
8069            }),
8070        );
8071        Llm {
8072            proc: self.proc.clone(),
8073            selection: query,
8074            graphql_client: self.graphql_client.clone(),
8075        }
8076    }
8077    /// Set a variable of type InterfaceTypeDef in the llm environment
8078    ///
8079    /// # Arguments
8080    ///
8081    /// * `value` - The InterfaceTypeDef value to assign to the variable
8082    pub fn with_interface_type_def(&self, value: impl IntoID<InterfaceTypeDefId>) -> Llm {
8083        let mut query = self.selection.select("withInterfaceTypeDef");
8084        query = query.arg_lazy(
8085            "value",
8086            Box::new(move || {
8087                let value = value.clone();
8088                Box::pin(async move { value.into_id().await.unwrap().quote() })
8089            }),
8090        );
8091        Llm {
8092            proc: self.proc.clone(),
8093            selection: query,
8094            graphql_client: self.graphql_client.clone(),
8095        }
8096    }
8097    /// Set a variable of type LLM in the llm environment
8098    ///
8099    /// # Arguments
8100    ///
8101    /// * `value` - The LLM value to assign to the variable
8102    pub fn with_llm(&self, value: impl IntoID<Llmid>) -> Llm {
8103        let mut query = self.selection.select("withLLM");
8104        query = query.arg_lazy(
8105            "value",
8106            Box::new(move || {
8107                let value = value.clone();
8108                Box::pin(async move { value.into_id().await.unwrap().quote() })
8109            }),
8110        );
8111        Llm {
8112            proc: self.proc.clone(),
8113            selection: query,
8114            graphql_client: self.graphql_client.clone(),
8115        }
8116    }
8117    /// Set a variable of type ListTypeDef in the llm environment
8118    ///
8119    /// # Arguments
8120    ///
8121    /// * `value` - The ListTypeDef value to assign to the variable
8122    pub fn with_list_type_def(&self, value: impl IntoID<ListTypeDefId>) -> Llm {
8123        let mut query = self.selection.select("withListTypeDef");
8124        query = query.arg_lazy(
8125            "value",
8126            Box::new(move || {
8127                let value = value.clone();
8128                Box::pin(async move { value.into_id().await.unwrap().quote() })
8129            }),
8130        );
8131        Llm {
8132            proc: self.proc.clone(),
8133            selection: query,
8134            graphql_client: self.graphql_client.clone(),
8135        }
8136    }
8137    /// swap out the llm model
8138    ///
8139    /// # Arguments
8140    ///
8141    /// * `model` - The model to use
8142    pub fn with_model(&self, model: impl Into<String>) -> Llm {
8143        let mut query = self.selection.select("withModel");
8144        query = query.arg("model", model.into());
8145        Llm {
8146            proc: self.proc.clone(),
8147            selection: query,
8148            graphql_client: self.graphql_client.clone(),
8149        }
8150    }
8151    /// Set a variable of type Module in the llm environment
8152    ///
8153    /// # Arguments
8154    ///
8155    /// * `value` - The Module value to assign to the variable
8156    pub fn with_module(&self, value: impl IntoID<ModuleId>) -> Llm {
8157        let mut query = self.selection.select("withModule");
8158        query = query.arg_lazy(
8159            "value",
8160            Box::new(move || {
8161                let value = value.clone();
8162                Box::pin(async move { value.into_id().await.unwrap().quote() })
8163            }),
8164        );
8165        Llm {
8166            proc: self.proc.clone(),
8167            selection: query,
8168            graphql_client: self.graphql_client.clone(),
8169        }
8170    }
8171    /// Set a variable of type ModuleConfigClient in the llm environment
8172    ///
8173    /// # Arguments
8174    ///
8175    /// * `value` - The ModuleConfigClient value to assign to the variable
8176    pub fn with_module_config_client(&self, value: impl IntoID<ModuleConfigClientId>) -> Llm {
8177        let mut query = self.selection.select("withModuleConfigClient");
8178        query = query.arg_lazy(
8179            "value",
8180            Box::new(move || {
8181                let value = value.clone();
8182                Box::pin(async move { value.into_id().await.unwrap().quote() })
8183            }),
8184        );
8185        Llm {
8186            proc: self.proc.clone(),
8187            selection: query,
8188            graphql_client: self.graphql_client.clone(),
8189        }
8190    }
8191    /// Set a variable of type ModuleSource in the llm environment
8192    ///
8193    /// # Arguments
8194    ///
8195    /// * `value` - The ModuleSource value to assign to the variable
8196    pub fn with_module_source(&self, value: impl IntoID<ModuleSourceId>) -> Llm {
8197        let mut query = self.selection.select("withModuleSource");
8198        query = query.arg_lazy(
8199            "value",
8200            Box::new(move || {
8201                let value = value.clone();
8202                Box::pin(async move { value.into_id().await.unwrap().quote() })
8203            }),
8204        );
8205        Llm {
8206            proc: self.proc.clone(),
8207            selection: query,
8208            graphql_client: self.graphql_client.clone(),
8209        }
8210    }
8211    /// Set a variable of type ObjectTypeDef in the llm environment
8212    ///
8213    /// # Arguments
8214    ///
8215    /// * `value` - The ObjectTypeDef value to assign to the variable
8216    pub fn with_object_type_def(&self, value: impl IntoID<ObjectTypeDefId>) -> Llm {
8217        let mut query = self.selection.select("withObjectTypeDef");
8218        query = query.arg_lazy(
8219            "value",
8220            Box::new(move || {
8221                let value = value.clone();
8222                Box::pin(async move { value.into_id().await.unwrap().quote() })
8223            }),
8224        );
8225        Llm {
8226            proc: self.proc.clone(),
8227            selection: query,
8228            graphql_client: self.graphql_client.clone(),
8229        }
8230    }
8231    /// append a prompt to the llm context
8232    ///
8233    /// # Arguments
8234    ///
8235    /// * `prompt` - The prompt to send
8236    pub fn with_prompt(&self, prompt: impl Into<String>) -> Llm {
8237        let mut query = self.selection.select("withPrompt");
8238        query = query.arg("prompt", prompt.into());
8239        Llm {
8240            proc: self.proc.clone(),
8241            selection: query,
8242            graphql_client: self.graphql_client.clone(),
8243        }
8244    }
8245    /// append the contents of a file to the llm context
8246    ///
8247    /// # Arguments
8248    ///
8249    /// * `file` - The file to read the prompt from
8250    pub fn with_prompt_file(&self, file: impl IntoID<FileId>) -> Llm {
8251        let mut query = self.selection.select("withPromptFile");
8252        query = query.arg_lazy(
8253            "file",
8254            Box::new(move || {
8255                let file = file.clone();
8256                Box::pin(async move { file.into_id().await.unwrap().quote() })
8257            }),
8258        );
8259        Llm {
8260            proc: self.proc.clone(),
8261            selection: query,
8262            graphql_client: self.graphql_client.clone(),
8263        }
8264    }
8265    /// Add a string variable to the LLM's environment
8266    ///
8267    /// # Arguments
8268    ///
8269    /// * `name` - The variable name
8270    /// * `value` - The variable value
8271    pub fn with_prompt_var(&self, name: impl Into<String>, value: impl Into<String>) -> Llm {
8272        let mut query = self.selection.select("withPromptVar");
8273        query = query.arg("name", name.into());
8274        query = query.arg("value", value.into());
8275        Llm {
8276            proc: self.proc.clone(),
8277            selection: query,
8278            graphql_client: self.graphql_client.clone(),
8279        }
8280    }
8281    /// Set a variable of type SDKConfig in the llm environment
8282    ///
8283    /// # Arguments
8284    ///
8285    /// * `value` - The SDKConfig value to assign to the variable
8286    pub fn with_sdk_config(&self, value: impl IntoID<SdkConfigId>) -> Llm {
8287        let mut query = self.selection.select("withSDKConfig");
8288        query = query.arg_lazy(
8289            "value",
8290            Box::new(move || {
8291                let value = value.clone();
8292                Box::pin(async move { value.into_id().await.unwrap().quote() })
8293            }),
8294        );
8295        Llm {
8296            proc: self.proc.clone(),
8297            selection: query,
8298            graphql_client: self.graphql_client.clone(),
8299        }
8300    }
8301    /// Set a variable of type ScalarTypeDef in the llm environment
8302    ///
8303    /// # Arguments
8304    ///
8305    /// * `value` - The ScalarTypeDef value to assign to the variable
8306    pub fn with_scalar_type_def(&self, value: impl IntoID<ScalarTypeDefId>) -> Llm {
8307        let mut query = self.selection.select("withScalarTypeDef");
8308        query = query.arg_lazy(
8309            "value",
8310            Box::new(move || {
8311                let value = value.clone();
8312                Box::pin(async move { value.into_id().await.unwrap().quote() })
8313            }),
8314        );
8315        Llm {
8316            proc: self.proc.clone(),
8317            selection: query,
8318            graphql_client: self.graphql_client.clone(),
8319        }
8320    }
8321    /// Set a variable of type Secret in the llm environment
8322    ///
8323    /// # Arguments
8324    ///
8325    /// * `value` - The Secret value to assign to the variable
8326    pub fn with_secret(&self, value: impl IntoID<SecretId>) -> Llm {
8327        let mut query = self.selection.select("withSecret");
8328        query = query.arg_lazy(
8329            "value",
8330            Box::new(move || {
8331                let value = value.clone();
8332                Box::pin(async move { value.into_id().await.unwrap().quote() })
8333            }),
8334        );
8335        Llm {
8336            proc: self.proc.clone(),
8337            selection: query,
8338            graphql_client: self.graphql_client.clone(),
8339        }
8340    }
8341    /// Set a variable of type Service in the llm environment
8342    ///
8343    /// # Arguments
8344    ///
8345    /// * `value` - The Service value to assign to the variable
8346    pub fn with_service(&self, value: impl IntoID<ServiceId>) -> Llm {
8347        let mut query = self.selection.select("withService");
8348        query = query.arg_lazy(
8349            "value",
8350            Box::new(move || {
8351                let value = value.clone();
8352                Box::pin(async move { value.into_id().await.unwrap().quote() })
8353            }),
8354        );
8355        Llm {
8356            proc: self.proc.clone(),
8357            selection: query,
8358            graphql_client: self.graphql_client.clone(),
8359        }
8360    }
8361    /// Set a variable of type Socket in the llm environment
8362    ///
8363    /// # Arguments
8364    ///
8365    /// * `value` - The Socket value to assign to the variable
8366    pub fn with_socket(&self, value: impl IntoID<SocketId>) -> Llm {
8367        let mut query = self.selection.select("withSocket");
8368        query = query.arg_lazy(
8369            "value",
8370            Box::new(move || {
8371                let value = value.clone();
8372                Box::pin(async move { value.into_id().await.unwrap().quote() })
8373            }),
8374        );
8375        Llm {
8376            proc: self.proc.clone(),
8377            selection: query,
8378            graphql_client: self.graphql_client.clone(),
8379        }
8380    }
8381    /// Set a variable of type SourceMap in the llm environment
8382    ///
8383    /// # Arguments
8384    ///
8385    /// * `value` - The SourceMap value to assign to the variable
8386    pub fn with_source_map(&self, value: impl IntoID<SourceMapId>) -> Llm {
8387        let mut query = self.selection.select("withSourceMap");
8388        query = query.arg_lazy(
8389            "value",
8390            Box::new(move || {
8391                let value = value.clone();
8392                Box::pin(async move { value.into_id().await.unwrap().quote() })
8393            }),
8394        );
8395        Llm {
8396            proc: self.proc.clone(),
8397            selection: query,
8398            graphql_client: self.graphql_client.clone(),
8399        }
8400    }
8401    /// Set a variable of type Terminal in the llm environment
8402    ///
8403    /// # Arguments
8404    ///
8405    /// * `value` - The Terminal value to assign to the variable
8406    pub fn with_terminal(&self, value: impl IntoID<TerminalId>) -> Llm {
8407        let mut query = self.selection.select("withTerminal");
8408        query = query.arg_lazy(
8409            "value",
8410            Box::new(move || {
8411                let value = value.clone();
8412                Box::pin(async move { value.into_id().await.unwrap().quote() })
8413            }),
8414        );
8415        Llm {
8416            proc: self.proc.clone(),
8417            selection: query,
8418            graphql_client: self.graphql_client.clone(),
8419        }
8420    }
8421    /// Set a variable of type TypeDef in the llm environment
8422    ///
8423    /// # Arguments
8424    ///
8425    /// * `value` - The TypeDef value to assign to the variable
8426    pub fn with_type_def(&self, value: impl IntoID<TypeDefId>) -> Llm {
8427        let mut query = self.selection.select("withTypeDef");
8428        query = query.arg_lazy(
8429            "value",
8430            Box::new(move || {
8431                let value = value.clone();
8432                Box::pin(async move { value.into_id().await.unwrap().quote() })
8433            }),
8434        );
8435        Llm {
8436            proc: self.proc.clone(),
8437            selection: query,
8438            graphql_client: self.graphql_client.clone(),
8439        }
8440    }
8441}
8442#[derive(Clone)]
8443pub struct LlmVariable {
8444    pub proc: Option<Arc<DaggerSessionProc>>,
8445    pub selection: Selection,
8446    pub graphql_client: DynGraphQLClient,
8447}
8448impl LlmVariable {
8449    pub async fn hash(&self) -> Result<String, DaggerError> {
8450        let query = self.selection.select("hash");
8451        query.execute(self.graphql_client.clone()).await
8452    }
8453    /// A unique identifier for this LLMVariable.
8454    pub async fn id(&self) -> Result<LlmVariableId, DaggerError> {
8455        let query = self.selection.select("id");
8456        query.execute(self.graphql_client.clone()).await
8457    }
8458    pub async fn name(&self) -> Result<String, DaggerError> {
8459        let query = self.selection.select("name");
8460        query.execute(self.graphql_client.clone()).await
8461    }
8462    pub async fn type_name(&self) -> Result<String, DaggerError> {
8463        let query = self.selection.select("typeName");
8464        query.execute(self.graphql_client.clone()).await
8465    }
8466}
8467#[derive(Clone)]
8468pub struct Label {
8469    pub proc: Option<Arc<DaggerSessionProc>>,
8470    pub selection: Selection,
8471    pub graphql_client: DynGraphQLClient,
8472}
8473impl Label {
8474    /// A unique identifier for this Label.
8475    pub async fn id(&self) -> Result<LabelId, DaggerError> {
8476        let query = self.selection.select("id");
8477        query.execute(self.graphql_client.clone()).await
8478    }
8479    /// The label name.
8480    pub async fn name(&self) -> Result<String, DaggerError> {
8481        let query = self.selection.select("name");
8482        query.execute(self.graphql_client.clone()).await
8483    }
8484    /// The label value.
8485    pub async fn value(&self) -> Result<String, DaggerError> {
8486        let query = self.selection.select("value");
8487        query.execute(self.graphql_client.clone()).await
8488    }
8489}
8490#[derive(Clone)]
8491pub struct ListTypeDef {
8492    pub proc: Option<Arc<DaggerSessionProc>>,
8493    pub selection: Selection,
8494    pub graphql_client: DynGraphQLClient,
8495}
8496impl ListTypeDef {
8497    /// The type of the elements in the list.
8498    pub fn element_type_def(&self) -> TypeDef {
8499        let query = self.selection.select("elementTypeDef");
8500        TypeDef {
8501            proc: self.proc.clone(),
8502            selection: query,
8503            graphql_client: self.graphql_client.clone(),
8504        }
8505    }
8506    /// A unique identifier for this ListTypeDef.
8507    pub async fn id(&self) -> Result<ListTypeDefId, DaggerError> {
8508        let query = self.selection.select("id");
8509        query.execute(self.graphql_client.clone()).await
8510    }
8511}
8512#[derive(Clone)]
8513pub struct Module {
8514    pub proc: Option<Arc<DaggerSessionProc>>,
8515    pub selection: Selection,
8516    pub graphql_client: DynGraphQLClient,
8517}
8518impl Module {
8519    /// The dependencies of the module.
8520    pub fn dependencies(&self) -> Vec<Module> {
8521        let query = self.selection.select("dependencies");
8522        vec![Module {
8523            proc: self.proc.clone(),
8524            selection: query,
8525            graphql_client: self.graphql_client.clone(),
8526        }]
8527    }
8528    /// The doc string of the module, if any
8529    pub async fn description(&self) -> Result<String, DaggerError> {
8530        let query = self.selection.select("description");
8531        query.execute(self.graphql_client.clone()).await
8532    }
8533    /// Enumerations served by this module.
8534    pub fn enums(&self) -> Vec<TypeDef> {
8535        let query = self.selection.select("enums");
8536        vec![TypeDef {
8537            proc: self.proc.clone(),
8538            selection: query,
8539            graphql_client: self.graphql_client.clone(),
8540        }]
8541    }
8542    /// The generated files and directories made on top of the module source's context directory.
8543    pub fn generated_context_directory(&self) -> Directory {
8544        let query = self.selection.select("generatedContextDirectory");
8545        Directory {
8546            proc: self.proc.clone(),
8547            selection: query,
8548            graphql_client: self.graphql_client.clone(),
8549        }
8550    }
8551    /// A unique identifier for this Module.
8552    pub async fn id(&self) -> Result<ModuleId, DaggerError> {
8553        let query = self.selection.select("id");
8554        query.execute(self.graphql_client.clone()).await
8555    }
8556    /// Interfaces served by this module.
8557    pub fn interfaces(&self) -> Vec<TypeDef> {
8558        let query = self.selection.select("interfaces");
8559        vec![TypeDef {
8560            proc: self.proc.clone(),
8561            selection: query,
8562            graphql_client: self.graphql_client.clone(),
8563        }]
8564    }
8565    /// The name of the module
8566    pub async fn name(&self) -> Result<String, DaggerError> {
8567        let query = self.selection.select("name");
8568        query.execute(self.graphql_client.clone()).await
8569    }
8570    /// Objects served by this module.
8571    pub fn objects(&self) -> Vec<TypeDef> {
8572        let query = self.selection.select("objects");
8573        vec![TypeDef {
8574            proc: self.proc.clone(),
8575            selection: query,
8576            graphql_client: self.graphql_client.clone(),
8577        }]
8578    }
8579    /// The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile.
8580    pub fn runtime(&self) -> Container {
8581        let query = self.selection.select("runtime");
8582        Container {
8583            proc: self.proc.clone(),
8584            selection: query,
8585            graphql_client: self.graphql_client.clone(),
8586        }
8587    }
8588    /// The SDK config used by this module.
8589    pub fn sdk(&self) -> SdkConfig {
8590        let query = self.selection.select("sdk");
8591        SdkConfig {
8592            proc: self.proc.clone(),
8593            selection: query,
8594            graphql_client: self.graphql_client.clone(),
8595        }
8596    }
8597    /// Serve a module's API in the current session.
8598    /// Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
8599    pub async fn serve(&self) -> Result<Void, DaggerError> {
8600        let query = self.selection.select("serve");
8601        query.execute(self.graphql_client.clone()).await
8602    }
8603    /// The source for the module.
8604    pub fn source(&self) -> ModuleSource {
8605        let query = self.selection.select("source");
8606        ModuleSource {
8607            proc: self.proc.clone(),
8608            selection: query,
8609            graphql_client: self.graphql_client.clone(),
8610        }
8611    }
8612    /// Forces evaluation of the module, including any loading into the engine and associated validation.
8613    pub async fn sync(&self) -> Result<ModuleId, DaggerError> {
8614        let query = self.selection.select("sync");
8615        query.execute(self.graphql_client.clone()).await
8616    }
8617    /// Retrieves the module with the given description
8618    ///
8619    /// # Arguments
8620    ///
8621    /// * `description` - The description to set
8622    pub fn with_description(&self, description: impl Into<String>) -> Module {
8623        let mut query = self.selection.select("withDescription");
8624        query = query.arg("description", description.into());
8625        Module {
8626            proc: self.proc.clone(),
8627            selection: query,
8628            graphql_client: self.graphql_client.clone(),
8629        }
8630    }
8631    /// This module plus the given Enum type and associated values
8632    pub fn with_enum(&self, r#enum: impl IntoID<TypeDefId>) -> Module {
8633        let mut query = self.selection.select("withEnum");
8634        query = query.arg_lazy(
8635            "enum",
8636            Box::new(move || {
8637                let r#enum = r#enum.clone();
8638                Box::pin(async move { r#enum.into_id().await.unwrap().quote() })
8639            }),
8640        );
8641        Module {
8642            proc: self.proc.clone(),
8643            selection: query,
8644            graphql_client: self.graphql_client.clone(),
8645        }
8646    }
8647    /// This module plus the given Interface type and associated functions
8648    pub fn with_interface(&self, iface: impl IntoID<TypeDefId>) -> Module {
8649        let mut query = self.selection.select("withInterface");
8650        query = query.arg_lazy(
8651            "iface",
8652            Box::new(move || {
8653                let iface = iface.clone();
8654                Box::pin(async move { iface.into_id().await.unwrap().quote() })
8655            }),
8656        );
8657        Module {
8658            proc: self.proc.clone(),
8659            selection: query,
8660            graphql_client: self.graphql_client.clone(),
8661        }
8662    }
8663    /// This module plus the given Object type and associated functions.
8664    pub fn with_object(&self, object: impl IntoID<TypeDefId>) -> Module {
8665        let mut query = self.selection.select("withObject");
8666        query = query.arg_lazy(
8667            "object",
8668            Box::new(move || {
8669                let object = object.clone();
8670                Box::pin(async move { object.into_id().await.unwrap().quote() })
8671            }),
8672        );
8673        Module {
8674            proc: self.proc.clone(),
8675            selection: query,
8676            graphql_client: self.graphql_client.clone(),
8677        }
8678    }
8679}
8680#[derive(Clone)]
8681pub struct ModuleConfigClient {
8682    pub proc: Option<Arc<DaggerSessionProc>>,
8683    pub selection: Selection,
8684    pub graphql_client: DynGraphQLClient,
8685}
8686impl ModuleConfigClient {
8687    /// If true, generate the client in developer mode.
8688    pub async fn dev(&self) -> Result<bool, DaggerError> {
8689        let query = self.selection.select("dev");
8690        query.execute(self.graphql_client.clone()).await
8691    }
8692    /// The directory the client is generated in.
8693    pub async fn directory(&self) -> Result<String, DaggerError> {
8694        let query = self.selection.select("directory");
8695        query.execute(self.graphql_client.clone()).await
8696    }
8697    /// The generator to use
8698    pub async fn generator(&self) -> Result<String, DaggerError> {
8699        let query = self.selection.select("generator");
8700        query.execute(self.graphql_client.clone()).await
8701    }
8702    /// A unique identifier for this ModuleConfigClient.
8703    pub async fn id(&self) -> Result<ModuleConfigClientId, DaggerError> {
8704        let query = self.selection.select("id");
8705        query.execute(self.graphql_client.clone()).await
8706    }
8707}
8708#[derive(Clone)]
8709pub struct ModuleSource {
8710    pub proc: Option<Arc<DaggerSessionProc>>,
8711    pub selection: Selection,
8712    pub graphql_client: DynGraphQLClient,
8713}
8714#[derive(Builder, Debug, PartialEq)]
8715pub struct ModuleSourceWithClientOpts {
8716    /// Generate in developer mode
8717    #[builder(setter(into, strip_option), default)]
8718    pub dev: Option<bool>,
8719}
8720impl ModuleSource {
8721    /// Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation
8722    pub fn as_module(&self) -> Module {
8723        let query = self.selection.select("asModule");
8724        Module {
8725            proc: self.proc.clone(),
8726            selection: query,
8727            graphql_client: self.graphql_client.clone(),
8728        }
8729    }
8730    /// A human readable ref string representation of this module source.
8731    pub async fn as_string(&self) -> Result<String, DaggerError> {
8732        let query = self.selection.select("asString");
8733        query.execute(self.graphql_client.clone()).await
8734    }
8735    /// The ref to clone the root of the git repo from. Only valid for git sources.
8736    pub async fn clone_ref(&self) -> Result<String, DaggerError> {
8737        let query = self.selection.select("cloneRef");
8738        query.execute(self.graphql_client.clone()).await
8739    }
8740    /// The resolved commit of the git repo this source points to. Only valid for git sources.
8741    pub async fn commit(&self) -> Result<String, DaggerError> {
8742        let query = self.selection.select("commit");
8743        query.execute(self.graphql_client.clone()).await
8744    }
8745    /// The clients generated for the module.
8746    pub fn config_clients(&self) -> Vec<ModuleConfigClient> {
8747        let query = self.selection.select("configClients");
8748        vec![ModuleConfigClient {
8749            proc: self.proc.clone(),
8750            selection: query,
8751            graphql_client: self.graphql_client.clone(),
8752        }]
8753    }
8754    /// Whether an existing dagger.json for the module was found.
8755    pub async fn config_exists(&self) -> Result<bool, DaggerError> {
8756        let query = self.selection.select("configExists");
8757        query.execute(self.graphql_client.clone()).await
8758    }
8759    /// The full directory loaded for the module source, including the source code as a subdirectory.
8760    pub fn context_directory(&self) -> Directory {
8761        let query = self.selection.select("contextDirectory");
8762        Directory {
8763            proc: self.proc.clone(),
8764            selection: query,
8765            graphql_client: self.graphql_client.clone(),
8766        }
8767    }
8768    /// The dependencies of the module source.
8769    pub fn dependencies(&self) -> Vec<ModuleSource> {
8770        let query = self.selection.select("dependencies");
8771        vec![ModuleSource {
8772            proc: self.proc.clone(),
8773            selection: query,
8774            graphql_client: self.graphql_client.clone(),
8775        }]
8776    }
8777    /// 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.
8778    pub async fn digest(&self) -> Result<String, DaggerError> {
8779        let query = self.selection.select("digest");
8780        query.execute(self.graphql_client.clone()).await
8781    }
8782    /// The directory containing the module configuration and source code (source code may be in a subdir).
8783    ///
8784    /// # Arguments
8785    ///
8786    /// * `path` - A subpath from the source directory to select.
8787    pub fn directory(&self, path: impl Into<String>) -> Directory {
8788        let mut query = self.selection.select("directory");
8789        query = query.arg("path", path.into());
8790        Directory {
8791            proc: self.proc.clone(),
8792            selection: query,
8793            graphql_client: self.graphql_client.clone(),
8794        }
8795    }
8796    /// The engine version of the module.
8797    pub async fn engine_version(&self) -> Result<String, DaggerError> {
8798        let query = self.selection.select("engineVersion");
8799        query.execute(self.graphql_client.clone()).await
8800    }
8801    /// The generated files and directories made on top of the module source's context directory.
8802    pub fn generated_context_directory(&self) -> Directory {
8803        let query = self.selection.select("generatedContextDirectory");
8804        Directory {
8805            proc: self.proc.clone(),
8806            selection: query,
8807            graphql_client: self.graphql_client.clone(),
8808        }
8809    }
8810    /// The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket). Only valid for git sources.
8811    pub async fn html_repo_url(&self) -> Result<String, DaggerError> {
8812        let query = self.selection.select("htmlRepoURL");
8813        query.execute(self.graphql_client.clone()).await
8814    }
8815    /// The URL to the source's git repo in a web browser. Only valid for git sources.
8816    pub async fn html_url(&self) -> Result<String, DaggerError> {
8817        let query = self.selection.select("htmlURL");
8818        query.execute(self.graphql_client.clone()).await
8819    }
8820    /// A unique identifier for this ModuleSource.
8821    pub async fn id(&self) -> Result<ModuleSourceId, DaggerError> {
8822        let query = self.selection.select("id");
8823        query.execute(self.graphql_client.clone()).await
8824    }
8825    /// The kind of module source (currently local, git or dir).
8826    pub async fn kind(&self) -> Result<ModuleSourceKind, DaggerError> {
8827        let query = self.selection.select("kind");
8828        query.execute(self.graphql_client.clone()).await
8829    }
8830    /// 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.
8831    pub async fn local_context_directory_path(&self) -> Result<String, DaggerError> {
8832        let query = self.selection.select("localContextDirectoryPath");
8833        query.execute(self.graphql_client.clone()).await
8834    }
8835    /// The name of the module, including any setting via the withName API.
8836    pub async fn module_name(&self) -> Result<String, DaggerError> {
8837        let query = self.selection.select("moduleName");
8838        query.execute(self.graphql_client.clone()).await
8839    }
8840    /// The original name of the module as read from the module's dagger.json (or set for the first time with the withName API).
8841    pub async fn module_original_name(&self) -> Result<String, DaggerError> {
8842        let query = self.selection.select("moduleOriginalName");
8843        query.execute(self.graphql_client.clone()).await
8844    }
8845    /// The original subpath used when instantiating this module source, relative to the context directory.
8846    pub async fn original_subpath(&self) -> Result<String, DaggerError> {
8847        let query = self.selection.select("originalSubpath");
8848        query.execute(self.graphql_client.clone()).await
8849    }
8850    /// The pinned version of this module source.
8851    pub async fn pin(&self) -> Result<String, DaggerError> {
8852        let query = self.selection.select("pin");
8853        query.execute(self.graphql_client.clone()).await
8854    }
8855    /// The import path corresponding to the root of the git repo this source points to. Only valid for git sources.
8856    pub async fn repo_root_path(&self) -> Result<String, DaggerError> {
8857        let query = self.selection.select("repoRootPath");
8858        query.execute(self.graphql_client.clone()).await
8859    }
8860    /// The SDK configuration of the module.
8861    pub fn sdk(&self) -> SdkConfig {
8862        let query = self.selection.select("sdk");
8863        SdkConfig {
8864            proc: self.proc.clone(),
8865            selection: query,
8866            graphql_client: self.graphql_client.clone(),
8867        }
8868    }
8869    /// The path, relative to the context directory, that contains the module's dagger.json.
8870    pub async fn source_root_subpath(&self) -> Result<String, DaggerError> {
8871        let query = self.selection.select("sourceRootSubpath");
8872        query.execute(self.graphql_client.clone()).await
8873    }
8874    /// The path to the directory containing the module's source code, relative to the context directory.
8875    pub async fn source_subpath(&self) -> Result<String, DaggerError> {
8876        let query = self.selection.select("sourceSubpath");
8877        query.execute(self.graphql_client.clone()).await
8878    }
8879    /// Forces evaluation of the module source, including any loading into the engine and associated validation.
8880    pub async fn sync(&self) -> Result<ModuleSourceId, DaggerError> {
8881        let query = self.selection.select("sync");
8882        query.execute(self.graphql_client.clone()).await
8883    }
8884    /// The specified version of the git repo this source points to. Only valid for git sources.
8885    pub async fn version(&self) -> Result<String, DaggerError> {
8886        let query = self.selection.select("version");
8887        query.execute(self.graphql_client.clone()).await
8888    }
8889    /// Update the module source with a new client to generate.
8890    ///
8891    /// # Arguments
8892    ///
8893    /// * `generator` - The generator to use
8894    /// * `output_dir` - The output directory for the generated client.
8895    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8896    pub fn with_client(
8897        &self,
8898        generator: impl Into<String>,
8899        output_dir: impl Into<String>,
8900    ) -> ModuleSource {
8901        let mut query = self.selection.select("withClient");
8902        query = query.arg("generator", generator.into());
8903        query = query.arg("outputDir", output_dir.into());
8904        ModuleSource {
8905            proc: self.proc.clone(),
8906            selection: query,
8907            graphql_client: self.graphql_client.clone(),
8908        }
8909    }
8910    /// Update the module source with a new client to generate.
8911    ///
8912    /// # Arguments
8913    ///
8914    /// * `generator` - The generator to use
8915    /// * `output_dir` - The output directory for the generated client.
8916    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8917    pub fn with_client_opts(
8918        &self,
8919        generator: impl Into<String>,
8920        output_dir: impl Into<String>,
8921        opts: ModuleSourceWithClientOpts,
8922    ) -> ModuleSource {
8923        let mut query = self.selection.select("withClient");
8924        query = query.arg("generator", generator.into());
8925        query = query.arg("outputDir", output_dir.into());
8926        if let Some(dev) = opts.dev {
8927            query = query.arg("dev", dev);
8928        }
8929        ModuleSource {
8930            proc: self.proc.clone(),
8931            selection: query,
8932            graphql_client: self.graphql_client.clone(),
8933        }
8934    }
8935    /// Append the provided dependencies to the module source's dependency list.
8936    ///
8937    /// # Arguments
8938    ///
8939    /// * `dependencies` - The dependencies to append.
8940    pub fn with_dependencies(&self, dependencies: Vec<ModuleSourceId>) -> ModuleSource {
8941        let mut query = self.selection.select("withDependencies");
8942        query = query.arg("dependencies", dependencies);
8943        ModuleSource {
8944            proc: self.proc.clone(),
8945            selection: query,
8946            graphql_client: self.graphql_client.clone(),
8947        }
8948    }
8949    /// Upgrade the engine version of the module to the given value.
8950    ///
8951    /// # Arguments
8952    ///
8953    /// * `version` - The engine version to upgrade to.
8954    pub fn with_engine_version(&self, version: impl Into<String>) -> ModuleSource {
8955        let mut query = self.selection.select("withEngineVersion");
8956        query = query.arg("version", version.into());
8957        ModuleSource {
8958            proc: self.proc.clone(),
8959            selection: query,
8960            graphql_client: self.graphql_client.clone(),
8961        }
8962    }
8963    /// Update the module source with additional include patterns for files+directories from its context that are required for building it
8964    ///
8965    /// # Arguments
8966    ///
8967    /// * `patterns` - The new additional include patterns.
8968    pub fn with_includes(&self, patterns: Vec<impl Into<String>>) -> ModuleSource {
8969        let mut query = self.selection.select("withIncludes");
8970        query = query.arg(
8971            "patterns",
8972            patterns
8973                .into_iter()
8974                .map(|i| i.into())
8975                .collect::<Vec<String>>(),
8976        );
8977        ModuleSource {
8978            proc: self.proc.clone(),
8979            selection: query,
8980            graphql_client: self.graphql_client.clone(),
8981        }
8982    }
8983    /// Update the module source with a new name.
8984    ///
8985    /// # Arguments
8986    ///
8987    /// * `name` - The name to set.
8988    pub fn with_name(&self, name: impl Into<String>) -> ModuleSource {
8989        let mut query = self.selection.select("withName");
8990        query = query.arg("name", name.into());
8991        ModuleSource {
8992            proc: self.proc.clone(),
8993            selection: query,
8994            graphql_client: self.graphql_client.clone(),
8995        }
8996    }
8997    /// Update the module source with a new SDK.
8998    ///
8999    /// # Arguments
9000    ///
9001    /// * `source` - The SDK source to set.
9002    pub fn with_sdk(&self, source: impl Into<String>) -> ModuleSource {
9003        let mut query = self.selection.select("withSDK");
9004        query = query.arg("source", source.into());
9005        ModuleSource {
9006            proc: self.proc.clone(),
9007            selection: query,
9008            graphql_client: self.graphql_client.clone(),
9009        }
9010    }
9011    /// Update the module source with a new source subpath.
9012    ///
9013    /// # Arguments
9014    ///
9015    /// * `path` - The path to set as the source subpath. Must be relative to the module source's source root directory.
9016    pub fn with_source_subpath(&self, path: impl Into<String>) -> ModuleSource {
9017        let mut query = self.selection.select("withSourceSubpath");
9018        query = query.arg("path", path.into());
9019        ModuleSource {
9020            proc: self.proc.clone(),
9021            selection: query,
9022            graphql_client: self.graphql_client.clone(),
9023        }
9024    }
9025    /// Update one or more module dependencies.
9026    ///
9027    /// # Arguments
9028    ///
9029    /// * `dependencies` - The dependencies to update.
9030    pub fn with_update_dependencies(&self, dependencies: Vec<impl Into<String>>) -> ModuleSource {
9031        let mut query = self.selection.select("withUpdateDependencies");
9032        query = query.arg(
9033            "dependencies",
9034            dependencies
9035                .into_iter()
9036                .map(|i| i.into())
9037                .collect::<Vec<String>>(),
9038        );
9039        ModuleSource {
9040            proc: self.proc.clone(),
9041            selection: query,
9042            graphql_client: self.graphql_client.clone(),
9043        }
9044    }
9045    /// Remove the provided dependencies from the module source's dependency list.
9046    ///
9047    /// # Arguments
9048    ///
9049    /// * `dependencies` - The dependencies to remove.
9050    pub fn without_dependencies(&self, dependencies: Vec<impl Into<String>>) -> ModuleSource {
9051        let mut query = self.selection.select("withoutDependencies");
9052        query = query.arg(
9053            "dependencies",
9054            dependencies
9055                .into_iter()
9056                .map(|i| i.into())
9057                .collect::<Vec<String>>(),
9058        );
9059        ModuleSource {
9060            proc: self.proc.clone(),
9061            selection: query,
9062            graphql_client: self.graphql_client.clone(),
9063        }
9064    }
9065}
9066#[derive(Clone)]
9067pub struct ObjectTypeDef {
9068    pub proc: Option<Arc<DaggerSessionProc>>,
9069    pub selection: Selection,
9070    pub graphql_client: DynGraphQLClient,
9071}
9072impl ObjectTypeDef {
9073    /// The function used to construct new instances of this object, if any
9074    pub fn constructor(&self) -> Function {
9075        let query = self.selection.select("constructor");
9076        Function {
9077            proc: self.proc.clone(),
9078            selection: query,
9079            graphql_client: self.graphql_client.clone(),
9080        }
9081    }
9082    /// The doc string for the object, if any.
9083    pub async fn description(&self) -> Result<String, DaggerError> {
9084        let query = self.selection.select("description");
9085        query.execute(self.graphql_client.clone()).await
9086    }
9087    /// Static fields defined on this object, if any.
9088    pub fn fields(&self) -> Vec<FieldTypeDef> {
9089        let query = self.selection.select("fields");
9090        vec![FieldTypeDef {
9091            proc: self.proc.clone(),
9092            selection: query,
9093            graphql_client: self.graphql_client.clone(),
9094        }]
9095    }
9096    /// Functions defined on this object, if any.
9097    pub fn functions(&self) -> Vec<Function> {
9098        let query = self.selection.select("functions");
9099        vec![Function {
9100            proc: self.proc.clone(),
9101            selection: query,
9102            graphql_client: self.graphql_client.clone(),
9103        }]
9104    }
9105    /// A unique identifier for this ObjectTypeDef.
9106    pub async fn id(&self) -> Result<ObjectTypeDefId, DaggerError> {
9107        let query = self.selection.select("id");
9108        query.execute(self.graphql_client.clone()).await
9109    }
9110    /// The name of the object.
9111    pub async fn name(&self) -> Result<String, DaggerError> {
9112        let query = self.selection.select("name");
9113        query.execute(self.graphql_client.clone()).await
9114    }
9115    /// The location of this object declaration.
9116    pub fn source_map(&self) -> SourceMap {
9117        let query = self.selection.select("sourceMap");
9118        SourceMap {
9119            proc: self.proc.clone(),
9120            selection: query,
9121            graphql_client: self.graphql_client.clone(),
9122        }
9123    }
9124    /// If this ObjectTypeDef is associated with a Module, the name of the module. Unset otherwise.
9125    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
9126        let query = self.selection.select("sourceModuleName");
9127        query.execute(self.graphql_client.clone()).await
9128    }
9129}
9130#[derive(Clone)]
9131pub struct Port {
9132    pub proc: Option<Arc<DaggerSessionProc>>,
9133    pub selection: Selection,
9134    pub graphql_client: DynGraphQLClient,
9135}
9136impl Port {
9137    /// The port description.
9138    pub async fn description(&self) -> Result<String, DaggerError> {
9139        let query = self.selection.select("description");
9140        query.execute(self.graphql_client.clone()).await
9141    }
9142    /// Skip the health check when run as a service.
9143    pub async fn experimental_skip_healthcheck(&self) -> Result<bool, DaggerError> {
9144        let query = self.selection.select("experimentalSkipHealthcheck");
9145        query.execute(self.graphql_client.clone()).await
9146    }
9147    /// A unique identifier for this Port.
9148    pub async fn id(&self) -> Result<PortId, DaggerError> {
9149        let query = self.selection.select("id");
9150        query.execute(self.graphql_client.clone()).await
9151    }
9152    /// The port number.
9153    pub async fn port(&self) -> Result<isize, DaggerError> {
9154        let query = self.selection.select("port");
9155        query.execute(self.graphql_client.clone()).await
9156    }
9157    /// The transport layer protocol.
9158    pub async fn protocol(&self) -> Result<NetworkProtocol, DaggerError> {
9159        let query = self.selection.select("protocol");
9160        query.execute(self.graphql_client.clone()).await
9161    }
9162}
9163#[derive(Clone)]
9164pub struct Query {
9165    pub proc: Option<Arc<DaggerSessionProc>>,
9166    pub selection: Selection,
9167    pub graphql_client: DynGraphQLClient,
9168}
9169#[derive(Builder, Debug, PartialEq)]
9170pub struct QueryCacheVolumeOpts<'a> {
9171    #[builder(setter(into, strip_option), default)]
9172    pub namespace: Option<&'a str>,
9173}
9174#[derive(Builder, Debug, PartialEq)]
9175pub struct QueryContainerOpts {
9176    /// Platform to initialize the container with.
9177    #[builder(setter(into, strip_option), default)]
9178    pub platform: Option<Platform>,
9179}
9180#[derive(Builder, Debug, PartialEq)]
9181pub struct QueryGitOpts<'a> {
9182    /// A service which must be started before the repo is fetched.
9183    #[builder(setter(into, strip_option), default)]
9184    pub experimental_service_host: Option<ServiceId>,
9185    /// DEPRECATED: Set to true to keep .git directory.
9186    #[builder(setter(into, strip_option), default)]
9187    pub keep_git_dir: Option<bool>,
9188    /// Set SSH auth socket
9189    #[builder(setter(into, strip_option), default)]
9190    pub ssh_auth_socket: Option<SocketId>,
9191    /// Set SSH known hosts
9192    #[builder(setter(into, strip_option), default)]
9193    pub ssh_known_hosts: Option<&'a str>,
9194}
9195#[derive(Builder, Debug, PartialEq)]
9196pub struct QueryHttpOpts {
9197    /// A service which must be started before the URL is fetched.
9198    #[builder(setter(into, strip_option), default)]
9199    pub experimental_service_host: Option<ServiceId>,
9200}
9201#[derive(Builder, Debug, PartialEq)]
9202pub struct QueryLlmOpts<'a> {
9203    /// Cap the number of API calls for this LLM
9204    #[builder(setter(into, strip_option), default)]
9205    pub max_api_calls: Option<isize>,
9206    /// Model to use
9207    #[builder(setter(into, strip_option), default)]
9208    pub model: Option<&'a str>,
9209}
9210#[derive(Builder, Debug, PartialEq)]
9211pub struct QueryLoadSecretFromNameOpts<'a> {
9212    #[builder(setter(into, strip_option), default)]
9213    pub accessor: Option<&'a str>,
9214}
9215#[derive(Builder, Debug, PartialEq)]
9216pub struct QueryModuleSourceOpts<'a> {
9217    /// 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.
9218    #[builder(setter(into, strip_option), default)]
9219    pub allow_not_exists: Option<bool>,
9220    /// If true, do not attempt to find dagger.json in a parent directory of the provided path. Only relevant for local module sources.
9221    #[builder(setter(into, strip_option), default)]
9222    pub disable_find_up: Option<bool>,
9223    /// The pinned version of the module source
9224    #[builder(setter(into, strip_option), default)]
9225    pub ref_pin: Option<&'a str>,
9226    /// If set, error out if the ref string is not of the provided requireKind.
9227    #[builder(setter(into, strip_option), default)]
9228    pub require_kind: Option<ModuleSourceKind>,
9229}
9230impl Query {
9231    /// Retrieves a container builtin to the engine.
9232    ///
9233    /// # Arguments
9234    ///
9235    /// * `digest` - Digest of the image manifest
9236    pub fn builtin_container(&self, digest: impl Into<String>) -> Container {
9237        let mut query = self.selection.select("builtinContainer");
9238        query = query.arg("digest", digest.into());
9239        Container {
9240            proc: self.proc.clone(),
9241            selection: query,
9242            graphql_client: self.graphql_client.clone(),
9243        }
9244    }
9245    /// Constructs a cache volume for a given cache key.
9246    ///
9247    /// # Arguments
9248    ///
9249    /// * `key` - A string identifier to target this cache volume (e.g., "modules-cache").
9250    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9251    pub fn cache_volume(&self, key: impl Into<String>) -> CacheVolume {
9252        let mut query = self.selection.select("cacheVolume");
9253        query = query.arg("key", key.into());
9254        CacheVolume {
9255            proc: self.proc.clone(),
9256            selection: query,
9257            graphql_client: self.graphql_client.clone(),
9258        }
9259    }
9260    /// Constructs a cache volume for a given cache key.
9261    ///
9262    /// # Arguments
9263    ///
9264    /// * `key` - A string identifier to target this cache volume (e.g., "modules-cache").
9265    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9266    pub fn cache_volume_opts<'a>(
9267        &self,
9268        key: impl Into<String>,
9269        opts: QueryCacheVolumeOpts<'a>,
9270    ) -> CacheVolume {
9271        let mut query = self.selection.select("cacheVolume");
9272        query = query.arg("key", key.into());
9273        if let Some(namespace) = opts.namespace {
9274            query = query.arg("namespace", namespace);
9275        }
9276        CacheVolume {
9277            proc: self.proc.clone(),
9278            selection: query,
9279            graphql_client: self.graphql_client.clone(),
9280        }
9281    }
9282    /// Creates a scratch container.
9283    /// Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host.
9284    ///
9285    /// # Arguments
9286    ///
9287    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9288    pub fn container(&self) -> Container {
9289        let query = self.selection.select("container");
9290        Container {
9291            proc: self.proc.clone(),
9292            selection: query,
9293            graphql_client: self.graphql_client.clone(),
9294        }
9295    }
9296    /// Creates a scratch container.
9297    /// Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host.
9298    ///
9299    /// # Arguments
9300    ///
9301    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9302    pub fn container_opts(&self, opts: QueryContainerOpts) -> Container {
9303        let mut query = self.selection.select("container");
9304        if let Some(platform) = opts.platform {
9305            query = query.arg("platform", platform);
9306        }
9307        Container {
9308            proc: self.proc.clone(),
9309            selection: query,
9310            graphql_client: self.graphql_client.clone(),
9311        }
9312    }
9313    /// The FunctionCall context that the SDK caller is currently executing in.
9314    /// If the caller is not currently executing in a function, this will return an error.
9315    pub fn current_function_call(&self) -> FunctionCall {
9316        let query = self.selection.select("currentFunctionCall");
9317        FunctionCall {
9318            proc: self.proc.clone(),
9319            selection: query,
9320            graphql_client: self.graphql_client.clone(),
9321        }
9322    }
9323    /// The module currently being served in the session, if any.
9324    pub fn current_module(&self) -> CurrentModule {
9325        let query = self.selection.select("currentModule");
9326        CurrentModule {
9327            proc: self.proc.clone(),
9328            selection: query,
9329            graphql_client: self.graphql_client.clone(),
9330        }
9331    }
9332    /// The TypeDef representations of the objects currently being served in the session.
9333    pub fn current_type_defs(&self) -> Vec<TypeDef> {
9334        let query = self.selection.select("currentTypeDefs");
9335        vec![TypeDef {
9336            proc: self.proc.clone(),
9337            selection: query,
9338            graphql_client: self.graphql_client.clone(),
9339        }]
9340    }
9341    /// The default platform of the engine.
9342    pub async fn default_platform(&self) -> Result<Platform, DaggerError> {
9343        let query = self.selection.select("defaultPlatform");
9344        query.execute(self.graphql_client.clone()).await
9345    }
9346    /// Creates an empty directory.
9347    pub fn directory(&self) -> Directory {
9348        let query = self.selection.select("directory");
9349        Directory {
9350            proc: self.proc.clone(),
9351            selection: query,
9352            graphql_client: self.graphql_client.clone(),
9353        }
9354    }
9355    /// The Dagger engine container configuration and state
9356    pub fn engine(&self) -> Engine {
9357        let query = self.selection.select("engine");
9358        Engine {
9359            proc: self.proc.clone(),
9360            selection: query,
9361            graphql_client: self.graphql_client.clone(),
9362        }
9363    }
9364    /// Create a new error.
9365    ///
9366    /// # Arguments
9367    ///
9368    /// * `message` - A brief description of the error.
9369    pub fn error(&self, message: impl Into<String>) -> Error {
9370        let mut query = self.selection.select("error");
9371        query = query.arg("message", message.into());
9372        Error {
9373            proc: self.proc.clone(),
9374            selection: query,
9375            graphql_client: self.graphql_client.clone(),
9376        }
9377    }
9378    /// Creates a function.
9379    ///
9380    /// # Arguments
9381    ///
9382    /// * `name` - Name of the function, in its original format from the implementation language.
9383    /// * `return_type` - Return type of the function.
9384    pub fn function(
9385        &self,
9386        name: impl Into<String>,
9387        return_type: impl IntoID<TypeDefId>,
9388    ) -> Function {
9389        let mut query = self.selection.select("function");
9390        query = query.arg("name", name.into());
9391        query = query.arg_lazy(
9392            "returnType",
9393            Box::new(move || {
9394                let return_type = return_type.clone();
9395                Box::pin(async move { return_type.into_id().await.unwrap().quote() })
9396            }),
9397        );
9398        Function {
9399            proc: self.proc.clone(),
9400            selection: query,
9401            graphql_client: self.graphql_client.clone(),
9402        }
9403    }
9404    /// Create a code generation result, given a directory containing the generated code.
9405    pub fn generated_code(&self, code: impl IntoID<DirectoryId>) -> GeneratedCode {
9406        let mut query = self.selection.select("generatedCode");
9407        query = query.arg_lazy(
9408            "code",
9409            Box::new(move || {
9410                let code = code.clone();
9411                Box::pin(async move { code.into_id().await.unwrap().quote() })
9412            }),
9413        );
9414        GeneratedCode {
9415            proc: self.proc.clone(),
9416            selection: query,
9417            graphql_client: self.graphql_client.clone(),
9418        }
9419    }
9420    /// Queries a Git repository.
9421    ///
9422    /// # Arguments
9423    ///
9424    /// * `url` - URL of the git repository.
9425    ///
9426    /// Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.
9427    ///
9428    /// Suffix ".git" is optional.
9429    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9430    pub fn git(&self, url: impl Into<String>) -> GitRepository {
9431        let mut query = self.selection.select("git");
9432        query = query.arg("url", url.into());
9433        GitRepository {
9434            proc: self.proc.clone(),
9435            selection: query,
9436            graphql_client: self.graphql_client.clone(),
9437        }
9438    }
9439    /// Queries a Git repository.
9440    ///
9441    /// # Arguments
9442    ///
9443    /// * `url` - URL of the git repository.
9444    ///
9445    /// Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.
9446    ///
9447    /// Suffix ".git" is optional.
9448    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9449    pub fn git_opts<'a>(&self, url: impl Into<String>, opts: QueryGitOpts<'a>) -> GitRepository {
9450        let mut query = self.selection.select("git");
9451        query = query.arg("url", url.into());
9452        if let Some(keep_git_dir) = opts.keep_git_dir {
9453            query = query.arg("keepGitDir", keep_git_dir);
9454        }
9455        if let Some(experimental_service_host) = opts.experimental_service_host {
9456            query = query.arg("experimentalServiceHost", experimental_service_host);
9457        }
9458        if let Some(ssh_known_hosts) = opts.ssh_known_hosts {
9459            query = query.arg("sshKnownHosts", ssh_known_hosts);
9460        }
9461        if let Some(ssh_auth_socket) = opts.ssh_auth_socket {
9462            query = query.arg("sshAuthSocket", ssh_auth_socket);
9463        }
9464        GitRepository {
9465            proc: self.proc.clone(),
9466            selection: query,
9467            graphql_client: self.graphql_client.clone(),
9468        }
9469    }
9470    /// Queries the host environment.
9471    pub fn host(&self) -> Host {
9472        let query = self.selection.select("host");
9473        Host {
9474            proc: self.proc.clone(),
9475            selection: query,
9476            graphql_client: self.graphql_client.clone(),
9477        }
9478    }
9479    /// Returns a file containing an http remote url content.
9480    ///
9481    /// # Arguments
9482    ///
9483    /// * `url` - HTTP url to get the content from (e.g., "https://docs.dagger.io").
9484    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9485    pub fn http(&self, url: impl Into<String>) -> File {
9486        let mut query = self.selection.select("http");
9487        query = query.arg("url", url.into());
9488        File {
9489            proc: self.proc.clone(),
9490            selection: query,
9491            graphql_client: self.graphql_client.clone(),
9492        }
9493    }
9494    /// Returns a file containing an http remote url content.
9495    ///
9496    /// # Arguments
9497    ///
9498    /// * `url` - HTTP url to get the content from (e.g., "https://docs.dagger.io").
9499    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9500    pub fn http_opts(&self, url: impl Into<String>, opts: QueryHttpOpts) -> File {
9501        let mut query = self.selection.select("http");
9502        query = query.arg("url", url.into());
9503        if let Some(experimental_service_host) = opts.experimental_service_host {
9504            query = query.arg("experimentalServiceHost", experimental_service_host);
9505        }
9506        File {
9507            proc: self.proc.clone(),
9508            selection: query,
9509            graphql_client: self.graphql_client.clone(),
9510        }
9511    }
9512    /// Initialize a Large Language Model (LLM)
9513    ///
9514    /// # Arguments
9515    ///
9516    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9517    pub fn llm(&self) -> Llm {
9518        let query = self.selection.select("llm");
9519        Llm {
9520            proc: self.proc.clone(),
9521            selection: query,
9522            graphql_client: self.graphql_client.clone(),
9523        }
9524    }
9525    /// Initialize a Large Language Model (LLM)
9526    ///
9527    /// # Arguments
9528    ///
9529    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9530    pub fn llm_opts<'a>(&self, opts: QueryLlmOpts<'a>) -> Llm {
9531        let mut query = self.selection.select("llm");
9532        if let Some(model) = opts.model {
9533            query = query.arg("model", model);
9534        }
9535        if let Some(max_api_calls) = opts.max_api_calls {
9536            query = query.arg("maxAPICalls", max_api_calls);
9537        }
9538        Llm {
9539            proc: self.proc.clone(),
9540            selection: query,
9541            graphql_client: self.graphql_client.clone(),
9542        }
9543    }
9544    /// Load a CacheVolume from its ID.
9545    pub fn load_cache_volume_from_id(&self, id: impl IntoID<CacheVolumeId>) -> CacheVolume {
9546        let mut query = self.selection.select("loadCacheVolumeFromID");
9547        query = query.arg_lazy(
9548            "id",
9549            Box::new(move || {
9550                let id = id.clone();
9551                Box::pin(async move { id.into_id().await.unwrap().quote() })
9552            }),
9553        );
9554        CacheVolume {
9555            proc: self.proc.clone(),
9556            selection: query,
9557            graphql_client: self.graphql_client.clone(),
9558        }
9559    }
9560    /// Load a Container from its ID.
9561    pub fn load_container_from_id(&self, id: impl IntoID<ContainerId>) -> Container {
9562        let mut query = self.selection.select("loadContainerFromID");
9563        query = query.arg_lazy(
9564            "id",
9565            Box::new(move || {
9566                let id = id.clone();
9567                Box::pin(async move { id.into_id().await.unwrap().quote() })
9568            }),
9569        );
9570        Container {
9571            proc: self.proc.clone(),
9572            selection: query,
9573            graphql_client: self.graphql_client.clone(),
9574        }
9575    }
9576    /// Load a CurrentModule from its ID.
9577    pub fn load_current_module_from_id(&self, id: impl IntoID<CurrentModuleId>) -> CurrentModule {
9578        let mut query = self.selection.select("loadCurrentModuleFromID");
9579        query = query.arg_lazy(
9580            "id",
9581            Box::new(move || {
9582                let id = id.clone();
9583                Box::pin(async move { id.into_id().await.unwrap().quote() })
9584            }),
9585        );
9586        CurrentModule {
9587            proc: self.proc.clone(),
9588            selection: query,
9589            graphql_client: self.graphql_client.clone(),
9590        }
9591    }
9592    /// Load a Directory from its ID.
9593    pub fn load_directory_from_id(&self, id: impl IntoID<DirectoryId>) -> Directory {
9594        let mut query = self.selection.select("loadDirectoryFromID");
9595        query = query.arg_lazy(
9596            "id",
9597            Box::new(move || {
9598                let id = id.clone();
9599                Box::pin(async move { id.into_id().await.unwrap().quote() })
9600            }),
9601        );
9602        Directory {
9603            proc: self.proc.clone(),
9604            selection: query,
9605            graphql_client: self.graphql_client.clone(),
9606        }
9607    }
9608    /// Load a EngineCacheEntry from its ID.
9609    pub fn load_engine_cache_entry_from_id(
9610        &self,
9611        id: impl IntoID<EngineCacheEntryId>,
9612    ) -> EngineCacheEntry {
9613        let mut query = self.selection.select("loadEngineCacheEntryFromID");
9614        query = query.arg_lazy(
9615            "id",
9616            Box::new(move || {
9617                let id = id.clone();
9618                Box::pin(async move { id.into_id().await.unwrap().quote() })
9619            }),
9620        );
9621        EngineCacheEntry {
9622            proc: self.proc.clone(),
9623            selection: query,
9624            graphql_client: self.graphql_client.clone(),
9625        }
9626    }
9627    /// Load a EngineCacheEntrySet from its ID.
9628    pub fn load_engine_cache_entry_set_from_id(
9629        &self,
9630        id: impl IntoID<EngineCacheEntrySetId>,
9631    ) -> EngineCacheEntrySet {
9632        let mut query = self.selection.select("loadEngineCacheEntrySetFromID");
9633        query = query.arg_lazy(
9634            "id",
9635            Box::new(move || {
9636                let id = id.clone();
9637                Box::pin(async move { id.into_id().await.unwrap().quote() })
9638            }),
9639        );
9640        EngineCacheEntrySet {
9641            proc: self.proc.clone(),
9642            selection: query,
9643            graphql_client: self.graphql_client.clone(),
9644        }
9645    }
9646    /// Load a EngineCache from its ID.
9647    pub fn load_engine_cache_from_id(&self, id: impl IntoID<EngineCacheId>) -> EngineCache {
9648        let mut query = self.selection.select("loadEngineCacheFromID");
9649        query = query.arg_lazy(
9650            "id",
9651            Box::new(move || {
9652                let id = id.clone();
9653                Box::pin(async move { id.into_id().await.unwrap().quote() })
9654            }),
9655        );
9656        EngineCache {
9657            proc: self.proc.clone(),
9658            selection: query,
9659            graphql_client: self.graphql_client.clone(),
9660        }
9661    }
9662    /// Load a Engine from its ID.
9663    pub fn load_engine_from_id(&self, id: impl IntoID<EngineId>) -> Engine {
9664        let mut query = self.selection.select("loadEngineFromID");
9665        query = query.arg_lazy(
9666            "id",
9667            Box::new(move || {
9668                let id = id.clone();
9669                Box::pin(async move { id.into_id().await.unwrap().quote() })
9670            }),
9671        );
9672        Engine {
9673            proc: self.proc.clone(),
9674            selection: query,
9675            graphql_client: self.graphql_client.clone(),
9676        }
9677    }
9678    /// Load a EnumTypeDef from its ID.
9679    pub fn load_enum_type_def_from_id(&self, id: impl IntoID<EnumTypeDefId>) -> EnumTypeDef {
9680        let mut query = self.selection.select("loadEnumTypeDefFromID");
9681        query = query.arg_lazy(
9682            "id",
9683            Box::new(move || {
9684                let id = id.clone();
9685                Box::pin(async move { id.into_id().await.unwrap().quote() })
9686            }),
9687        );
9688        EnumTypeDef {
9689            proc: self.proc.clone(),
9690            selection: query,
9691            graphql_client: self.graphql_client.clone(),
9692        }
9693    }
9694    /// Load a EnumValueTypeDef from its ID.
9695    pub fn load_enum_value_type_def_from_id(
9696        &self,
9697        id: impl IntoID<EnumValueTypeDefId>,
9698    ) -> EnumValueTypeDef {
9699        let mut query = self.selection.select("loadEnumValueTypeDefFromID");
9700        query = query.arg_lazy(
9701            "id",
9702            Box::new(move || {
9703                let id = id.clone();
9704                Box::pin(async move { id.into_id().await.unwrap().quote() })
9705            }),
9706        );
9707        EnumValueTypeDef {
9708            proc: self.proc.clone(),
9709            selection: query,
9710            graphql_client: self.graphql_client.clone(),
9711        }
9712    }
9713    /// Load a EnvVariable from its ID.
9714    pub fn load_env_variable_from_id(&self, id: impl IntoID<EnvVariableId>) -> EnvVariable {
9715        let mut query = self.selection.select("loadEnvVariableFromID");
9716        query = query.arg_lazy(
9717            "id",
9718            Box::new(move || {
9719                let id = id.clone();
9720                Box::pin(async move { id.into_id().await.unwrap().quote() })
9721            }),
9722        );
9723        EnvVariable {
9724            proc: self.proc.clone(),
9725            selection: query,
9726            graphql_client: self.graphql_client.clone(),
9727        }
9728    }
9729    /// Load a Error from its ID.
9730    pub fn load_error_from_id(&self, id: impl IntoID<ErrorId>) -> Error {
9731        let mut query = self.selection.select("loadErrorFromID");
9732        query = query.arg_lazy(
9733            "id",
9734            Box::new(move || {
9735                let id = id.clone();
9736                Box::pin(async move { id.into_id().await.unwrap().quote() })
9737            }),
9738        );
9739        Error {
9740            proc: self.proc.clone(),
9741            selection: query,
9742            graphql_client: self.graphql_client.clone(),
9743        }
9744    }
9745    /// Load a ErrorValue from its ID.
9746    pub fn load_error_value_from_id(&self, id: impl IntoID<ErrorValueId>) -> ErrorValue {
9747        let mut query = self.selection.select("loadErrorValueFromID");
9748        query = query.arg_lazy(
9749            "id",
9750            Box::new(move || {
9751                let id = id.clone();
9752                Box::pin(async move { id.into_id().await.unwrap().quote() })
9753            }),
9754        );
9755        ErrorValue {
9756            proc: self.proc.clone(),
9757            selection: query,
9758            graphql_client: self.graphql_client.clone(),
9759        }
9760    }
9761    /// Load a FieldTypeDef from its ID.
9762    pub fn load_field_type_def_from_id(&self, id: impl IntoID<FieldTypeDefId>) -> FieldTypeDef {
9763        let mut query = self.selection.select("loadFieldTypeDefFromID");
9764        query = query.arg_lazy(
9765            "id",
9766            Box::new(move || {
9767                let id = id.clone();
9768                Box::pin(async move { id.into_id().await.unwrap().quote() })
9769            }),
9770        );
9771        FieldTypeDef {
9772            proc: self.proc.clone(),
9773            selection: query,
9774            graphql_client: self.graphql_client.clone(),
9775        }
9776    }
9777    /// Load a File from its ID.
9778    pub fn load_file_from_id(&self, id: impl IntoID<FileId>) -> File {
9779        let mut query = self.selection.select("loadFileFromID");
9780        query = query.arg_lazy(
9781            "id",
9782            Box::new(move || {
9783                let id = id.clone();
9784                Box::pin(async move { id.into_id().await.unwrap().quote() })
9785            }),
9786        );
9787        File {
9788            proc: self.proc.clone(),
9789            selection: query,
9790            graphql_client: self.graphql_client.clone(),
9791        }
9792    }
9793    /// Load a FunctionArg from its ID.
9794    pub fn load_function_arg_from_id(&self, id: impl IntoID<FunctionArgId>) -> FunctionArg {
9795        let mut query = self.selection.select("loadFunctionArgFromID");
9796        query = query.arg_lazy(
9797            "id",
9798            Box::new(move || {
9799                let id = id.clone();
9800                Box::pin(async move { id.into_id().await.unwrap().quote() })
9801            }),
9802        );
9803        FunctionArg {
9804            proc: self.proc.clone(),
9805            selection: query,
9806            graphql_client: self.graphql_client.clone(),
9807        }
9808    }
9809    /// Load a FunctionCallArgValue from its ID.
9810    pub fn load_function_call_arg_value_from_id(
9811        &self,
9812        id: impl IntoID<FunctionCallArgValueId>,
9813    ) -> FunctionCallArgValue {
9814        let mut query = self.selection.select("loadFunctionCallArgValueFromID");
9815        query = query.arg_lazy(
9816            "id",
9817            Box::new(move || {
9818                let id = id.clone();
9819                Box::pin(async move { id.into_id().await.unwrap().quote() })
9820            }),
9821        );
9822        FunctionCallArgValue {
9823            proc: self.proc.clone(),
9824            selection: query,
9825            graphql_client: self.graphql_client.clone(),
9826        }
9827    }
9828    /// Load a FunctionCall from its ID.
9829    pub fn load_function_call_from_id(&self, id: impl IntoID<FunctionCallId>) -> FunctionCall {
9830        let mut query = self.selection.select("loadFunctionCallFromID");
9831        query = query.arg_lazy(
9832            "id",
9833            Box::new(move || {
9834                let id = id.clone();
9835                Box::pin(async move { id.into_id().await.unwrap().quote() })
9836            }),
9837        );
9838        FunctionCall {
9839            proc: self.proc.clone(),
9840            selection: query,
9841            graphql_client: self.graphql_client.clone(),
9842        }
9843    }
9844    /// Load a Function from its ID.
9845    pub fn load_function_from_id(&self, id: impl IntoID<FunctionId>) -> Function {
9846        let mut query = self.selection.select("loadFunctionFromID");
9847        query = query.arg_lazy(
9848            "id",
9849            Box::new(move || {
9850                let id = id.clone();
9851                Box::pin(async move { id.into_id().await.unwrap().quote() })
9852            }),
9853        );
9854        Function {
9855            proc: self.proc.clone(),
9856            selection: query,
9857            graphql_client: self.graphql_client.clone(),
9858        }
9859    }
9860    /// Load a GeneratedCode from its ID.
9861    pub fn load_generated_code_from_id(&self, id: impl IntoID<GeneratedCodeId>) -> GeneratedCode {
9862        let mut query = self.selection.select("loadGeneratedCodeFromID");
9863        query = query.arg_lazy(
9864            "id",
9865            Box::new(move || {
9866                let id = id.clone();
9867                Box::pin(async move { id.into_id().await.unwrap().quote() })
9868            }),
9869        );
9870        GeneratedCode {
9871            proc: self.proc.clone(),
9872            selection: query,
9873            graphql_client: self.graphql_client.clone(),
9874        }
9875    }
9876    /// Load a GitRef from its ID.
9877    pub fn load_git_ref_from_id(&self, id: impl IntoID<GitRefId>) -> GitRef {
9878        let mut query = self.selection.select("loadGitRefFromID");
9879        query = query.arg_lazy(
9880            "id",
9881            Box::new(move || {
9882                let id = id.clone();
9883                Box::pin(async move { id.into_id().await.unwrap().quote() })
9884            }),
9885        );
9886        GitRef {
9887            proc: self.proc.clone(),
9888            selection: query,
9889            graphql_client: self.graphql_client.clone(),
9890        }
9891    }
9892    /// Load a GitRepository from its ID.
9893    pub fn load_git_repository_from_id(&self, id: impl IntoID<GitRepositoryId>) -> GitRepository {
9894        let mut query = self.selection.select("loadGitRepositoryFromID");
9895        query = query.arg_lazy(
9896            "id",
9897            Box::new(move || {
9898                let id = id.clone();
9899                Box::pin(async move { id.into_id().await.unwrap().quote() })
9900            }),
9901        );
9902        GitRepository {
9903            proc: self.proc.clone(),
9904            selection: query,
9905            graphql_client: self.graphql_client.clone(),
9906        }
9907    }
9908    /// Load a Host from its ID.
9909    pub fn load_host_from_id(&self, id: impl IntoID<HostId>) -> Host {
9910        let mut query = self.selection.select("loadHostFromID");
9911        query = query.arg_lazy(
9912            "id",
9913            Box::new(move || {
9914                let id = id.clone();
9915                Box::pin(async move { id.into_id().await.unwrap().quote() })
9916            }),
9917        );
9918        Host {
9919            proc: self.proc.clone(),
9920            selection: query,
9921            graphql_client: self.graphql_client.clone(),
9922        }
9923    }
9924    /// Load a InputTypeDef from its ID.
9925    pub fn load_input_type_def_from_id(&self, id: impl IntoID<InputTypeDefId>) -> InputTypeDef {
9926        let mut query = self.selection.select("loadInputTypeDefFromID");
9927        query = query.arg_lazy(
9928            "id",
9929            Box::new(move || {
9930                let id = id.clone();
9931                Box::pin(async move { id.into_id().await.unwrap().quote() })
9932            }),
9933        );
9934        InputTypeDef {
9935            proc: self.proc.clone(),
9936            selection: query,
9937            graphql_client: self.graphql_client.clone(),
9938        }
9939    }
9940    /// Load a InterfaceTypeDef from its ID.
9941    pub fn load_interface_type_def_from_id(
9942        &self,
9943        id: impl IntoID<InterfaceTypeDefId>,
9944    ) -> InterfaceTypeDef {
9945        let mut query = self.selection.select("loadInterfaceTypeDefFromID");
9946        query = query.arg_lazy(
9947            "id",
9948            Box::new(move || {
9949                let id = id.clone();
9950                Box::pin(async move { id.into_id().await.unwrap().quote() })
9951            }),
9952        );
9953        InterfaceTypeDef {
9954            proc: self.proc.clone(),
9955            selection: query,
9956            graphql_client: self.graphql_client.clone(),
9957        }
9958    }
9959    /// Load a LLM from its ID.
9960    pub fn load_llm_from_id(&self, id: impl IntoID<Llmid>) -> Llm {
9961        let mut query = self.selection.select("loadLLMFromID");
9962        query = query.arg_lazy(
9963            "id",
9964            Box::new(move || {
9965                let id = id.clone();
9966                Box::pin(async move { id.into_id().await.unwrap().quote() })
9967            }),
9968        );
9969        Llm {
9970            proc: self.proc.clone(),
9971            selection: query,
9972            graphql_client: self.graphql_client.clone(),
9973        }
9974    }
9975    /// Load a LLMVariable from its ID.
9976    pub fn load_llm_variable_from_id(&self, id: impl IntoID<LlmVariableId>) -> LlmVariable {
9977        let mut query = self.selection.select("loadLLMVariableFromID");
9978        query = query.arg_lazy(
9979            "id",
9980            Box::new(move || {
9981                let id = id.clone();
9982                Box::pin(async move { id.into_id().await.unwrap().quote() })
9983            }),
9984        );
9985        LlmVariable {
9986            proc: self.proc.clone(),
9987            selection: query,
9988            graphql_client: self.graphql_client.clone(),
9989        }
9990    }
9991    /// Load a Label from its ID.
9992    pub fn load_label_from_id(&self, id: impl IntoID<LabelId>) -> Label {
9993        let mut query = self.selection.select("loadLabelFromID");
9994        query = query.arg_lazy(
9995            "id",
9996            Box::new(move || {
9997                let id = id.clone();
9998                Box::pin(async move { id.into_id().await.unwrap().quote() })
9999            }),
10000        );
10001        Label {
10002            proc: self.proc.clone(),
10003            selection: query,
10004            graphql_client: self.graphql_client.clone(),
10005        }
10006    }
10007    /// Load a ListTypeDef from its ID.
10008    pub fn load_list_type_def_from_id(&self, id: impl IntoID<ListTypeDefId>) -> ListTypeDef {
10009        let mut query = self.selection.select("loadListTypeDefFromID");
10010        query = query.arg_lazy(
10011            "id",
10012            Box::new(move || {
10013                let id = id.clone();
10014                Box::pin(async move { id.into_id().await.unwrap().quote() })
10015            }),
10016        );
10017        ListTypeDef {
10018            proc: self.proc.clone(),
10019            selection: query,
10020            graphql_client: self.graphql_client.clone(),
10021        }
10022    }
10023    /// Load a ModuleConfigClient from its ID.
10024    pub fn load_module_config_client_from_id(
10025        &self,
10026        id: impl IntoID<ModuleConfigClientId>,
10027    ) -> ModuleConfigClient {
10028        let mut query = self.selection.select("loadModuleConfigClientFromID");
10029        query = query.arg_lazy(
10030            "id",
10031            Box::new(move || {
10032                let id = id.clone();
10033                Box::pin(async move { id.into_id().await.unwrap().quote() })
10034            }),
10035        );
10036        ModuleConfigClient {
10037            proc: self.proc.clone(),
10038            selection: query,
10039            graphql_client: self.graphql_client.clone(),
10040        }
10041    }
10042    /// Load a Module from its ID.
10043    pub fn load_module_from_id(&self, id: impl IntoID<ModuleId>) -> Module {
10044        let mut query = self.selection.select("loadModuleFromID");
10045        query = query.arg_lazy(
10046            "id",
10047            Box::new(move || {
10048                let id = id.clone();
10049                Box::pin(async move { id.into_id().await.unwrap().quote() })
10050            }),
10051        );
10052        Module {
10053            proc: self.proc.clone(),
10054            selection: query,
10055            graphql_client: self.graphql_client.clone(),
10056        }
10057    }
10058    /// Load a ModuleSource from its ID.
10059    pub fn load_module_source_from_id(&self, id: impl IntoID<ModuleSourceId>) -> ModuleSource {
10060        let mut query = self.selection.select("loadModuleSourceFromID");
10061        query = query.arg_lazy(
10062            "id",
10063            Box::new(move || {
10064                let id = id.clone();
10065                Box::pin(async move { id.into_id().await.unwrap().quote() })
10066            }),
10067        );
10068        ModuleSource {
10069            proc: self.proc.clone(),
10070            selection: query,
10071            graphql_client: self.graphql_client.clone(),
10072        }
10073    }
10074    /// Load a ObjectTypeDef from its ID.
10075    pub fn load_object_type_def_from_id(&self, id: impl IntoID<ObjectTypeDefId>) -> ObjectTypeDef {
10076        let mut query = self.selection.select("loadObjectTypeDefFromID");
10077        query = query.arg_lazy(
10078            "id",
10079            Box::new(move || {
10080                let id = id.clone();
10081                Box::pin(async move { id.into_id().await.unwrap().quote() })
10082            }),
10083        );
10084        ObjectTypeDef {
10085            proc: self.proc.clone(),
10086            selection: query,
10087            graphql_client: self.graphql_client.clone(),
10088        }
10089    }
10090    /// Load a Port from its ID.
10091    pub fn load_port_from_id(&self, id: impl IntoID<PortId>) -> Port {
10092        let mut query = self.selection.select("loadPortFromID");
10093        query = query.arg_lazy(
10094            "id",
10095            Box::new(move || {
10096                let id = id.clone();
10097                Box::pin(async move { id.into_id().await.unwrap().quote() })
10098            }),
10099        );
10100        Port {
10101            proc: self.proc.clone(),
10102            selection: query,
10103            graphql_client: self.graphql_client.clone(),
10104        }
10105    }
10106    /// Load a SDKConfig from its ID.
10107    pub fn load_sdk_config_from_id(&self, id: impl IntoID<SdkConfigId>) -> SdkConfig {
10108        let mut query = self.selection.select("loadSDKConfigFromID");
10109        query = query.arg_lazy(
10110            "id",
10111            Box::new(move || {
10112                let id = id.clone();
10113                Box::pin(async move { id.into_id().await.unwrap().quote() })
10114            }),
10115        );
10116        SdkConfig {
10117            proc: self.proc.clone(),
10118            selection: query,
10119            graphql_client: self.graphql_client.clone(),
10120        }
10121    }
10122    /// Load a ScalarTypeDef from its ID.
10123    pub fn load_scalar_type_def_from_id(&self, id: impl IntoID<ScalarTypeDefId>) -> ScalarTypeDef {
10124        let mut query = self.selection.select("loadScalarTypeDefFromID");
10125        query = query.arg_lazy(
10126            "id",
10127            Box::new(move || {
10128                let id = id.clone();
10129                Box::pin(async move { id.into_id().await.unwrap().quote() })
10130            }),
10131        );
10132        ScalarTypeDef {
10133            proc: self.proc.clone(),
10134            selection: query,
10135            graphql_client: self.graphql_client.clone(),
10136        }
10137    }
10138    /// Load a Secret from its ID.
10139    pub fn load_secret_from_id(&self, id: impl IntoID<SecretId>) -> Secret {
10140        let mut query = self.selection.select("loadSecretFromID");
10141        query = query.arg_lazy(
10142            "id",
10143            Box::new(move || {
10144                let id = id.clone();
10145                Box::pin(async move { id.into_id().await.unwrap().quote() })
10146            }),
10147        );
10148        Secret {
10149            proc: self.proc.clone(),
10150            selection: query,
10151            graphql_client: self.graphql_client.clone(),
10152        }
10153    }
10154    /// Load a Secret from its Name.
10155    ///
10156    /// # Arguments
10157    ///
10158    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10159    pub fn load_secret_from_name(&self, name: impl Into<String>) -> Secret {
10160        let mut query = self.selection.select("loadSecretFromName");
10161        query = query.arg("name", name.into());
10162        Secret {
10163            proc: self.proc.clone(),
10164            selection: query,
10165            graphql_client: self.graphql_client.clone(),
10166        }
10167    }
10168    /// Load a Secret from its Name.
10169    ///
10170    /// # Arguments
10171    ///
10172    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10173    pub fn load_secret_from_name_opts<'a>(
10174        &self,
10175        name: impl Into<String>,
10176        opts: QueryLoadSecretFromNameOpts<'a>,
10177    ) -> Secret {
10178        let mut query = self.selection.select("loadSecretFromName");
10179        query = query.arg("name", name.into());
10180        if let Some(accessor) = opts.accessor {
10181            query = query.arg("accessor", accessor);
10182        }
10183        Secret {
10184            proc: self.proc.clone(),
10185            selection: query,
10186            graphql_client: self.graphql_client.clone(),
10187        }
10188    }
10189    /// Load a Service from its ID.
10190    pub fn load_service_from_id(&self, id: impl IntoID<ServiceId>) -> Service {
10191        let mut query = self.selection.select("loadServiceFromID");
10192        query = query.arg_lazy(
10193            "id",
10194            Box::new(move || {
10195                let id = id.clone();
10196                Box::pin(async move { id.into_id().await.unwrap().quote() })
10197            }),
10198        );
10199        Service {
10200            proc: self.proc.clone(),
10201            selection: query,
10202            graphql_client: self.graphql_client.clone(),
10203        }
10204    }
10205    /// Load a Socket from its ID.
10206    pub fn load_socket_from_id(&self, id: impl IntoID<SocketId>) -> Socket {
10207        let mut query = self.selection.select("loadSocketFromID");
10208        query = query.arg_lazy(
10209            "id",
10210            Box::new(move || {
10211                let id = id.clone();
10212                Box::pin(async move { id.into_id().await.unwrap().quote() })
10213            }),
10214        );
10215        Socket {
10216            proc: self.proc.clone(),
10217            selection: query,
10218            graphql_client: self.graphql_client.clone(),
10219        }
10220    }
10221    /// Load a SourceMap from its ID.
10222    pub fn load_source_map_from_id(&self, id: impl IntoID<SourceMapId>) -> SourceMap {
10223        let mut query = self.selection.select("loadSourceMapFromID");
10224        query = query.arg_lazy(
10225            "id",
10226            Box::new(move || {
10227                let id = id.clone();
10228                Box::pin(async move { id.into_id().await.unwrap().quote() })
10229            }),
10230        );
10231        SourceMap {
10232            proc: self.proc.clone(),
10233            selection: query,
10234            graphql_client: self.graphql_client.clone(),
10235        }
10236    }
10237    /// Load a Terminal from its ID.
10238    pub fn load_terminal_from_id(&self, id: impl IntoID<TerminalId>) -> Terminal {
10239        let mut query = self.selection.select("loadTerminalFromID");
10240        query = query.arg_lazy(
10241            "id",
10242            Box::new(move || {
10243                let id = id.clone();
10244                Box::pin(async move { id.into_id().await.unwrap().quote() })
10245            }),
10246        );
10247        Terminal {
10248            proc: self.proc.clone(),
10249            selection: query,
10250            graphql_client: self.graphql_client.clone(),
10251        }
10252    }
10253    /// Load a TypeDef from its ID.
10254    pub fn load_type_def_from_id(&self, id: impl IntoID<TypeDefId>) -> TypeDef {
10255        let mut query = self.selection.select("loadTypeDefFromID");
10256        query = query.arg_lazy(
10257            "id",
10258            Box::new(move || {
10259                let id = id.clone();
10260                Box::pin(async move { id.into_id().await.unwrap().quote() })
10261            }),
10262        );
10263        TypeDef {
10264            proc: self.proc.clone(),
10265            selection: query,
10266            graphql_client: self.graphql_client.clone(),
10267        }
10268    }
10269    /// Create a new module.
10270    pub fn module(&self) -> Module {
10271        let query = self.selection.select("module");
10272        Module {
10273            proc: self.proc.clone(),
10274            selection: query,
10275            graphql_client: self.graphql_client.clone(),
10276        }
10277    }
10278    /// Create a new module source instance from a source ref string
10279    ///
10280    /// # Arguments
10281    ///
10282    /// * `ref_string` - The string ref representation of the module source
10283    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10284    pub fn module_source(&self, ref_string: impl Into<String>) -> ModuleSource {
10285        let mut query = self.selection.select("moduleSource");
10286        query = query.arg("refString", ref_string.into());
10287        ModuleSource {
10288            proc: self.proc.clone(),
10289            selection: query,
10290            graphql_client: self.graphql_client.clone(),
10291        }
10292    }
10293    /// Create a new module source instance from a source ref string
10294    ///
10295    /// # Arguments
10296    ///
10297    /// * `ref_string` - The string ref representation of the module source
10298    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10299    pub fn module_source_opts<'a>(
10300        &self,
10301        ref_string: impl Into<String>,
10302        opts: QueryModuleSourceOpts<'a>,
10303    ) -> ModuleSource {
10304        let mut query = self.selection.select("moduleSource");
10305        query = query.arg("refString", ref_string.into());
10306        if let Some(ref_pin) = opts.ref_pin {
10307            query = query.arg("refPin", ref_pin);
10308        }
10309        if let Some(disable_find_up) = opts.disable_find_up {
10310            query = query.arg("disableFindUp", disable_find_up);
10311        }
10312        if let Some(allow_not_exists) = opts.allow_not_exists {
10313            query = query.arg("allowNotExists", allow_not_exists);
10314        }
10315        if let Some(require_kind) = opts.require_kind {
10316            query = query.arg("requireKind", require_kind);
10317        }
10318        ModuleSource {
10319            proc: self.proc.clone(),
10320            selection: query,
10321            graphql_client: self.graphql_client.clone(),
10322        }
10323    }
10324    /// Creates a new secret.
10325    ///
10326    /// # Arguments
10327    ///
10328    /// * `uri` - The URI of the secret store
10329    pub fn secret(&self, uri: impl Into<String>) -> Secret {
10330        let mut query = self.selection.select("secret");
10331        query = query.arg("uri", uri.into());
10332        Secret {
10333            proc: self.proc.clone(),
10334            selection: query,
10335            graphql_client: self.graphql_client.clone(),
10336        }
10337    }
10338    /// Sets a secret given a user defined name to its plaintext and returns the secret.
10339    /// The plaintext value is limited to a size of 128000 bytes.
10340    ///
10341    /// # Arguments
10342    ///
10343    /// * `name` - The user defined name for this secret
10344    /// * `plaintext` - The plaintext of the secret
10345    pub fn set_secret(&self, name: impl Into<String>, plaintext: impl Into<String>) -> Secret {
10346        let mut query = self.selection.select("setSecret");
10347        query = query.arg("name", name.into());
10348        query = query.arg("plaintext", plaintext.into());
10349        Secret {
10350            proc: self.proc.clone(),
10351            selection: query,
10352            graphql_client: self.graphql_client.clone(),
10353        }
10354    }
10355    /// Creates source map metadata.
10356    ///
10357    /// # Arguments
10358    ///
10359    /// * `filename` - The filename from the module source.
10360    /// * `line` - The line number within the filename.
10361    /// * `column` - The column number within the line.
10362    pub fn source_map(&self, filename: impl Into<String>, line: isize, column: isize) -> SourceMap {
10363        let mut query = self.selection.select("sourceMap");
10364        query = query.arg("filename", filename.into());
10365        query = query.arg("line", line);
10366        query = query.arg("column", column);
10367        SourceMap {
10368            proc: self.proc.clone(),
10369            selection: query,
10370            graphql_client: self.graphql_client.clone(),
10371        }
10372    }
10373    /// Create a new TypeDef.
10374    pub fn type_def(&self) -> TypeDef {
10375        let query = self.selection.select("typeDef");
10376        TypeDef {
10377            proc: self.proc.clone(),
10378            selection: query,
10379            graphql_client: self.graphql_client.clone(),
10380        }
10381    }
10382    /// Get the current Dagger Engine version.
10383    pub async fn version(&self) -> Result<String, DaggerError> {
10384        let query = self.selection.select("version");
10385        query.execute(self.graphql_client.clone()).await
10386    }
10387}
10388#[derive(Clone)]
10389pub struct SdkConfig {
10390    pub proc: Option<Arc<DaggerSessionProc>>,
10391    pub selection: Selection,
10392    pub graphql_client: DynGraphQLClient,
10393}
10394impl SdkConfig {
10395    /// A unique identifier for this SDKConfig.
10396    pub async fn id(&self) -> Result<SdkConfigId, DaggerError> {
10397        let query = self.selection.select("id");
10398        query.execute(self.graphql_client.clone()).await
10399    }
10400    /// Source of the SDK. Either a name of a builtin SDK or a module source ref string pointing to the SDK's implementation.
10401    pub async fn source(&self) -> Result<String, DaggerError> {
10402        let query = self.selection.select("source");
10403        query.execute(self.graphql_client.clone()).await
10404    }
10405}
10406#[derive(Clone)]
10407pub struct ScalarTypeDef {
10408    pub proc: Option<Arc<DaggerSessionProc>>,
10409    pub selection: Selection,
10410    pub graphql_client: DynGraphQLClient,
10411}
10412impl ScalarTypeDef {
10413    /// A doc string for the scalar, if any.
10414    pub async fn description(&self) -> Result<String, DaggerError> {
10415        let query = self.selection.select("description");
10416        query.execute(self.graphql_client.clone()).await
10417    }
10418    /// A unique identifier for this ScalarTypeDef.
10419    pub async fn id(&self) -> Result<ScalarTypeDefId, DaggerError> {
10420        let query = self.selection.select("id");
10421        query.execute(self.graphql_client.clone()).await
10422    }
10423    /// The name of the scalar.
10424    pub async fn name(&self) -> Result<String, DaggerError> {
10425        let query = self.selection.select("name");
10426        query.execute(self.graphql_client.clone()).await
10427    }
10428    /// If this ScalarTypeDef is associated with a Module, the name of the module. Unset otherwise.
10429    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
10430        let query = self.selection.select("sourceModuleName");
10431        query.execute(self.graphql_client.clone()).await
10432    }
10433}
10434#[derive(Clone)]
10435pub struct Secret {
10436    pub proc: Option<Arc<DaggerSessionProc>>,
10437    pub selection: Selection,
10438    pub graphql_client: DynGraphQLClient,
10439}
10440impl Secret {
10441    /// A unique identifier for this Secret.
10442    pub async fn id(&self) -> Result<SecretId, DaggerError> {
10443        let query = self.selection.select("id");
10444        query.execute(self.graphql_client.clone()).await
10445    }
10446    /// The name of this secret.
10447    pub async fn name(&self) -> Result<String, DaggerError> {
10448        let query = self.selection.select("name");
10449        query.execute(self.graphql_client.clone()).await
10450    }
10451    /// The value of this secret.
10452    pub async fn plaintext(&self) -> Result<String, DaggerError> {
10453        let query = self.selection.select("plaintext");
10454        query.execute(self.graphql_client.clone()).await
10455    }
10456    /// The URI of this secret.
10457    pub async fn uri(&self) -> Result<String, DaggerError> {
10458        let query = self.selection.select("uri");
10459        query.execute(self.graphql_client.clone()).await
10460    }
10461}
10462#[derive(Clone)]
10463pub struct Service {
10464    pub proc: Option<Arc<DaggerSessionProc>>,
10465    pub selection: Selection,
10466    pub graphql_client: DynGraphQLClient,
10467}
10468#[derive(Builder, Debug, PartialEq)]
10469pub struct ServiceEndpointOpts<'a> {
10470    /// The exposed port number for the endpoint
10471    #[builder(setter(into, strip_option), default)]
10472    pub port: Option<isize>,
10473    /// Return a URL with the given scheme, eg. http for http://
10474    #[builder(setter(into, strip_option), default)]
10475    pub scheme: Option<&'a str>,
10476}
10477#[derive(Builder, Debug, PartialEq)]
10478pub struct ServiceStopOpts {
10479    /// Immediately kill the service without waiting for a graceful exit
10480    #[builder(setter(into, strip_option), default)]
10481    pub kill: Option<bool>,
10482}
10483#[derive(Builder, Debug, PartialEq)]
10484pub struct ServiceUpOpts {
10485    /// List of frontend/backend port mappings to forward.
10486    /// Frontend is the port accepting traffic on the host, backend is the service port.
10487    #[builder(setter(into, strip_option), default)]
10488    pub ports: Option<Vec<PortForward>>,
10489    /// Bind each tunnel port to a random port on the host.
10490    #[builder(setter(into, strip_option), default)]
10491    pub random: Option<bool>,
10492}
10493impl Service {
10494    /// Retrieves an endpoint that clients can use to reach this container.
10495    /// If no port is specified, the first exposed port is used. If none exist an error is returned.
10496    /// If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.
10497    ///
10498    /// # Arguments
10499    ///
10500    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10501    pub async fn endpoint(&self) -> Result<String, DaggerError> {
10502        let query = self.selection.select("endpoint");
10503        query.execute(self.graphql_client.clone()).await
10504    }
10505    /// Retrieves an endpoint that clients can use to reach this container.
10506    /// If no port is specified, the first exposed port is used. If none exist an error is returned.
10507    /// If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.
10508    ///
10509    /// # Arguments
10510    ///
10511    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10512    pub async fn endpoint_opts<'a>(
10513        &self,
10514        opts: ServiceEndpointOpts<'a>,
10515    ) -> Result<String, DaggerError> {
10516        let mut query = self.selection.select("endpoint");
10517        if let Some(port) = opts.port {
10518            query = query.arg("port", port);
10519        }
10520        if let Some(scheme) = opts.scheme {
10521            query = query.arg("scheme", scheme);
10522        }
10523        query.execute(self.graphql_client.clone()).await
10524    }
10525    /// Retrieves a hostname which can be used by clients to reach this container.
10526    pub async fn hostname(&self) -> Result<String, DaggerError> {
10527        let query = self.selection.select("hostname");
10528        query.execute(self.graphql_client.clone()).await
10529    }
10530    /// A unique identifier for this Service.
10531    pub async fn id(&self) -> Result<ServiceId, DaggerError> {
10532        let query = self.selection.select("id");
10533        query.execute(self.graphql_client.clone()).await
10534    }
10535    /// Retrieves the list of ports provided by the service.
10536    pub fn ports(&self) -> Vec<Port> {
10537        let query = self.selection.select("ports");
10538        vec![Port {
10539            proc: self.proc.clone(),
10540            selection: query,
10541            graphql_client: self.graphql_client.clone(),
10542        }]
10543    }
10544    /// Start the service and wait for its health checks to succeed.
10545    /// Services bound to a Container do not need to be manually started.
10546    pub async fn start(&self) -> Result<ServiceId, DaggerError> {
10547        let query = self.selection.select("start");
10548        query.execute(self.graphql_client.clone()).await
10549    }
10550    /// Stop the service.
10551    ///
10552    /// # Arguments
10553    ///
10554    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10555    pub async fn stop(&self) -> Result<ServiceId, DaggerError> {
10556        let query = self.selection.select("stop");
10557        query.execute(self.graphql_client.clone()).await
10558    }
10559    /// Stop the service.
10560    ///
10561    /// # Arguments
10562    ///
10563    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10564    pub async fn stop_opts(&self, opts: ServiceStopOpts) -> Result<ServiceId, DaggerError> {
10565        let mut query = self.selection.select("stop");
10566        if let Some(kill) = opts.kill {
10567            query = query.arg("kill", kill);
10568        }
10569        query.execute(self.graphql_client.clone()).await
10570    }
10571    /// Creates a tunnel that forwards traffic from the caller's network to this service.
10572    ///
10573    /// # Arguments
10574    ///
10575    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10576    pub async fn up(&self) -> Result<Void, DaggerError> {
10577        let query = self.selection.select("up");
10578        query.execute(self.graphql_client.clone()).await
10579    }
10580    /// Creates a tunnel that forwards traffic from the caller's network to this service.
10581    ///
10582    /// # Arguments
10583    ///
10584    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10585    pub async fn up_opts(&self, opts: ServiceUpOpts) -> Result<Void, DaggerError> {
10586        let mut query = self.selection.select("up");
10587        if let Some(ports) = opts.ports {
10588            query = query.arg("ports", ports);
10589        }
10590        if let Some(random) = opts.random {
10591            query = query.arg("random", random);
10592        }
10593        query.execute(self.graphql_client.clone()).await
10594    }
10595    /// Configures a hostname which can be used by clients within the session to reach this container.
10596    ///
10597    /// # Arguments
10598    ///
10599    /// * `hostname` - The hostname to use.
10600    pub fn with_hostname(&self, hostname: impl Into<String>) -> Service {
10601        let mut query = self.selection.select("withHostname");
10602        query = query.arg("hostname", hostname.into());
10603        Service {
10604            proc: self.proc.clone(),
10605            selection: query,
10606            graphql_client: self.graphql_client.clone(),
10607        }
10608    }
10609}
10610#[derive(Clone)]
10611pub struct Socket {
10612    pub proc: Option<Arc<DaggerSessionProc>>,
10613    pub selection: Selection,
10614    pub graphql_client: DynGraphQLClient,
10615}
10616impl Socket {
10617    /// A unique identifier for this Socket.
10618    pub async fn id(&self) -> Result<SocketId, DaggerError> {
10619        let query = self.selection.select("id");
10620        query.execute(self.graphql_client.clone()).await
10621    }
10622}
10623#[derive(Clone)]
10624pub struct SourceMap {
10625    pub proc: Option<Arc<DaggerSessionProc>>,
10626    pub selection: Selection,
10627    pub graphql_client: DynGraphQLClient,
10628}
10629impl SourceMap {
10630    /// The column number within the line.
10631    pub async fn column(&self) -> Result<isize, DaggerError> {
10632        let query = self.selection.select("column");
10633        query.execute(self.graphql_client.clone()).await
10634    }
10635    /// The filename from the module source.
10636    pub async fn filename(&self) -> Result<String, DaggerError> {
10637        let query = self.selection.select("filename");
10638        query.execute(self.graphql_client.clone()).await
10639    }
10640    /// A unique identifier for this SourceMap.
10641    pub async fn id(&self) -> Result<SourceMapId, DaggerError> {
10642        let query = self.selection.select("id");
10643        query.execute(self.graphql_client.clone()).await
10644    }
10645    /// The line number within the filename.
10646    pub async fn line(&self) -> Result<isize, DaggerError> {
10647        let query = self.selection.select("line");
10648        query.execute(self.graphql_client.clone()).await
10649    }
10650    /// The module dependency this was declared in.
10651    pub async fn module(&self) -> Result<String, DaggerError> {
10652        let query = self.selection.select("module");
10653        query.execute(self.graphql_client.clone()).await
10654    }
10655}
10656#[derive(Clone)]
10657pub struct Terminal {
10658    pub proc: Option<Arc<DaggerSessionProc>>,
10659    pub selection: Selection,
10660    pub graphql_client: DynGraphQLClient,
10661}
10662impl Terminal {
10663    /// A unique identifier for this Terminal.
10664    pub async fn id(&self) -> Result<TerminalId, DaggerError> {
10665        let query = self.selection.select("id");
10666        query.execute(self.graphql_client.clone()).await
10667    }
10668    /// Forces evaluation of the pipeline in the engine.
10669    /// It doesn't run the default command if no exec has been set.
10670    pub async fn sync(&self) -> Result<TerminalId, DaggerError> {
10671        let query = self.selection.select("sync");
10672        query.execute(self.graphql_client.clone()).await
10673    }
10674}
10675#[derive(Clone)]
10676pub struct TypeDef {
10677    pub proc: Option<Arc<DaggerSessionProc>>,
10678    pub selection: Selection,
10679    pub graphql_client: DynGraphQLClient,
10680}
10681#[derive(Builder, Debug, PartialEq)]
10682pub struct TypeDefWithEnumOpts<'a> {
10683    /// A doc string for the enum, if any
10684    #[builder(setter(into, strip_option), default)]
10685    pub description: Option<&'a str>,
10686    /// The source map for the enum definition.
10687    #[builder(setter(into, strip_option), default)]
10688    pub source_map: Option<SourceMapId>,
10689}
10690#[derive(Builder, Debug, PartialEq)]
10691pub struct TypeDefWithEnumValueOpts<'a> {
10692    /// A doc string for the value, if any
10693    #[builder(setter(into, strip_option), default)]
10694    pub description: Option<&'a str>,
10695    /// The source map for the enum value definition.
10696    #[builder(setter(into, strip_option), default)]
10697    pub source_map: Option<SourceMapId>,
10698}
10699#[derive(Builder, Debug, PartialEq)]
10700pub struct TypeDefWithFieldOpts<'a> {
10701    /// A doc string for the field, if any
10702    #[builder(setter(into, strip_option), default)]
10703    pub description: Option<&'a str>,
10704    /// The source map for the field definition.
10705    #[builder(setter(into, strip_option), default)]
10706    pub source_map: Option<SourceMapId>,
10707}
10708#[derive(Builder, Debug, PartialEq)]
10709pub struct TypeDefWithInterfaceOpts<'a> {
10710    #[builder(setter(into, strip_option), default)]
10711    pub description: Option<&'a str>,
10712    #[builder(setter(into, strip_option), default)]
10713    pub source_map: Option<SourceMapId>,
10714}
10715#[derive(Builder, Debug, PartialEq)]
10716pub struct TypeDefWithObjectOpts<'a> {
10717    #[builder(setter(into, strip_option), default)]
10718    pub description: Option<&'a str>,
10719    #[builder(setter(into, strip_option), default)]
10720    pub source_map: Option<SourceMapId>,
10721}
10722#[derive(Builder, Debug, PartialEq)]
10723pub struct TypeDefWithScalarOpts<'a> {
10724    #[builder(setter(into, strip_option), default)]
10725    pub description: Option<&'a str>,
10726}
10727impl TypeDef {
10728    /// If kind is ENUM, the enum-specific type definition. If kind is not ENUM, this will be null.
10729    pub fn as_enum(&self) -> EnumTypeDef {
10730        let query = self.selection.select("asEnum");
10731        EnumTypeDef {
10732            proc: self.proc.clone(),
10733            selection: query,
10734            graphql_client: self.graphql_client.clone(),
10735        }
10736    }
10737    /// If kind is INPUT, the input-specific type definition. If kind is not INPUT, this will be null.
10738    pub fn as_input(&self) -> InputTypeDef {
10739        let query = self.selection.select("asInput");
10740        InputTypeDef {
10741            proc: self.proc.clone(),
10742            selection: query,
10743            graphql_client: self.graphql_client.clone(),
10744        }
10745    }
10746    /// If kind is INTERFACE, the interface-specific type definition. If kind is not INTERFACE, this will be null.
10747    pub fn as_interface(&self) -> InterfaceTypeDef {
10748        let query = self.selection.select("asInterface");
10749        InterfaceTypeDef {
10750            proc: self.proc.clone(),
10751            selection: query,
10752            graphql_client: self.graphql_client.clone(),
10753        }
10754    }
10755    /// If kind is LIST, the list-specific type definition. If kind is not LIST, this will be null.
10756    pub fn as_list(&self) -> ListTypeDef {
10757        let query = self.selection.select("asList");
10758        ListTypeDef {
10759            proc: self.proc.clone(),
10760            selection: query,
10761            graphql_client: self.graphql_client.clone(),
10762        }
10763    }
10764    /// If kind is OBJECT, the object-specific type definition. If kind is not OBJECT, this will be null.
10765    pub fn as_object(&self) -> ObjectTypeDef {
10766        let query = self.selection.select("asObject");
10767        ObjectTypeDef {
10768            proc: self.proc.clone(),
10769            selection: query,
10770            graphql_client: self.graphql_client.clone(),
10771        }
10772    }
10773    /// If kind is SCALAR, the scalar-specific type definition. If kind is not SCALAR, this will be null.
10774    pub fn as_scalar(&self) -> ScalarTypeDef {
10775        let query = self.selection.select("asScalar");
10776        ScalarTypeDef {
10777            proc: self.proc.clone(),
10778            selection: query,
10779            graphql_client: self.graphql_client.clone(),
10780        }
10781    }
10782    /// A unique identifier for this TypeDef.
10783    pub async fn id(&self) -> Result<TypeDefId, DaggerError> {
10784        let query = self.selection.select("id");
10785        query.execute(self.graphql_client.clone()).await
10786    }
10787    /// The kind of type this is (e.g. primitive, list, object).
10788    pub async fn kind(&self) -> Result<TypeDefKind, DaggerError> {
10789        let query = self.selection.select("kind");
10790        query.execute(self.graphql_client.clone()).await
10791    }
10792    /// Whether this type can be set to null. Defaults to false.
10793    pub async fn optional(&self) -> Result<bool, DaggerError> {
10794        let query = self.selection.select("optional");
10795        query.execute(self.graphql_client.clone()).await
10796    }
10797    /// Adds a function for constructing a new instance of an Object TypeDef, failing if the type is not an object.
10798    pub fn with_constructor(&self, function: impl IntoID<FunctionId>) -> TypeDef {
10799        let mut query = self.selection.select("withConstructor");
10800        query = query.arg_lazy(
10801            "function",
10802            Box::new(move || {
10803                let function = function.clone();
10804                Box::pin(async move { function.into_id().await.unwrap().quote() })
10805            }),
10806        );
10807        TypeDef {
10808            proc: self.proc.clone(),
10809            selection: query,
10810            graphql_client: self.graphql_client.clone(),
10811        }
10812    }
10813    /// Returns a TypeDef of kind Enum with the provided name.
10814    /// 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.
10815    ///
10816    /// # Arguments
10817    ///
10818    /// * `name` - The name of the enum
10819    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10820    pub fn with_enum(&self, name: impl Into<String>) -> TypeDef {
10821        let mut query = self.selection.select("withEnum");
10822        query = query.arg("name", name.into());
10823        TypeDef {
10824            proc: self.proc.clone(),
10825            selection: query,
10826            graphql_client: self.graphql_client.clone(),
10827        }
10828    }
10829    /// Returns a TypeDef of kind Enum with the provided name.
10830    /// 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.
10831    ///
10832    /// # Arguments
10833    ///
10834    /// * `name` - The name of the enum
10835    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10836    pub fn with_enum_opts<'a>(
10837        &self,
10838        name: impl Into<String>,
10839        opts: TypeDefWithEnumOpts<'a>,
10840    ) -> TypeDef {
10841        let mut query = self.selection.select("withEnum");
10842        query = query.arg("name", name.into());
10843        if let Some(description) = opts.description {
10844            query = query.arg("description", description);
10845        }
10846        if let Some(source_map) = opts.source_map {
10847            query = query.arg("sourceMap", source_map);
10848        }
10849        TypeDef {
10850            proc: self.proc.clone(),
10851            selection: query,
10852            graphql_client: self.graphql_client.clone(),
10853        }
10854    }
10855    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
10856    ///
10857    /// # Arguments
10858    ///
10859    /// * `value` - The name of the value in the enum
10860    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10861    pub fn with_enum_value(&self, value: impl Into<String>) -> TypeDef {
10862        let mut query = self.selection.select("withEnumValue");
10863        query = query.arg("value", value.into());
10864        TypeDef {
10865            proc: self.proc.clone(),
10866            selection: query,
10867            graphql_client: self.graphql_client.clone(),
10868        }
10869    }
10870    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
10871    ///
10872    /// # Arguments
10873    ///
10874    /// * `value` - The name of the value in the enum
10875    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10876    pub fn with_enum_value_opts<'a>(
10877        &self,
10878        value: impl Into<String>,
10879        opts: TypeDefWithEnumValueOpts<'a>,
10880    ) -> TypeDef {
10881        let mut query = self.selection.select("withEnumValue");
10882        query = query.arg("value", value.into());
10883        if let Some(description) = opts.description {
10884            query = query.arg("description", description);
10885        }
10886        if let Some(source_map) = opts.source_map {
10887            query = query.arg("sourceMap", source_map);
10888        }
10889        TypeDef {
10890            proc: self.proc.clone(),
10891            selection: query,
10892            graphql_client: self.graphql_client.clone(),
10893        }
10894    }
10895    /// Adds a static field for an Object TypeDef, failing if the type is not an object.
10896    ///
10897    /// # Arguments
10898    ///
10899    /// * `name` - The name of the field in the object
10900    /// * `type_def` - The type of the field
10901    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10902    pub fn with_field(&self, name: impl Into<String>, type_def: impl IntoID<TypeDefId>) -> TypeDef {
10903        let mut query = self.selection.select("withField");
10904        query = query.arg("name", name.into());
10905        query = query.arg_lazy(
10906            "typeDef",
10907            Box::new(move || {
10908                let type_def = type_def.clone();
10909                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
10910            }),
10911        );
10912        TypeDef {
10913            proc: self.proc.clone(),
10914            selection: query,
10915            graphql_client: self.graphql_client.clone(),
10916        }
10917    }
10918    /// Adds a static field for an Object TypeDef, failing if the type is not an object.
10919    ///
10920    /// # Arguments
10921    ///
10922    /// * `name` - The name of the field in the object
10923    /// * `type_def` - The type of the field
10924    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10925    pub fn with_field_opts<'a>(
10926        &self,
10927        name: impl Into<String>,
10928        type_def: impl IntoID<TypeDefId>,
10929        opts: TypeDefWithFieldOpts<'a>,
10930    ) -> TypeDef {
10931        let mut query = self.selection.select("withField");
10932        query = query.arg("name", name.into());
10933        query = query.arg_lazy(
10934            "typeDef",
10935            Box::new(move || {
10936                let type_def = type_def.clone();
10937                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
10938            }),
10939        );
10940        if let Some(description) = opts.description {
10941            query = query.arg("description", description);
10942        }
10943        if let Some(source_map) = opts.source_map {
10944            query = query.arg("sourceMap", source_map);
10945        }
10946        TypeDef {
10947            proc: self.proc.clone(),
10948            selection: query,
10949            graphql_client: self.graphql_client.clone(),
10950        }
10951    }
10952    /// Adds a function for an Object or Interface TypeDef, failing if the type is not one of those kinds.
10953    pub fn with_function(&self, function: impl IntoID<FunctionId>) -> TypeDef {
10954        let mut query = self.selection.select("withFunction");
10955        query = query.arg_lazy(
10956            "function",
10957            Box::new(move || {
10958                let function = function.clone();
10959                Box::pin(async move { function.into_id().await.unwrap().quote() })
10960            }),
10961        );
10962        TypeDef {
10963            proc: self.proc.clone(),
10964            selection: query,
10965            graphql_client: self.graphql_client.clone(),
10966        }
10967    }
10968    /// Returns a TypeDef of kind Interface with the provided name.
10969    ///
10970    /// # Arguments
10971    ///
10972    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10973    pub fn with_interface(&self, name: impl Into<String>) -> TypeDef {
10974        let mut query = self.selection.select("withInterface");
10975        query = query.arg("name", name.into());
10976        TypeDef {
10977            proc: self.proc.clone(),
10978            selection: query,
10979            graphql_client: self.graphql_client.clone(),
10980        }
10981    }
10982    /// Returns a TypeDef of kind Interface with the provided name.
10983    ///
10984    /// # Arguments
10985    ///
10986    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10987    pub fn with_interface_opts<'a>(
10988        &self,
10989        name: impl Into<String>,
10990        opts: TypeDefWithInterfaceOpts<'a>,
10991    ) -> TypeDef {
10992        let mut query = self.selection.select("withInterface");
10993        query = query.arg("name", name.into());
10994        if let Some(description) = opts.description {
10995            query = query.arg("description", description);
10996        }
10997        if let Some(source_map) = opts.source_map {
10998            query = query.arg("sourceMap", source_map);
10999        }
11000        TypeDef {
11001            proc: self.proc.clone(),
11002            selection: query,
11003            graphql_client: self.graphql_client.clone(),
11004        }
11005    }
11006    /// Sets the kind of the type.
11007    pub fn with_kind(&self, kind: TypeDefKind) -> TypeDef {
11008        let mut query = self.selection.select("withKind");
11009        query = query.arg("kind", kind);
11010        TypeDef {
11011            proc: self.proc.clone(),
11012            selection: query,
11013            graphql_client: self.graphql_client.clone(),
11014        }
11015    }
11016    /// Returns a TypeDef of kind List with the provided type for its elements.
11017    pub fn with_list_of(&self, element_type: impl IntoID<TypeDefId>) -> TypeDef {
11018        let mut query = self.selection.select("withListOf");
11019        query = query.arg_lazy(
11020            "elementType",
11021            Box::new(move || {
11022                let element_type = element_type.clone();
11023                Box::pin(async move { element_type.into_id().await.unwrap().quote() })
11024            }),
11025        );
11026        TypeDef {
11027            proc: self.proc.clone(),
11028            selection: query,
11029            graphql_client: self.graphql_client.clone(),
11030        }
11031    }
11032    /// Returns a TypeDef of kind Object with the provided name.
11033    /// 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.
11034    ///
11035    /// # Arguments
11036    ///
11037    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11038    pub fn with_object(&self, name: impl Into<String>) -> TypeDef {
11039        let mut query = self.selection.select("withObject");
11040        query = query.arg("name", name.into());
11041        TypeDef {
11042            proc: self.proc.clone(),
11043            selection: query,
11044            graphql_client: self.graphql_client.clone(),
11045        }
11046    }
11047    /// Returns a TypeDef of kind Object with the provided name.
11048    /// 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.
11049    ///
11050    /// # Arguments
11051    ///
11052    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11053    pub fn with_object_opts<'a>(
11054        &self,
11055        name: impl Into<String>,
11056        opts: TypeDefWithObjectOpts<'a>,
11057    ) -> TypeDef {
11058        let mut query = self.selection.select("withObject");
11059        query = query.arg("name", name.into());
11060        if let Some(description) = opts.description {
11061            query = query.arg("description", description);
11062        }
11063        if let Some(source_map) = opts.source_map {
11064            query = query.arg("sourceMap", source_map);
11065        }
11066        TypeDef {
11067            proc: self.proc.clone(),
11068            selection: query,
11069            graphql_client: self.graphql_client.clone(),
11070        }
11071    }
11072    /// Sets whether this type can be set to null.
11073    pub fn with_optional(&self, optional: bool) -> TypeDef {
11074        let mut query = self.selection.select("withOptional");
11075        query = query.arg("optional", optional);
11076        TypeDef {
11077            proc: self.proc.clone(),
11078            selection: query,
11079            graphql_client: self.graphql_client.clone(),
11080        }
11081    }
11082    /// Returns a TypeDef of kind Scalar with the provided name.
11083    ///
11084    /// # Arguments
11085    ///
11086    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11087    pub fn with_scalar(&self, name: impl Into<String>) -> TypeDef {
11088        let mut query = self.selection.select("withScalar");
11089        query = query.arg("name", name.into());
11090        TypeDef {
11091            proc: self.proc.clone(),
11092            selection: query,
11093            graphql_client: self.graphql_client.clone(),
11094        }
11095    }
11096    /// Returns a TypeDef of kind Scalar with the provided name.
11097    ///
11098    /// # Arguments
11099    ///
11100    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11101    pub fn with_scalar_opts<'a>(
11102        &self,
11103        name: impl Into<String>,
11104        opts: TypeDefWithScalarOpts<'a>,
11105    ) -> TypeDef {
11106        let mut query = self.selection.select("withScalar");
11107        query = query.arg("name", name.into());
11108        if let Some(description) = opts.description {
11109            query = query.arg("description", description);
11110        }
11111        TypeDef {
11112            proc: self.proc.clone(),
11113            selection: query,
11114            graphql_client: self.graphql_client.clone(),
11115        }
11116    }
11117}
11118#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
11119pub enum CacheSharingMode {
11120    #[serde(rename = "LOCKED")]
11121    Locked,
11122    #[serde(rename = "PRIVATE")]
11123    Private,
11124    #[serde(rename = "SHARED")]
11125    Shared,
11126}
11127#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
11128pub enum ImageLayerCompression {
11129    #[serde(rename = "EStarGZ")]
11130    EStarGz,
11131    #[serde(rename = "Gzip")]
11132    Gzip,
11133    #[serde(rename = "Uncompressed")]
11134    Uncompressed,
11135    #[serde(rename = "Zstd")]
11136    Zstd,
11137}
11138#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
11139pub enum ImageMediaTypes {
11140    #[serde(rename = "DockerMediaTypes")]
11141    DockerMediaTypes,
11142    #[serde(rename = "OCIMediaTypes")]
11143    OciMediaTypes,
11144}
11145#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
11146pub enum ModuleSourceKind {
11147    #[serde(rename = "DIR_SOURCE")]
11148    DirSource,
11149    #[serde(rename = "GIT_SOURCE")]
11150    GitSource,
11151    #[serde(rename = "LOCAL_SOURCE")]
11152    LocalSource,
11153}
11154#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
11155pub enum NetworkProtocol {
11156    #[serde(rename = "TCP")]
11157    Tcp,
11158    #[serde(rename = "UDP")]
11159    Udp,
11160}
11161#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
11162pub enum ReturnType {
11163    #[serde(rename = "ANY")]
11164    Any,
11165    #[serde(rename = "FAILURE")]
11166    Failure,
11167    #[serde(rename = "SUCCESS")]
11168    Success,
11169}
11170#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
11171pub enum TypeDefKind {
11172    #[serde(rename = "BOOLEAN_KIND")]
11173    BooleanKind,
11174    #[serde(rename = "ENUM_KIND")]
11175    EnumKind,
11176    #[serde(rename = "FLOAT_KIND")]
11177    FloatKind,
11178    #[serde(rename = "INPUT_KIND")]
11179    InputKind,
11180    #[serde(rename = "INTEGER_KIND")]
11181    IntegerKind,
11182    #[serde(rename = "INTERFACE_KIND")]
11183    InterfaceKind,
11184    #[serde(rename = "LIST_KIND")]
11185    ListKind,
11186    #[serde(rename = "OBJECT_KIND")]
11187    ObjectKind,
11188    #[serde(rename = "SCALAR_KIND")]
11189    ScalarKind,
11190    #[serde(rename = "STRING_KIND")]
11191    StringKind,
11192    #[serde(rename = "VOID_KIND")]
11193    VoidKind,
11194}